@aws-sdk/client-mturk 3.312.0 → 3.316.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,238 +9,238 @@ const MTurkServiceException_1 = require("../models/MTurkServiceException");
9
9
  const se_AcceptQualificationRequestCommand = async (input, context) => {
10
10
  const headers = sharedHeaders("AcceptQualificationRequest");
11
11
  let body;
12
- body = JSON.stringify(se_AcceptQualificationRequestRequest(input, context));
12
+ body = JSON.stringify((0, smithy_client_1._json)(input));
13
13
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
14
14
  };
15
15
  exports.se_AcceptQualificationRequestCommand = se_AcceptQualificationRequestCommand;
16
16
  const se_ApproveAssignmentCommand = async (input, context) => {
17
17
  const headers = sharedHeaders("ApproveAssignment");
18
18
  let body;
19
- body = JSON.stringify(se_ApproveAssignmentRequest(input, context));
19
+ body = JSON.stringify((0, smithy_client_1._json)(input));
20
20
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
21
21
  };
22
22
  exports.se_ApproveAssignmentCommand = se_ApproveAssignmentCommand;
23
23
  const se_AssociateQualificationWithWorkerCommand = async (input, context) => {
24
24
  const headers = sharedHeaders("AssociateQualificationWithWorker");
25
25
  let body;
26
- body = JSON.stringify(se_AssociateQualificationWithWorkerRequest(input, context));
26
+ body = JSON.stringify((0, smithy_client_1._json)(input));
27
27
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
28
28
  };
29
29
  exports.se_AssociateQualificationWithWorkerCommand = se_AssociateQualificationWithWorkerCommand;
30
30
  const se_CreateAdditionalAssignmentsForHITCommand = async (input, context) => {
31
31
  const headers = sharedHeaders("CreateAdditionalAssignmentsForHIT");
32
32
  let body;
33
- body = JSON.stringify(se_CreateAdditionalAssignmentsForHITRequest(input, context));
33
+ body = JSON.stringify((0, smithy_client_1._json)(input));
34
34
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
35
35
  };
36
36
  exports.se_CreateAdditionalAssignmentsForHITCommand = se_CreateAdditionalAssignmentsForHITCommand;
37
37
  const se_CreateHITCommand = async (input, context) => {
38
38
  const headers = sharedHeaders("CreateHIT");
39
39
  let body;
40
- body = JSON.stringify(se_CreateHITRequest(input, context));
40
+ body = JSON.stringify((0, smithy_client_1._json)(input));
41
41
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
42
42
  };
43
43
  exports.se_CreateHITCommand = se_CreateHITCommand;
44
44
  const se_CreateHITTypeCommand = async (input, context) => {
45
45
  const headers = sharedHeaders("CreateHITType");
46
46
  let body;
47
- body = JSON.stringify(se_CreateHITTypeRequest(input, context));
47
+ body = JSON.stringify((0, smithy_client_1._json)(input));
48
48
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
49
49
  };
50
50
  exports.se_CreateHITTypeCommand = se_CreateHITTypeCommand;
51
51
  const se_CreateHITWithHITTypeCommand = async (input, context) => {
52
52
  const headers = sharedHeaders("CreateHITWithHITType");
53
53
  let body;
54
- body = JSON.stringify(se_CreateHITWithHITTypeRequest(input, context));
54
+ body = JSON.stringify((0, smithy_client_1._json)(input));
55
55
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
56
56
  };
57
57
  exports.se_CreateHITWithHITTypeCommand = se_CreateHITWithHITTypeCommand;
58
58
  const se_CreateQualificationTypeCommand = async (input, context) => {
59
59
  const headers = sharedHeaders("CreateQualificationType");
60
60
  let body;
61
- body = JSON.stringify(se_CreateQualificationTypeRequest(input, context));
61
+ body = JSON.stringify((0, smithy_client_1._json)(input));
62
62
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
63
63
  };
64
64
  exports.se_CreateQualificationTypeCommand = se_CreateQualificationTypeCommand;
65
65
  const se_CreateWorkerBlockCommand = async (input, context) => {
66
66
  const headers = sharedHeaders("CreateWorkerBlock");
67
67
  let body;
68
- body = JSON.stringify(se_CreateWorkerBlockRequest(input, context));
68
+ body = JSON.stringify((0, smithy_client_1._json)(input));
69
69
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
70
70
  };
71
71
  exports.se_CreateWorkerBlockCommand = se_CreateWorkerBlockCommand;
72
72
  const se_DeleteHITCommand = async (input, context) => {
73
73
  const headers = sharedHeaders("DeleteHIT");
74
74
  let body;
75
- body = JSON.stringify(se_DeleteHITRequest(input, context));
75
+ body = JSON.stringify((0, smithy_client_1._json)(input));
76
76
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
77
77
  };
78
78
  exports.se_DeleteHITCommand = se_DeleteHITCommand;
79
79
  const se_DeleteQualificationTypeCommand = async (input, context) => {
80
80
  const headers = sharedHeaders("DeleteQualificationType");
81
81
  let body;
82
- body = JSON.stringify(se_DeleteQualificationTypeRequest(input, context));
82
+ body = JSON.stringify((0, smithy_client_1._json)(input));
83
83
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
84
84
  };
85
85
  exports.se_DeleteQualificationTypeCommand = se_DeleteQualificationTypeCommand;
86
86
  const se_DeleteWorkerBlockCommand = async (input, context) => {
87
87
  const headers = sharedHeaders("DeleteWorkerBlock");
88
88
  let body;
89
- body = JSON.stringify(se_DeleteWorkerBlockRequest(input, context));
89
+ body = JSON.stringify((0, smithy_client_1._json)(input));
90
90
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
91
91
  };
92
92
  exports.se_DeleteWorkerBlockCommand = se_DeleteWorkerBlockCommand;
93
93
  const se_DisassociateQualificationFromWorkerCommand = async (input, context) => {
94
94
  const headers = sharedHeaders("DisassociateQualificationFromWorker");
95
95
  let body;
96
- body = JSON.stringify(se_DisassociateQualificationFromWorkerRequest(input, context));
96
+ body = JSON.stringify((0, smithy_client_1._json)(input));
97
97
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
98
98
  };
99
99
  exports.se_DisassociateQualificationFromWorkerCommand = se_DisassociateQualificationFromWorkerCommand;
100
100
  const se_GetAccountBalanceCommand = async (input, context) => {
101
101
  const headers = sharedHeaders("GetAccountBalance");
102
102
  let body;
103
- body = JSON.stringify(se_GetAccountBalanceRequest(input, context));
103
+ body = JSON.stringify((0, smithy_client_1._json)(input));
104
104
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
105
105
  };
106
106
  exports.se_GetAccountBalanceCommand = se_GetAccountBalanceCommand;
107
107
  const se_GetAssignmentCommand = async (input, context) => {
108
108
  const headers = sharedHeaders("GetAssignment");
109
109
  let body;
110
- body = JSON.stringify(se_GetAssignmentRequest(input, context));
110
+ body = JSON.stringify((0, smithy_client_1._json)(input));
111
111
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
112
112
  };
113
113
  exports.se_GetAssignmentCommand = se_GetAssignmentCommand;
114
114
  const se_GetFileUploadURLCommand = async (input, context) => {
115
115
  const headers = sharedHeaders("GetFileUploadURL");
116
116
  let body;
117
- body = JSON.stringify(se_GetFileUploadURLRequest(input, context));
117
+ body = JSON.stringify((0, smithy_client_1._json)(input));
118
118
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
119
119
  };
120
120
  exports.se_GetFileUploadURLCommand = se_GetFileUploadURLCommand;
121
121
  const se_GetHITCommand = async (input, context) => {
122
122
  const headers = sharedHeaders("GetHIT");
123
123
  let body;
124
- body = JSON.stringify(se_GetHITRequest(input, context));
124
+ body = JSON.stringify((0, smithy_client_1._json)(input));
125
125
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
126
126
  };
127
127
  exports.se_GetHITCommand = se_GetHITCommand;
128
128
  const se_GetQualificationScoreCommand = async (input, context) => {
129
129
  const headers = sharedHeaders("GetQualificationScore");
130
130
  let body;
131
- body = JSON.stringify(se_GetQualificationScoreRequest(input, context));
131
+ body = JSON.stringify((0, smithy_client_1._json)(input));
132
132
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
133
133
  };
134
134
  exports.se_GetQualificationScoreCommand = se_GetQualificationScoreCommand;
135
135
  const se_GetQualificationTypeCommand = async (input, context) => {
136
136
  const headers = sharedHeaders("GetQualificationType");
137
137
  let body;
138
- body = JSON.stringify(se_GetQualificationTypeRequest(input, context));
138
+ body = JSON.stringify((0, smithy_client_1._json)(input));
139
139
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
140
140
  };
141
141
  exports.se_GetQualificationTypeCommand = se_GetQualificationTypeCommand;
142
142
  const se_ListAssignmentsForHITCommand = async (input, context) => {
143
143
  const headers = sharedHeaders("ListAssignmentsForHIT");
144
144
  let body;
145
- body = JSON.stringify(se_ListAssignmentsForHITRequest(input, context));
145
+ body = JSON.stringify((0, smithy_client_1._json)(input));
146
146
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
147
147
  };
148
148
  exports.se_ListAssignmentsForHITCommand = se_ListAssignmentsForHITCommand;
149
149
  const se_ListBonusPaymentsCommand = async (input, context) => {
150
150
  const headers = sharedHeaders("ListBonusPayments");
151
151
  let body;
152
- body = JSON.stringify(se_ListBonusPaymentsRequest(input, context));
152
+ body = JSON.stringify((0, smithy_client_1._json)(input));
153
153
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
154
154
  };
155
155
  exports.se_ListBonusPaymentsCommand = se_ListBonusPaymentsCommand;
156
156
  const se_ListHITsCommand = async (input, context) => {
157
157
  const headers = sharedHeaders("ListHITs");
158
158
  let body;
159
- body = JSON.stringify(se_ListHITsRequest(input, context));
159
+ body = JSON.stringify((0, smithy_client_1._json)(input));
160
160
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
161
161
  };
162
162
  exports.se_ListHITsCommand = se_ListHITsCommand;
163
163
  const se_ListHITsForQualificationTypeCommand = async (input, context) => {
164
164
  const headers = sharedHeaders("ListHITsForQualificationType");
165
165
  let body;
166
- body = JSON.stringify(se_ListHITsForQualificationTypeRequest(input, context));
166
+ body = JSON.stringify((0, smithy_client_1._json)(input));
167
167
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
168
168
  };
169
169
  exports.se_ListHITsForQualificationTypeCommand = se_ListHITsForQualificationTypeCommand;
170
170
  const se_ListQualificationRequestsCommand = async (input, context) => {
171
171
  const headers = sharedHeaders("ListQualificationRequests");
172
172
  let body;
173
- body = JSON.stringify(se_ListQualificationRequestsRequest(input, context));
173
+ body = JSON.stringify((0, smithy_client_1._json)(input));
174
174
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
175
175
  };
176
176
  exports.se_ListQualificationRequestsCommand = se_ListQualificationRequestsCommand;
177
177
  const se_ListQualificationTypesCommand = async (input, context) => {
178
178
  const headers = sharedHeaders("ListQualificationTypes");
179
179
  let body;
180
- body = JSON.stringify(se_ListQualificationTypesRequest(input, context));
180
+ body = JSON.stringify((0, smithy_client_1._json)(input));
181
181
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
182
182
  };
183
183
  exports.se_ListQualificationTypesCommand = se_ListQualificationTypesCommand;
184
184
  const se_ListReviewableHITsCommand = async (input, context) => {
185
185
  const headers = sharedHeaders("ListReviewableHITs");
186
186
  let body;
187
- body = JSON.stringify(se_ListReviewableHITsRequest(input, context));
187
+ body = JSON.stringify((0, smithy_client_1._json)(input));
188
188
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
189
189
  };
190
190
  exports.se_ListReviewableHITsCommand = se_ListReviewableHITsCommand;
191
191
  const se_ListReviewPolicyResultsForHITCommand = async (input, context) => {
192
192
  const headers = sharedHeaders("ListReviewPolicyResultsForHIT");
193
193
  let body;
194
- body = JSON.stringify(se_ListReviewPolicyResultsForHITRequest(input, context));
194
+ body = JSON.stringify((0, smithy_client_1._json)(input));
195
195
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
196
196
  };
197
197
  exports.se_ListReviewPolicyResultsForHITCommand = se_ListReviewPolicyResultsForHITCommand;
198
198
  const se_ListWorkerBlocksCommand = async (input, context) => {
199
199
  const headers = sharedHeaders("ListWorkerBlocks");
200
200
  let body;
201
- body = JSON.stringify(se_ListWorkerBlocksRequest(input, context));
201
+ body = JSON.stringify((0, smithy_client_1._json)(input));
202
202
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
203
203
  };
204
204
  exports.se_ListWorkerBlocksCommand = se_ListWorkerBlocksCommand;
205
205
  const se_ListWorkersWithQualificationTypeCommand = async (input, context) => {
206
206
  const headers = sharedHeaders("ListWorkersWithQualificationType");
207
207
  let body;
208
- body = JSON.stringify(se_ListWorkersWithQualificationTypeRequest(input, context));
208
+ body = JSON.stringify((0, smithy_client_1._json)(input));
209
209
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
210
210
  };
211
211
  exports.se_ListWorkersWithQualificationTypeCommand = se_ListWorkersWithQualificationTypeCommand;
212
212
  const se_NotifyWorkersCommand = async (input, context) => {
213
213
  const headers = sharedHeaders("NotifyWorkers");
214
214
  let body;
215
- body = JSON.stringify(se_NotifyWorkersRequest(input, context));
215
+ body = JSON.stringify((0, smithy_client_1._json)(input));
216
216
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
217
217
  };
218
218
  exports.se_NotifyWorkersCommand = se_NotifyWorkersCommand;
219
219
  const se_RejectAssignmentCommand = async (input, context) => {
220
220
  const headers = sharedHeaders("RejectAssignment");
221
221
  let body;
222
- body = JSON.stringify(se_RejectAssignmentRequest(input, context));
222
+ body = JSON.stringify((0, smithy_client_1._json)(input));
223
223
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
224
224
  };
225
225
  exports.se_RejectAssignmentCommand = se_RejectAssignmentCommand;
226
226
  const se_RejectQualificationRequestCommand = async (input, context) => {
227
227
  const headers = sharedHeaders("RejectQualificationRequest");
228
228
  let body;
229
- body = JSON.stringify(se_RejectQualificationRequestRequest(input, context));
229
+ body = JSON.stringify((0, smithy_client_1._json)(input));
230
230
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
231
231
  };
232
232
  exports.se_RejectQualificationRequestCommand = se_RejectQualificationRequestCommand;
233
233
  const se_SendBonusCommand = async (input, context) => {
234
234
  const headers = sharedHeaders("SendBonus");
235
235
  let body;
236
- body = JSON.stringify(se_SendBonusRequest(input, context));
236
+ body = JSON.stringify((0, smithy_client_1._json)(input));
237
237
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
238
238
  };
239
239
  exports.se_SendBonusCommand = se_SendBonusCommand;
