updateHITTypeOfHIT method

Future<void> updateHITTypeOfHIT({
  1. required String hITId,
  2. required String hITTypeId,
})

The UpdateHITTypeOfHIT operation allows you to change the HITType properties of a HIT. This operation disassociates the HIT from its old HITType properties and associates it with the new HITType properties. The HIT takes on the properties of the new HITType in place of the old ones.

May throw ServiceFault. May throw RequestError.

Parameter hITId : The HIT to update.

Parameter hITTypeId : The ID of the new HIT type.

Implementation

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