startAnnotationImportJob method

Future<StartAnnotationImportResponse> startAnnotationImportJob({
  1. required String destinationName,
  2. required List<AnnotationImportItemSource> items,
  3. required String roleArn,
  4. Map<String, String>? annotationFields,
  5. FormatOptions? formatOptions,
  6. bool? runLeftNormalization,
  7. String? versionName,
})
Starts an annotation import job.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ServiceQuotaExceededException. May throw ThrottlingException. May throw ValidationException.

Parameter destinationName : A destination annotation store for the job.

Parameter items : Items to import.

Parameter roleArn : A service role for the job.

Parameter annotationFields : The annotation schema generated by the parsed annotation data.

Parameter formatOptions : Formatting options for the annotation file.

Parameter runLeftNormalization : The job's left normalization setting.

Parameter versionName : The name of the annotation store version.

Implementation

Future<StartAnnotationImportResponse> startAnnotationImportJob({
  required String destinationName,
  required List<AnnotationImportItemSource> items,
  required String roleArn,
  Map<String, String>? annotationFields,
  FormatOptions? formatOptions,
  bool? runLeftNormalization,
  String? versionName,
}) async {
  final $payload = <String, dynamic>{
    'destinationName': destinationName,
    'items': items,
    'roleArn': roleArn,
    if (annotationFields != null) 'annotationFields': annotationFields,
    if (formatOptions != null) 'formatOptions': formatOptions,
    if (runLeftNormalization != null)
      'runLeftNormalization': runLeftNormalization,
    if (versionName != null) 'versionName': versionName,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/import/annotation',
    exceptionFnMap: _exceptionFns,
  );
  return StartAnnotationImportResponse.fromJson(response);
}