240
240
  const se_SendTestEventNotificationCommand = async (input, context) => {
241
241
  const headers = sharedHeaders("SendTestEventNotification");
242
242
  let body;
243
- body = JSON.stringify(se_SendTestEventNotificationRequest(input, context));
243
+ body = JSON.stringify((0, smithy_client_1._json)(input));
244
244
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
245
245
  };
246
246
  exports.se_SendTestEventNotificationCommand = se_SendTestEventNotificationCommand;
@@ -254,28 +254,28 @@ exports.se_UpdateExpirationForHITCommand = se_UpdateExpirationForHITCommand;
254
254
  const se_UpdateHITReviewStatusCommand = async (input, context) => {
255
255
  const headers = sharedHeaders("UpdateHITReviewStatus");
256
256
  let body;
257
- body = JSON.stringify(se_UpdateHITReviewStatusRequest(input, context));
257
+ body = JSON.stringify((0, smithy_client_1._json)(input));
258
258
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
259
259
  };
260
260
  exports.se_UpdateHITReviewStatusCommand = se_UpdateHITReviewStatusCommand;
261
261
  const se_UpdateHITTypeOfHITCommand = async (input, context) => {
262
262
  const headers = sharedHeaders("UpdateHITTypeOfHIT");
263
263
  let body;
264
- body = JSON.stringify(se_UpdateHITTypeOfHITRequest(input, context));
264
+ body = JSON.stringify((0, smithy_client_1._json)(input));
265
265
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
266
266
  };
267
267
  exports.se_UpdateHITTypeOfHITCommand = se_UpdateHITTypeOfHITCommand;
268
268
  const se_UpdateNotificationSettingsCommand = async (input, context) => {
269
269
  const headers = sharedHeaders("UpdateNotificationSettings");
270
270
  let body;
271
- body = JSON.stringify(se_UpdateNotificationSettingsRequest(input, context));
271
+ body = JSON.stringify((0, smithy_client_1._json)(input));
272
272
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
273
273
  };
274
274
  exports.se_UpdateNotificationSettingsCommand = se_UpdateNotificationSettingsCommand;
275
275
  const se_UpdateQualificationTypeCommand = async (input, context) => {
276
276
  const headers = sharedHeaders("UpdateQualificationType");
277
277
  let body;
278
- body = JSON.stringify(se_UpdateQualificationTypeRequest(input, context));
278
+ body = JSON.stringify((0, smithy_client_1._json)(input));
279
279
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
280
280
  };
281
281
  exports.se_UpdateQualificationTypeCommand = se_UpdateQualificationTypeCommand;
@@ -285,12 +285,12 @@ const de_AcceptQualificationRequestCommand = async (output, context) => {
285
285
  }
286
286
  const data = await parseBody(output.body, context);
287
287
  let contents = {};
288
- contents = de_AcceptQualificationRequestResponse(data, context);
288
+ contents = (0, smithy_client_1._json)(data);
289
289
  const response = {
290
290
  $metadata: deserializeMetadata(output),
291
291
  ...contents,
292
292
  };
293
- return Promise.resolve(response);
293
+ return response;
294
294
  };
295
295
  exports.de_AcceptQualificationRequestCommand = de_AcceptQualificationRequestCommand;
