listTextTranslationJobs method

Future<ListTextTranslationJobsResponse> listTextTranslationJobs({
  1. TextTranslationJobFilter? filter,
  2. int? maxResults,
  3. String? nextToken,
})

Gets a list of the batch translation jobs that you have submitted.

May throw InvalidRequestException. May throw TooManyRequestsException. May throw InvalidFilterException. May throw InternalServerException.

Parameter filter : The parameters that specify which batch translation jobs to retrieve. Filters include job name, job status, and submission time. You can only set one filter at a time.

Parameter maxResults : The maximum number of results to return in each page. The default value is 100.

Parameter nextToken : The token to request the next page of results.

Implementation

Future<ListTextTranslationJobsResponse> listTextTranslationJobs({
  TextTranslationJobFilter? filter,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    500,
  );
  _s.validateStringLength(
    'nextToken',
    nextToken,
    0,
    8192,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSShineFrontendService_20170701.ListTextTranslationJobs'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (filter != null) 'Filter': filter,
      if (maxResults != null) 'MaxResults': maxResults,
      if (nextToken != null) 'NextToken': nextToken,
    },
  );

  return ListTextTranslationJobsResponse.fromJson(jsonResponse.body);
}