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