296
296
  const de_AcceptQualificationRequestCommandError = async (output, context) => {
@@ -308,10 +308,9 @@ const de_AcceptQualificationRequestCommandError = async (output, context) => {
308
308
  throw await de_ServiceFaultRes(parsedOutput, context);
309
309
  default:
310
310
  const parsedBody = parsedOutput.body;
311
- (0, smithy_client_1.throwDefaultError)({
311
+ return throwDefaultError({
312
312
  output,
313
313
  parsedBody,
314
- exceptionCtor: MTurkServiceException_1.MTurkServiceException,
315
314
  errorCode,
316
315
  });
317
316
  }
@@ -322,12 +321,12 @@ const de_ApproveAssignmentCommand = async (output, context) => {
322
321
  }
323
322
  const data = await parseBody(output.body, context);
324
323
  let contents = {};
325
- contents = de_ApproveAssignmentResponse(data, context);
324
+ contents = (0, smithy_client_1._json)(data);
326
325
  const response = {
327
326
  $metadata: deserializeMetadata(output),
328
327
  ...contents,
329
328
  };
330
- return Promise.resolve(response);
329
+ return response;
331
330
  };
332
331
  exports.de_ApproveAssignmentCommand = de_ApproveAssignmentCommand;
333
332
  const de_ApproveAssignmentCommandError = async (output, context) => {
@@ -345,10 +344,9 @@ const de_ApproveAssignmentCommandError = async (output, context) => {
345
344
  throw await de_ServiceFaultRes(parsedOutput, context);
346
345
  default:
347
346
  const parsedBody = parsedOutput.body;
348
- (0, smithy_client_1.throwDefaultError)({
347
+ return throwDefaultError({
349
348
  output,
350
349
  parsedBody,
351
- exceptionCtor: MTurkServiceException_1.MTurkServiceException,
352
350
  errorCode,
353
351
  });
354
352
  }
@@ -359,12 +357,12 @@ const de_AssociateQualificationWithWorkerCommand = async (output, context) => {
359
357
  }
360
358
  const data = await parseBody(output.body, context);
361
359
  let contents = {};
362
- contents = de_AssociateQualificationWithWorkerResponse(data, context);
360
+ contents = (0, smithy_client_1._json)(data);
363
361
  const response = {
364
362
  $metadata: deserializeMetadata(output),
365
363
  ...contents,
366
364
  };
367
- return Promise.resolve(response);
365
+ return response;
368
366
  };
369
367
  exports.de_AssociateQualificationWithWorkerCommand = de_AssociateQualificationWithWorkerCommand;
370
368
  const de_AssociateQualificationWithWorkerCommandError = async (output, context) => {
@@ -382,10 +380,9 @@ const de_AssociateQualificationWithWorkerCommandError = async (output, context)
382
380
  throw await de_ServiceFaultRes(parsedOutput, context);
383
381
  default:
384
382
  const parsedBody = parsedOutput.body;
385
- (0, smithy_client_1.throwDefaultError)({
383
+ return throwDefaultError({
386
384
  output,
387
385
  parsedBody,
388
- exceptionCtor: MTurkServiceException_1.MTurkServiceException,
389
386
  errorCode,
390
387
  });
391
388
  }
@@ -396,12 +393,12 @@ const de_CreateAdditionalAssignmentsForHITCommand = async (output, context) => {
396
393
  }
397
394
  const data = await parseBody(output.body, context);
398
395
  let contents = {};
399
- contents = de_CreateAdditionalAssignmentsForHITResponse(data, context);
396
+ contents = (0, smithy_client_1._json)(data);
400
397
  const response = {
401
398
  $metadata: deserializeMetadata(output),
402
399
  ...contents,
403
400
  };
404
- return Promise.resolve(response);
401
+ return response;
405
402
  };
406
403
  exports.de_CreateAdditionalAssignmentsForHITCommand = de_CreateAdditionalAssignmentsForHITCommand;
407
404
  const de_CreateAdditionalAssignmentsForHITCommandError = async (output, context) => {
@@ -419,10 +416,9 @@ const de_CreateAdditionalAssignmentsForHITCommandError = async (output, context)
419
416
  throw await de_ServiceFaultRes(parsedOutput, context);
420
417
  default:
421
418
  const parsedBody = parsedOutput.body;
422
- (0, smithy_client_1.throwDefaultError)({
419
+ return throwDefaultError({
423
420
  output,
424
421
  parsedBody,
425
- exceptionCtor: MTurkServiceException_1.MTurkServiceException,
426
422
  errorCode,
427
423
  });
428
424
  }
@@ -438,7 +434,7 @@ const de_CreateHITCommand = async (output, context) => {
438
434
  $metadata: deserializeMetadata(output),
439
435
  ...contents,
440
436
  };
441
- return Promise.resolve(response);
437
+ return response;
442
438
  };
443
439
  exports.de_CreateHITCommand = de_CreateHITCommand;
444
440
  const de_CreateHITCommandError = async (output, context) => {
@@ -456,10 +452,9 @@ const de_CreateHITCommandError = async (output, context) => {
456
452
  throw await de_ServiceFaultRes(parsedOutput, context);
457
453
  default:
458
454
  const parsedBody = parsedOutput.body;
459
- (0, smithy_client_1.throwDefaultError)({
455
+ return throwDefaultError({
460
456
  output,
461
457
  parsedBody,
462
- exceptionCtor: MTurkServiceException_1.MTurkServiceException,
463
458
  errorCode,
464
459
  });
465
460
  }
@@ -470,12 +465,12 @@ const de_CreateHITTypeCommand = async (output, context) => {
470
465
  }
471
466
  const data = await parseBody(output.body, context);
472
467
  let contents = {};
473
- contents = de_CreateHITTypeResponse(data, context);
468
+ contents = (0, smithy_client_1._json)(data);
474
469
  const response = {
475
470
  $metadata: deserializeMetadata(output),
476
471
  ...contents,
477
472
  };
478
- return Promise.resolve(response);
473
+ return response;
479
474
  };
480
475
  exports.de_CreateHITTypeCommand = de_CreateHITTypeCommand;
481
476
  const de_CreateHITTypeCommandError = async (output, context) => {
@@ -493,10 +488,9 @@ const de_CreateHITTypeCommandError = async (output, context) => {
493
488
  throw await de_ServiceFaultRes(parsedOutput, context);
494
489
  default:
495
490
  const parsedBody = parsedOutput.body;
496
- (0, smithy_client_1.throwDefaultError)({
491
+ return throwDefaultError({
497
492
  output,
498
493
  parsedBody,
499
- exceptionCtor: MTurkServiceException_1.MTurkServiceException,
500
494
  errorCode,
501
495
  });
502
496
  }
@@ -512,7 +506,7 @@ const de_CreateHITWithHITTypeCommand = async (output, context) => {
512
506
  $metadata: deserializeMetadata(output),
513
507
  ...contents,
514
508
  };
515
- return Promise.resolve(response);
509
+ return response;
516
510
  };
517
511
  exports.de_CreateHITWithHITTypeCommand = de_CreateHITWithHITTypeCommand;
518
512
  const de_CreateHITWithHITTypeCommandError = async (output, context) => {
@@ -530,10 +524,9 @@ const de_CreateHITWithHITTypeCommandError = async (output, context) => {
530
524
  throw await de_ServiceFaultRes(parsedOutput, context);
531
525
  default:
532
526
  const parsedBody = parsedOutput.body;
533
- (0, smithy_client_1.throwDefaultError)({
527
+ return throwDefaultError({
534
528
  output,
535
529
  parsedBody,
536
- exceptionCtor: MTurkServiceException_1.MTurkServiceException,
537
530
  errorCode,
538
531
  });
539
532
  }
@@ -549,7 +542,7 @@ const de_CreateQualificationTypeCommand = async (output, context) => {
549
542
  $metadata: deserializeMetadata(output),
550
543
  ...contents,
551
544
  };
552
- return Promise.resolve(response);
545
+ return response;
553
546
  };
554
547
  exports.de_CreateQualificationTypeCommand = de_CreateQualificationTypeCommand;
555
548
  const de_CreateQualificationTypeCommandError = async (output, context) => {
@@ -567,10 +560,9 @@ const de_CreateQualificationTypeCommandError = async (output, context) => {
567
560
  throw await de_ServiceFaultRes(parsedOutput, context);
568
561
  default:
569
562
  const parsedBody = parsedOutput.body;
570
- (0, smithy_client_1.throwDefaultError)({
563
+ return throwDefaultError({
571
564
  output,
572
565
  parsedBody,
573
- exceptionCtor: MTurkServiceException_1.MTurkServiceException,
574
566
  errorCode,
575
567
  });
576
568
  }
@@ -581,12 +573,12 @@ const de_CreateWorkerBlockCommand = async (output, context) => {
581
573
  }
582
574
  const data = await parseBody(output.body, context);
583
575
  let contents = {};
584
- contents = de_CreateWorkerBlockResponse(data, context);
576
+ contents = (0, smithy_client_1._json)(data);
585
577
  const response = {
586
578
  $metadata: deserializeMetadata(output),
587
579
  ...contents,
588
580
  };
589
- return Promise.resolve(response);
581
+ return response;
590
582
  };
591
583
  exports.de_CreateWorkerBlockCommand = de_CreateWorkerBlockCommand;
592
584
  const de_CreateWorkerBlockCommandError = async (output, context) => {
@@ -604,10 +596,9 @@ const de_CreateWorkerBlockCommandError = async (output, context) => {
604
596
  throw await de_ServiceFaultRes(parsedOutput, context);
605
597
  default:
606
598
  const parsedBody = parsedOutput.body;
607
- (0, smithy_client_1.throwDefaultError)({
599
+ return throwDefaultError({
608
600
  output,
609
601
  parsedBody,
610
- exceptionCtor: MTurkServiceException_1.MTurkServiceException,
611
602
  errorCode,
612
603
  });
613
604
  }
@@ -618,12 +609,12 @@ const de_DeleteHITCommand = async (output, context) => {
618
609
  }
619
610
  const data = await parseBody(output.body, context);
620
611
  let contents = {};
621
- contents = de_DeleteHITResponse(data, context);
612
+ contents = (0, smithy_client_1._json)(data);
622
613
  const response = {
623
614
  $metadata: deserializeMetadata(output),
624
615
  ...contents,
625
616
  };
626
- return Promise.resolve(response);
617
+ return response;
627
618
  };
628
619
  exports.de_DeleteHITCommand = de_DeleteHITCommand;
629
620
  const de_DeleteHITCommandError = async (output, context) => {
@@ -641,10 +632,9 @@ const de_DeleteHITCommandError = async (output, context) => {
641
632
  throw await de_ServiceFaultRes(parsedOutput, context);
642
633
  default:
643
634
  const parsedBody = parsedOutput.body;
644
- (0, smithy_client_1.throwDefaultError)({
635
+ return throwDefaultError({
645
636
  output,
646
637
  parsedBody,
647
- exceptionCtor: MTurkServiceException_1.MTurkServiceException,
648
638
  errorCode,
649
639
  });
650
640
  }
@@ -655,12 +645,12 @@ const de_DeleteQualificationTypeCommand = async (output, context) => {
655
645
  }
656
646
  const data = await parseBody(output.body, context);
657
647
  let contents = {};
658
- contents = de_DeleteQualificationTypeResponse(data, context);
648
+ contents = (0, smithy_client_1._json)(data);
659
649
  const response = {
660
650
  $metadata: deserializeMetadata(output),
661
651
  ...contents,
662
652
  };
663
- return Promise.resolve(response);
653
+ return response;
664
654
  };
665
655
  exports.de_DeleteQualificationTypeCommand = de_DeleteQualificationTypeCommand;
666
656
  const de_DeleteQualificationTypeCommandError = async (output, context) => {
@@ -678,10 +668,9 @@ const de_DeleteQualificationTypeCommandError = async (output, context) => {
678
668
  throw await de_ServiceFaultRes(parsedOutput, context);
679
669
  default:
680
670
  const parsedBody = parsedOutput.body;
681
- (0, smithy_client_1.throwDefaultError)({
671
+ return throwDefaultError({
682
672
  output,
683
673
  parsedBody,
684
- exceptionCtor: MTurkServiceException_1.MTurkServiceException,
685
674
  errorCode,
686
675
  });
687
676
  }
@@ -692,12 +681,12 @@ const de_DeleteWorkerBlockCommand = async (output, context) => {
692
681
  }
693
682
  const data = await parseBody(output.body, context);
694
683
  let contents = {};
695
- contents = de_DeleteWorkerBlockResponse(data, context);
684
+ contents = (0, smithy_client_1._json)(data);
696
685
  const response = {
697
686
  $metadata: deserializeMetadata(output),
698
687
  ...contents,
699
688
  };
700
- return Promise.resolve(response);
689
+ return response;
701
690
  };
702
691
  exports.de_DeleteWorkerBlockCommand = de_DeleteWorkerBlockCommand;
703
692
  const de_DeleteWorkerBlockCommandError = async (output, context) => {
@@ -715,10 +704,9 @@ const de_DeleteWorkerBlockCommandError = async (output, context) => {
715
704
  throw await de_ServiceFaultRes(parsedOutput, context);
716
705
  default:
717
706
  const parsedBody = parsedOutput.body;
718
- (0, smithy_client_1.throwDefaultError)({
707
+ return throwDefaultError({
719
708
  output,
720
709
  parsedBody,
721
- exceptionCtor: MTurkServiceException_1.MTurkServiceException,
722
710
  errorCode,
723
711
  });
724
712
  }
@@ -729,12 +717,12 @@ const de_DisassociateQualificationFromWorkerCommand = async (output, context) =>
729
717
  }
730
718
  const data = await parseBody(output.body, context);
731
719
  let contents = {};
732
- contents = de_DisassociateQualificationFromWorkerResponse(data, context);
720
+ contents = (0, smithy_client_1._json)(data);
733
721
  const response = {
734
722
  $metadata: deserializeMetadata(output),
735
723
  ...contents,
736
724
  };
737
- return Promise.resolve(response);
725
+ return response;
738
726
  };
739
727
  exports.de_DisassociateQualificationFromWorkerCommand = de_DisassociateQualificationFromWorkerCommand;
740
728
  const de_DisassociateQualificationFromWorkerCommandError = async (output, context) => {
@@ -752,10 +740,9 @@ const de_DisassociateQualificationFromWorkerCommandError = async (output, contex
752
740
  throw await de_ServiceFaultRes(parsedOutput, context);
753
741
  default:
754
742
  const parsedBody = parsedOutput.body;
755
- (0, smithy_client_1.throwDefaultError)({
743
+ return throwDefaultError({
756
744
  output,
757
745
  parsedBody,
758
- exceptionCtor: MTurkServiceException_1.MTurkServiceException,
759
746
  errorCode,
760
747
  });
761
748
  }
@@ -766,12 +753,12 @@ const de_GetAccountBalanceCommand = async (output, context) => {
766
753
  }
767
754
  const data = await parseBody(output.body, context);
768
755
  let contents = {};
769
- contents = de_GetAccountBalanceResponse(data, context);
756
+ contents = (0, smithy_client_1._json)(data);
770
757
  const response = {
771
758
  $metadata: deserializeMetadata(output),
772
759
  ...contents,
773
760
  };
774
- return Promise.resolve(response);
761
+ return response;
775
762
  };
776
763
  exports.de_GetAccountBalanceCommand = de_GetAccountBalanceCommand;
777
764
  const de_GetAccountBalanceCommandError = async (output, context) => {
@@ -789,10 +776,9 @@ const de_GetAccountBalanceCommandError = async (output, context) => {
789
776
  throw await de_ServiceFaultRes(parsedOutput, context);
790
777
  default:
791
778
  const parsedBody = parsedOutput.body;
792
- (0, smithy_client_1.throwDefaultError)({
779
+ return throwDefaultError({
793
780
  output,
794
781
  parsedBody,
795
- exceptionCtor: MTurkServiceException_1.MTurkServiceException,
796
782
  errorCode,
797
783
  });
798
784
  }
@@ -808,7 +794,7 @@ const de_GetAssignmentCommand = async (output, context) => {
808
794
  $metadata: deserializeMetadata(output),
809
795
  ...contents,
810
796
  };
811
- return Promise.resolve(response);
797
+ return response;
812
798
  };
813
799
  exports.de_GetAssignmentCommand = de_GetAssignmentCommand;
814
800
  const de_GetAssignmentCommandError = async (output, context) => {
@@ -826,10 +812,9 @@ const de_GetAssignmentCommandError = async (output, context) => {
826
812
  throw await de_ServiceFaultRes(parsedOutput, context);
827
813
  default:
828
814
  const parsedBody = parsedOutput.body;
829
- (0, smithy_client_1.throwDefaultError)({
815
+ return throwDefaultError({
830
816
  output,
831
817
  parsedBody,
832
- exceptionCtor: MTurkServiceException_1.MTurkServiceException,
833
818
  errorCode,
834
819
  });
835
820
  }
@@ -840,12 +825,12 @@ const de_GetFileUploadURLCommand = async (output, context) => {
840
825
  }
841
826
  const data = await parseBody(output.body, context);
842
827
  let contents = {};
843
- contents = de_GetFileUploadURLResponse(data, context);
828
+ contents = (0, smithy_client_1._json)(data);
844
829
  const response = {
845
830
  $metadata: deserializeMetadata(output),
846
831
  ...contents,
847
832
  };
848
- return Promise.resolve(response);
833
+ return response;
849
834
  };
850
835
  exports.de_GetFileUploadURLCommand = de_GetFileUploadURLCommand;
851
836
  const de_GetFileUploadURLCommandError = async (output, context) => {
@@ -863,10 +848,9 @@ const de_GetFileUploadURLCommandError = async (output, context) => {
863
848
  throw await de_ServiceFaultRes(parsedOutput, context);
864
849
  default:
865
850
  const parsedBody = parsedOutput.body;
866
- (0, smithy_client_1.throwDefaultError)({
851
+ return throwDefaultError({
867
852
  output,
868
853
  parsedBody,
869
- exceptionCtor: MTurkServiceException_1.MTurkServiceException,
870
854
  errorCode,
871
855
  });
872
856
  }
@@ -882,7 +866,7 @@ const de_GetHITCommand = async (output, context) => {
882
866
  $metadata: deserializeMetadata(output),
883
867
  ...contents,
884
868
  };
885
- return Promise.resolve(response);
869
+ return response;
886
870
  };
887
871
  exports.de_GetHITCommand = de_GetHITCommand;
888
872
  const de_GetHITCommandError = async (output, context) => {
@@ -900,10 +884,9 @@ const de_GetHITCommandError = async (output, context) => {
900
884
  throw await de_ServiceFaultRes(parsedOutput, context);
901
885
  default:
902
886
  const parsedBody = parsedOutput.body;
903
- (0, smithy_client_1.throwDefaultError)({
887
+ return throwDefaultError({
904
888
  output,
905
889
  parsedBody,
906
- exceptionCtor: MTurkServiceException_1.MTurkServiceException,
907
890
  errorCode,
908
891
  });
909
892
  }
@@ -919,7 +902,7 @@ const de_GetQualificationScoreCommand = async (output, context) => {
919
902
  $metadata: deserializeMetadata(output),
920
903
  ...contents,
921
904
  };
922
- return Promise.resolve(response);
905
+ return response;
923
906
  };
924
907
  exports.de_GetQualificationScoreCommand = de_GetQualificationScoreCommand;
925
908
  const de_GetQualificationScoreCommandError = async (output, context) => {
@@ -937,10 +920,9 @@ const de_GetQualificationScoreCommandError = async (output, context) => {
937
920
  throw await de_ServiceFaultRes(parsedOutput, context);
938
921
  default:
939
922
  const parsedBody = parsedOutput.body;
940
- (0, smithy_client_1.throwDefaultError)({
923
+ return throwDefaultError({
941
924
  output,
942
925
  parsedBody,
943
- exceptionCtor: MTurkServiceException_1.MTurkServiceException,
944
926
  errorCode,
945
927
  });
946
928
  }
@@ -956,7 +938,7 @@ const de_GetQualificationTypeCommand = async (output, context) => {
956
938
  $metadata: deserializeMetadata(output),
957
939
  ...contents,
958
940
  };
959
- return Promise.resolve(response);
941
+ return response;
960
942
  };
961
943
  exports.de_GetQualificationTypeCommand = de_GetQualificationTypeCommand;
962
944
  const de_GetQualificationTypeCommandError = async (output, context) => {
@@ -974,10 +956,9 @@ const de_GetQualificationTypeCommandError = async (output, context) => {
974
956
  throw await de_ServiceFaultRes(parsedOutput, context);
975
957
  default:
976
958
  const parsedBody = parsedOutput.body;
977
- (0, smithy_client_1.throwDefaultError)({
959
+ return throwDefaultError({
978
960
  output,
979
961
  parsedBody,
980
- exceptionCtor: MTurkServiceException_1.MTurkServiceException,
981
962
  errorCode,
982
963
  });
983
964
  }
@@ -993,7 +974,7 @@ const de_ListAssignmentsForHITCommand = async (output, context) => {
993
974
  $metadata: deserializeMetadata(output),
994
975
  ...contents,
995
976
  };
996
- return Promise.resolve(response);
977
+ return response;
997
978
  };
998
979
  exports.de_ListAssignmentsForHITCommand = de_ListAssignmentsForHITCommand;
999
980
  const de_ListAssignmentsForHITCommandError = async (output, context) => {
@@ -1011,10 +992,9 @@ const de_ListAssignmentsForHITCommandError = async (output, context) => {
1011
992
  throw await de_ServiceFaultRes(parsedOutput, context);
1012
993
  default:
1013
994
  const parsedBody = parsedOutput.body;
1014
- (0, smithy_client_1.throwDefaultError)({
995
+ return throwDefaultError({
1015
996
  output,
1016
997
  parsedBody,
1017
- exceptionCtor: MTurkServiceException_1.MTurkServiceException,
1018
998
  errorCode,
1019
999
  });
1020
1000
  }
@@ -1030,7 +1010,7 @@ const de_ListBonusPaymentsCommand = async (output, context) => {
1030
1010
  $metadata: deserializeMetadata(output),
1031
1011
  ...contents,
1032
1012
  };
1033
- return Promise.resolve(response);
1013
+ return response;
1034
1014
  };
1035
1015
  exports.de_ListBonusPaymentsCommand = de_ListBonusPaymentsCommand;
1036
1016
  const de_ListBonusPaymentsCommandError = async (output, context) => {
@@ -1048,10 +1028,9 @@ const de_ListBonusPaymentsCommandError = async (output, context) => {
1048
1028
  throw await de_ServiceFaultRes(parsedOutput, context);
1049
1029
  default:
1050
1030
  const parsedBody = parsedOutput.body;
1051
- (0, smithy_client_1.throwDefaultError)({
1031
+ return throwDefaultError({
1052
1032
  output,
1053
1033
  parsedBody,
1054
- exceptionCtor: MTurkServiceException_1.MTurkServiceException,
1055
1034
  errorCode,
1056
1035
  });
1057
1036
  }
@@ -1067,7 +1046,7 @@ const de_ListHITsCommand = async (output, context) => {
1067
1046
  $metadata: deserializeMetadata(output),
1068
1047
  ...contents,
1069
1048
  };
1070
- return Promise.resolve(response);
1049
+ return response;
1071
1050
  };
1072
1051
  exports.de_ListHITsCommand = de_ListHITsCommand;
1073
1052
  const de_ListHITsCommandError = async (output, context) => {
@@ -1085,10 +1064,9 @@ const de_ListHITsCommandError = async (output, context) => {
1085
1064
  throw await de_ServiceFaultRes(parsedOutput, context);
1086
1065
  default:
1087
1066
  const parsedBody = parsedOutput.body;
1088
- (0, smithy_client_1.throwDefaultError)({
1067
+ return throwDefaultError({
1089
1068
  output,
1090
1069
  parsedBody,
1091
- exceptionCtor: MTurkServiceException_1.MTurkServiceException,
1092
1070
  errorCode,
1093
1071
  });
1094
1072
  }
@@ -1104,7 +1082,7 @@ const de_ListHITsForQualificationTypeCommand = async (output, context) => {
1104
1082
  $metadata: deserializeMetadata(output),
1105
1083
  ...contents,
1106
1084
  };
1107
- return Promise.resolve(response);
1085
+ return response;
1108
1086
  };
1109
1087
  exports.de_ListHITsForQualificationTypeCommand = de_ListHITsForQualificationTypeCommand;
1110
1088
  const de_ListHITsForQualificationTypeCommandError = async (output, context) => {
@@ -1122,10 +1100,9 @@ const de_ListHITsForQualificationTypeCommandError = async (output, context) => {
1122
1100
  throw await de_ServiceFaultRes(parsedOutput, context);
1123
1101
  default:
1124
1102
  const parsedBody = parsedOutput.body;
1125
- (0, smithy_client_1.throwDefaultError)({
1103
+ return throwDefaultError({
1126
1104
  output,
1127
1105
  parsedBody,
1128
- exceptionCtor: MTurkServiceException_1.MTurkServiceException,
1129
1106
  errorCode,
1130
1107
  });
1131
1108
  }
@@ -1141,7 +1118,7 @@ const de_ListQualificationRequestsCommand = async (output, context) => {
1141
1118
  $metadata: deserializeMetadata(output),
1142
1119
  ...contents,
1143
1120
  };
1144
- return Promise.resolve(response);
1121
+ return response;
1145
1122
  };
1146
1123
  exports.de_ListQualificationRequestsCommand = de_ListQualificationRequestsCommand;
1147
1124
  const de_ListQualificationRequestsCommandError = async (output, context) => {
@@ -1159,10 +1136,9 @@ const de_ListQualificationRequestsCommandError = async (output, context) => {
1159
1136
  throw await de_ServiceFaultRes(parsedOutput, context);
1160
1137
  default:
1161
1138
  const parsedBody = parsedOutput.body;
1162
- (0, smithy_client_1.throwDefaultError)({
1139
+ return throwDefaultError({
1163
1140
  output,
1164
1141
  parsedBody,
1165
- exceptionCtor: MTurkServiceException_1.MTurkServiceException,
1166
1142
  errorCode,
1167
1143
  });
1168
1144
  }
@@ -1178,7 +1154,7 @@ const de_ListQualificationTypesCommand = async (output, context) => {
1178
1154
  $metadata: deserializeMetadata(output),
1179
1155
  ...contents,
1180
1156
  };
1181
- return Promise.resolve(response);
1157
+ return response;
1182
1158
  };
1183
1159
  exports.de_ListQualificationTypesCommand = de_ListQualificationTypesCommand;
1184
1160
  const de_ListQualificationTypesCommandError = async (output, context) => {
@@ -1196,10 +1172,9 @@ const de_ListQualificationTypesCommandError = async (output, context) => {
1196
1172
  throw await de_ServiceFaultRes(parsedOutput, context);
1197
1173
  default:
1198
1174
  const parsedBody = parsedOutput.body;
1199
- (0, smithy_client_1.throwDefaultError)({
1175
+ return throwDefaultError({
1200
1176
  output,
1201
1177
  parsedBody,
1202
- exceptionCtor: MTurkServiceException_1.MTurkServiceException,
1203
1178
  errorCode,
1204
1179
  });
1205
1180
  }
@@ -1215,7 +1190,7 @@ const de_ListReviewableHITsCommand = async (output, context) => {
1215
1190
  $metadata: deserializeMetadata(output),
1216
1191
  ...contents,
1217
1192
  };
1218
- return Promise.resolve(response);
1193
+ return response;
1219
1194
  };
1220
1195
  exports.de_ListReviewableHITsCommand = de_ListReviewableHITsCommand;
1221
1196
  const de_ListReviewableHITsCommandError = async (output, context) => {
@@ -1233,10 +1208,9 @@ const de_ListReviewableHITsCommandError = async (output, context) => {
1233
1208
  throw await de_ServiceFaultRes(parsedOutput, context);
1234
1209
  default:
1235
1210
  const parsedBody = parsedOutput.body;
1236
- (0, smithy_client_1.throwDefaultError)({
1211
+ return throwDefaultError({
1237
1212
  output,
1238
1213
  parsedBody,
1239
- exceptionCtor: MTurkServiceException_1.MTurkServiceException,
1240
1214
  errorCode,
1241
1215
  });
1242
1216
  }
@@ -1252,7 +1226,7 @@ const de_ListReviewPolicyResultsForHITCommand = async (output, context) => {
1252
1226
  $metadata: deserializeMetadata(output),
1253
1227
  ...contents,
1254
1228
  };
1255
- return Promise.resolve(response);
1229
+ return response;
1256
1230
  };
1257
1231
  exports.de_ListReviewPolicyResultsForHITCommand = de_ListReviewPolicyResultsForHITCommand;
1258
1232
  const de_ListReviewPolicyResultsForHITCommandError = async (output, context) => {
@@ -1270,10 +1244,9 @@ const de_ListReviewPolicyResultsForHITCommandError = async (output, context) =>
1270
1244
  throw await de_ServiceFaultRes(parsedOutput, context);
1271
1245
  default:
1272
1246
  const parsedBody = parsedOutput.body;
1273
- (0, smithy_client_1.throwDefaultError)({
1247
+ return throwDefaultError({
1274
1248
  output,
1275
1249
  parsedBody,
1276
- exceptionCtor: MTurkServiceException_1.MTurkServiceException,
1277
1250
  errorCode,
1278
1251
  });
1279
1252
  }
@@ -1284,12 +1257,12 @@ const de_ListWorkerBlocksCommand = async (output, context) => {
1284
1257
  }
1285
1258
  const data = await parseBody(output.body, context);
1286
1259
  let contents = {};
1287
- contents = de_ListWorkerBlocksResponse(data, context);
1260
+ contents = (0, smithy_client_1._json)(data);
1288
1261
  const response = {
1289
1262
  $metadata: deserializeMetadata(output),
1290
1263
  ...contents,
1291
1264
  };
1292
- return Promise.resolve(response);
1265
+ return response;
1293
1266
  };
1294
1267
  exports.de_ListWorkerBlocksCommand = de_ListWorkerBlocksCommand;
1295
1268
  const de_ListWorkerBlocksCommandError = async (output, context) => {
@@ -1307,10 +1280,9 @@ const de_ListWorkerBlocksCommandError = async (output, context) => {
1307
1280
  throw await de_ServiceFaultRes(parsedOutput, context);
1308
1281
  default:
1309
1282
  const parsedBody = parsedOutput.body;
1310
- (0, smithy_client_1.throwDefaultError)({
1283
+ return throwDefaultError({
1311
1284
  output,
1312
1285
  parsedBody,
1313
- exceptionCtor: MTurkServiceException_1.MTurkServiceException,
1314
1286
  errorCode,
1315
1287
  });
1316
1288
  }
@@ -1326,7 +1298,7 @@ const de_ListWorkersWithQualificationTypeCommand = async (output, context) => {
1326
1298
  $metadata: deserializeMetadata(output),
1327
1299
  ...contents,
1328
1300
  };
1329
- return Promise.resolve(response);
1301
+ return response;
1330
1302
  };
1331
1303
  exports.de_ListWorkersWithQualificationTypeCommand = de_ListWorkersWithQualificationTypeCommand;
1332
1304
  const de_ListWorkersWithQualificationTypeCommandError = async (output, context) => {
@@ -1344,10 +1316,9 @@ const de_ListWorkersWithQualificationTypeCommandError = async (output, context)
1344
1316
  throw await de_ServiceFaultRes(parsedOutput, context);
1345
1317
  default:
1346
1318
  const parsedBody = parsedOutput.body;
1347
- (0, smithy_client_1.throwDefaultError)({
1319
+ return throwDefaultError({
1348
1320
  output,
1349
1321
  parsedBody,
1350
- exceptionCtor: MTurkServiceException_1.MTurkServiceException,
1351
1322
  errorCode,
1352
1323
  });
1353
1324
  }
@@ -1358,12 +1329,12 @@ const de_NotifyWorkersCommand = async (output, context) => {
1358
1329
  }
1359
1330
  const data = await parseBody(output.body, context);
1360
1331
  let contents = {};
1361
- contents = de_NotifyWorkersResponse(data, context);
1332
+ contents = (0, smithy_client_1._json)(data);
1362
1333
  const response = {
1363
1334
  $metadata: deserializeMetadata(output),
1364
1335
  ...contents,
1365
1336
  };
1366
- return Promise.resolve(response);
1337
+ return response;
1367
1338
  };
1368
1339
  exports.de_NotifyWorkersCommand = de_NotifyWorkersCommand;
1369
1340
  const de_NotifyWorkersCommandError = async (output, context) => {
@@ -1381,10 +1352,9 @@ const de_NotifyWorkersCommandError = async (output, context) => {
1381
1352
  throw await de_ServiceFaultRes(parsedOutput, context);
1382
1353
  default:
1383
1354
  const parsedBody = parsedOutput.body;
1384
- (0, smithy_client_1.throwDefaultError)({
1355
+ return throwDefaultError({
1385
1356
  output,
1386
1357
  parsedBody,
1387
- exceptionCtor: MTurkServiceException_1.MTurkServiceException,
1388
1358
  errorCode,
1389
1359
  });
1390
1360
  }
@@ -1395,12 +1365,12 @@ const de_RejectAssignmentCommand = async (output, context) => {
1395
1365
  }
1396
1366
  const data = await parseBody(output.body, context);
1397
1367
  let contents = {};
1398
- contents = de_RejectAssignmentResponse(data, context);
1368
+ contents = (0, smithy_client_1._json)(data);
1399
1369
  const response = {
1400
1370
  $metadata: deserializeMetadata(output),
1401
1371
  ...contents,
1402
1372
  };
1403
- return Promise.resolve(response);
1373
+ return response;
1404
1374
  };
1405
1375
  exports.de_RejectAssignmentCommand = de_RejectAssignmentCommand;
1406
1376
  const de_RejectAssignmentCommandError = async (output, context) => {
@@ -1418,10 +1388,9 @@ const de_RejectAssignmentCommandError = async (output, context) => {
1418
1388
  throw await de_ServiceFaultRes(parsedOutput, context);
1419
1389
  default:
1420
1390
  const parsedBody = parsedOutput.body;
1421
- (0, smithy_client_1.throwDefaultError)({
1391
+ return throwDefaultError({
1422
1392
  output,
1423
1393
  parsedBody,
1424
- exceptionCtor: MTurkServiceException_1.MTurkServiceException,
1425
1394
  errorCode,
1426
1395
  });
1427
1396
  }
@@ -1432,12 +1401,12 @@ const de_RejectQualificationRequestCommand = async (output, context) => {
1432
1401
  }
1433
1402
  const data = await parseBody(output.body, context);
1434
1403
  let contents = {};
1435
- contents = de_RejectQualificationRequestResponse(data, context);
1404
+ contents = (0, smithy_client_1._json)(data);
1436
1405
  const response = {
1437
1406
  $metadata: deserializeMetadata(output),
1438
1407
  ...contents,
1439
1408
  };
1440
- return Promise.resolve(response);
1409
+ return response;
1441
1410
  };
1442
1411
  exports.de_RejectQualificationRequestCommand = de_RejectQualificationRequestCommand;
1443
1412
  const de_RejectQualificationRequestCommandError = async (output, context) => {
@@ -1455,10 +1424,9 @@ const de_RejectQualificationRequestCommandError = async (output, context) => {
1455
1424
  throw await de_ServiceFaultRes(parsedOutput, context);
1456
1425
  default:
1457
1426
  const parsedBody = parsedOutput.body;
1458
- (0, smithy_client_1.throwDefaultError)({
1427
+ return throwDefaultError({
1459
1428
  output,
1460
1429
  parsedBody,
1461
- exceptionCtor: MTurkServiceException_1.MTurkServiceException,
1462
1430
  errorCode,
1463
1431
  });
1464
1432
  }
@@ -1469,12 +1437,12 @@ const de_SendBonusCommand = async (output, context) => {
1469
1437
  }
1470
1438
  const data = await parseBody(output.body, context);
1471
1439
  let contents = {};
1472
- contents = de_SendBonusResponse(data, context);
1440
+ contents = (0, smithy_client_1._json)(data);
1473
1441
  const response = {
1474
1442
  $metadata: deserializeMetadata(output),
1475
1443
  ...contents,
1476
1444
  };
1477
- return Promise.resolve(response);
1445
+ return response;
1478
1446
  };
1479
1447
  exports.de_SendBonusCommand = de_SendBonusCommand;
1480
1448
  const de_SendBonusCommandError = async (output, context) => {
@@ -1492,10 +1460,9 @@ const de_SendBonusCommandError = async (output, context) => {
1492
1460
  throw await de_ServiceFaultRes(parsedOutput, context);
1493
1461
  default:
1494
1462
  const parsedBody = parsedOutput.body;
1495
- (0, smithy_client_1.throwDefaultError)({
1463
+ return throwDefaultError({
1496
1464
  output,
1497
1465
  parsedBody,
1498
- exceptionCtor: MTurkServiceException_1.MTurkServiceException,
1499
1466
  errorCode,
1500
1467
  });
1501
1468
  }
@@ -1506,12 +1473,12 @@ const de_SendTestEventNotificationCommand = async (output, context) => {
1506
1473
  }
1507
1474
  const data = await parseBody(output.body, context);
1508
1475
  let contents = {};
1509
- contents = de_SendTestEventNotificationResponse(data, context);
1476
+ contents = (0, smithy_client_1._json)(data);
1510
1477
  const response = {
1511
1478
  $metadata: deserializeMetadata(output),
1512
1479
  ...contents,
1513
1480
  };
1514
- return Promise.resolve(response);
1481
+ return response;
1515
1482
  };
1516
1483
  exports.de_SendTestEventNotificationCommand = de_SendTestEventNotificationCommand;
1517
1484
  const de_SendTestEventNotificationCommandError = async (output, context) => {
@@ -1529,10 +1496,9 @@ const de_SendTestEventNotificationCommandError = async (output, context) => {
1529
1496
  throw await de_ServiceFaultRes(parsedOutput, context);
1530
1497
  default:
1531
1498
  const parsedBody = parsedOutput.body;
1532
- (0, smithy_client_1.throwDefaultError)({
1499
+ return throwDefaultError({
1533
1500
  output,
1534
1501
  parsedBody,
1535
- exceptionCtor: MTurkServiceException_1.MTurkServiceException,
1536
1502
  errorCode,
1537
1503
  });
1538
1504
  }
@@ -1543,12 +1509,12 @@ const de_UpdateExpirationForHITCommand = async (output, context) => {
1543
1509
  }
1544
1510
  const data = await parseBody(output.body, context);
1545
1511
  let contents = {};
1546
- contents = de_UpdateExpirationForHITResponse(data, context);
1512
+ contents = (0, smithy_client_1._json)(data);
1547
1513
  const response = {
1548
1514
  $metadata: deserializeMetadata(output),
1549
1515
  ...contents,
1550
1516
  };
1551
- return Promise.resolve(response);
1517
+ return response;
1552
1518
  };
1553
1519
  exports.de_UpdateExpirationForHITCommand = de_UpdateExpirationForHITCommand;
1554
1520
  const de_UpdateExpirationForHITCommandError = async (output, context) => {
@@ -1566,10 +1532,9 @@ const de_UpdateExpirationForHITCommandError = async (output, context) => {
1566
1532
  throw await de_ServiceFaultRes(parsedOutput, context);
1567
1533
  default:
1568
1534
  const parsedBody = parsedOutput.body;
1569
- (0, smithy_client_1.throwDefaultError)({
1535
+ return throwDefaultError({
1570
1536
  output,
1571
1537
  parsedBody,
1572
- exceptionCtor: MTurkServiceException_1.MTurkServiceException,
1573
1538
  errorCode,
1574
1539
  });
1575
1540
  }
@@ -1580,12 +1545,12 @@ const de_UpdateHITReviewStatusCommand = async (output, context) => {
1580
1545
  }
1581
1546
  const data = await parseBody(output.body, context);
1582
1547
  let contents = {};
1583
- contents = de_UpdateHITReviewStatusResponse(data, context);
1548
+ contents = (0, smithy_client_1._json)(data);
1584
1549
  const response = {
1585
1550
  $metadata: deserializeMetadata(output),
1586
1551
  ...contents,
1587
1552
  };
1588
- return Promise.resolve(response);
1553
+ return response;
1589
1554
  };
1590
1555
  exports.de_UpdateHITReviewStatusCommand = de_UpdateHITReviewStatusCommand;
1591
1556
  const de_UpdateHITReviewStatusCommandError = async (output, context) => {
@@ -1603,10 +1568,9 @@ const de_UpdateHITReviewStatusCommandError = async (output, context) => {
1603
1568
  throw await de_ServiceFaultRes(parsedOutput, context);
1604
1569
  default:
1605
1570
  const parsedBody = parsedOutput.body;
1606
- (0, smithy_client_1.throwDefaultError)({
1571
+ return throwDefaultError({
1607
1572
  output,
1608
1573
  parsedBody,
1609
- exceptionCtor: MTurkServiceException_1.MTurkServiceException,
1610
1574
  errorCode,
1611
1575
  });
1612
1576
  }
@@ -1617,12 +1581,12 @@ const de_UpdateHITTypeOfHITCommand = async (output, context) => {
1617
1581
  }
1618
1582
  const data = await parseBody(output.body, context);
1619
1583
  let contents = {};
1620
- contents = de_UpdateHITTypeOfHITResponse(data, context);
1584
+ contents = (0, smithy_client_1._json)(data);
1621
1585
  const response = {
1622
1586
  $metadata: deserializeMetadata(output),
1623
1587
  ...contents,
1624
1588
  };
1625
- return Promise.resolve(response);
1589
+ return response;
1626
1590
  };
1627
1591
  exports.de_UpdateHITTypeOfHITCommand = de_UpdateHITTypeOfHITCommand;
1628
1592
  const de_UpdateHITTypeOfHITCommandError = async (output, context) => {
@@ -1640,10 +1604,9 @@ const de_UpdateHITTypeOfHITCommandError = async (output, context) => {
1640
1604
  throw await de_ServiceFaultRes(parsedOutput, context);
1641
1605
  default:
1642
1606
  const parsedBody = parsedOutput.body;
1643
- (0, smithy_client_1.throwDefaultError)({
1607
+ return throwDefaultError({
1644
1608
  output,
1645
1609
  parsedBody,
1646
- exceptionCtor: MTurkServiceException_1.MTurkServiceException,
1647
1610
  errorCode,
1648
1611
  });
1649
1612
  }
@@ -1654,12 +1617,12 @@ const de_UpdateNotificationSettingsCommand = async (output, context) => {
1654
1617
  }
1655
1618
  const data = await parseBody(output.body, context);
1656
1619
  let contents = {};
1657
- contents = de_UpdateNotificationSettingsResponse(data, context);
1620
+ contents = (0, smithy_client_1._json)(data);
1658
1621
  const response = {
1659
1622
  $metadata: deserializeMetadata(output),
1660
1623
  ...contents,
1661
1624
  };
1662
- return Promise.resolve(response);
1625
+ return response;
1663
1626
  };
1664
1627
  exports.de_UpdateNotificationSettingsCommand = de_UpdateNotificationSettingsCommand;
1665
1628
  const de_UpdateNotificationSettingsCommandError = async (output, context) => {
@@ -1677,10 +1640,9 @@ const de_UpdateNotificationSettingsCommandError = async (output, context) => {
1677
1640
  throw await de_ServiceFaultRes(parsedOutput, context);
1678
1641
  default:
1679
1642
  const parsedBody = parsedOutput.body;
1680
- (0, smithy_client_1.throwDefaultError)({
1643
+ return throwDefaultError({
1681
1644
  output,
1682
1645
  parsedBody,
1683
- exceptionCtor: MTurkServiceException_1.MTurkServiceException,
1684
1646
  errorCode,
1685
1647
  });
1686
1648
  }
@@ -1696,7 +1658,7 @@ const de_UpdateQualificationTypeCommand = async (output, context) => {
1696
1658
  $metadata: deserializeMetadata(output),
1697
1659
  ...contents,
1698
1660
  };
1699
- return Promise.resolve(response);
1661
+ return response;
1700
1662
  };
1701
1663
  exports.de_UpdateQualificationTypeCommand = de_UpdateQualificationTypeCommand;
1702
1664
  const de_UpdateQualificationTypeCommandError = async (output, context) => {
@@ -1714,17 +1676,16 @@ const de_UpdateQualificationTypeCommandError = async (output, context) => {
1714
1676
  throw await de_ServiceFaultRes(parsedOutput, context);
1715
1677
  default:
1716
1678
  const parsedBody = parsedOutput.body;
1717
- (0, smithy_client_1.throwDefaultError)({
1679
+ return throwDefaultError({
1718
1680
  output,
1719
1681
  parsedBody,
1720
- exceptionCtor: MTurkServiceException_1.MTurkServiceException,
1721
1682
  errorCode,
1722
1683
  });
1723
1684
  }
1724
1685
  };
1725
1686
  const de_RequestErrorRes = async (parsedOutput, context) => {
1726
1687
  const body = parsedOutput.body;
1727
- const deserialized = de_RequestError(body, context);
1688
+ const deserialized = (0, smithy_client_1._json)(body);
1728
1689
  const exception = new models_0_1.RequestError({
1729
1690
  $metadata: deserializeMetadata(parsedOutput),
1730
1691
  ...deserialized,
@@ -1733,1008 +1694,286 @@ const de_RequestErrorRes = async (parsedOutput, context) => {
1733
1694
  };
1734
1695
  const de_ServiceFaultRes = async (parsedOutput, context) => {
1735
1696
  const body = parsedOutput.body;
1736
- const deserialized = de_ServiceFault(body, context);
1697
+ const deserialized = (0, smithy_client_1._json)(body);
1737
1698
  const exception = new models_0_1.ServiceFault({
1738
1699
  $metadata: deserializeMetadata(parsedOutput),
1739
1700
  ...deserialized,
1740
1701
  });
1741
1702
  return (0, smithy_client_1.decorateServiceException)(exception, body);
1742
1703
  };
1743
- const se_AcceptQualificationRequestRequest = (input, context) => {
1744
- return {
1745
- ...(input.IntegerValue != null && { IntegerValue: input.IntegerValue }),
1746
- ...(input.QualificationRequestId != null && { QualificationRequestId: input.QualificationRequestId }),
1747
- };
1748
- };
1749
- const se_ApproveAssignmentRequest = (input, context) => {
1750
- return {
1751
- ...(input.AssignmentId != null && { AssignmentId: input.AssignmentId }),
1752
- ...(input.OverrideRejection != null && { OverrideRejection: input.OverrideRejection }),
1753
- ...(input.RequesterFeedback != null && { RequesterFeedback: input.RequesterFeedback }),
1754
- };
1755
- };
1756
- const se_AssignmentStatusList = (input, context) => {
1757
- return input
1758
- .filter((e) => e != null)
1759
- .map((entry) => {
1760
- return entry;
1761
- });
1762
- };
1763
- const se_AssociateQualificationWithWorkerRequest = (input, context) => {
1764
- return {
1765
- ...(input.IntegerValue != null && { IntegerValue: input.IntegerValue }),
1766
- ...(input.QualificationTypeId != null && { QualificationTypeId: input.QualificationTypeId }),
1767
- ...(input.SendNotification != null && { SendNotification: input.SendNotification }),
1768
- ...(input.WorkerId != null && { WorkerId: input.WorkerId }),
1769
- };
1770
- };
1771
- const se_CreateAdditionalAssignmentsForHITRequest = (input, context) => {
1772
- return {
1773
- ...(input.HITId != null && { HITId: input.HITId }),
1774
- ...(input.NumberOfAdditionalAssignments != null && {
1775
- NumberOfAdditionalAssignments: input.NumberOfAdditionalAssignments,
1776
- }),
1777
- ...(input.UniqueRequestToken != null && { UniqueRequestToken: input.UniqueRequestToken }),
1778
- };
1779
- };
1780
- const se_CreateHITRequest = (input, context) => {
1781
- return {
1782
- ...(input.AssignmentDurationInSeconds != null && {
1783
- AssignmentDurationInSeconds: input.AssignmentDurationInSeconds,
1784
- }),
1785
- ...(input.AssignmentReviewPolicy != null && {
1786
- AssignmentReviewPolicy: se_ReviewPolicy(input.AssignmentReviewPolicy, context),
1787
- }),
1788
- ...(input.AutoApprovalDelayInSeconds != null && { AutoApprovalDelayInSeconds: input.AutoApprovalDelayInSeconds }),
1789
- ...(input.Description != null && { Description: input.Description }),
1790
- ...(input.HITLayoutId != null && { HITLayoutId: input.HITLayoutId }),
1791
- ...(input.HITLayoutParameters != null && {
1792
- HITLayoutParameters: se_HITLayoutParameterList(input.HITLayoutParameters, context),
1793
- }),
1794
- ...(input.HITReviewPolicy != null && { HITReviewPolicy: se_ReviewPolicy(input.HITReviewPolicy, context) }),
1795
- ...(input.Keywords != null && { Keywords: input.Keywords }),
1796
- ...(input.LifetimeInSeconds != null && { LifetimeInSeconds: input.LifetimeInSeconds }),
1797
- ...(input.MaxAssignments != null && { MaxAssignments: input.MaxAssignments }),
1798
- ...(input.QualificationRequirements != null && {
1799
- QualificationRequirements: se_QualificationRequirementList(input.QualificationRequirements, context),
1800
- }),
1801
- ...(input.Question != null && { Question: input.Question }),
1802
- ...(input.RequesterAnnotation != null && { RequesterAnnotation: input.RequesterAnnotation }),
1803
- ...(input.Reward != null && { Reward: input.Reward }),
1804
- ...(input.Title != null && { Title: input.Title }),
1805
- ...(input.UniqueRequestToken != null && { UniqueRequestToken: input.UniqueRequestToken }),
1806
- };
1807
- };
1808
- const se_CreateHITTypeRequest = (input, context) => {
1809
- return {
1810
- ...(input.AssignmentDurationInSeconds != null && {
1811
- AssignmentDurationInSeconds: input.AssignmentDurationInSeconds,
1812
- }),
1813
- ...(input.AutoApprovalDelayInSeconds != null && { AutoApprovalDelayInSeconds: input.AutoApprovalDelayInSeconds }),
1814
- ...(input.Description != null && { Description: input.Description }),
1815
- ...(input.Keywords != null && { Keywords: input.Keywords }),
1816
- ...(input.QualificationRequirements != null && {
1817
- QualificationRequirements: se_QualificationRequirementList(input.QualificationRequirements, context),
1818
- }),
1819
- ...(input.Reward != null && { Reward: input.Reward }),
1820
- ...(input.Title != null && { Title: input.Title }),
1821
- };
1822
- };
1823
- const se_CreateHITWithHITTypeRequest = (input, context) => {
1824
- return {
1825
- ...(input.AssignmentReviewPolicy != null && {
1826
- AssignmentReviewPolicy: se_ReviewPolicy(input.AssignmentReviewPolicy, context),
1827
- }),
1828
- ...(input.HITLayoutId != null && { HITLayoutId: input.HITLayoutId }),
1829
- ...(input.HITLayoutParameters != null && {
1830
- HITLayoutParameters: se_HITLayoutParameterList(input.HITLayoutParameters, context),
1831
- }),
1832
- ...(input.HITReviewPolicy != null && { HITReviewPolicy: se_ReviewPolicy(input.HITReviewPolicy, context) }),
1833
- ...(input.HITTypeId != null && { HITTypeId: input.HITTypeId }),
1834
- ...(input.LifetimeInSeconds != null && { LifetimeInSeconds: input.LifetimeInSeconds }),
1835
- ...(input.MaxAssignments != null && { MaxAssignments: input.MaxAssignments }),
1836
- ...(input.Question != null && { Question: input.Question }),
1837
- ...(input.RequesterAnnotation != null && { RequesterAnnotation: input.RequesterAnnotation }),
1838
- ...(input.UniqueRequestToken != null && { UniqueRequestToken: input.UniqueRequestToken }),
1839
- };
1840
- };
1841
- const se_CreateQualificationTypeRequest = (input, context) => {
1842
- return {
1843
- ...(input.AnswerKey != null && { AnswerKey: input.AnswerKey }),
1844
- ...(input.AutoGranted != null && { AutoGranted: input.AutoGranted }),
1845
- ...(input.AutoGrantedValue != null && { AutoGrantedValue: input.AutoGrantedValue }),
1846
- ...(input.Description != null && { Description: input.Description }),
1847
- ...(input.Keywords != null && { Keywords: input.Keywords }),
1848
- ...(input.Name != null && { Name: input.Name }),
1849
- ...(input.QualificationTypeStatus != null && { QualificationTypeStatus: input.QualificationTypeStatus }),
1850
- ...(input.RetryDelayInSeconds != null && { RetryDelayInSeconds: input.RetryDelayInSeconds }),
1851
- ...(input.Test != null && { Test: input.Test }),
1852
- ...(input.TestDurationInSeconds != null && { TestDurationInSeconds: input.TestDurationInSeconds }),
1853
- };
1854
- };
1855
- const se_CreateWorkerBlockRequest = (input, context) => {
1856
- return {
1857
- ...(input.Reason != null && { Reason: input.Reason }),
1858
- ...(input.WorkerId != null && { WorkerId: input.WorkerId }),
1859
- };
1860
- };
1861
- const se_CustomerIdList = (input, context) => {
1862
- return input
1863
- .filter((e) => e != null)
1864
- .map((entry) => {
1865
- return entry;
1866
- });
1867
- };
1868
- const se_DeleteHITRequest = (input, context) => {
1869
- return {
1870
- ...(input.HITId != null && { HITId: input.HITId }),
1871
- };
1872
- };
1873
- const se_DeleteQualificationTypeRequest = (input, context) => {
1874
- return {
1875
- ...(input.QualificationTypeId != null && { QualificationTypeId: input.QualificationTypeId }),
1876
- };
1877
- };
1878
- const se_DeleteWorkerBlockRequest = (input, context) => {
1879
- return {
1880
- ...(input.Reason != null && { Reason: input.Reason }),
1881
- ...(input.WorkerId != null && { WorkerId: input.WorkerId }),
1882
- };
1883
- };
1884
- const se_DisassociateQualificationFromWorkerRequest = (input, context) => {
1885
- return {
1886
- ...(input.QualificationTypeId != null && { QualificationTypeId: input.QualificationTypeId }),
1887
- ...(input.Reason != null && { Reason: input.Reason }),
1888
- ...(input.WorkerId != null && { WorkerId: input.WorkerId }),
1889
- };
1890
- };
1891
- const se_EventTypeList = (input, context) => {
1892
- return input
1893
- .filter((e) => e != null)
1894
- .map((entry) => {
1895
- return entry;
1896
- });
1897
- };
1898
- const se_GetAccountBalanceRequest = (input, context) => {
1899
- return {};
1900
- };
1901
- const se_GetAssignmentRequest = (input, context) => {
1902
- return {
1903
- ...(input.AssignmentId != null && { AssignmentId: input.AssignmentId }),
1904
- };
1905
- };
1906
- const se_GetFileUploadURLRequest = (input, context) => {
1907
- return {
1908
- ...(input.AssignmentId != null && { AssignmentId: input.AssignmentId }),
1909
- ...(input.QuestionIdentifier != null && { QuestionIdentifier: input.QuestionIdentifier }),
1910
- };
1911
- };
1912
- const se_GetHITRequest = (input, context) => {
1913
- return {
1914
- ...(input.HITId != null && { HITId: input.HITId }),
1915
- };
1916
- };
1917
- const se_GetQualificationScoreRequest = (input, context) => {
1918
- return {
1919
- ...(input.QualificationTypeId != null && { QualificationTypeId: input.QualificationTypeId }),
1920
- ...(input.WorkerId != null && { WorkerId: input.WorkerId }),
1921
- };
1922
- };
1923
- const se_GetQualificationTypeRequest = (input, context) => {
1924
- return {
1925
- ...(input.QualificationTypeId != null && { QualificationTypeId: input.QualificationTypeId }),
1926
- };
1927
- };
1928
- const se_HITLayoutParameter = (input, context) => {
1929
- return {
1930
- ...(input.Name != null && { Name: input.Name }),
1931
- ...(input.Value != null && { Value: input.Value }),
1932
- };
1933
- };
1934
- const se_HITLayoutParameterList = (input, context) => {
1935
- return input
1936
- .filter((e) => e != null)
1937
- .map((entry) => {
1938
- return se_HITLayoutParameter(entry, context);
1939
- });
1940
- };
1941
- const se_IntegerList = (input, context) => {
1942
- return input
1943
- .filter((e) => e != null)
1944
- .map((entry) => {
1945
- return entry;
1946
- });
1947
- };
1948
- const se_ListAssignmentsForHITRequest = (input, context) => {
1949
- return {
1950
- ...(input.AssignmentStatuses != null && {
1951
- AssignmentStatuses: se_AssignmentStatusList(input.AssignmentStatuses, context),
1952
- }),
1953
- ...(input.HITId != null && { HITId: input.HITId }),
1954
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1955
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1956
- };
1957
- };
1958
- const se_ListBonusPaymentsRequest = (input, context) => {
1959
- return {
1960
- ...(input.AssignmentId != null && { AssignmentId: input.AssignmentId }),
1961
- ...(input.HITId != null && { HITId: input.HITId }),
1962
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1963
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1964
- };
1965
- };
1966
- const se_ListHITsForQualificationTypeRequest = (input, context) => {
1967
- return {
1968
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1969
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1970
- ...(input.QualificationTypeId != null && { QualificationTypeId: input.QualificationTypeId }),
1971
- };
1972
- };
1973
- const se_ListHITsRequest = (input, context) => {
1974
- return {
1975
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1976
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1977
- };
1978
- };
1979
- const se_ListQualificationRequestsRequest = (input, context) => {
1980
- return {
1981
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1982
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1983
- ...(input.QualificationTypeId != null && { QualificationTypeId: input.QualificationTypeId }),
1984
- };
1985
- };
1986
- const se_ListQualificationTypesRequest = (input, context) => {
1987
- return {
1988
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1989
- ...(input.MustBeOwnedByCaller != null && { MustBeOwnedByCaller: input.MustBeOwnedByCaller }),
1990
- ...(input.MustBeRequestable != null && { MustBeRequestable: input.MustBeRequestable }),
1991
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1992
- ...(input.Query != null && { Query: input.Query }),
1993
- };
1994
- };
1995
- const se_ListReviewableHITsRequest = (input, context) => {
1996
- return {
1997
- ...(input.HITTypeId != null && { HITTypeId: input.HITTypeId }),
1998
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1999
- ...(input.NextToken != null && { NextToken: input.NextToken }),
2000
- ...(input.Status != null && { Status: input.Status }),
2001
- };
2002
- };
2003
- const se_ListReviewPolicyResultsForHITRequest = (input, context) => {
2004
- return {
2005
- ...(input.HITId != null && { HITId: input.HITId }),
2006
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
2007
- ...(input.NextToken != null && { NextToken: input.NextToken }),
2008
- ...(input.PolicyLevels != null && { PolicyLevels: se_ReviewPolicyLevelList(input.PolicyLevels, context) }),
2009
- ...(input.RetrieveActions != null && { RetrieveActions: input.RetrieveActions }),
2010
- ...(input.RetrieveResults != null && { RetrieveResults: input.RetrieveResults }),
2011
- };
2012
- };
2013
- const se_ListWorkerBlocksRequest = (input, context) => {
2014
- return {
2015
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
2016
- ...(input.NextToken != null && { NextToken: input.NextToken }),
2017
- };
2018
- };
2019
- const se_ListWorkersWithQualificationTypeRequest = (input, context) => {
2020
- return {
2021
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
2022
- ...(input.NextToken != null && { NextToken: input.NextToken }),
2023
- ...(input.QualificationTypeId != null && { QualificationTypeId: input.QualificationTypeId }),
2024
- ...(input.Status != null && { Status: input.Status }),
2025
- };
2026
- };
2027
- const se_Locale = (input, context) => {
2028
- return {
2029
- ...(input.Country != null && { Country: input.Country }),
2030
- ...(input.Subdivision != null && { Subdivision: input.Subdivision }),
2031
- };
2032
- };
2033
- const se_LocaleList = (input, context) => {
2034
- return input
2035
- .filter((e) => e != null)
2036
- .map((entry) => {
2037
- return se_Locale(entry, context);
2038
- });
2039
- };
2040
- const se_NotificationSpecification = (input, context) => {
2041
- return {
2042
- ...(input.Destination != null && { Destination: input.Destination }),
2043
- ...(input.EventTypes != null && { EventTypes: se_EventTypeList(input.EventTypes, context) }),
2044
- ...(input.Transport != null && { Transport: input.Transport }),
2045
- ...(input.Version != null && { Version: input.Version }),
2046
- };
2047
- };
2048
- const se_NotifyWorkersRequest = (input, context) => {
2049
- return {
2050
- ...(input.MessageText != null && { MessageText: input.MessageText }),
2051
- ...(input.Subject != null && { Subject: input.Subject }),
2052
- ...(input.WorkerIds != null && { WorkerIds: se_CustomerIdList(input.WorkerIds, context) }),
2053
- };
2054
- };
2055
- const se_ParameterMapEntry = (input, context) => {
2056
- return {
2057
- ...(input.Key != null && { Key: input.Key }),
2058
- ...(input.Values != null && { Values: se_StringList(input.Values, context) }),
2059
- };
2060
- };
2061
- const se_ParameterMapEntryList = (input, context) => {
2062
- return input
2063
- .filter((e) => e != null)
2064
- .map((entry) => {
2065
- return se_ParameterMapEntry(entry, context);
2066
- });
2067
- };
2068
- const se_PolicyParameter = (input, context) => {
2069
- return {
2070
- ...(input.Key != null && { Key: input.Key }),
2071
- ...(input.MapEntries != null && { MapEntries: se_ParameterMapEntryList(input.MapEntries, context) }),
2072
- ...(input.Values != null && { Values: se_StringList(input.Values, context) }),
2073
- };
2074
- };
2075
- const se_PolicyParameterList = (input, context) => {
2076
- return input
2077
- .filter((e) => e != null)
2078
- .map((entry) => {
2079
- return se_PolicyParameter(entry, context);
2080
- });
2081
- };
2082
- const se_QualificationRequirement = (input, context) => {
2083
- return {
2084
- ...(input.ActionsGuarded != null && { ActionsGuarded: input.ActionsGuarded }),
2085
- ...(input.Comparator != null && { Comparator: input.Comparator }),
2086
- ...(input.IntegerValues != null && { IntegerValues: se_IntegerList(input.IntegerValues, context) }),
2087
- ...(input.LocaleValues != null && { LocaleValues: se_LocaleList(input.LocaleValues, context) }),
2088
- ...(input.QualificationTypeId != null && { QualificationTypeId: input.QualificationTypeId }),
2089
- ...(input.RequiredToPreview != null && { RequiredToPreview: input.RequiredToPreview }),
2090
- };
2091
- };
2092
- const se_QualificationRequirementList = (input, context) => {
2093
- return input
2094
- .filter((e) => e != null)
2095
- .map((entry) => {
2096
- return se_QualificationRequirement(entry, context);
2097
- });
2098
- };
2099
- const se_RejectAssignmentRequest = (input, context) => {
2100
- return {
2101
- ...(input.AssignmentId != null && { AssignmentId: input.AssignmentId }),
2102
- ...(input.RequesterFeedback != null && { RequesterFeedback: input.RequesterFeedback }),
2103
- };
2104
- };
2105
- const se_RejectQualificationRequestRequest = (input, context) => {
2106
- return {
2107
- ...(input.QualificationRequestId != null && { QualificationRequestId: input.QualificationRequestId }),
2108
- ...(input.Reason != null && { Reason: input.Reason }),
2109
- };
2110
- };
2111
- const se_ReviewPolicy = (input, context) => {
2112
- return {
2113
- ...(input.Parameters != null && { Parameters: se_PolicyParameterList(input.Parameters, context) }),
2114
- ...(input.PolicyName != null && { PolicyName: input.PolicyName }),
2115
- };
2116
- };
2117
- const se_ReviewPolicyLevelList = (input, context) => {
2118
- return input
2119
- .filter((e) => e != null)
2120
- .map((entry) => {
2121
- return entry;
2122
- });
2123
- };
2124
- const se_SendBonusRequest = (input, context) => {
2125
- return {
2126
- ...(input.AssignmentId != null && { AssignmentId: input.AssignmentId }),
2127
- ...(input.BonusAmount != null && { BonusAmount: input.BonusAmount }),
2128
- ...(input.Reason != null && { Reason: input.Reason }),
2129
- ...(input.UniqueRequestToken != null && { UniqueRequestToken: input.UniqueRequestToken }),
2130
- ...(input.WorkerId != null && { WorkerId: input.WorkerId }),
2131
- };
2132
- };
2133
- const se_SendTestEventNotificationRequest = (input, context) => {
2134
- return {
2135
- ...(input.Notification != null && { Notification: se_NotificationSpecification(input.Notification, context) }),
2136
- ...(input.TestEventType != null && { TestEventType: input.TestEventType }),
2137
- };
2138
- };
2139
- const se_StringList = (input, context) => {
2140
- return input
2141
- .filter((e) => e != null)
2142
- .map((entry) => {
2143
- return entry;
2144
- });
2145
- };
2146
1704
  const se_UpdateExpirationForHITRequest = (input, context) => {
2147
- return {
2148
- ...(input.ExpireAt != null && { ExpireAt: Math.round(input.ExpireAt.getTime() / 1000) }),
2149
- ...(input.HITId != null && { HITId: input.HITId }),
2150
- };
2151
- };
2152
- const se_UpdateHITReviewStatusRequest = (input, context) => {
2153
- return {
2154
- ...(input.HITId != null && { HITId: input.HITId }),
2155
- ...(input.Revert != null && { Revert: input.Revert }),
2156
- };
2157
- };
2158
- const se_UpdateHITTypeOfHITRequest = (input, context) => {
2159
- return {
2160
- ...(input.HITId != null && { HITId: input.HITId }),
2161
- ...(input.HITTypeId != null && { HITTypeId: input.HITTypeId }),
2162
- };
2163
- };
2164
- const se_UpdateNotificationSettingsRequest = (input, context) => {
2165
- return {
2166
- ...(input.Active != null && { Active: input.Active }),
2167
- ...(input.HITTypeId != null && { HITTypeId: input.HITTypeId }),
2168
- ...(input.Notification != null && { Notification: se_NotificationSpecification(input.Notification, context) }),
2169
- };
2170
- };
2171
- const se_UpdateQualificationTypeRequest = (input, context) => {
2172
- return {
2173
- ...(input.AnswerKey != null && { AnswerKey: input.AnswerKey }),
2174
- ...(input.AutoGranted != null && { AutoGranted: input.AutoGranted }),
2175
- ...(input.AutoGrantedValue != null && { AutoGrantedValue: input.AutoGrantedValue }),
2176
- ...(input.Description != null && { Description: input.Description }),
2177
- ...(input.QualificationTypeId != null && { QualificationTypeId: input.QualificationTypeId }),
2178
- ...(input.QualificationTypeStatus != null && { QualificationTypeStatus: input.QualificationTypeStatus }),
2179
- ...(input.RetryDelayInSeconds != null && { RetryDelayInSeconds: input.RetryDelayInSeconds }),
2180
- ...(input.Test != null && { Test: input.Test }),
2181
- ...(input.TestDurationInSeconds != null && { TestDurationInSeconds: input.TestDurationInSeconds }),
2182
- };
2183
- };
2184
- const de_AcceptQualificationRequestResponse = (output, context) => {
2185
- return {};
2186
- };
2187
- const de_ApproveAssignmentResponse = (output, context) => {
2188
- return {};
1705
+ return (0, smithy_client_1.take)(input, {
1706
+ ExpireAt: (_) => Math.round(_.getTime() / 1000),
1707
+ HITId: [],
1708
+ });
2189
1709
  };
2190
1710
  const de_Assignment = (output, context) => {
2191
- return {
2192
- AcceptTime: output.AcceptTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.AcceptTime))) : undefined,
2193
- Answer: (0, smithy_client_1.expectString)(output.Answer),
2194
- ApprovalTime: output.ApprovalTime != null
2195
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.ApprovalTime)))
2196
- : undefined,
2197
- AssignmentId: (0, smithy_client_1.expectString)(output.AssignmentId),
2198
- AssignmentStatus: (0, smithy_client_1.expectString)(output.AssignmentStatus),
2199
- AutoApprovalTime: output.AutoApprovalTime != null
2200
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.AutoApprovalTime)))
2201
- : undefined,
2202
- Deadline: output.Deadline != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.Deadline))) : undefined,
2203
- HITId: (0, smithy_client_1.expectString)(output.HITId),
2204
- RejectionTime: output.RejectionTime != null
2205
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.RejectionTime)))
2206
- : undefined,
2207
- RequesterFeedback: (0, smithy_client_1.expectString)(output.RequesterFeedback),
2208
- SubmitTime: output.SubmitTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.SubmitTime))) : undefined,
2209
- WorkerId: (0, smithy_client_1.expectString)(output.WorkerId),
2210
- };
1711
+ return (0, smithy_client_1.take)(output, {
1712
+ AcceptTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1713
+ Answer: smithy_client_1.expectString,
1714
+ ApprovalTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1715
+ AssignmentId: smithy_client_1.expectString,
1716
+ AssignmentStatus: smithy_client_1.expectString,
1717
+ AutoApprovalTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1718
+ Deadline: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1719
+ HITId: smithy_client_1.expectString,
1720
+ RejectionTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1721
+ RequesterFeedback: smithy_client_1.expectString,
1722
+ SubmitTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1723
+ WorkerId: smithy_client_1.expectString,
1724
+ });
2211
1725
  };
2212
1726
  const de_AssignmentList = (output, context) => {
2213
1727
  const retVal = (output || [])
2214
1728
  .filter((e) => e != null)
2215
1729
  .map((entry) => {
2216
- if (entry === null) {
2217
- return null;
2218
- }
2219
1730
  return de_Assignment(entry, context);
2220
1731
  });
2221
1732
  return retVal;
2222
1733
  };
2223
- const de_AssociateQualificationWithWorkerResponse = (output, context) => {
2224
- return {};
2225
- };
2226
1734
  const de_BonusPayment = (output, context) => {
2227
- return {
2228
- AssignmentId: (0, smithy_client_1.expectString)(output.AssignmentId),
2229
- BonusAmount: (0, smithy_client_1.expectString)(output.BonusAmount),
2230
- GrantTime: output.GrantTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.GrantTime))) : undefined,
2231
- Reason: (0, smithy_client_1.expectString)(output.Reason),
2232
- WorkerId: (0, smithy_client_1.expectString)(output.WorkerId),
2233
- };
1735
+ return (0, smithy_client_1.take)(output, {
1736
+ AssignmentId: smithy_client_1.expectString,
1737
+ BonusAmount: smithy_client_1.expectString,
1738
+ GrantTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1739
+ Reason: smithy_client_1.expectString,
1740
+ WorkerId: smithy_client_1.expectString,
1741
+ });
2234
1742
  };
2235
1743
  const de_BonusPaymentList = (output, context) => {
2236
1744
  const retVal = (output || [])
2237
1745
  .filter((e) => e != null)
2238
1746
  .map((entry) => {
2239
- if (entry === null) {
2240
- return null;
2241
- }
2242
1747
  return de_BonusPayment(entry, context);
2243
1748
  });
2244
1749
  return retVal;
2245
1750
  };
2246
- const de_CreateAdditionalAssignmentsForHITResponse = (output, context) => {
2247
- return {};
2248
- };
2249
1751
  const de_CreateHITResponse = (output, context) => {
2250
- return {
2251
- HIT: output.HIT != null ? de_HIT(output.HIT, context) : undefined,
2252
- };
2253
- };
2254
- const de_CreateHITTypeResponse = (output, context) => {
2255
- return {
2256
- HITTypeId: (0, smithy_client_1.expectString)(output.HITTypeId),
2257
- };
1752
+ return (0, smithy_client_1.take)(output, {
1753
+ HIT: (_) => de_HIT(_, context),
1754
+ });
2258
1755
  };
2259
1756
  const de_CreateHITWithHITTypeResponse = (output, context) => {
2260
- return {
2261
- HIT: output.HIT != null ? de_HIT(output.HIT, context) : undefined,
2262
- };
1757
+ return (0, smithy_client_1.take)(output, {
1758
+ HIT: (_) => de_HIT(_, context),
1759
+ });
2263
1760
  };
2264
1761
  const de_CreateQualificationTypeResponse = (output, context) => {
2265
- return {
2266
- QualificationType: output.QualificationType != null ? de_QualificationType(output.QualificationType, context) : undefined,
2267
- };
2268
- };
2269
- const de_CreateWorkerBlockResponse = (output, context) => {
2270
- return {};
2271
- };
2272
- const de_DeleteHITResponse = (output, context) => {
2273
- return {};
2274
- };
2275
- const de_DeleteQualificationTypeResponse = (output, context) => {
2276
- return {};
2277
- };
2278
- const de_DeleteWorkerBlockResponse = (output, context) => {
2279
- return {};
2280
- };
2281
- const de_DisassociateQualificationFromWorkerResponse = (output, context) => {
2282
- return {};
2283
- };
2284
- const de_GetAccountBalanceResponse = (output, context) => {
2285
- return {
2286
- AvailableBalance: (0, smithy_client_1.expectString)(output.AvailableBalance),
2287
- OnHoldBalance: (0, smithy_client_1.expectString)(output.OnHoldBalance),
2288
- };
1762
+ return (0, smithy_client_1.take)(output, {
1763
+ QualificationType: (_) => de_QualificationType(_, context),
1764
+ });
2289
1765
  };
2290
1766
  const de_GetAssignmentResponse = (output, context) => {
2291
- return {
2292
- Assignment: output.Assignment != null ? de_Assignment(output.Assignment, context) : undefined,
2293
- HIT: output.HIT != null ? de_HIT(output.HIT, context) : undefined,
2294
- };
2295
- };
2296
- const de_GetFileUploadURLResponse = (output, context) => {
2297
- return {
2298
- FileUploadURL: (0, smithy_client_1.expectString)(output.FileUploadURL),
2299
- };
1767
+ return (0, smithy_client_1.take)(output, {
1768
+ Assignment: (_) => de_Assignment(_, context),
1769
+ HIT: (_) => de_HIT(_, context),
1770
+ });
2300
1771
  };
2301
1772
  const de_GetHITResponse = (output, context) => {
2302
- return {
2303
- HIT: output.HIT != null ? de_HIT(output.HIT, context) : undefined,
2304
- };
1773
+ return (0, smithy_client_1.take)(output, {
1774
+ HIT: (_) => de_HIT(_, context),
1775
+ });
2305
1776
  };
2306
1777
  const de_GetQualificationScoreResponse = (output, context) => {
2307
- return {
2308
- Qualification: output.Qualification != null ? de_Qualification(output.Qualification, context) : undefined,
2309
- };
1778
+ return (0, smithy_client_1.take)(output, {
1779
+ Qualification: (_) => de_Qualification(_, context),
1780
+ });
2310
1781
  };
2311
1782
  const de_GetQualificationTypeResponse = (output, context) => {
2312
- return {
2313
- QualificationType: output.QualificationType != null ? de_QualificationType(output.QualificationType, context) : undefined,
2314
- };
1783
+ return (0, smithy_client_1.take)(output, {
1784
+ QualificationType: (_) => de_QualificationType(_, context),
1785
+ });
2315
1786
  };
2316
1787
  const de_HIT = (output, context) => {
2317
- return {
2318
- AssignmentDurationInSeconds: (0, smithy_client_1.expectLong)(output.AssignmentDurationInSeconds),
2319
- AutoApprovalDelayInSeconds: (0, smithy_client_1.expectLong)(output.AutoApprovalDelayInSeconds),
2320
- CreationTime: output.CreationTime != null
2321
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreationTime)))
2322
- : undefined,
2323
- Description: (0, smithy_client_1.expectString)(output.Description),
2324
- Expiration: output.Expiration != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.Expiration))) : undefined,
2325
- HITGroupId: (0, smithy_client_1.expectString)(output.HITGroupId),
2326
- HITId: (0, smithy_client_1.expectString)(output.HITId),
2327
- HITLayoutId: (0, smithy_client_1.expectString)(output.HITLayoutId),
2328
- HITReviewStatus: (0, smithy_client_1.expectString)(output.HITReviewStatus),
2329
- HITStatus: (0, smithy_client_1.expectString)(output.HITStatus),
2330
- HITTypeId: (0, smithy_client_1.expectString)(output.HITTypeId),
2331
- Keywords: (0, smithy_client_1.expectString)(output.Keywords),
2332
- MaxAssignments: (0, smithy_client_1.expectInt32)(output.MaxAssignments),
2333
- NumberOfAssignmentsAvailable: (0, smithy_client_1.expectInt32)(output.NumberOfAssignmentsAvailable),
2334
- NumberOfAssignmentsCompleted: (0, smithy_client_1.expectInt32)(output.NumberOfAssignmentsCompleted),
2335
- NumberOfAssignmentsPending: (0, smithy_client_1.expectInt32)(output.NumberOfAssignmentsPending),
2336
- QualificationRequirements: output.QualificationRequirements != null
2337
- ? de_QualificationRequirementList(output.QualificationRequirements, context)
2338
- : undefined,
2339
- Question: (0, smithy_client_1.expectString)(output.Question),
2340
- RequesterAnnotation: (0, smithy_client_1.expectString)(output.RequesterAnnotation),
2341
- Reward: (0, smithy_client_1.expectString)(output.Reward),
2342
- Title: (0, smithy_client_1.expectString)(output.Title),
2343
- };
1788
+ return (0, smithy_client_1.take)(output, {
1789
+ AssignmentDurationInSeconds: smithy_client_1.expectLong,
1790
+ AutoApprovalDelayInSeconds: smithy_client_1.expectLong,
1791
+ CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1792
+ Description: smithy_client_1.expectString,
1793
+ Expiration: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1794
+ HITGroupId: smithy_client_1.expectString,
1795
+ HITId: smithy_client_1.expectString,
1796
+ HITLayoutId: smithy_client_1.expectString,
1797
+ HITReviewStatus: smithy_client_1.expectString,
1798
+ HITStatus: smithy_client_1.expectString,
1799
+ HITTypeId: smithy_client_1.expectString,
1800
+ Keywords: smithy_client_1.expectString,
1801
+ MaxAssignments: smithy_client_1.expectInt32,
1802
+ NumberOfAssignmentsAvailable: smithy_client_1.expectInt32,
1803
+ NumberOfAssignmentsCompleted: smithy_client_1.expectInt32,
1804
+ NumberOfAssignmentsPending: smithy_client_1.expectInt32,
1805
+ QualificationRequirements: smithy_client_1._json,
1806
+ Question: smithy_client_1.expectString,
1807
+ RequesterAnnotation: smithy_client_1.expectString,
1808
+ Reward: smithy_client_1.expectString,
1809
+ Title: smithy_client_1.expectString,
1810
+ });
2344
1811
  };
2345
1812
  const de_HITList = (output, context) => {
2346
1813
  const retVal = (output || [])
2347
1814
  .filter((e) => e != null)
2348
1815
  .map((entry) => {
2349
- if (entry === null) {
2350
- return null;
2351
- }
2352
1816
  return de_HIT(entry, context);
2353
1817
  });
2354
1818
  return retVal;
2355
1819
  };
2356
- const de_IntegerList = (output, context) => {
2357
- const retVal = (output || [])
2358
- .filter((e) => e != null)
2359
- .map((entry) => {
2360
- if (entry === null) {
2361
- return null;
2362
- }
2363
- return (0, smithy_client_1.expectInt32)(entry);
2364
- });
2365
- return retVal;
2366
- };
2367
1820
  const de_ListAssignmentsForHITResponse = (output, context) => {
2368
- return {
2369
- Assignments: output.Assignments != null ? de_AssignmentList(output.Assignments, context) : undefined,
2370
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
2371
- NumResults: (0, smithy_client_1.expectInt32)(output.NumResults),
2372
- };
1821
+ return (0, smithy_client_1.take)(output, {
1822
+ Assignments: (_) => de_AssignmentList(_, context),
1823
+ NextToken: smithy_client_1.expectString,
1824
+ NumResults: smithy_client_1.expectInt32,
1825
+ });
2373
1826
  };
2374
1827
  const de_ListBonusPaymentsResponse = (output, context) => {
2375
- return {
2376
- BonusPayments: output.BonusPayments != null ? de_BonusPaymentList(output.BonusPayments, context) : undefined,
2377
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
2378
- NumResults: (0, smithy_client_1.expectInt32)(output.NumResults),
2379
- };
1828
+ return (0, smithy_client_1.take)(output, {
1829
+ BonusPayments: (_) => de_BonusPaymentList(_, context),
1830
+ NextToken: smithy_client_1.expectString,
1831
+ NumResults: smithy_client_1.expectInt32,
1832
+ });
2380
1833
  };
2381
1834
  const de_ListHITsForQualificationTypeResponse = (output, context) => {
2382
- return {
2383
- HITs: output.HITs != null ? de_HITList(output.HITs, context) : undefined,
2384
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
2385
- NumResults: (0, smithy_client_1.expectInt32)(output.NumResults),
2386
- };
1835
+ return (0, smithy_client_1.take)(output, {
1836
+ HITs: (_) => de_HITList(_, context),
1837
+ NextToken: smithy_client_1.expectString,
1838
+ NumResults: smithy_client_1.expectInt32,
1839
+ });
2387
1840
  };
2388
1841
  const de_ListHITsResponse = (output, context) => {
2389
- return {
2390
- HITs: output.HITs != null ? de_HITList(output.HITs, context) : undefined,
2391
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
2392
- NumResults: (0, smithy_client_1.expectInt32)(output.NumResults),
2393
- };
1842
+ return (0, smithy_client_1.take)(output, {
1843
+ HITs: (_) => de_HITList(_, context),
1844
+ NextToken: smithy_client_1.expectString,
1845
+ NumResults: smithy_client_1.expectInt32,
1846
+ });
2394
1847
  };
2395
1848
  const de_ListQualificationRequestsResponse = (output, context) => {
2396
- return {
2397
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
2398
- NumResults: (0, smithy_client_1.expectInt32)(output.NumResults),
2399
- QualificationRequests: output.QualificationRequests != null
2400
- ? de_QualificationRequestList(output.QualificationRequests, context)
2401
- : undefined,
2402
- };
1849
+ return (0, smithy_client_1.take)(output, {
1850
+ NextToken: smithy_client_1.expectString,
1851
+ NumResults: smithy_client_1.expectInt32,
1852
+ QualificationRequests: (_) => de_QualificationRequestList(_, context),
1853
+ });
2403
1854
  };
2404
1855
  const de_ListQualificationTypesResponse = (output, context) => {
2405
- return {
2406
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
2407
- NumResults: (0, smithy_client_1.expectInt32)(output.NumResults),
2408
- QualificationTypes: output.QualificationTypes != null ? de_QualificationTypeList(output.QualificationTypes, context) : undefined,
2409
- };
2410
- };
2411
- const de_ListReviewableHITsResponse = (output, context) => {
2412
- return {
2413
- HITs: output.HITs != null ? de_HITList(output.HITs, context) : undefined,
2414
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
2415
- NumResults: (0, smithy_client_1.expectInt32)(output.NumResults),
2416
- };
2417
- };
2418
- const de_ListReviewPolicyResultsForHITResponse = (output, context) => {
2419
- return {
2420
- AssignmentReviewPolicy: output.AssignmentReviewPolicy != null ? de_ReviewPolicy(output.AssignmentReviewPolicy, context) : undefined,
2421
- AssignmentReviewReport: output.AssignmentReviewReport != null ? de_ReviewReport(output.AssignmentReviewReport, context) : undefined,
2422
- HITId: (0, smithy_client_1.expectString)(output.HITId),
2423
- HITReviewPolicy: output.HITReviewPolicy != null ? de_ReviewPolicy(output.HITReviewPolicy, context) : undefined,
2424
- HITReviewReport: output.HITReviewReport != null ? de_ReviewReport(output.HITReviewReport, context) : undefined,
2425
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
2426
- };
2427
- };
2428
- const de_ListWorkerBlocksResponse = (output, context) => {
2429
- return {
2430
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
2431
- NumResults: (0, smithy_client_1.expectInt32)(output.NumResults),
2432
- WorkerBlocks: output.WorkerBlocks != null ? de_WorkerBlockList(output.WorkerBlocks, context) : undefined,
2433
- };
2434
- };
2435
- const de_ListWorkersWithQualificationTypeResponse = (output, context) => {
2436
- return {
2437
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
2438
- NumResults: (0, smithy_client_1.expectInt32)(output.NumResults),
2439
- Qualifications: output.Qualifications != null ? de_QualificationList(output.Qualifications, context) : undefined,
2440
- };
2441
- };
2442
- const de_Locale = (output, context) => {
2443
- return {
2444
- Country: (0, smithy_client_1.expectString)(output.Country),
2445
- Subdivision: (0, smithy_client_1.expectString)(output.Subdivision),
2446
- };
2447
- };
2448
- const de_LocaleList = (output, context) => {
2449
- const retVal = (output || [])
2450
- .filter((e) => e != null)
2451
- .map((entry) => {
2452
- if (entry === null) {
2453
- return null;
2454
- }
2455
- return de_Locale(entry, context);
1856
+ return (0, smithy_client_1.take)(output, {
1857
+ NextToken: smithy_client_1.expectString,
1858
+ NumResults: smithy_client_1.expectInt32,
1859
+ QualificationTypes: (_) => de_QualificationTypeList(_, context),
2456
1860
  });
2457
- return retVal;
2458
- };
2459
- const de_NotifyWorkersFailureStatus = (output, context) => {
2460
- return {
2461
- NotifyWorkersFailureCode: (0, smithy_client_1.expectString)(output.NotifyWorkersFailureCode),
2462
- NotifyWorkersFailureMessage: (0, smithy_client_1.expectString)(output.NotifyWorkersFailureMessage),
2463
- WorkerId: (0, smithy_client_1.expectString)(output.WorkerId),
2464
- };
2465
1861
  };
2466
- const de_NotifyWorkersFailureStatusList = (output, context) => {
2467
- const retVal = (output || [])
2468
- .filter((e) => e != null)
2469
- .map((entry) => {
2470
- if (entry === null) {
2471
- return null;
2472
- }
2473
- return de_NotifyWorkersFailureStatus(entry, context);
1862
+ const de_ListReviewableHITsResponse = (output, context) => {
1863
+ return (0, smithy_client_1.take)(output, {
1864
+ HITs: (_) => de_HITList(_, context),
1865
+ NextToken: smithy_client_1.expectString,
1866
+ NumResults: smithy_client_1.expectInt32,
2474
1867
  });
2475
- return retVal;
2476
- };
2477
- const de_NotifyWorkersResponse = (output, context) => {
2478
- return {
2479
- NotifyWorkersFailureStatuses: output.NotifyWorkersFailureStatuses != null
2480
- ? de_NotifyWorkersFailureStatusList(output.NotifyWorkersFailureStatuses, context)
2481
- : undefined,
2482
- };
2483
- };
2484
- const de_ParameterMapEntry = (output, context) => {
2485
- return {
2486
- Key: (0, smithy_client_1.expectString)(output.Key),
2487
- Values: output.Values != null ? de_StringList(output.Values, context) : undefined,
2488
- };
2489
1868
  };
2490
- const de_ParameterMapEntryList = (output, context) => {
2491
- const retVal = (output || [])
2492
- .filter((e) => e != null)
2493
- .map((entry) => {
2494
- if (entry === null) {
2495
- return null;
2496
- }
2497
- return de_ParameterMapEntry(entry, context);
1869
+ const de_ListReviewPolicyResultsForHITResponse = (output, context) => {
1870
+ return (0, smithy_client_1.take)(output, {
1871
+ AssignmentReviewPolicy: smithy_client_1._json,
1872
+ AssignmentReviewReport: (_) => de_ReviewReport(_, context),
1873
+ HITId: smithy_client_1.expectString,
1874
+ HITReviewPolicy: smithy_client_1._json,
1875
+ HITReviewReport: (_) => de_ReviewReport(_, context),
1876
+ NextToken: smithy_client_1.expectString,
2498
1877
  });
2499
- return retVal;
2500
- };
2501
- const de_PolicyParameter = (output, context) => {
2502
- return {
2503
- Key: (0, smithy_client_1.expectString)(output.Key),
2504
- MapEntries: output.MapEntries != null ? de_ParameterMapEntryList(output.MapEntries, context) : undefined,
2505
- Values: output.Values != null ? de_StringList(output.Values, context) : undefined,
2506
- };
2507
1878
  };
2508
- const de_PolicyParameterList = (output, context) => {
2509
- const retVal = (output || [])
2510
- .filter((e) => e != null)
2511
- .map((entry) => {
2512
- if (entry === null) {
2513
- return null;
2514
- }
2515
- return de_PolicyParameter(entry, context);
1879
+ const de_ListWorkersWithQualificationTypeResponse = (output, context) => {
1880
+ return (0, smithy_client_1.take)(output, {
1881
+ NextToken: smithy_client_1.expectString,
1882
+ NumResults: smithy_client_1.expectInt32,
1883
+ Qualifications: (_) => de_QualificationList(_, context),
2516
1884
  });
2517
- return retVal;
2518
1885
  };
2519
1886
  const de_Qualification = (output, context) => {
2520
- return {
2521
- GrantTime: output.GrantTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.GrantTime))) : undefined,
2522
- IntegerValue: (0, smithy_client_1.expectInt32)(output.IntegerValue),
2523
- LocaleValue: output.LocaleValue != null ? de_Locale(output.LocaleValue, context) : undefined,
2524
- QualificationTypeId: (0, smithy_client_1.expectString)(output.QualificationTypeId),
2525
- Status: (0, smithy_client_1.expectString)(output.Status),
2526
- WorkerId: (0, smithy_client_1.expectString)(output.WorkerId),
2527
- };
1887
+ return (0, smithy_client_1.take)(output, {
1888
+ GrantTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1889
+ IntegerValue: smithy_client_1.expectInt32,
1890
+ LocaleValue: smithy_client_1._json,
1891
+ QualificationTypeId: smithy_client_1.expectString,
1892
+ Status: smithy_client_1.expectString,
1893
+ WorkerId: smithy_client_1.expectString,
1894
+ });
2528
1895
  };
2529
1896
  const de_QualificationList = (output, context) => {
2530
1897
  const retVal = (output || [])
2531
1898
  .filter((e) => e != null)
2532
1899
  .map((entry) => {
2533
- if (entry === null) {
2534
- return null;
2535
- }
2536
1900
  return de_Qualification(entry, context);
2537
1901
  });
2538
1902
  return retVal;
2539
1903
  };
2540
1904
  const de_QualificationRequest = (output, context) => {
2541
- return {
2542
- Answer: (0, smithy_client_1.expectString)(output.Answer),
2543
- QualificationRequestId: (0, smithy_client_1.expectString)(output.QualificationRequestId),
2544
- QualificationTypeId: (0, smithy_client_1.expectString)(output.QualificationTypeId),
2545
- SubmitTime: output.SubmitTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.SubmitTime))) : undefined,
2546
- Test: (0, smithy_client_1.expectString)(output.Test),
2547
- WorkerId: (0, smithy_client_1.expectString)(output.WorkerId),
2548
- };
1905
+ return (0, smithy_client_1.take)(output, {
1906
+ Answer: smithy_client_1.expectString,
1907
+ QualificationRequestId: smithy_client_1.expectString,
1908
+ QualificationTypeId: smithy_client_1.expectString,
1909
+ SubmitTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1910
+ Test: smithy_client_1.expectString,
1911
+ WorkerId: smithy_client_1.expectString,
1912
+ });
2549
1913
  };
2550
1914
  const de_QualificationRequestList = (output, context) => {
2551
1915
  const retVal = (output || [])
2552
1916
  .filter((e) => e != null)
2553
1917
  .map((entry) => {
2554
- if (entry === null) {
2555
- return null;
2556
- }
2557
1918
  return de_QualificationRequest(entry, context);
2558
1919
  });
2559
1920
  return retVal;
2560
1921
  };
2561
- const de_QualificationRequirement = (output, context) => {
2562
- return {
2563
- ActionsGuarded: (0, smithy_client_1.expectString)(output.ActionsGuarded),
2564
- Comparator: (0, smithy_client_1.expectString)(output.Comparator),
2565
- IntegerValues: output.IntegerValues != null ? de_IntegerList(output.IntegerValues, context) : undefined,
2566
- LocaleValues: output.LocaleValues != null ? de_LocaleList(output.LocaleValues, context) : undefined,
2567
- QualificationTypeId: (0, smithy_client_1.expectString)(output.QualificationTypeId),
2568
- RequiredToPreview: (0, smithy_client_1.expectBoolean)(output.RequiredToPreview),
2569
- };
2570
- };
2571
- const de_QualificationRequirementList = (output, context) => {
2572
- const retVal = (output || [])
2573
- .filter((e) => e != null)
2574
- .map((entry) => {
2575
- if (entry === null) {
2576
- return null;
2577
- }
2578
- return de_QualificationRequirement(entry, context);
2579
- });
2580
- return retVal;
2581
- };
2582
1922
  const de_QualificationType = (output, context) => {
2583
- return {
2584
- AnswerKey: (0, smithy_client_1.expectString)(output.AnswerKey),
2585
- AutoGranted: (0, smithy_client_1.expectBoolean)(output.AutoGranted),
2586
- AutoGrantedValue: (0, smithy_client_1.expectInt32)(output.AutoGrantedValue),
2587
- CreationTime: output.CreationTime != null
2588
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreationTime)))
2589
- : undefined,
2590
- Description: (0, smithy_client_1.expectString)(output.Description),
2591
- IsRequestable: (0, smithy_client_1.expectBoolean)(output.IsRequestable),
2592
- Keywords: (0, smithy_client_1.expectString)(output.Keywords),
2593
- Name: (0, smithy_client_1.expectString)(output.Name),
2594
- QualificationTypeId: (0, smithy_client_1.expectString)(output.QualificationTypeId),
2595
- QualificationTypeStatus: (0, smithy_client_1.expectString)(output.QualificationTypeStatus),
2596
- RetryDelayInSeconds: (0, smithy_client_1.expectLong)(output.RetryDelayInSeconds),
2597
- Test: (0, smithy_client_1.expectString)(output.Test),
2598
- TestDurationInSeconds: (0, smithy_client_1.expectLong)(output.TestDurationInSeconds),
2599
- };
1923
+ return (0, smithy_client_1.take)(output, {
1924
+ AnswerKey: smithy_client_1.expectString,
1925
+ AutoGranted: smithy_client_1.expectBoolean,
1926
+ AutoGrantedValue: smithy_client_1.expectInt32,
1927
+ CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1928
+ Description: smithy_client_1.expectString,
1929
+ IsRequestable: smithy_client_1.expectBoolean,
1930
+ Keywords: smithy_client_1.expectString,
1931
+ Name: smithy_client_1.expectString,
1932
+ QualificationTypeId: smithy_client_1.expectString,
1933
+ QualificationTypeStatus: smithy_client_1.expectString,
1934
+ RetryDelayInSeconds: smithy_client_1.expectLong,
1935
+ Test: smithy_client_1.expectString,
1936
+ TestDurationInSeconds: smithy_client_1.expectLong,
1937
+ });
2600
1938
  };
2601
1939
  const de_QualificationTypeList = (output, context) => {
2602
1940
  const retVal = (output || [])
2603
1941
  .filter((e) => e != null)
2604
1942
  .map((entry) => {
2605
- if (entry === null) {
2606
- return null;
2607
- }
2608
1943
  return de_QualificationType(entry, context);
2609
1944
  });
2610
1945
  return retVal;
2611
1946
  };
2612
- const de_RejectAssignmentResponse = (output, context) => {
2613
- return {};
2614
- };
2615
- const de_RejectQualificationRequestResponse = (output, context) => {
2616
- return {};
2617
- };
2618
- const de_RequestError = (output, context) => {
2619
- return {
2620
- Message: (0, smithy_client_1.expectString)(output.Message),
2621
- TurkErrorCode: (0, smithy_client_1.expectString)(output.TurkErrorCode),
2622
- };
2623
- };
2624
1947
  const de_ReviewActionDetail = (output, context) => {
2625
- return {
2626
- ActionId: (0, smithy_client_1.expectString)(output.ActionId),
2627
- ActionName: (0, smithy_client_1.expectString)(output.ActionName),
2628
- CompleteTime: output.CompleteTime != null
2629
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CompleteTime)))
2630
- : undefined,
2631
- ErrorCode: (0, smithy_client_1.expectString)(output.ErrorCode),
2632
- Result: (0, smithy_client_1.expectString)(output.Result),
2633
- Status: (0, smithy_client_1.expectString)(output.Status),
2634
- TargetId: (0, smithy_client_1.expectString)(output.TargetId),
2635
- TargetType: (0, smithy_client_1.expectString)(output.TargetType),
2636
- };
1948
+ return (0, smithy_client_1.take)(output, {
1949
+ ActionId: smithy_client_1.expectString,
1950
+ ActionName: smithy_client_1.expectString,
1951
+ CompleteTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1952
+ ErrorCode: smithy_client_1.expectString,
1953
+ Result: smithy_client_1.expectString,
1954
+ Status: smithy_client_1.expectString,
1955
+ TargetId: smithy_client_1.expectString,
1956
+ TargetType: smithy_client_1.expectString,
1957
+ });
2637
1958
  };
2638
1959
  const de_ReviewActionDetailList = (output, context) => {
2639
1960
  const retVal = (output || [])
2640
1961
  .filter((e) => e != null)
2641
1962
  .map((entry) => {
2642
- if (entry === null) {
2643
- return null;
2644
- }
2645
1963
  return de_ReviewActionDetail(entry, context);
2646
1964
  });
2647
1965
  return retVal;
2648
1966
  };
2649
- const de_ReviewPolicy = (output, context) => {
2650
- return {
2651
- Parameters: output.Parameters != null ? de_PolicyParameterList(output.Parameters, context) : undefined,
2652
- PolicyName: (0, smithy_client_1.expectString)(output.PolicyName),
2653
- };
2654
- };
2655
1967
  const de_ReviewReport = (output, context) => {
2656
- return {
2657
- ReviewActions: output.ReviewActions != null ? de_ReviewActionDetailList(output.ReviewActions, context) : undefined,
2658
- ReviewResults: output.ReviewResults != null ? de_ReviewResultDetailList(output.ReviewResults, context) : undefined,
2659
- };
2660
- };
2661
- const de_ReviewResultDetail = (output, context) => {
2662
- return {
2663
- ActionId: (0, smithy_client_1.expectString)(output.ActionId),
2664
- Key: (0, smithy_client_1.expectString)(output.Key),
2665
- QuestionId: (0, smithy_client_1.expectString)(output.QuestionId),
2666
- SubjectId: (0, smithy_client_1.expectString)(output.SubjectId),
2667
- SubjectType: (0, smithy_client_1.expectString)(output.SubjectType),
2668
- Value: (0, smithy_client_1.expectString)(output.Value),
2669
- };
2670
- };
2671
- const de_ReviewResultDetailList = (output, context) => {
2672
- const retVal = (output || [])
2673
- .filter((e) => e != null)
2674
- .map((entry) => {
2675
- if (entry === null) {
2676
- return null;
2677
- }
2678
- return de_ReviewResultDetail(entry, context);
2679
- });
2680
- return retVal;
2681
- };
2682
- const de_SendBonusResponse = (output, context) => {
2683
- return {};
2684
- };
2685
- const de_SendTestEventNotificationResponse = (output, context) => {
2686
- return {};
2687
- };
2688
- const de_ServiceFault = (output, context) => {
2689
- return {
2690
- Message: (0, smithy_client_1.expectString)(output.Message),
2691
- TurkErrorCode: (0, smithy_client_1.expectString)(output.TurkErrorCode),
2692
- };
2693
- };
2694
- const de_StringList = (output, context) => {
2695
- const retVal = (output || [])
2696
- .filter((e) => e != null)
2697
- .map((entry) => {
2698
- if (entry === null) {
2699
- return null;
2700
- }
2701
- return (0, smithy_client_1.expectString)(entry);
1968
+ return (0, smithy_client_1.take)(output, {
1969
+ ReviewActions: (_) => de_ReviewActionDetailList(_, context),
1970
+ ReviewResults: smithy_client_1._json,
2702
1971
  });
2703
- return retVal;
2704
- };
2705
- const de_UpdateExpirationForHITResponse = (output, context) => {
2706
- return {};
2707
- };
2708
- const de_UpdateHITReviewStatusResponse = (output, context) => {
2709
- return {};
2710
- };
2711
- const de_UpdateHITTypeOfHITResponse = (output, context) => {
2712
- return {};
2713
- };
2714
- const de_UpdateNotificationSettingsResponse = (output, context) => {
2715
- return {};
2716
1972
  };
2717
1973
  const de_UpdateQualificationTypeResponse = (output, context) => {
2718
- return {
2719
- QualificationType: output.QualificationType != null ? de_QualificationType(output.QualificationType, context) : undefined,
2720
- };
2721
- };
2722
- const de_WorkerBlock = (output, context) => {
2723
- return {
2724
- Reason: (0, smithy_client_1.expectString)(output.Reason),
2725
- WorkerId: (0, smithy_client_1.expectString)(output.WorkerId),
2726
- };
2727
- };
2728
- const de_WorkerBlockList = (output, context) => {
2729
- const retVal = (output || [])
2730
- .filter((e) => e != null)
2731
- .map((entry) => {
2732
- if (entry === null) {
2733
- return null;
2734
- }
2735
- return de_WorkerBlock(entry, context);
1974
+ return (0, smithy_client_1.take)(output, {
1975
+ QualificationType: (_) => de_QualificationType(_, context),
2736
1976
  });
2737
- return retVal;
2738
1977
  };
2739
1978
  const deserializeMetadata = (output) => ({
2740
1979
  httpStatusCode: output.statusCode,
@@ -2749,6 +1988,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
2749
1988
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
2750
1989
  };
2751
1990
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
1991
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(MTurkServiceException_1.MTurkServiceException);
2752
1992
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
2753
1993
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2754
1994
  const contents = {