listMedicalScribeJobs method

Future<ListMedicalScribeJobsResponse> listMedicalScribeJobs({
  1. String? jobNameContains,
  2. int? maxResults,
  3. String? nextToken,
  4. MedicalScribeJobStatus? status,
})

Provides a list of Medical Scribe jobs that match the specified criteria. If no criteria are specified, all Medical Scribe jobs are returned.

To get detailed information about a specific Medical Scribe job, use the operation.

May throw BadRequestException. May throw InternalFailureException. May throw LimitExceededException.

Parameter jobNameContains : Returns only the Medical Scribe jobs that contain the specified string. The search is not case sensitive.

Parameter maxResults : The maximum number of Medical Scribe jobs to return in each page of results. If there are fewer results than the value that you specify, only the actual results are returned. If you do not specify a value, a default of 5 is used.

Parameter nextToken : If your ListMedicalScribeJobs request returns more results than can be displayed, NextToken is displayed in the response with an associated string. To get the next page of results, copy this string and repeat your request, including NextToken with the value of the copied string. Repeat as needed to view all your results.

Parameter status : Returns only Medical Scribe jobs with the specified status. Jobs are ordered by creation date, with the newest job first. If you do not include Status, all Medical Scribe jobs are returned.

Implementation

Future<ListMedicalScribeJobsResponse> listMedicalScribeJobs({
  String? jobNameContains,
  int? maxResults,
  String? nextToken,
  MedicalScribeJobStatus? status,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'Transcribe.ListMedicalScribeJobs'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (jobNameContains != null) 'JobNameContains': jobNameContains,
      if (maxResults != null) 'MaxResults': maxResults,
      if (nextToken != null) 'NextToken': nextToken,
      if (status != null) 'Status': status.value,
    },
  );

  return ListMedicalScribeJobsResponse.fromJson(jsonResponse.body);
}