listHarvestJobs method

Future<ListHarvestJobsResponse> listHarvestJobs({
  1. String? includeChannelId,
  2. String? includeStatus,
  3. int? maxResults,
  4. String? nextToken,
})

Returns a collection of HarvestJob records.

May throw UnprocessableEntityException. May throw InternalServerErrorException. May throw ForbiddenException. May throw NotFoundException. May throw ServiceUnavailableException. May throw TooManyRequestsException.

Parameter includeChannelId : When specified, the request will return only HarvestJobs associated with the given Channel ID.

Parameter includeStatus : When specified, the request will return only HarvestJobs in the given status.

Parameter maxResults : The upper bound on the number of records to return.

Parameter nextToken : A token used to resume pagination from the end of a previous request.

Implementation

Future<ListHarvestJobsResponse> listHarvestJobs({
  String? includeChannelId,
  String? includeStatus,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    1000,
  );
  final $query = <String, List<String>>{
    if (includeChannelId != null) 'includeChannelId': [includeChannelId],
    if (includeStatus != null) 'includeStatus': [includeStatus],
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/harvest_jobs',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListHarvestJobsResponse.fromJson(response);
}