deleteQualificationType method

Future<void> deleteQualificationType({
  1. required String qualificationTypeId,
})

The DeleteQualificationType deletes a Qualification type and deletes any HIT types that are associated with the Qualification type.

This operation does not revoke Qualifications already assigned to Workers because the Qualifications might be needed for active HITs. If there are any pending requests for the Qualification type, Amazon Mechanical Turk rejects those requests. After you delete a Qualification type, you can no longer use it to create HITs or HIT types.

May throw ServiceFault. May throw RequestError.

Parameter qualificationTypeId : The ID of the QualificationType to dispose.

Implementation

Future<void> deleteQualificationType({
  required String qualificationTypeId,
}) async {
  ArgumentError.checkNotNull(qualificationTypeId, 'qualificationTypeId');
  _s.validateStringLength(
    'qualificationTypeId',
    qualificationTypeId,
    1,
    64,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'MTurkRequesterServiceV20170117.DeleteQualificationType'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'QualificationTypeId': qualificationTypeId,
    },
  );
}