@aws-sdk/client-sfn 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.
@@ -1,194 +1,131 @@
1
1
  import { HttpRequest as __HttpRequest, isValidHostname as __isValidHostname, } from "@aws-sdk/protocol-http";
2
- import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, limitedParseFloat32 as __limitedParseFloat32, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, throwDefaultError, } from "@aws-sdk/smithy-client";
2
+ import { _json, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, limitedParseFloat32 as __limitedParseFloat32, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, take, withBaseException, } from "@aws-sdk/smithy-client";
3
3
  import { ActivityDoesNotExist, ActivityLimitExceeded, ActivityWorkerLimitExceeded, ExecutionAlreadyExists, ExecutionDoesNotExist, ExecutionLimitExceeded, InvalidArn, InvalidDefinition, InvalidExecutionInput, InvalidLoggingConfiguration, InvalidName, InvalidOutput, InvalidToken, InvalidTracingConfiguration, MissingRequiredParameter, ResourceNotFound, StateMachineAlreadyExists, StateMachineDeleting, StateMachineDoesNotExist, StateMachineLimitExceeded, StateMachineTypeNotSupported, TaskDoesNotExist, TaskTimedOut, TooManyTags, ValidationException, } from "../models/models_0";
4
4
  import { SFNServiceException as __BaseException } from "../models/SFNServiceException";
5
5
  export const se_CreateActivityCommand = async (input, context) => {
6
- const headers = {
7
- "content-type": "application/x-amz-json-1.0",
8
- "x-amz-target": "AWSStepFunctions.CreateActivity",
9
- };
6
+ const headers = sharedHeaders("CreateActivity");
10
7
  let body;
11
- body = JSON.stringify(se_CreateActivityInput(input, context));
8
+ body = JSON.stringify(_json(input));
12
9
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
13
10
  };
14
11
  export const se_CreateStateMachineCommand = async (input, context) => {
15
- const headers = {
16
- "content-type": "application/x-amz-json-1.0",
17
- "x-amz-target": "AWSStepFunctions.CreateStateMachine",
18
- };
12
+ const headers = sharedHeaders("CreateStateMachine");
19
13
  let body;
20
- body = JSON.stringify(se_CreateStateMachineInput(input, context));
14
+ body = JSON.stringify(_json(input));
21
15
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
22
16
  };
23
17
  export const se_DeleteActivityCommand = async (input, context) => {
24
- const headers = {
25
- "content-type": "application/x-amz-json-1.0",
26
- "x-amz-target": "AWSStepFunctions.DeleteActivity",
27
- };
18
+ const headers = sharedHeaders("DeleteActivity");
28
19
  let body;
29
- body = JSON.stringify(se_DeleteActivityInput(input, context));
20
+ body = JSON.stringify(_json(input));
30
21
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
31
22
  };
32
23
  export const se_DeleteStateMachineCommand = async (input, context) => {
33
- const headers = {
34
- "content-type": "application/x-amz-json-1.0",
35
- "x-amz-target": "AWSStepFunctions.DeleteStateMachine",
36
- };
24
+ const headers = sharedHeaders("DeleteStateMachine");
37
25
  let body;
38
- body = JSON.stringify(se_DeleteStateMachineInput(input, context));
26
+ body = JSON.stringify(_json(input));
39
27
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
40
28
  };
41
29
  export const se_DescribeActivityCommand = async (input, context) => {
42
- const headers = {
43
- "content-type": "application/x-amz-json-1.0",
44
- "x-amz-target": "AWSStepFunctions.DescribeActivity",
45
- };
30
+ const headers = sharedHeaders("DescribeActivity");
46
31
  let body;
47
- body = JSON.stringify(se_DescribeActivityInput(input, context));
32
+ body = JSON.stringify(_json(input));
48
33
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
49
34
  };
50
35
  export const se_DescribeExecutionCommand = async (input, context) => {
51
- const headers = {
52
- "content-type": "application/x-amz-json-1.0",
53
- "x-amz-target": "AWSStepFunctions.DescribeExecution",
54
- };
36
+ const headers = sharedHeaders("DescribeExecution");
55
37
  let body;
56
- body = JSON.stringify(se_DescribeExecutionInput(input, context));
38
+ body = JSON.stringify(_json(input));
57
39
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
58
40
  };
59
41
  export const se_DescribeMapRunCommand = async (input, context) => {
60
- const headers = {
61
- "content-type": "application/x-amz-json-1.0",
62
- "x-amz-target": "AWSStepFunctions.DescribeMapRun",
63
- };
42
+ const headers = sharedHeaders("DescribeMapRun");
64
43
  let body;
65
- body = JSON.stringify(se_DescribeMapRunInput(input, context));
44
+ body = JSON.stringify(_json(input));
66
45
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
67
46
  };
68
47
  export const se_DescribeStateMachineCommand = async (input, context) => {
69
- const headers = {
70
- "content-type": "application/x-amz-json-1.0",
71
- "x-amz-target": "AWSStepFunctions.DescribeStateMachine",
72
- };
48
+ const headers = sharedHeaders("DescribeStateMachine");
73
49
  let body;
74
- body = JSON.stringify(se_DescribeStateMachineInput(input, context));
50
+ body = JSON.stringify(_json(input));
75
51
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
76
52
  };
77
53
  export const se_DescribeStateMachineForExecutionCommand = async (input, context) => {
78
- const headers = {
79
- "content-type": "application/x-amz-json-1.0",
80
- "x-amz-target": "AWSStepFunctions.DescribeStateMachineForExecution",
81
- };
54
+ const headers = sharedHeaders("DescribeStateMachineForExecution");
82
55
  let body;
83
- body = JSON.stringify(se_DescribeStateMachineForExecutionInput(input, context));
56
+ body = JSON.stringify(_json(input));
84
57
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
85
58
  };
86
59
  export const se_GetActivityTaskCommand = async (input, context) => {
87
- const headers = {
88
- "content-type": "application/x-amz-json-1.0",
89
- "x-amz-target": "AWSStepFunctions.GetActivityTask",
90
- };
60
+ const headers = sharedHeaders("GetActivityTask");
91
61
  let body;
92
- body = JSON.stringify(se_GetActivityTaskInput(input, context));
62
+ body = JSON.stringify(_json(input));
93
63
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
94
64
  };
95
65
  export const se_GetExecutionHistoryCommand = async (input, context) => {
96
- const headers = {
97
- "content-type": "application/x-amz-json-1.0",
98
- "x-amz-target": "AWSStepFunctions.GetExecutionHistory",
99
- };
66
+ const headers = sharedHeaders("GetExecutionHistory");
100
67
  let body;
101
- body = JSON.stringify(se_GetExecutionHistoryInput(input, context));
68
+ body = JSON.stringify(_json(input));
102
69
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
103
70
  };
104
71
  export const se_ListActivitiesCommand = async (input, context) => {
105
- const headers = {
106
- "content-type": "application/x-amz-json-1.0",
107
- "x-amz-target": "AWSStepFunctions.ListActivities",
108
- };
72
+ const headers = sharedHeaders("ListActivities");
109
73
  let body;
110
- body = JSON.stringify(se_ListActivitiesInput(input, context));
74
+ body = JSON.stringify(_json(input));
111
75
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
112
76
  };
113
77
  export const se_ListExecutionsCommand = async (input, context) => {
114
- const headers = {
115
- "content-type": "application/x-amz-json-1.0",
116
- "x-amz-target": "AWSStepFunctions.ListExecutions",
117
- };
78
+ const headers = sharedHeaders("ListExecutions");
118
79
  let body;
119
- body = JSON.stringify(se_ListExecutionsInput(input, context));
80
+ body = JSON.stringify(_json(input));
120
81
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
121
82
  };
122
83
  export const se_ListMapRunsCommand = async (input, context) => {
123
- const headers = {
124
- "content-type": "application/x-amz-json-1.0",
125
- "x-amz-target": "AWSStepFunctions.ListMapRuns",
126
- };
84
+ const headers = sharedHeaders("ListMapRuns");
127
85
  let body;
128
- body = JSON.stringify(se_ListMapRunsInput(input, context));
86
+ body = JSON.stringify(_json(input));
129
87
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
130
88
  };
131
89
  export const se_ListStateMachinesCommand = async (input, context) => {
132
- const headers = {
133
- "content-type": "application/x-amz-json-1.0",
134
- "x-amz-target": "AWSStepFunctions.ListStateMachines",
135
- };
90
+ const headers = sharedHeaders("ListStateMachines");
136
91
  let body;
137
- body = JSON.stringify(se_ListStateMachinesInput(input, context));
92
+ body = JSON.stringify(_json(input));
138
93
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
139
94
  };
140
95
  export const se_ListTagsForResourceCommand = async (input, context) => {
141
- const headers = {
142
- "content-type": "application/x-amz-json-1.0",
143
- "x-amz-target": "AWSStepFunctions.ListTagsForResource",
144
- };
96
+ const headers = sharedHeaders("ListTagsForResource");
145
97
  let body;
146
- body = JSON.stringify(se_ListTagsForResourceInput(input, context));
98
+ body = JSON.stringify(_json(input));
147
99
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
148
100
  };
149
101
  export const se_SendTaskFailureCommand = async (input, context) => {
150
- const headers = {
151
- "content-type": "application/x-amz-json-1.0",
152
- "x-amz-target": "AWSStepFunctions.SendTaskFailure",
153
- };
102
+ const headers = sharedHeaders("SendTaskFailure");
154
103
  let body;
155
- body = JSON.stringify(se_SendTaskFailureInput(input, context));
104
+ body = JSON.stringify(_json(input));
156
105
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
157
106
  };
158
107
  export const se_SendTaskHeartbeatCommand = async (input, context) => {
159
- const headers = {
160
- "content-type": "application/x-amz-json-1.0",
161
- "x-amz-target": "AWSStepFunctions.SendTaskHeartbeat",
162
- };
108
+ const headers = sharedHeaders("SendTaskHeartbeat");
163
109
  let body;
164
- body = JSON.stringify(se_SendTaskHeartbeatInput(input, context));
110
+ body = JSON.stringify(_json(input));
165
111
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
166
112
  };
167
113
  export const se_SendTaskSuccessCommand = async (input, context) => {
168
- const headers = {
169
- "content-type": "application/x-amz-json-1.0",
170
- "x-amz-target": "AWSStepFunctions.SendTaskSuccess",
171
- };
114
+ const headers = sharedHeaders("SendTaskSuccess");
172
115
  let body;
173
- body = JSON.stringify(se_SendTaskSuccessInput(input, context));
116
+ body = JSON.stringify(_json(input));
174
117
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
175
118
  };
176
119
  export const se_StartExecutionCommand = async (input, context) => {
177
- const headers = {
178
- "content-type": "application/x-amz-json-1.0",
179
- "x-amz-target": "AWSStepFunctions.StartExecution",
180
- };
120
+ const headers = sharedHeaders("StartExecution");
181
121
  let body;
182
- body = JSON.stringify(se_StartExecutionInput(input, context));
122
+ body = JSON.stringify(_json(input));
183
123
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
184
124
  };
185
125
  export const se_StartSyncExecutionCommand = async (input, context) => {
186
- const headers = {
187
- "content-type": "application/x-amz-json-1.0",
188
- "x-amz-target": "AWSStepFunctions.StartSyncExecution",
189
- };
126
+ const headers = sharedHeaders("StartSyncExecution");
190
127
  let body;
191
- body = JSON.stringify(se_StartSyncExecutionInput(input, context));
128
+ body = JSON.stringify(_json(input));
192
129
  let { hostname: resolvedHostname } = await context.endpoint();
193
130
  if (context.disableHostPrefix !== true) {
194
131
  resolvedHostname = "sync-" + resolvedHostname;
@@ -199,48 +136,33 @@ export const se_StartSyncExecutionCommand = async (input, context) => {
199
136
  return buildHttpRpcRequest(context, headers, "/", resolvedHostname, body);
200
137
  };
201
138
  export const se_StopExecutionCommand = async (input, context) => {
202
- const headers = {
203
- "content-type": "application/x-amz-json-1.0",
204
- "x-amz-target": "AWSStepFunctions.StopExecution",
205
- };
139
+ const headers = sharedHeaders("StopExecution");
206
140
  let body;
207
- body = JSON.stringify(se_StopExecutionInput(input, context));
141
+ body = JSON.stringify(_json(input));
208
142
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
209
143
  };
210
144
  export const se_TagResourceCommand = async (input, context) => {
211
- const headers = {
212
- "content-type": "application/x-amz-json-1.0",
213
- "x-amz-target": "AWSStepFunctions.TagResource",
214
- };
145
+ const headers = sharedHeaders("TagResource");
215
146
  let body;
216
- body = JSON.stringify(se_TagResourceInput(input, context));
147
+ body = JSON.stringify(_json(input));
217
148
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
218
149
  };
219
150
  export const se_UntagResourceCommand = async (input, context) => {
220
- const headers = {
221
- "content-type": "application/x-amz-json-1.0",
222
- "x-amz-target": "AWSStepFunctions.UntagResource",
223
- };
151
+ const headers = sharedHeaders("UntagResource");
224
152
  let body;
225
- body = JSON.stringify(se_UntagResourceInput(input, context));
153
+ body = JSON.stringify(_json(input));
226
154
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
227
155
  };
228
156
  export const se_UpdateMapRunCommand = async (input, context) => {
229
- const headers = {
230
- "content-type": "application/x-amz-json-1.0",
231
- "x-amz-target": "AWSStepFunctions.UpdateMapRun",
232
- };
157
+ const headers = sharedHeaders("UpdateMapRun");
233
158
  let body;
234
159
  body = JSON.stringify(se_UpdateMapRunInput(input, context));
235
160
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
236
161
  };
237
162
  export const se_UpdateStateMachineCommand = async (input, context) => {
238
- const headers = {
239
- "content-type": "application/x-amz-json-1.0",
240
- "x-amz-target": "AWSStepFunctions.UpdateStateMachine",
241
- };
163
+ const headers = sharedHeaders("UpdateStateMachine");
242
164
  let body;
243
- body = JSON.stringify(se_UpdateStateMachineInput(input, context));
165
+ body = JSON.stringify(_json(input));
244
166
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
245
167
  };
246
168
  export const de_CreateActivityCommand = async (output, context) => {
@@ -254,7 +176,7 @@ export const de_CreateActivityCommand = async (output, context) => {
254
176
  $metadata: deserializeMetadata(output),
255
177
  ...contents,
256
178
  };
257
- return Promise.resolve(response);
179
+ return response;
258
180
  };
259
181
  const de_CreateActivityCommandError = async (output, context) => {
260
182
  const parsedOutput = {
@@ -274,10 +196,9 @@ const de_CreateActivityCommandError = async (output, context) => {
274
196
  throw await de_TooManyTagsRes(parsedOutput, context);
275
197
  default:
276
198
  const parsedBody = parsedOutput.body;
277
- throwDefaultError({
199
+ return throwDefaultError({
278
200
  output,
279
201
  parsedBody,
280
- exceptionCtor: __BaseException,
281
202
  errorCode,
282
203
  });
283
204
  }
@@ -293,7 +214,7 @@ export const de_CreateStateMachineCommand = async (output, context) => {
293
214
  $metadata: deserializeMetadata(output),
294
215
  ...contents,
295
216
  };
296
- return Promise.resolve(response);
217
+ return response;
297
218
  };
298
219
  const de_CreateStateMachineCommandError = async (output, context) => {
299
220
  const parsedOutput = {
@@ -334,10 +255,9 @@ const de_CreateStateMachineCommandError = async (output, context) => {
334
255
  throw await de_TooManyTagsRes(parsedOutput, context);
335
256
  default:
336
257
  const parsedBody = parsedOutput.body;
337
- throwDefaultError({
258
+ return throwDefaultError({
338
259
  output,
339
260
  parsedBody,
340
- exceptionCtor: __BaseException,
341
261
  errorCode,
342
262
  });
343
263
  }
@@ -348,12 +268,12 @@ export const de_DeleteActivityCommand = async (output, context) => {
348
268
  }
349
269
  const data = await parseBody(output.body, context);
350
270
  let contents = {};
351
- contents = de_DeleteActivityOutput(data, context);
271
+ contents = _json(data);
352
272
  const response = {
353
273
  $metadata: deserializeMetadata(output),
354
274
  ...contents,
355
275
  };
356
- return Promise.resolve(response);
276
+ return response;
357
277
  };
358
278
  const de_DeleteActivityCommandError = async (output, context) => {
359
279
  const parsedOutput = {
@@ -367,10 +287,9 @@ const de_DeleteActivityCommandError = async (output, context) => {
367
287
  throw await de_InvalidArnRes(parsedOutput, context);
368
288
  default:
369
289
  const parsedBody = parsedOutput.body;
370
- throwDefaultError({
290
+ return throwDefaultError({
371
291
  output,
372
292
  parsedBody,
373
- exceptionCtor: __BaseException,
374
293
  errorCode,
375
294
  });
376
295
  }
@@ -381,12 +300,12 @@ export const de_DeleteStateMachineCommand = async (output, context) => {
381
300
  }
382
301
  const data = await parseBody(output.body, context);
383
302
  let contents = {};
384
- contents = de_DeleteStateMachineOutput(data, context);
303
+ contents = _json(data);
385
304
  const response = {
386
305
  $metadata: deserializeMetadata(output),
387
306
  ...contents,
388
307
  };
389
- return Promise.resolve(response);
308
+ return response;
390
309
  };
391
310
  const de_DeleteStateMachineCommandError = async (output, context) => {
392
311
  const parsedOutput = {
@@ -403,10 +322,9 @@ const de_DeleteStateMachineCommandError = async (output, context) => {
403
322
  throw await de_ValidationExceptionRes(parsedOutput, context);
404
323
  default:
405
324
  const parsedBody = parsedOutput.body;
406
- throwDefaultError({
325
+ return throwDefaultError({
407
326
  output,
408
327
  parsedBody,
409
- exceptionCtor: __BaseException,
410
328
  errorCode,
411
329
  });
412
330
  }
@@ -422,7 +340,7 @@ export const de_DescribeActivityCommand = async (output, context) => {
422
340
  $metadata: deserializeMetadata(output),
423
341
  ...contents,
424
342
  };
425
- return Promise.resolve(response);
343
+ return response;
426
344
  };
427
345
  const de_DescribeActivityCommandError = async (output, context) => {
428
346
  const parsedOutput = {
@@ -439,10 +357,9 @@ const de_DescribeActivityCommandError = async (output, context) => {
439
357
  throw await de_InvalidArnRes(parsedOutput, context);
440
358
  default:
441
359
  const parsedBody = parsedOutput.body;
442
- throwDefaultError({
360
+ return throwDefaultError({
443
361
  output,
444
362
  parsedBody,
445
- exceptionCtor: __BaseException,
446
363
  errorCode,
447
364
  });
448
365
  }
@@ -458,7 +375,7 @@ export const de_DescribeExecutionCommand = async (output, context) => {
458
375
  $metadata: deserializeMetadata(output),
459
376
  ...contents,
460
377
  };
461
- return Promise.resolve(response);
378
+ return response;
462
379
  };
463
380
  const de_DescribeExecutionCommandError = async (output, context) => {
464
381
  const parsedOutput = {
@@ -475,10 +392,9 @@ const de_DescribeExecutionCommandError = async (output, context) => {
475
392
  throw await de_InvalidArnRes(parsedOutput, context);
476
393
  default:
477
394
  const parsedBody = parsedOutput.body;
478
- throwDefaultError({
395
+ return throwDefaultError({
479
396
  output,
480
397
  parsedBody,
481
- exceptionCtor: __BaseException,
482
398
  errorCode,
483
399
  });
484
400
  }
@@ -494,7 +410,7 @@ export const de_DescribeMapRunCommand = async (output, context) => {
494
410
  $metadata: deserializeMetadata(output),
495
411
  ...contents,
496
412
  };
497
- return Promise.resolve(response);
413
+ return response;
498
414
  };
499
415
  const de_DescribeMapRunCommandError = async (output, context) => {
500
416
  const parsedOutput = {
@@ -511,10 +427,9 @@ const de_DescribeMapRunCommandError = async (output, context) => {
511
427
  throw await de_ResourceNotFoundRes(parsedOutput, context);
512
428
  default:
513
429
  const parsedBody = parsedOutput.body;
514
- throwDefaultError({
430
+ return throwDefaultError({
515
431
  output,
516
432
  parsedBody,
517
- exceptionCtor: __BaseException,
518
433
  errorCode,
519
434
  });
520
435
  }
@@ -530,7 +445,7 @@ export const de_DescribeStateMachineCommand = async (output, context) => {
530
445
  $metadata: deserializeMetadata(output),
531
446
  ...contents,
532
447
  };
533
- return Promise.resolve(response);
448
+ return response;
534
449
  };
535
450
  const de_DescribeStateMachineCommandError = async (output, context) => {
536
451
  const parsedOutput = {
@@ -547,10 +462,9 @@ const de_DescribeStateMachineCommandError = async (output, context) => {
547
462
  throw await de_StateMachineDoesNotExistRes(parsedOutput, context);
548
463
  default:
549
464
  const parsedBody = parsedOutput.body;
550
- throwDefaultError({
465
+ return throwDefaultError({
551
466
  output,
552
467
  parsedBody,
553
- exceptionCtor: __BaseException,
554
468
  errorCode,
555
469
  });
556
470
  }
@@ -566,7 +480,7 @@ export const de_DescribeStateMachineForExecutionCommand = async (output, context
566
480
  $metadata: deserializeMetadata(output),
567
481
  ...contents,
568
482
  };
569
- return Promise.resolve(response);
483
+ return response;
570
484
  };
571
485
  const de_DescribeStateMachineForExecutionCommandError = async (output, context) => {
572
486
  const parsedOutput = {
@@ -583,10 +497,9 @@ const de_DescribeStateMachineForExecutionCommandError = async (output, context)
583
497
  throw await de_InvalidArnRes(parsedOutput, context);
584
498
  default:
585
499
  const parsedBody = parsedOutput.body;
586
- throwDefaultError({
500
+ return throwDefaultError({
587
501
  output,
588
502
  parsedBody,
589
- exceptionCtor: __BaseException,
590
503
  errorCode,
591
504
  });
592
505
  }
@@ -597,12 +510,12 @@ export const de_GetActivityTaskCommand = async (output, context) => {
597
510
  }
598
511
  const data = await parseBody(output.body, context);
599
512
  let contents = {};
600
- contents = de_GetActivityTaskOutput(data, context);
513
+ contents = _json(data);
601
514
  const response = {
602
515
  $metadata: deserializeMetadata(output),
603
516
  ...contents,
604
517
  };
605
- return Promise.resolve(response);
518
+ return response;
606
519
  };
607
520
  const de_GetActivityTaskCommandError = async (output, context) => {
608
521
  const parsedOutput = {
@@ -622,10 +535,9 @@ const de_GetActivityTaskCommandError = async (output, context) => {
622
535
  throw await de_InvalidArnRes(parsedOutput, context);
623
536
  default:
624
537
  const parsedBody = parsedOutput.body;
625
- throwDefaultError({
538
+ return throwDefaultError({
626
539
  output,
627
540
  parsedBody,
628
- exceptionCtor: __BaseException,
629
541
  errorCode,
630
542
  });
631
543
  }
@@ -641,7 +553,7 @@ export const de_GetExecutionHistoryCommand = async (output, context) => {
641
553
  $metadata: deserializeMetadata(output),
642
554
  ...contents,
643
555
  };
644
- return Promise.resolve(response);
556
+ return response;
645
557
  };
646
558
  const de_GetExecutionHistoryCommandError = async (output, context) => {
647
559
  const parsedOutput = {
@@ -661,10 +573,9 @@ const de_GetExecutionHistoryCommandError = async (output, context) => {
661
573
  throw await de_InvalidTokenRes(parsedOutput, context);
662
574
  default:
663
575
  const parsedBody = parsedOutput.body;
664
- throwDefaultError({
576
+ return throwDefaultError({
665
577
  output,
666
578
  parsedBody,
667
- exceptionCtor: __BaseException,
668
579
  errorCode,
669
580
  });
670
581
  }
@@ -680,7 +591,7 @@ export const de_ListActivitiesCommand = async (output, context) => {
680
591
  $metadata: deserializeMetadata(output),
681
592
  ...contents,
682
593
  };
683
- return Promise.resolve(response);
594
+ return response;
684
595
  };
685
596
  const de_ListActivitiesCommandError = async (output, context) => {
686
597
  const parsedOutput = {
@@ -694,10 +605,9 @@ const de_ListActivitiesCommandError = async (output, context) => {
694
605
  throw await de_InvalidTokenRes(parsedOutput, context);
695
606
  default:
696
607
  const parsedBody = parsedOutput.body;
697
- throwDefaultError({
608
+ return throwDefaultError({
698
609
  output,
699
610
  parsedBody,
700
- exceptionCtor: __BaseException,
701
611
  errorCode,
702
612
  });
703
613
  }
@@ -713,7 +623,7 @@ export const de_ListExecutionsCommand = async (output, context) => {
713
623
  $metadata: deserializeMetadata(output),
714
624
  ...contents,
715
625
  };
716
- return Promise.resolve(response);
626
+ return response;
717
627
  };
718
628
  const de_ListExecutionsCommandError = async (output, context) => {
719
629
  const parsedOutput = {
@@ -742,10 +652,9 @@ const de_ListExecutionsCommandError = async (output, context) => {
742
652
  throw await de_ValidationExceptionRes(parsedOutput, context);
743
653
  default:
744
654
  const parsedBody = parsedOutput.body;
745
- throwDefaultError({
655
+ return throwDefaultError({
746
656
  output,
747
657
  parsedBody,
748
- exceptionCtor: __BaseException,
749
658
  errorCode,
750
659
  });
751
660
  }
@@ -761,7 +670,7 @@ export const de_ListMapRunsCommand = async (output, context) => {
761
670
  $metadata: deserializeMetadata(output),
762
671
  ...contents,
763
672
  };
764
- return Promise.resolve(response);
673
+ return response;
765
674
  };
766
675
  const de_ListMapRunsCommandError = async (output, context) => {
767
676
  const parsedOutput = {
@@ -781,10 +690,9 @@ const de_ListMapRunsCommandError = async (output, context) => {
781
690
  throw await de_InvalidTokenRes(parsedOutput, context);
782
691
  default:
783
692
  const parsedBody = parsedOutput.body;
784
- throwDefaultError({
693
+ return throwDefaultError({
785
694
  output,
786
695
  parsedBody,
787
- exceptionCtor: __BaseException,
788
696
  errorCode,
789
697
  });
790
698
  }
@@ -800,7 +708,7 @@ export const de_ListStateMachinesCommand = async (output, context) => {
800
708
  $metadata: deserializeMetadata(output),
801
709
  ...contents,
802
710
  };
803
- return Promise.resolve(response);
711
+ return response;
804
712
  };
805
713
  const de_ListStateMachinesCommandError = async (output, context) => {
806
714
  const parsedOutput = {
@@ -814,10 +722,9 @@ const de_ListStateMachinesCommandError = async (output, context) => {
814
722
  throw await de_InvalidTokenRes(parsedOutput, context);
815
723
  default:
816
724
  const parsedBody = parsedOutput.body;
817
- throwDefaultError({
725
+ return throwDefaultError({
818
726
  output,
819
727
  parsedBody,
820
- exceptionCtor: __BaseException,
821
728
  errorCode,
822
729
  });
823
730
  }
@@ -828,12 +735,12 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
828
735
  }
829
736
  const data = await parseBody(output.body, context);
830
737
  let contents = {};
831
- contents = de_ListTagsForResourceOutput(data, context);
738
+ contents = _json(data);
832
739
  const response = {
833
740
  $metadata: deserializeMetadata(output),
834
741
  ...contents,
835
742
  };
836
- return Promise.resolve(response);
743
+ return response;
837
744
  };
838
745
  const de_ListTagsForResourceCommandError = async (output, context) => {
839
746
  const parsedOutput = {
@@ -850,10 +757,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
850
757
  throw await de_ResourceNotFoundRes(parsedOutput, context);
851
758
  default:
852
759
  const parsedBody = parsedOutput.body;
853
- throwDefaultError({
760
+ return throwDefaultError({
854
761
  output,
855
762
  parsedBody,
856
- exceptionCtor: __BaseException,
857
763
  errorCode,
858
764
  });
859
765
  }
@@ -864,12 +770,12 @@ export const de_SendTaskFailureCommand = async (output, context) => {
864
770
  }
865
771
  const data = await parseBody(output.body, context);
866
772
  let contents = {};
867
- contents = de_SendTaskFailureOutput(data, context);
773
+ contents = _json(data);
868
774
  const response = {
869
775
  $metadata: deserializeMetadata(output),
870
776
  ...contents,
871
777
  };
872
- return Promise.resolve(response);
778
+ return response;
873
779
  };
874
780
  const de_SendTaskFailureCommandError = async (output, context) => {
875
781
  const parsedOutput = {
@@ -889,10 +795,9 @@ const de_SendTaskFailureCommandError = async (output, context) => {
889
795
  throw await de_TaskTimedOutRes(parsedOutput, context);
890
796
  default:
891
797
  const parsedBody = parsedOutput.body;
892
- throwDefaultError({
798
+ return throwDefaultError({
893
799
  output,
894
800
  parsedBody,
895
- exceptionCtor: __BaseException,
896
801
  errorCode,
897
802
  });
898
803
  }
@@ -903,12 +808,12 @@ export const de_SendTaskHeartbeatCommand = async (output, context) => {
903
808
  }
904
809
  const data = await parseBody(output.body, context);
905
810
  let contents = {};
906
- contents = de_SendTaskHeartbeatOutput(data, context);
811
+ contents = _json(data);
907
812
  const response = {
908
813
  $metadata: deserializeMetadata(output),
909
814
  ...contents,
910
815
  };
911
- return Promise.resolve(response);
816
+ return response;
912
817
  };
913
818
  const de_SendTaskHeartbeatCommandError = async (output, context) => {
914
819
  const parsedOutput = {
@@ -928,10 +833,9 @@ const de_SendTaskHeartbeatCommandError = async (output, context) => {
928
833
  throw await de_TaskTimedOutRes(parsedOutput, context);
929
834
  default:
930
835
  const parsedBody = parsedOutput.body;
931
- throwDefaultError({
836
+ return throwDefaultError({
932
837
  output,
933
838
  parsedBody,
934
- exceptionCtor: __BaseException,
935
839
  errorCode,
936
840
  });
937
841
  }
@@ -942,12 +846,12 @@ export const de_SendTaskSuccessCommand = async (output, context) => {
942
846
  }
943
847
  const data = await parseBody(output.body, context);
944
848
  let contents = {};
945
- contents = de_SendTaskSuccessOutput(data, context);
849
+ contents = _json(data);
946
850
  const response = {
947
851
  $metadata: deserializeMetadata(output),
948
852
  ...contents,
949
853
  };
950
- return Promise.resolve(response);
854
+ return response;
951
855
  };
952
856
  const de_SendTaskSuccessCommandError = async (output, context) => {
953
857
  const parsedOutput = {
@@ -970,10 +874,9 @@ const de_SendTaskSuccessCommandError = async (output, context) => {
970
874
  throw await de_TaskTimedOutRes(parsedOutput, context);
971
875
  default:
972
876
  const parsedBody = parsedOutput.body;
973
- throwDefaultError({
877
+ return throwDefaultError({
974
878
  output,
975
879
  parsedBody,
976
- exceptionCtor: __BaseException,
977
880
  errorCode,
978
881
  });
979
882
  }
@@ -989,7 +892,7 @@ export const de_StartExecutionCommand = async (output, context) => {
989
892
  $metadata: deserializeMetadata(output),
990
893
  ...contents,
991
894
  };
992
- return Promise.resolve(response);
895
+ return response;
993
896
  };
994
897
  const de_StartExecutionCommandError = async (output, context) => {
995
898
  const parsedOutput = {
@@ -1024,10 +927,9 @@ const de_StartExecutionCommandError = async (output, context) => {
1024
927
  throw await de_ValidationExceptionRes(parsedOutput, context);
1025
928
  default:
1026
929
  const parsedBody = parsedOutput.body;
1027
- throwDefaultError({
930
+ return throwDefaultError({
1028
931
  output,
1029
932
  parsedBody,
1030
- exceptionCtor: __BaseException,
1031
933
  errorCode,
1032
934
  });
1033
935
  }
@@ -1043,7 +945,7 @@ export const de_StartSyncExecutionCommand = async (output, context) => {
1043
945
  $metadata: deserializeMetadata(output),
1044
946
  ...contents,
1045
947
  };
1046
- return Promise.resolve(response);
948
+ return response;
1047
949
  };
1048
950
  const de_StartSyncExecutionCommandError = async (output, context) => {
1049
951
  const parsedOutput = {
@@ -1072,10 +974,9 @@ const de_StartSyncExecutionCommandError = async (output, context) => {
1072
974
  throw await de_StateMachineTypeNotSupportedRes(parsedOutput, context);
1073
975
  default:
1074
976
  const parsedBody = parsedOutput.body;
1075
- throwDefaultError({
977
+ return throwDefaultError({
1076
978
  output,
1077
979
  parsedBody,
1078
- exceptionCtor: __BaseException,
1079
980
  errorCode,
1080
981
  });
1081
982
  }
@@ -1091,7 +992,7 @@ export const de_StopExecutionCommand = async (output, context) => {
1091
992
  $metadata: deserializeMetadata(output),
1092
993
  ...contents,
1093
994
  };
1094
- return Promise.resolve(response);
995
+ return response;
1095
996
  };
1096
997
  const de_StopExecutionCommandError = async (output, context) => {
1097
998
  const parsedOutput = {
@@ -1111,10 +1012,9 @@ const de_StopExecutionCommandError = async (output, context) => {
1111
1012
  throw await de_ValidationExceptionRes(parsedOutput, context);
1112
1013
  default:
1113
1014
  const parsedBody = parsedOutput.body;
1114
- throwDefaultError({
1015
+ return throwDefaultError({
1115
1016
  output,
1116
1017
  parsedBody,
1117
- exceptionCtor: __BaseException,
1118
1018
  errorCode,
1119
1019
  });
1120
1020
  }
@@ -1125,12 +1025,12 @@ export const de_TagResourceCommand = async (output, context) => {
1125
1025
  }
1126
1026
  const data = await parseBody(output.body, context);
1127
1027
  let contents = {};
1128
- contents = de_TagResourceOutput(data, context);
1028
+ contents = _json(data);
1129
1029
  const response = {
1130
1030
  $metadata: deserializeMetadata(output),
1131
1031
  ...contents,
1132
1032
  };
1133
- return Promise.resolve(response);
1033
+ return response;
1134
1034
  };
1135
1035
  const de_TagResourceCommandError = async (output, context) => {
1136
1036
  const parsedOutput = {
@@ -1150,10 +1050,9 @@ const de_TagResourceCommandError = async (output, context) => {
1150
1050
  throw await de_TooManyTagsRes(parsedOutput, context);
1151
1051
  default:
1152
1052
  const parsedBody = parsedOutput.body;
1153
- throwDefaultError({
1053
+ return throwDefaultError({
1154
1054
  output,
1155
1055
  parsedBody,
1156
- exceptionCtor: __BaseException,
1157
1056
  errorCode,
1158
1057
  });
1159
1058
  }
@@ -1164,12 +1063,12 @@ export const de_UntagResourceCommand = async (output, context) => {
1164
1063
  }
1165
1064
  const data = await parseBody(output.body, context);
1166
1065
  let contents = {};
1167
- contents = de_UntagResourceOutput(data, context);
1066
+ contents = _json(data);
1168
1067
  const response = {
1169
1068
  $metadata: deserializeMetadata(output),
1170
1069
  ...contents,
1171
1070
  };
1172
- return Promise.resolve(response);
1071
+ return response;
1173
1072
  };
1174
1073
  const de_UntagResourceCommandError = async (output, context) => {
1175
1074
  const parsedOutput = {
@@ -1186,10 +1085,9 @@ const de_UntagResourceCommandError = async (output, context) => {
1186
1085
  throw await de_ResourceNotFoundRes(parsedOutput, context);
1187
1086
  default:
1188
1087
  const parsedBody = parsedOutput.body;
1189
- throwDefaultError({
1088
+ return throwDefaultError({
1190
1089
  output,
1191
1090
  parsedBody,
1192
- exceptionCtor: __BaseException,
1193
1091
  errorCode,
1194
1092
  });
1195
1093
  }
@@ -1200,12 +1098,12 @@ export const de_UpdateMapRunCommand = async (output, context) => {
1200
1098
  }
1201
1099
  const data = await parseBody(output.body, context);
1202
1100
  let contents = {};
1203
- contents = de_UpdateMapRunOutput(data, context);
1101
+ contents = _json(data);
1204
1102
  const response = {
1205
1103
  $metadata: deserializeMetadata(output),
1206
1104
  ...contents,
1207
1105
  };
1208
- return Promise.resolve(response);
1106
+ return response;
1209
1107
  };
1210
1108
  const de_UpdateMapRunCommandError = async (output, context) => {
1211
1109
  const parsedOutput = {
@@ -1225,10 +1123,9 @@ const de_UpdateMapRunCommandError = async (output, context) => {
1225
1123
  throw await de_ValidationExceptionRes(parsedOutput, context);
1226
1124
  default:
1227
1125
  const parsedBody = parsedOutput.body;
1228
- throwDefaultError({
1126
+ return throwDefaultError({
1229
1127
  output,
1230
1128
  parsedBody,
1231
- exceptionCtor: __BaseException,
1232
1129
  errorCode,
1233
1130
  });
1234
1131
  }
@@ -1244,7 +1141,7 @@ export const de_UpdateStateMachineCommand = async (output, context) => {
1244
1141
  $metadata: deserializeMetadata(output),
1245
1142
  ...contents,
1246
1143
  };
1247
- return Promise.resolve(response);
1144
+ return response;
1248
1145
  };
1249
1146
  const de_UpdateStateMachineCommandError = async (output, context) => {
1250
1147
  const parsedOutput = {
@@ -1279,17 +1176,16 @@ const de_UpdateStateMachineCommandError = async (output, context) => {
1279
1176
  throw await de_ValidationExceptionRes(parsedOutput, context);
1280
1177
  default:
1281
1178
  const parsedBody = parsedOutput.body;
1282
- throwDefaultError({
1179
+ return throwDefaultError({
1283
1180
  output,
1284
1181
  parsedBody,
1285
- exceptionCtor: __BaseException,
1286
1182
  errorCode,
1287
1183
  });
1288
1184
  }
1289
1185
  };
1290
1186
  const de_ActivityDoesNotExistRes = async (parsedOutput, context) => {
1291
1187
  const body = parsedOutput.body;
1292
- const deserialized = de_ActivityDoesNotExist(body, context);
1188
+ const deserialized = _json(body);
1293
1189
  const exception = new ActivityDoesNotExist({
1294
1190
  $metadata: deserializeMetadata(parsedOutput),
1295
1191
  ...deserialized,
@@ -1298,7 +1194,7 @@ const de_ActivityDoesNotExistRes = async (parsedOutput, context) => {
1298
1194
  };
1299
1195
  const de_ActivityLimitExceededRes = async (parsedOutput, context) => {
1300
1196
  const body = parsedOutput.body;
1301
- const deserialized = de_ActivityLimitExceeded(body, context);
1197
+ const deserialized = _json(body);
1302
1198
  const exception = new ActivityLimitExceeded({
1303
1199
  $metadata: deserializeMetadata(parsedOutput),
1304
1200
  ...deserialized,
@@ -1307,7 +1203,7 @@ const de_ActivityLimitExceededRes = async (parsedOutput, context) => {
1307
1203
  };
1308
1204
  const de_ActivityWorkerLimitExceededRes = async (parsedOutput, context) => {
1309
1205
  const body = parsedOutput.body;
1310
- const deserialized = de_ActivityWorkerLimitExceeded(body, context);
1206
+ const deserialized = _json(body);
1311
1207
  const exception = new ActivityWorkerLimitExceeded({
1312
1208
  $metadata: deserializeMetadata(parsedOutput),
1313
1209
  ...deserialized,
@@ -1316,7 +1212,7 @@ const de_ActivityWorkerLimitExceededRes = async (parsedOutput, context) => {
1316
1212
  };
1317
1213
  const de_ExecutionAlreadyExistsRes = async (parsedOutput, context) => {
1318
1214
  const body = parsedOutput.body;
1319
- const deserialized = de_ExecutionAlreadyExists(body, context);
1215
+ const deserialized = _json(body);
1320
1216
  const exception = new ExecutionAlreadyExists({
1321
1217
  $metadata: deserializeMetadata(parsedOutput),
1322
1218
  ...deserialized,
@@ -1325,7 +1221,7 @@ const de_ExecutionAlreadyExistsRes = async (parsedOutput, context) => {
1325
1221
  };
1326
1222
  const de_ExecutionDoesNotExistRes = async (parsedOutput, context) => {
1327
1223
  const body = parsedOutput.body;
1328
- const deserialized = de_ExecutionDoesNotExist(body, context);
1224
+ const deserialized = _json(body);
1329
1225
  const exception = new ExecutionDoesNotExist({
1330
1226
  $metadata: deserializeMetadata(parsedOutput),
1331
1227
  ...deserialized,
@@ -1334,7 +1230,7 @@ const de_ExecutionDoesNotExistRes = async (parsedOutput, context) => {
1334
1230
  };
1335
1231
  const de_ExecutionLimitExceededRes = async (parsedOutput, context) => {
1336
1232
  const body = parsedOutput.body;
1337
- const deserialized = de_ExecutionLimitExceeded(body, context);
1233
+ const deserialized = _json(body);
1338
1234
  const exception = new ExecutionLimitExceeded({
1339
1235
  $metadata: deserializeMetadata(parsedOutput),
1340
1236
  ...deserialized,
@@ -1343,7 +1239,7 @@ const de_ExecutionLimitExceededRes = async (parsedOutput, context) => {
1343
1239
  };
1344
1240
  const de_InvalidArnRes = async (parsedOutput, context) => {
1345
1241
  const body = parsedOutput.body;
1346
- const deserialized = de_InvalidArn(body, context);
1242
+ const deserialized = _json(body);
1347
1243
  const exception = new InvalidArn({
1348
1244
  $metadata: deserializeMetadata(parsedOutput),
1349
1245
  ...deserialized,
@@ -1352,7 +1248,7 @@ const de_InvalidArnRes = async (parsedOutput, context) => {
1352
1248
  };
1353
1249
  const de_InvalidDefinitionRes = async (parsedOutput, context) => {
1354
1250
  const body = parsedOutput.body;
1355
- const deserialized = de_InvalidDefinition(body, context);
1251
+ const deserialized = _json(body);
1356
1252
  const exception = new InvalidDefinition({
1357
1253
  $metadata: deserializeMetadata(parsedOutput),
1358
1254
  ...deserialized,
@@ -1361,7 +1257,7 @@ const de_InvalidDefinitionRes = async (parsedOutput, context) => {
1361
1257
  };
1362
1258
  const de_InvalidExecutionInputRes = async (parsedOutput, context) => {
1363
1259
  const body = parsedOutput.body;
1364
- const deserialized = de_InvalidExecutionInput(body, context);
1260
+ const deserialized = _json(body);
1365
1261
  const exception = new InvalidExecutionInput({
1366
1262
  $metadata: deserializeMetadata(parsedOutput),
1367
1263
  ...deserialized,
@@ -1370,7 +1266,7 @@ const de_InvalidExecutionInputRes = async (parsedOutput, context) => {
1370
1266
  };
1371
1267
  const de_InvalidLoggingConfigurationRes = async (parsedOutput, context) => {
1372
1268
  const body = parsedOutput.body;
1373
- const deserialized = de_InvalidLoggingConfiguration(body, context);
1269
+ const deserialized = _json(body);
1374
1270
  const exception = new InvalidLoggingConfiguration({
1375
1271
  $metadata: deserializeMetadata(parsedOutput),
1376
1272
  ...deserialized,
@@ -1379,7 +1275,7 @@ const de_InvalidLoggingConfigurationRes = async (parsedOutput, context) => {
1379
1275
  };
1380
1276
  const de_InvalidNameRes = async (parsedOutput, context) => {
1381
1277
  const body = parsedOutput.body;
1382
- const deserialized = de_InvalidName(body, context);
1278
+ const deserialized = _json(body);
1383
1279
  const exception = new InvalidName({
1384
1280
  $metadata: deserializeMetadata(parsedOutput),
1385
1281
  ...deserialized,
@@ -1388,7 +1284,7 @@ const de_InvalidNameRes = async (parsedOutput, context) => {
1388
1284
  };
1389
1285
  const de_InvalidOutputRes = async (parsedOutput, context) => {
1390
1286
  const body = parsedOutput.body;
1391
- const deserialized = de_InvalidOutput(body, context);
1287
+ const deserialized = _json(body);
1392
1288
  const exception = new InvalidOutput({
1393
1289
  $metadata: deserializeMetadata(parsedOutput),
1394
1290
  ...deserialized,
@@ -1397,7 +1293,7 @@ const de_InvalidOutputRes = async (parsedOutput, context) => {
1397
1293
  };
1398
1294
  const de_InvalidTokenRes = async (parsedOutput, context) => {
1399
1295
  const body = parsedOutput.body;
1400
- const deserialized = de_InvalidToken(body, context);
1296
+ const deserialized = _json(body);
1401
1297
  const exception = new InvalidToken({
1402
1298
  $metadata: deserializeMetadata(parsedOutput),
1403
1299
  ...deserialized,
@@ -1406,7 +1302,7 @@ const de_InvalidTokenRes = async (parsedOutput, context) => {
1406
1302
  };
1407
1303
  const de_InvalidTracingConfigurationRes = async (parsedOutput, context) => {
1408
1304
  const body = parsedOutput.body;
1409
- const deserialized = de_InvalidTracingConfiguration(body, context);
1305
+ const deserialized = _json(body);
1410
1306
  const exception = new InvalidTracingConfiguration({
1411
1307
  $metadata: deserializeMetadata(parsedOutput),
1412
1308
  ...deserialized,
@@ -1415,7 +1311,7 @@ const de_InvalidTracingConfigurationRes = async (parsedOutput, context) => {
1415
1311
  };
1416
1312
  const de_MissingRequiredParameterRes = async (parsedOutput, context) => {
1417
1313
  const body = parsedOutput.body;
1418
- const deserialized = de_MissingRequiredParameter(body, context);
1314
+ const deserialized = _json(body);
1419
1315
  const exception = new MissingRequiredParameter({
1420
1316
  $metadata: deserializeMetadata(parsedOutput),
1421
1317
  ...deserialized,
@@ -1424,7 +1320,7 @@ const de_MissingRequiredParameterRes = async (parsedOutput, context) => {
1424
1320
  };
1425
1321
  const de_ResourceNotFoundRes = async (parsedOutput, context) => {
1426
1322
  const body = parsedOutput.body;
1427
- const deserialized = de_ResourceNotFound(body, context);
1323
+ const deserialized = _json(body);
1428
1324
  const exception = new ResourceNotFound({
1429
1325
  $metadata: deserializeMetadata(parsedOutput),
1430
1326
  ...deserialized,
@@ -1433,7 +1329,7 @@ const de_ResourceNotFoundRes = async (parsedOutput, context) => {
1433
1329
  };
1434
1330
  const de_StateMachineAlreadyExistsRes = async (parsedOutput, context) => {
1435
1331
  const body = parsedOutput.body;
1436
- const deserialized = de_StateMachineAlreadyExists(body, context);
1332
+ const deserialized = _json(body);
1437
1333
  const exception = new StateMachineAlreadyExists({
1438
1334
  $metadata: deserializeMetadata(parsedOutput),
1439
1335
  ...deserialized,
@@ -1442,7 +1338,7 @@ const de_StateMachineAlreadyExistsRes = async (parsedOutput, context) => {
1442
1338
  };
1443
1339
  const de_StateMachineDeletingRes = async (parsedOutput, context) => {
1444
1340
  const body = parsedOutput.body;
1445
- const deserialized = de_StateMachineDeleting(body, context);
1341
+ const deserialized = _json(body);
1446
1342
  const exception = new StateMachineDeleting({
1447
1343
  $metadata: deserializeMetadata(parsedOutput),
1448
1344
  ...deserialized,
@@ -1451,7 +1347,7 @@ const de_StateMachineDeletingRes = async (parsedOutput, context) => {
1451
1347
  };
1452
1348
  const de_StateMachineDoesNotExistRes = async (parsedOutput, context) => {
1453
1349
  const body = parsedOutput.body;
1454
- const deserialized = de_StateMachineDoesNotExist(body, context);
1350
+ const deserialized = _json(body);
1455
1351
  const exception = new StateMachineDoesNotExist({
1456
1352
  $metadata: deserializeMetadata(parsedOutput),
1457
1353
  ...deserialized,
@@ -1460,7 +1356,7 @@ const de_StateMachineDoesNotExistRes = async (parsedOutput, context) => {
1460
1356
  };
1461
1357
  const de_StateMachineLimitExceededRes = async (parsedOutput, context) => {
1462
1358
  const body = parsedOutput.body;
1463
- const deserialized = de_StateMachineLimitExceeded(body, context);
1359
+ const deserialized = _json(body);
1464
1360
  const exception = new StateMachineLimitExceeded({
1465
1361
  $metadata: deserializeMetadata(parsedOutput),
1466
1362
  ...deserialized,
@@ -1469,7 +1365,7 @@ const de_StateMachineLimitExceededRes = async (parsedOutput, context) => {
1469
1365
  };
1470
1366
  const de_StateMachineTypeNotSupportedRes = async (parsedOutput, context) => {
1471
1367
  const body = parsedOutput.body;
1472
- const deserialized = de_StateMachineTypeNotSupported(body, context);
1368
+ const deserialized = _json(body);
1473
1369
  const exception = new StateMachineTypeNotSupported({
1474
1370
  $metadata: deserializeMetadata(parsedOutput),
1475
1371
  ...deserialized,
@@ -1478,7 +1374,7 @@ const de_StateMachineTypeNotSupportedRes = async (parsedOutput, context) => {
1478
1374
  };
1479
1375
  const de_TaskDoesNotExistRes = async (parsedOutput, context) => {
1480
1376
  const body = parsedOutput.body;
1481
- const deserialized = de_TaskDoesNotExist(body, context);
1377
+ const deserialized = _json(body);
1482
1378
  const exception = new TaskDoesNotExist({
1483
1379
  $metadata: deserializeMetadata(parsedOutput),
1484
1380
  ...deserialized,
@@ -1487,7 +1383,7 @@ const de_TaskDoesNotExistRes = async (parsedOutput, context) => {
1487
1383
  };
1488
1384
  const de_TaskTimedOutRes = async (parsedOutput, context) => {
1489
1385
  const body = parsedOutput.body;
1490
- const deserialized = de_TaskTimedOut(body, context);
1386
+ const deserialized = _json(body);
1491
1387
  const exception = new TaskTimedOut({
1492
1388
  $metadata: deserializeMetadata(parsedOutput),
1493
1389
  ...deserialized,
@@ -1496,7 +1392,7 @@ const de_TaskTimedOutRes = async (parsedOutput, context) => {
1496
1392
  };
1497
1393
  const de_TooManyTagsRes = async (parsedOutput, context) => {
1498
1394
  const body = parsedOutput.body;
1499
- const deserialized = de_TooManyTags(body, context);
1395
+ const deserialized = _json(body);
1500
1396
  const exception = new TooManyTags({
1501
1397
  $metadata: deserializeMetadata(parsedOutput),
1502
1398
  ...deserialized,
@@ -1505,1067 +1401,280 @@ const de_TooManyTagsRes = async (parsedOutput, context) => {
1505
1401
  };
1506
1402
  const de_ValidationExceptionRes = async (parsedOutput, context) => {
1507
1403
  const body = parsedOutput.body;
1508
- const deserialized = de_ValidationException(body, context);
1404
+ const deserialized = _json(body);
1509
1405
  const exception = new ValidationException({
1510
1406
  $metadata: deserializeMetadata(parsedOutput),
1511
1407
  ...deserialized,
1512
1408
  });
1513
1409
  return __decorateServiceException(exception, body);
1514
1410
  };
1515
- const se_CloudWatchLogsLogGroup = (input, context) => {
1516
- return {
1517
- ...(input.logGroupArn != null && { logGroupArn: input.logGroupArn }),
1518
- };
1519
- };
1520
- const se_CreateActivityInput = (input, context) => {
1521
- return {
1522
- ...(input.name != null && { name: input.name }),
1523
- ...(input.tags != null && { tags: se_TagList(input.tags, context) }),
1524
- };
1525
- };
1526
- const se_CreateStateMachineInput = (input, context) => {
1527
- return {
1528
- ...(input.definition != null && { definition: input.definition }),
1529
- ...(input.loggingConfiguration != null && {
1530
- loggingConfiguration: se_LoggingConfiguration(input.loggingConfiguration, context),
1531
- }),
1532
- ...(input.name != null && { name: input.name }),
1533
- ...(input.roleArn != null && { roleArn: input.roleArn }),
1534
- ...(input.tags != null && { tags: se_TagList(input.tags, context) }),
1535
- ...(input.tracingConfiguration != null && {
1536
- tracingConfiguration: se_TracingConfiguration(input.tracingConfiguration, context),
1537
- }),
1538
- ...(input.type != null && { type: input.type }),
1539
- };
1540
- };
1541
- const se_DeleteActivityInput = (input, context) => {
1542
- return {
1543
- ...(input.activityArn != null && { activityArn: input.activityArn }),
1544
- };
1545
- };
1546
- const se_DeleteStateMachineInput = (input, context) => {
1547
- return {
1548
- ...(input.stateMachineArn != null && { stateMachineArn: input.stateMachineArn }),
1549
- };
1550
- };
1551
- const se_DescribeActivityInput = (input, context) => {
1552
- return {
1553
- ...(input.activityArn != null && { activityArn: input.activityArn }),
1554
- };
1555
- };
1556
- const se_DescribeExecutionInput = (input, context) => {
1557
- return {
1558
- ...(input.executionArn != null && { executionArn: input.executionArn }),
1559
- };
1560
- };
1561
- const se_DescribeMapRunInput = (input, context) => {
1562
- return {
1563
- ...(input.mapRunArn != null && { mapRunArn: input.mapRunArn }),
1564
- };
1565
- };
1566
- const se_DescribeStateMachineForExecutionInput = (input, context) => {
1567
- return {
1568
- ...(input.executionArn != null && { executionArn: input.executionArn }),
1569
- };
1570
- };
1571
- const se_DescribeStateMachineInput = (input, context) => {
1572
- return {
1573
- ...(input.stateMachineArn != null && { stateMachineArn: input.stateMachineArn }),
1574
- };
1575
- };
1576
- const se_GetActivityTaskInput = (input, context) => {
1577
- return {
1578
- ...(input.activityArn != null && { activityArn: input.activityArn }),
1579
- ...(input.workerName != null && { workerName: input.workerName }),
1580
- };
1581
- };
1582
- const se_GetExecutionHistoryInput = (input, context) => {
1583
- return {
1584
- ...(input.executionArn != null && { executionArn: input.executionArn }),
1585
- ...(input.includeExecutionData != null && { includeExecutionData: input.includeExecutionData }),
1586
- ...(input.maxResults != null && { maxResults: input.maxResults }),
1587
- ...(input.nextToken != null && { nextToken: input.nextToken }),
1588
- ...(input.reverseOrder != null && { reverseOrder: input.reverseOrder }),
1589
- };
1590
- };
1591
- const se_ListActivitiesInput = (input, context) => {
1592
- return {
1593
- ...(input.maxResults != null && { maxResults: input.maxResults }),
1594
- ...(input.nextToken != null && { nextToken: input.nextToken }),
1595
- };
1596
- };
1597
- const se_ListExecutionsInput = (input, context) => {
1598
- return {
1599
- ...(input.mapRunArn != null && { mapRunArn: input.mapRunArn }),
1600
- ...(input.maxResults != null && { maxResults: input.maxResults }),
1601
- ...(input.nextToken != null && { nextToken: input.nextToken }),
1602
- ...(input.stateMachineArn != null && { stateMachineArn: input.stateMachineArn }),
1603
- ...(input.statusFilter != null && { statusFilter: input.statusFilter }),
1604
- };
1605
- };
1606
- const se_ListMapRunsInput = (input, context) => {
1607
- return {
1608
- ...(input.executionArn != null && { executionArn: input.executionArn }),
1609
- ...(input.maxResults != null && { maxResults: input.maxResults }),
1610
- ...(input.nextToken != null && { nextToken: input.nextToken }),
1611
- };
1612
- };
1613
- const se_ListStateMachinesInput = (input, context) => {
1614
- return {
1615
- ...(input.maxResults != null && { maxResults: input.maxResults }),
1616
- ...(input.nextToken != null && { nextToken: input.nextToken }),
1617
- };
1618
- };
1619
- const se_ListTagsForResourceInput = (input, context) => {
1620
- return {
1621
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
1622
- };
1623
- };
1624
- const se_LogDestination = (input, context) => {
1625
- return {
1626
- ...(input.cloudWatchLogsLogGroup != null && {
1627
- cloudWatchLogsLogGroup: se_CloudWatchLogsLogGroup(input.cloudWatchLogsLogGroup, context),
1628
- }),
1629
- };
1630
- };
1631
- const se_LogDestinationList = (input, context) => {
1632
- return input
1633
- .filter((e) => e != null)
1634
- .map((entry) => {
1635
- return se_LogDestination(entry, context);
1636
- });
1637
- };
1638
- const se_LoggingConfiguration = (input, context) => {
1639
- return {
1640
- ...(input.destinations != null && { destinations: se_LogDestinationList(input.destinations, context) }),
1641
- ...(input.includeExecutionData != null && { includeExecutionData: input.includeExecutionData }),
1642
- ...(input.level != null && { level: input.level }),
1643
- };
1644
- };
1645
- const se_SendTaskFailureInput = (input, context) => {
1646
- return {
1647
- ...(input.cause != null && { cause: input.cause }),
1648
- ...(input.error != null && { error: input.error }),
1649
- ...(input.taskToken != null && { taskToken: input.taskToken }),
1650
- };
1651
- };
1652
- const se_SendTaskHeartbeatInput = (input, context) => {
1653
- return {
1654
- ...(input.taskToken != null && { taskToken: input.taskToken }),
1655
- };
1656
- };
1657
- const se_SendTaskSuccessInput = (input, context) => {
1658
- return {
1659
- ...(input.output != null && { output: input.output }),
1660
- ...(input.taskToken != null && { taskToken: input.taskToken }),
1661
- };
1662
- };
1663
- const se_StartExecutionInput = (input, context) => {
1664
- return {
1665
- ...(input.input != null && { input: input.input }),
1666
- ...(input.name != null && { name: input.name }),
1667
- ...(input.stateMachineArn != null && { stateMachineArn: input.stateMachineArn }),
1668
- ...(input.traceHeader != null && { traceHeader: input.traceHeader }),
1669
- };
1670
- };
1671
- const se_StartSyncExecutionInput = (input, context) => {
1672
- return {
1673
- ...(input.input != null && { input: input.input }),
1674
- ...(input.name != null && { name: input.name }),
1675
- ...(input.stateMachineArn != null && { stateMachineArn: input.stateMachineArn }),
1676
- ...(input.traceHeader != null && { traceHeader: input.traceHeader }),
1677
- };
1678
- };
1679
- const se_StopExecutionInput = (input, context) => {
1680
- return {
1681
- ...(input.cause != null && { cause: input.cause }),
1682
- ...(input.error != null && { error: input.error }),
1683
- ...(input.executionArn != null && { executionArn: input.executionArn }),
1684
- };
1685
- };
1686
- const se_Tag = (input, context) => {
1687
- return {
1688
- ...(input.key != null && { key: input.key }),
1689
- ...(input.value != null && { value: input.value }),
1690
- };
1691
- };
1692
- const se_TagKeyList = (input, context) => {
1693
- return input
1694
- .filter((e) => e != null)
1695
- .map((entry) => {
1696
- return entry;
1697
- });
1698
- };
1699
- const se_TagList = (input, context) => {
1700
- return input
1701
- .filter((e) => e != null)
1702
- .map((entry) => {
1703
- return se_Tag(entry, context);
1704
- });
1705
- };
1706
- const se_TagResourceInput = (input, context) => {
1707
- return {
1708
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
1709
- ...(input.tags != null && { tags: se_TagList(input.tags, context) }),
1710
- };
1711
- };
1712
- const se_TracingConfiguration = (input, context) => {
1713
- return {
1714
- ...(input.enabled != null && { enabled: input.enabled }),
1715
- };
1716
- };
1717
- const se_UntagResourceInput = (input, context) => {
1718
- return {
1719
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
1720
- ...(input.tagKeys != null && { tagKeys: se_TagKeyList(input.tagKeys, context) }),
1721
- };
1722
- };
1723
1411
  const se_UpdateMapRunInput = (input, context) => {
1724
- return {
1725
- ...(input.mapRunArn != null && { mapRunArn: input.mapRunArn }),
1726
- ...(input.maxConcurrency != null && { maxConcurrency: input.maxConcurrency }),
1727
- ...(input.toleratedFailureCount != null && { toleratedFailureCount: input.toleratedFailureCount }),
1728
- ...(input.toleratedFailurePercentage != null && {
1729
- toleratedFailurePercentage: __serializeFloat(input.toleratedFailurePercentage),
1730
- }),
1731
- };
1732
- };
1733
- const se_UpdateStateMachineInput = (input, context) => {
1734
- return {
1735
- ...(input.definition != null && { definition: input.definition }),
1736
- ...(input.loggingConfiguration != null && {
1737
- loggingConfiguration: se_LoggingConfiguration(input.loggingConfiguration, context),
1738
- }),
1739
- ...(input.roleArn != null && { roleArn: input.roleArn }),
1740
- ...(input.stateMachineArn != null && { stateMachineArn: input.stateMachineArn }),
1741
- ...(input.tracingConfiguration != null && {
1742
- tracingConfiguration: se_TracingConfiguration(input.tracingConfiguration, context),
1743
- }),
1744
- };
1745
- };
1746
- const de_ActivityDoesNotExist = (output, context) => {
1747
- return {
1748
- message: __expectString(output.message),
1749
- };
1750
- };
1751
- const de_ActivityFailedEventDetails = (output, context) => {
1752
- return {
1753
- cause: __expectString(output.cause),
1754
- error: __expectString(output.error),
1755
- };
1756
- };
1757
- const de_ActivityLimitExceeded = (output, context) => {
1758
- return {
1759
- message: __expectString(output.message),
1760
- };
1412
+ return take(input, {
1413
+ mapRunArn: [],
1414
+ maxConcurrency: [],
1415
+ toleratedFailureCount: [],
1416
+ toleratedFailurePercentage: __serializeFloat,
1417
+ });
1761
1418
  };
1762
1419
  const de_ActivityList = (output, context) => {
1763
1420
  const retVal = (output || [])
1764
1421
  .filter((e) => e != null)
1765
1422
  .map((entry) => {
1766
- if (entry === null) {
1767
- return null;
1768
- }
1769
1423
  return de_ActivityListItem(entry, context);
1770
1424
  });
1771
1425
  return retVal;
1772
1426
  };
1773
1427
  const de_ActivityListItem = (output, context) => {
1774
- return {
1775
- activityArn: __expectString(output.activityArn),
1776
- creationDate: output.creationDate != null
1777
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDate)))
1778
- : undefined,
1779
- name: __expectString(output.name),
1780
- };
1781
- };
1782
- const de_ActivityScheduledEventDetails = (output, context) => {
1783
- return {
1784
- heartbeatInSeconds: __expectLong(output.heartbeatInSeconds),
1785
- input: __expectString(output.input),
1786
- inputDetails: output.inputDetails != null ? de_HistoryEventExecutionDataDetails(output.inputDetails, context) : undefined,
1787
- resource: __expectString(output.resource),
1788
- timeoutInSeconds: __expectLong(output.timeoutInSeconds),
1789
- };
1790
- };
1791
- const de_ActivityScheduleFailedEventDetails = (output, context) => {
1792
- return {
1793
- cause: __expectString(output.cause),
1794
- error: __expectString(output.error),
1795
- };
1796
- };
1797
- const de_ActivityStartedEventDetails = (output, context) => {
1798
- return {
1799
- workerName: __expectString(output.workerName),
1800
- };
1801
- };
1802
- const de_ActivitySucceededEventDetails = (output, context) => {
1803
- return {
1804
- output: __expectString(output.output),
1805
- outputDetails: output.outputDetails != null ? de_HistoryEventExecutionDataDetails(output.outputDetails, context) : undefined,
1806
- };
1807
- };
1808
- const de_ActivityTimedOutEventDetails = (output, context) => {
1809
- return {
1810
- cause: __expectString(output.cause),
1811
- error: __expectString(output.error),
1812
- };
1813
- };
1814
- const de_ActivityWorkerLimitExceeded = (output, context) => {
1815
- return {
1816
- message: __expectString(output.message),
1817
- };
1818
- };
1819
- const de_BillingDetails = (output, context) => {
1820
- return {
1821
- billedDurationInMilliseconds: __expectLong(output.billedDurationInMilliseconds),
1822
- billedMemoryUsedInMB: __expectLong(output.billedMemoryUsedInMB),
1823
- };
1824
- };
1825
- const de_CloudWatchEventsExecutionDataDetails = (output, context) => {
1826
- return {
1827
- included: __expectBoolean(output.included),
1828
- };
1829
- };
1830
- const de_CloudWatchLogsLogGroup = (output, context) => {
1831
- return {
1832
- logGroupArn: __expectString(output.logGroupArn),
1833
- };
1428
+ return take(output, {
1429
+ activityArn: __expectString,
1430
+ creationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1431
+ name: __expectString,
1432
+ });
1834
1433
  };
1835
1434
  const de_CreateActivityOutput = (output, context) => {
1836
- return {
1837
- activityArn: __expectString(output.activityArn),
1838
- creationDate: output.creationDate != null
1839
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDate)))
1840
- : undefined,
1841
- };
1435
+ return take(output, {
1436
+ activityArn: __expectString,
1437
+ creationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1438
+ });
1842
1439
  };
1843
1440
  const de_CreateStateMachineOutput = (output, context) => {
1844
- return {
1845
- creationDate: output.creationDate != null
1846
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDate)))
1847
- : undefined,
1848
- stateMachineArn: __expectString(output.stateMachineArn),
1849
- };
1850
- };
1851
- const de_DeleteActivityOutput = (output, context) => {
1852
- return {};
1853
- };
1854
- const de_DeleteStateMachineOutput = (output, context) => {
1855
- return {};
1441
+ return take(output, {
1442
+ creationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1443
+ stateMachineArn: __expectString,
1444
+ });
1856
1445
  };
1857
1446
  const de_DescribeActivityOutput = (output, context) => {
1858
- return {
1859
- activityArn: __expectString(output.activityArn),
1860
- creationDate: output.creationDate != null
1861
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDate)))
1862
- : undefined,
1863
- name: __expectString(output.name),
1864
- };
1447
+ return take(output, {
1448
+ activityArn: __expectString,
1449
+ creationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1450
+ name: __expectString,
1451
+ });
1865
1452
  };
1866
1453
  const de_DescribeExecutionOutput = (output, context) => {
1867
- return {
1868
- cause: __expectString(output.cause),
1869
- error: __expectString(output.error),
1870
- executionArn: __expectString(output.executionArn),
1871
- input: __expectString(output.input),
1872
- inputDetails: output.inputDetails != null ? de_CloudWatchEventsExecutionDataDetails(output.inputDetails, context) : undefined,
1873
- mapRunArn: __expectString(output.mapRunArn),
1874
- name: __expectString(output.name),
1875
- output: __expectString(output.output),
1876
- outputDetails: output.outputDetails != null ? de_CloudWatchEventsExecutionDataDetails(output.outputDetails, context) : undefined,
1877
- startDate: output.startDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startDate))) : undefined,
1878
- stateMachineArn: __expectString(output.stateMachineArn),
1879
- status: __expectString(output.status),
1880
- stopDate: output.stopDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.stopDate))) : undefined,
1881
- traceHeader: __expectString(output.traceHeader),
1882
- };
1454
+ return take(output, {
1455
+ cause: __expectString,
1456
+ error: __expectString,
1457
+ executionArn: __expectString,
1458
+ input: __expectString,
1459
+ inputDetails: _json,
1460
+ mapRunArn: __expectString,
1461
+ name: __expectString,
1462
+ output: __expectString,
1463
+ outputDetails: _json,
1464
+ startDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1465
+ stateMachineArn: __expectString,
1466
+ status: __expectString,
1467
+ stopDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1468
+ traceHeader: __expectString,
1469
+ });
1883
1470
  };
1884
1471
  const de_DescribeMapRunOutput = (output, context) => {
1885
- return {
1886
- executionArn: __expectString(output.executionArn),
1887
- executionCounts: output.executionCounts != null ? de_MapRunExecutionCounts(output.executionCounts, context) : undefined,
1888
- itemCounts: output.itemCounts != null ? de_MapRunItemCounts(output.itemCounts, context) : undefined,
1889
- mapRunArn: __expectString(output.mapRunArn),
1890
- maxConcurrency: __expectInt32(output.maxConcurrency),
1891
- startDate: output.startDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startDate))) : undefined,
1892
- status: __expectString(output.status),
1893
- stopDate: output.stopDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.stopDate))) : undefined,
1894
- toleratedFailureCount: __expectLong(output.toleratedFailureCount),
1895
- toleratedFailurePercentage: __limitedParseFloat32(output.toleratedFailurePercentage),
1896
- };
1472
+ return take(output, {
1473
+ executionArn: __expectString,
1474
+ executionCounts: _json,
1475
+ itemCounts: _json,
1476
+ mapRunArn: __expectString,
1477
+ maxConcurrency: __expectInt32,
1478
+ startDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1479
+ status: __expectString,
1480
+ stopDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1481
+ toleratedFailureCount: __expectLong,
1482
+ toleratedFailurePercentage: __limitedParseFloat32,
1483
+ });
1897
1484
  };
1898
1485
  const de_DescribeStateMachineForExecutionOutput = (output, context) => {
1899
- return {
1900
- definition: __expectString(output.definition),
1901
- label: __expectString(output.label),
1902
- loggingConfiguration: output.loggingConfiguration != null ? de_LoggingConfiguration(output.loggingConfiguration, context) : undefined,
1903
- mapRunArn: __expectString(output.mapRunArn),
1904
- name: __expectString(output.name),
1905
- roleArn: __expectString(output.roleArn),
1906
- stateMachineArn: __expectString(output.stateMachineArn),
1907
- tracingConfiguration: output.tracingConfiguration != null ? de_TracingConfiguration(output.tracingConfiguration, context) : undefined,
1908
- updateDate: output.updateDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updateDate))) : undefined,
1909
- };
1486
+ return take(output, {
1487
+ definition: __expectString,
1488
+ label: __expectString,
1489
+ loggingConfiguration: _json,
1490
+ mapRunArn: __expectString,
1491
+ name: __expectString,
1492
+ roleArn: __expectString,
1493
+ stateMachineArn: __expectString,
1494
+ tracingConfiguration: _json,
1495
+ updateDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1496
+ });
1910
1497
  };
1911
1498
  const de_DescribeStateMachineOutput = (output, context) => {
1912
- return {
1913
- creationDate: output.creationDate != null
1914
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDate)))
1915
- : undefined,
1916
- definition: __expectString(output.definition),
1917
- label: __expectString(output.label),
1918
- loggingConfiguration: output.loggingConfiguration != null ? de_LoggingConfiguration(output.loggingConfiguration, context) : undefined,
1919
- name: __expectString(output.name),
1920
- roleArn: __expectString(output.roleArn),
1921
- stateMachineArn: __expectString(output.stateMachineArn),
1922
- status: __expectString(output.status),
1923
- tracingConfiguration: output.tracingConfiguration != null ? de_TracingConfiguration(output.tracingConfiguration, context) : undefined,
1924
- type: __expectString(output.type),
1925
- };
1926
- };
1927
- const de_ExecutionAbortedEventDetails = (output, context) => {
1928
- return {
1929
- cause: __expectString(output.cause),
1930
- error: __expectString(output.error),
1931
- };
1932
- };
1933
- const de_ExecutionAlreadyExists = (output, context) => {
1934
- return {
1935
- message: __expectString(output.message),
1936
- };
1937
- };
1938
- const de_ExecutionDoesNotExist = (output, context) => {
1939
- return {
1940
- message: __expectString(output.message),
1941
- };
1942
- };
1943
- const de_ExecutionFailedEventDetails = (output, context) => {
1944
- return {
1945
- cause: __expectString(output.cause),
1946
- error: __expectString(output.error),
1947
- };
1948
- };
1949
- const de_ExecutionLimitExceeded = (output, context) => {
1950
- return {
1951
- message: __expectString(output.message),
1952
- };
1499
+ return take(output, {
1500
+ creationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1501
+ definition: __expectString,
1502
+ label: __expectString,
1503
+ loggingConfiguration: _json,
1504
+ name: __expectString,
1505
+ roleArn: __expectString,
1506
+ stateMachineArn: __expectString,
1507
+ status: __expectString,
1508
+ tracingConfiguration: _json,
1509
+ type: __expectString,
1510
+ });
1953
1511
  };
1954
1512
  const de_ExecutionList = (output, context) => {
1955
1513
  const retVal = (output || [])
1956
1514
  .filter((e) => e != null)
1957
1515
  .map((entry) => {
1958
- if (entry === null) {
1959
- return null;
1960
- }
1961
1516
  return de_ExecutionListItem(entry, context);
1962
1517
  });
1963
1518
  return retVal;
1964
1519
  };
1965
1520
  const de_ExecutionListItem = (output, context) => {
1966
- return {
1967
- executionArn: __expectString(output.executionArn),
1968
- itemCount: __expectInt32(output.itemCount),
1969
- mapRunArn: __expectString(output.mapRunArn),
1970
- name: __expectString(output.name),
1971
- startDate: output.startDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startDate))) : undefined,
1972
- stateMachineArn: __expectString(output.stateMachineArn),
1973
- status: __expectString(output.status),
1974
- stopDate: output.stopDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.stopDate))) : undefined,
1975
- };
1976
- };
1977
- const de_ExecutionStartedEventDetails = (output, context) => {
1978
- return {
1979
- input: __expectString(output.input),
1980
- inputDetails: output.inputDetails != null ? de_HistoryEventExecutionDataDetails(output.inputDetails, context) : undefined,
1981
- roleArn: __expectString(output.roleArn),
1982
- };
1983
- };
1984
- const de_ExecutionSucceededEventDetails = (output, context) => {
1985
- return {
1986
- output: __expectString(output.output),
1987
- outputDetails: output.outputDetails != null ? de_HistoryEventExecutionDataDetails(output.outputDetails, context) : undefined,
1988
- };
1989
- };
1990
- const de_ExecutionTimedOutEventDetails = (output, context) => {
1991
- return {
1992
- cause: __expectString(output.cause),
1993
- error: __expectString(output.error),
1994
- };
1995
- };
1996
- const de_GetActivityTaskOutput = (output, context) => {
1997
- return {
1998
- input: __expectString(output.input),
1999
- taskToken: __expectString(output.taskToken),
2000
- };
1521
+ return take(output, {
1522
+ executionArn: __expectString,
1523
+ itemCount: __expectInt32,
1524
+ mapRunArn: __expectString,
1525
+ name: __expectString,
1526
+ startDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1527
+ stateMachineArn: __expectString,
1528
+ status: __expectString,
1529
+ stopDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1530
+ });
2001
1531
  };
2002
1532
  const de_GetExecutionHistoryOutput = (output, context) => {
2003
- return {
2004
- events: output.events != null ? de_HistoryEventList(output.events, context) : undefined,
2005
- nextToken: __expectString(output.nextToken),
2006
- };
1533
+ return take(output, {
1534
+ events: (_) => de_HistoryEventList(_, context),
1535
+ nextToken: __expectString,
1536
+ });
2007
1537
  };
2008
1538
  const de_HistoryEvent = (output, context) => {
2009
- return {
2010
- activityFailedEventDetails: output.activityFailedEventDetails != null
2011
- ? de_ActivityFailedEventDetails(output.activityFailedEventDetails, context)
2012
- : undefined,
2013
- activityScheduleFailedEventDetails: output.activityScheduleFailedEventDetails != null
2014
- ? de_ActivityScheduleFailedEventDetails(output.activityScheduleFailedEventDetails, context)
2015
- : undefined,
2016
- activityScheduledEventDetails: output.activityScheduledEventDetails != null
2017
- ? de_ActivityScheduledEventDetails(output.activityScheduledEventDetails, context)
2018
- : undefined,
2019
- activityStartedEventDetails: output.activityStartedEventDetails != null
2020
- ? de_ActivityStartedEventDetails(output.activityStartedEventDetails, context)
2021
- : undefined,
2022
- activitySucceededEventDetails: output.activitySucceededEventDetails != null
2023
- ? de_ActivitySucceededEventDetails(output.activitySucceededEventDetails, context)
2024
- : undefined,
2025
- activityTimedOutEventDetails: output.activityTimedOutEventDetails != null
2026
- ? de_ActivityTimedOutEventDetails(output.activityTimedOutEventDetails, context)
2027
- : undefined,
2028
- executionAbortedEventDetails: output.executionAbortedEventDetails != null
2029
- ? de_ExecutionAbortedEventDetails(output.executionAbortedEventDetails, context)
2030
- : undefined,
2031
- executionFailedEventDetails: output.executionFailedEventDetails != null
2032
- ? de_ExecutionFailedEventDetails(output.executionFailedEventDetails, context)
2033
- : undefined,
2034
- executionStartedEventDetails: output.executionStartedEventDetails != null
2035
- ? de_ExecutionStartedEventDetails(output.executionStartedEventDetails, context)
2036
- : undefined,
2037
- executionSucceededEventDetails: output.executionSucceededEventDetails != null
2038
- ? de_ExecutionSucceededEventDetails(output.executionSucceededEventDetails, context)
2039
- : undefined,
2040
- executionTimedOutEventDetails: output.executionTimedOutEventDetails != null
2041
- ? de_ExecutionTimedOutEventDetails(output.executionTimedOutEventDetails, context)
2042
- : undefined,
2043
- id: __expectLong(output.id),
2044
- lambdaFunctionFailedEventDetails: output.lambdaFunctionFailedEventDetails != null
2045
- ? de_LambdaFunctionFailedEventDetails(output.lambdaFunctionFailedEventDetails, context)
2046
- : undefined,
2047
- lambdaFunctionScheduleFailedEventDetails: output.lambdaFunctionScheduleFailedEventDetails != null
2048
- ? de_LambdaFunctionScheduleFailedEventDetails(output.lambdaFunctionScheduleFailedEventDetails, context)
2049
- : undefined,
2050
- lambdaFunctionScheduledEventDetails: output.lambdaFunctionScheduledEventDetails != null
2051
- ? de_LambdaFunctionScheduledEventDetails(output.lambdaFunctionScheduledEventDetails, context)
2052
- : undefined,
2053
- lambdaFunctionStartFailedEventDetails: output.lambdaFunctionStartFailedEventDetails != null
2054
- ? de_LambdaFunctionStartFailedEventDetails(output.lambdaFunctionStartFailedEventDetails, context)
2055
- : undefined,
2056
- lambdaFunctionSucceededEventDetails: output.lambdaFunctionSucceededEventDetails != null
2057
- ? de_LambdaFunctionSucceededEventDetails(output.lambdaFunctionSucceededEventDetails, context)
2058
- : undefined,
2059
- lambdaFunctionTimedOutEventDetails: output.lambdaFunctionTimedOutEventDetails != null
2060
- ? de_LambdaFunctionTimedOutEventDetails(output.lambdaFunctionTimedOutEventDetails, context)
2061
- : undefined,
2062
- mapIterationAbortedEventDetails: output.mapIterationAbortedEventDetails != null
2063
- ? de_MapIterationEventDetails(output.mapIterationAbortedEventDetails, context)
2064
- : undefined,
2065
- mapIterationFailedEventDetails: output.mapIterationFailedEventDetails != null
2066
- ? de_MapIterationEventDetails(output.mapIterationFailedEventDetails, context)
2067
- : undefined,
2068
- mapIterationStartedEventDetails: output.mapIterationStartedEventDetails != null
2069
- ? de_MapIterationEventDetails(output.mapIterationStartedEventDetails, context)
2070
- : undefined,
2071
- mapIterationSucceededEventDetails: output.mapIterationSucceededEventDetails != null
2072
- ? de_MapIterationEventDetails(output.mapIterationSucceededEventDetails, context)
2073
- : undefined,
2074
- mapRunFailedEventDetails: output.mapRunFailedEventDetails != null
2075
- ? de_MapRunFailedEventDetails(output.mapRunFailedEventDetails, context)
2076
- : undefined,
2077
- mapRunStartedEventDetails: output.mapRunStartedEventDetails != null
2078
- ? de_MapRunStartedEventDetails(output.mapRunStartedEventDetails, context)
2079
- : undefined,
2080
- mapStateStartedEventDetails: output.mapStateStartedEventDetails != null
2081
- ? de_MapStateStartedEventDetails(output.mapStateStartedEventDetails, context)
2082
- : undefined,
2083
- previousEventId: __expectLong(output.previousEventId),
2084
- stateEnteredEventDetails: output.stateEnteredEventDetails != null
2085
- ? de_StateEnteredEventDetails(output.stateEnteredEventDetails, context)
2086
- : undefined,
2087
- stateExitedEventDetails: output.stateExitedEventDetails != null
2088
- ? de_StateExitedEventDetails(output.stateExitedEventDetails, context)
2089
- : undefined,
2090
- taskFailedEventDetails: output.taskFailedEventDetails != null
2091
- ? de_TaskFailedEventDetails(output.taskFailedEventDetails, context)
2092
- : undefined,
2093
- taskScheduledEventDetails: output.taskScheduledEventDetails != null
2094
- ? de_TaskScheduledEventDetails(output.taskScheduledEventDetails, context)
2095
- : undefined,
2096
- taskStartFailedEventDetails: output.taskStartFailedEventDetails != null
2097
- ? de_TaskStartFailedEventDetails(output.taskStartFailedEventDetails, context)
2098
- : undefined,
2099
- taskStartedEventDetails: output.taskStartedEventDetails != null
2100
- ? de_TaskStartedEventDetails(output.taskStartedEventDetails, context)
2101
- : undefined,
2102
- taskSubmitFailedEventDetails: output.taskSubmitFailedEventDetails != null
2103
- ? de_TaskSubmitFailedEventDetails(output.taskSubmitFailedEventDetails, context)
2104
- : undefined,
2105
- taskSubmittedEventDetails: output.taskSubmittedEventDetails != null
2106
- ? de_TaskSubmittedEventDetails(output.taskSubmittedEventDetails, context)
2107
- : undefined,
2108
- taskSucceededEventDetails: output.taskSucceededEventDetails != null
2109
- ? de_TaskSucceededEventDetails(output.taskSucceededEventDetails, context)
2110
- : undefined,
2111
- taskTimedOutEventDetails: output.taskTimedOutEventDetails != null
2112
- ? de_TaskTimedOutEventDetails(output.taskTimedOutEventDetails, context)
2113
- : undefined,
2114
- timestamp: output.timestamp != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.timestamp))) : undefined,
2115
- type: __expectString(output.type),
2116
- };
2117
- };
2118
- const de_HistoryEventExecutionDataDetails = (output, context) => {
2119
- return {
2120
- truncated: __expectBoolean(output.truncated),
2121
- };
1539
+ return take(output, {
1540
+ activityFailedEventDetails: _json,
1541
+ activityScheduleFailedEventDetails: _json,
1542
+ activityScheduledEventDetails: _json,
1543
+ activityStartedEventDetails: _json,
1544
+ activitySucceededEventDetails: _json,
1545
+ activityTimedOutEventDetails: _json,
1546
+ executionAbortedEventDetails: _json,
1547
+ executionFailedEventDetails: _json,
1548
+ executionStartedEventDetails: _json,
1549
+ executionSucceededEventDetails: _json,
1550
+ executionTimedOutEventDetails: _json,
1551
+ id: __expectLong,
1552
+ lambdaFunctionFailedEventDetails: _json,
1553
+ lambdaFunctionScheduleFailedEventDetails: _json,
1554
+ lambdaFunctionScheduledEventDetails: _json,
1555
+ lambdaFunctionStartFailedEventDetails: _json,
1556
+ lambdaFunctionSucceededEventDetails: _json,
1557
+ lambdaFunctionTimedOutEventDetails: _json,
1558
+ mapIterationAbortedEventDetails: _json,
1559
+ mapIterationFailedEventDetails: _json,
1560
+ mapIterationStartedEventDetails: _json,
1561
+ mapIterationSucceededEventDetails: _json,
1562
+ mapRunFailedEventDetails: _json,
1563
+ mapRunStartedEventDetails: _json,
1564
+ mapStateStartedEventDetails: _json,
1565
+ previousEventId: __expectLong,
1566
+ stateEnteredEventDetails: _json,
1567
+ stateExitedEventDetails: _json,
1568
+ taskFailedEventDetails: _json,
1569
+ taskScheduledEventDetails: _json,
1570
+ taskStartFailedEventDetails: _json,
1571
+ taskStartedEventDetails: _json,
1572
+ taskSubmitFailedEventDetails: _json,
1573
+ taskSubmittedEventDetails: _json,
1574
+ taskSucceededEventDetails: _json,
1575
+ taskTimedOutEventDetails: _json,
1576
+ timestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1577
+ type: __expectString,
1578
+ });
2122
1579
  };
2123
1580
  const de_HistoryEventList = (output, context) => {
2124
1581
  const retVal = (output || [])
2125
1582
  .filter((e) => e != null)
2126
1583
  .map((entry) => {
2127
- if (entry === null) {
2128
- return null;
2129
- }
2130
1584
  return de_HistoryEvent(entry, context);
2131
1585
  });
2132
1586
  return retVal;
2133
1587
  };
2134
- const de_InvalidArn = (output, context) => {
2135
- return {
2136
- message: __expectString(output.message),
2137
- };
2138
- };
2139
- const de_InvalidDefinition = (output, context) => {
2140
- return {
2141
- message: __expectString(output.message),
2142
- };
2143
- };
2144
- const de_InvalidExecutionInput = (output, context) => {
2145
- return {
2146
- message: __expectString(output.message),
2147
- };
2148
- };
2149
- const de_InvalidLoggingConfiguration = (output, context) => {
2150
- return {
2151
- message: __expectString(output.message),
2152
- };
2153
- };
2154
- const de_InvalidName = (output, context) => {
2155
- return {
2156
- message: __expectString(output.message),
2157
- };
2158
- };
2159
- const de_InvalidOutput = (output, context) => {
2160
- return {
2161
- message: __expectString(output.message),
2162
- };
2163
- };
2164
- const de_InvalidToken = (output, context) => {
2165
- return {
2166
- message: __expectString(output.message),
2167
- };
2168
- };
2169
- const de_InvalidTracingConfiguration = (output, context) => {
2170
- return {
2171
- message: __expectString(output.message),
2172
- };
2173
- };
2174
- const de_LambdaFunctionFailedEventDetails = (output, context) => {
2175
- return {
2176
- cause: __expectString(output.cause),
2177
- error: __expectString(output.error),
2178
- };
2179
- };
2180
- const de_LambdaFunctionScheduledEventDetails = (output, context) => {
2181
- return {
2182
- input: __expectString(output.input),
2183
- inputDetails: output.inputDetails != null ? de_HistoryEventExecutionDataDetails(output.inputDetails, context) : undefined,
2184
- resource: __expectString(output.resource),
2185
- taskCredentials: output.taskCredentials != null ? de_TaskCredentials(output.taskCredentials, context) : undefined,
2186
- timeoutInSeconds: __expectLong(output.timeoutInSeconds),
2187
- };
2188
- };
2189
- const de_LambdaFunctionScheduleFailedEventDetails = (output, context) => {
2190
- return {
2191
- cause: __expectString(output.cause),
2192
- error: __expectString(output.error),
2193
- };
2194
- };
2195
- const de_LambdaFunctionStartFailedEventDetails = (output, context) => {
2196
- return {
2197
- cause: __expectString(output.cause),
2198
- error: __expectString(output.error),
2199
- };
2200
- };
2201
- const de_LambdaFunctionSucceededEventDetails = (output, context) => {
2202
- return {
2203
- output: __expectString(output.output),
2204
- outputDetails: output.outputDetails != null ? de_HistoryEventExecutionDataDetails(output.outputDetails, context) : undefined,
2205
- };
2206
- };
2207
- const de_LambdaFunctionTimedOutEventDetails = (output, context) => {
2208
- return {
2209
- cause: __expectString(output.cause),
2210
- error: __expectString(output.error),
2211
- };
2212
- };
2213
1588
  const de_ListActivitiesOutput = (output, context) => {
2214
- return {
2215
- activities: output.activities != null ? de_ActivityList(output.activities, context) : undefined,
2216
- nextToken: __expectString(output.nextToken),
2217
- };
1589
+ return take(output, {
1590
+ activities: (_) => de_ActivityList(_, context),
1591
+ nextToken: __expectString,
1592
+ });
2218
1593
  };
2219
1594
  const de_ListExecutionsOutput = (output, context) => {
2220
- return {
2221
- executions: output.executions != null ? de_ExecutionList(output.executions, context) : undefined,
2222
- nextToken: __expectString(output.nextToken),
2223
- };
1595
+ return take(output, {
1596
+ executions: (_) => de_ExecutionList(_, context),
1597
+ nextToken: __expectString,
1598
+ });
2224
1599
  };
2225
1600
  const de_ListMapRunsOutput = (output, context) => {
2226
- return {
2227
- mapRuns: output.mapRuns != null ? de_MapRunList(output.mapRuns, context) : undefined,
2228
- nextToken: __expectString(output.nextToken),
2229
- };
1601
+ return take(output, {
1602
+ mapRuns: (_) => de_MapRunList(_, context),
1603
+ nextToken: __expectString,
1604
+ });
2230
1605
  };
2231
1606
  const de_ListStateMachinesOutput = (output, context) => {
2232
- return {
2233
- nextToken: __expectString(output.nextToken),
2234
- stateMachines: output.stateMachines != null ? de_StateMachineList(output.stateMachines, context) : undefined,
2235
- };
2236
- };
2237
- const de_ListTagsForResourceOutput = (output, context) => {
2238
- return {
2239
- tags: output.tags != null ? de_TagList(output.tags, context) : undefined,
2240
- };
2241
- };
2242
- const de_LogDestination = (output, context) => {
2243
- return {
2244
- cloudWatchLogsLogGroup: output.cloudWatchLogsLogGroup != null
2245
- ? de_CloudWatchLogsLogGroup(output.cloudWatchLogsLogGroup, context)
2246
- : undefined,
2247
- };
2248
- };
2249
- const de_LogDestinationList = (output, context) => {
2250
- const retVal = (output || [])
2251
- .filter((e) => e != null)
2252
- .map((entry) => {
2253
- if (entry === null) {
2254
- return null;
2255
- }
2256
- return de_LogDestination(entry, context);
1607
+ return take(output, {
1608
+ nextToken: __expectString,
1609
+ stateMachines: (_) => de_StateMachineList(_, context),
2257
1610
  });
2258
- return retVal;
2259
- };
2260
- const de_LoggingConfiguration = (output, context) => {
2261
- return {
2262
- destinations: output.destinations != null ? de_LogDestinationList(output.destinations, context) : undefined,
2263
- includeExecutionData: __expectBoolean(output.includeExecutionData),
2264
- level: __expectString(output.level),
2265
- };
2266
- };
2267
- const de_MapIterationEventDetails = (output, context) => {
2268
- return {
2269
- index: __expectInt32(output.index),
2270
- name: __expectString(output.name),
2271
- };
2272
- };
2273
- const de_MapRunExecutionCounts = (output, context) => {
2274
- return {
2275
- aborted: __expectLong(output.aborted),
2276
- failed: __expectLong(output.failed),
2277
- pending: __expectLong(output.pending),
2278
- resultsWritten: __expectLong(output.resultsWritten),
2279
- running: __expectLong(output.running),
2280
- succeeded: __expectLong(output.succeeded),
2281
- timedOut: __expectLong(output.timedOut),
2282
- total: __expectLong(output.total),
2283
- };
2284
- };
2285
- const de_MapRunFailedEventDetails = (output, context) => {
2286
- return {
2287
- cause: __expectString(output.cause),
2288
- error: __expectString(output.error),
2289
- };
2290
- };
2291
- const de_MapRunItemCounts = (output, context) => {
2292
- return {
2293
- aborted: __expectLong(output.aborted),
2294
- failed: __expectLong(output.failed),
2295
- pending: __expectLong(output.pending),
2296
- resultsWritten: __expectLong(output.resultsWritten),
2297
- running: __expectLong(output.running),
2298
- succeeded: __expectLong(output.succeeded),
2299
- timedOut: __expectLong(output.timedOut),
2300
- total: __expectLong(output.total),
2301
- };
2302
1611
  };
2303
1612
  const de_MapRunList = (output, context) => {
2304
1613
  const retVal = (output || [])
2305
1614
  .filter((e) => e != null)
2306
1615
  .map((entry) => {
2307
- if (entry === null) {
2308
- return null;
2309
- }
2310
1616
  return de_MapRunListItem(entry, context);
2311
1617
  });
2312
1618
  return retVal;
2313
1619
  };
2314
1620
  const de_MapRunListItem = (output, context) => {
2315
- return {
2316
- executionArn: __expectString(output.executionArn),
2317
- mapRunArn: __expectString(output.mapRunArn),
2318
- startDate: output.startDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startDate))) : undefined,
2319
- stateMachineArn: __expectString(output.stateMachineArn),
2320
- stopDate: output.stopDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.stopDate))) : undefined,
2321
- };
2322
- };
2323
- const de_MapRunStartedEventDetails = (output, context) => {
2324
- return {
2325
- mapRunArn: __expectString(output.mapRunArn),
2326
- };
2327
- };
2328
- const de_MapStateStartedEventDetails = (output, context) => {
2329
- return {
2330
- length: __expectInt32(output.length),
2331
- };
2332
- };
2333
- const de_MissingRequiredParameter = (output, context) => {
2334
- return {
2335
- message: __expectString(output.message),
2336
- };
2337
- };
2338
- const de_ResourceNotFound = (output, context) => {
2339
- return {
2340
- message: __expectString(output.message),
2341
- resourceName: __expectString(output.resourceName),
2342
- };
2343
- };
2344
- const de_SendTaskFailureOutput = (output, context) => {
2345
- return {};
2346
- };
2347
- const de_SendTaskHeartbeatOutput = (output, context) => {
2348
- return {};
2349
- };
2350
- const de_SendTaskSuccessOutput = (output, context) => {
2351
- return {};
1621
+ return take(output, {
1622
+ executionArn: __expectString,
1623
+ mapRunArn: __expectString,
1624
+ startDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1625
+ stateMachineArn: __expectString,
1626
+ stopDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1627
+ });
2352
1628
  };
2353
1629
  const de_StartExecutionOutput = (output, context) => {
2354
- return {
2355
- executionArn: __expectString(output.executionArn),
2356
- startDate: output.startDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startDate))) : undefined,
2357
- };
1630
+ return take(output, {
1631
+ executionArn: __expectString,
1632
+ startDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1633
+ });
2358
1634
  };
2359
1635
  const de_StartSyncExecutionOutput = (output, context) => {
2360
- return {
2361
- billingDetails: output.billingDetails != null ? de_BillingDetails(output.billingDetails, context) : undefined,
2362
- cause: __expectString(output.cause),
2363
- error: __expectString(output.error),
2364
- executionArn: __expectString(output.executionArn),
2365
- input: __expectString(output.input),
2366
- inputDetails: output.inputDetails != null ? de_CloudWatchEventsExecutionDataDetails(output.inputDetails, context) : undefined,
2367
- name: __expectString(output.name),
2368
- output: __expectString(output.output),
2369
- outputDetails: output.outputDetails != null ? de_CloudWatchEventsExecutionDataDetails(output.outputDetails, context) : undefined,
2370
- startDate: output.startDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startDate))) : undefined,
2371
- stateMachineArn: __expectString(output.stateMachineArn),
2372
- status: __expectString(output.status),
2373
- stopDate: output.stopDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.stopDate))) : undefined,
2374
- traceHeader: __expectString(output.traceHeader),
2375
- };
2376
- };
2377
- const de_StateEnteredEventDetails = (output, context) => {
2378
- return {
2379
- input: __expectString(output.input),
2380
- inputDetails: output.inputDetails != null ? de_HistoryEventExecutionDataDetails(output.inputDetails, context) : undefined,
2381
- name: __expectString(output.name),
2382
- };
2383
- };
2384
- const de_StateExitedEventDetails = (output, context) => {
2385
- return {
2386
- name: __expectString(output.name),
2387
- output: __expectString(output.output),
2388
- outputDetails: output.outputDetails != null ? de_HistoryEventExecutionDataDetails(output.outputDetails, context) : undefined,
2389
- };
2390
- };
2391
- const de_StateMachineAlreadyExists = (output, context) => {
2392
- return {
2393
- message: __expectString(output.message),
2394
- };
2395
- };
2396
- const de_StateMachineDeleting = (output, context) => {
2397
- return {
2398
- message: __expectString(output.message),
2399
- };
2400
- };
2401
- const de_StateMachineDoesNotExist = (output, context) => {
2402
- return {
2403
- message: __expectString(output.message),
2404
- };
2405
- };
2406
- const de_StateMachineLimitExceeded = (output, context) => {
2407
- return {
2408
- message: __expectString(output.message),
2409
- };
1636
+ return take(output, {
1637
+ billingDetails: _json,
1638
+ cause: __expectString,
1639
+ error: __expectString,
1640
+ executionArn: __expectString,
1641
+ input: __expectString,
1642
+ inputDetails: _json,
1643
+ name: __expectString,
1644
+ output: __expectString,
1645
+ outputDetails: _json,
1646
+ startDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1647
+ stateMachineArn: __expectString,
1648
+ status: __expectString,
1649
+ stopDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1650
+ traceHeader: __expectString,
1651
+ });
2410
1652
  };
2411
1653
  const de_StateMachineList = (output, context) => {
2412
1654
  const retVal = (output || [])
2413
1655
  .filter((e) => e != null)
2414
1656
  .map((entry) => {
2415
- if (entry === null) {
2416
- return null;
2417
- }
2418
1657
  return de_StateMachineListItem(entry, context);
2419
1658
  });
2420
1659
  return retVal;
2421
1660
  };
2422
1661
  const de_StateMachineListItem = (output, context) => {
2423
- return {
2424
- creationDate: output.creationDate != null
2425
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDate)))
2426
- : undefined,
2427
- name: __expectString(output.name),
2428
- stateMachineArn: __expectString(output.stateMachineArn),
2429
- type: __expectString(output.type),
2430
- };
2431
- };
2432
- const de_StateMachineTypeNotSupported = (output, context) => {
2433
- return {
2434
- message: __expectString(output.message),
2435
- };
1662
+ return take(output, {
1663
+ creationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1664
+ name: __expectString,
1665
+ stateMachineArn: __expectString,
1666
+ type: __expectString,
1667
+ });
2436
1668
  };
2437
1669
  const de_StopExecutionOutput = (output, context) => {
2438
- return {
2439
- stopDate: output.stopDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.stopDate))) : undefined,
2440
- };
2441
- };
2442
- const de_Tag = (output, context) => {
2443
- return {
2444
- key: __expectString(output.key),
2445
- value: __expectString(output.value),
2446
- };
2447
- };
2448
- const de_TagList = (output, context) => {
2449
- const retVal = (output || [])
2450
- .filter((e) => e != null)
2451
- .map((entry) => {
2452
- if (entry === null) {
2453
- return null;
2454
- }
2455
- return de_Tag(entry, context);
1670
+ return take(output, {
1671
+ stopDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2456
1672
  });
2457
- return retVal;
2458
- };
2459
- const de_TagResourceOutput = (output, context) => {
2460
- return {};
2461
- };
2462
- const de_TaskCredentials = (output, context) => {
2463
- return {
2464
- roleArn: __expectString(output.roleArn),
2465
- };
2466
- };
2467
- const de_TaskDoesNotExist = (output, context) => {
2468
- return {
2469
- message: __expectString(output.message),
2470
- };
2471
- };
2472
- const de_TaskFailedEventDetails = (output, context) => {
2473
- return {
2474
- cause: __expectString(output.cause),
2475
- error: __expectString(output.error),
2476
- resource: __expectString(output.resource),
2477
- resourceType: __expectString(output.resourceType),
2478
- };
2479
- };
2480
- const de_TaskScheduledEventDetails = (output, context) => {
2481
- return {
2482
- heartbeatInSeconds: __expectLong(output.heartbeatInSeconds),
2483
- parameters: __expectString(output.parameters),
2484
- region: __expectString(output.region),
2485
- resource: __expectString(output.resource),
2486
- resourceType: __expectString(output.resourceType),
2487
- taskCredentials: output.taskCredentials != null ? de_TaskCredentials(output.taskCredentials, context) : undefined,
2488
- timeoutInSeconds: __expectLong(output.timeoutInSeconds),
2489
- };
2490
- };
2491
- const de_TaskStartedEventDetails = (output, context) => {
2492
- return {
2493
- resource: __expectString(output.resource),
2494
- resourceType: __expectString(output.resourceType),
2495
- };
2496
- };
2497
- const de_TaskStartFailedEventDetails = (output, context) => {
2498
- return {
2499
- cause: __expectString(output.cause),
2500
- error: __expectString(output.error),
2501
- resource: __expectString(output.resource),
2502
- resourceType: __expectString(output.resourceType),
2503
- };
2504
- };
2505
- const de_TaskSubmitFailedEventDetails = (output, context) => {
2506
- return {
2507
- cause: __expectString(output.cause),
2508
- error: __expectString(output.error),
2509
- resource: __expectString(output.resource),
2510
- resourceType: __expectString(output.resourceType),
2511
- };
2512
- };
2513
- const de_TaskSubmittedEventDetails = (output, context) => {
2514
- return {
2515
- output: __expectString(output.output),
2516
- outputDetails: output.outputDetails != null ? de_HistoryEventExecutionDataDetails(output.outputDetails, context) : undefined,
2517
- resource: __expectString(output.resource),
2518
- resourceType: __expectString(output.resourceType),
2519
- };
2520
- };
2521
- const de_TaskSucceededEventDetails = (output, context) => {
2522
- return {
2523
- output: __expectString(output.output),
2524
- outputDetails: output.outputDetails != null ? de_HistoryEventExecutionDataDetails(output.outputDetails, context) : undefined,
2525
- resource: __expectString(output.resource),
2526
- resourceType: __expectString(output.resourceType),
2527
- };
2528
- };
2529
- const de_TaskTimedOut = (output, context) => {
2530
- return {
2531
- message: __expectString(output.message),
2532
- };
2533
- };
2534
- const de_TaskTimedOutEventDetails = (output, context) => {
2535
- return {
2536
- cause: __expectString(output.cause),
2537
- error: __expectString(output.error),
2538
- resource: __expectString(output.resource),
2539
- resourceType: __expectString(output.resourceType),
2540
- };
2541
- };
2542
- const de_TooManyTags = (output, context) => {
2543
- return {
2544
- message: __expectString(output.message),
2545
- resourceName: __expectString(output.resourceName),
2546
- };
2547
- };
2548
- const de_TracingConfiguration = (output, context) => {
2549
- return {
2550
- enabled: __expectBoolean(output.enabled),
2551
- };
2552
- };
2553
- const de_UntagResourceOutput = (output, context) => {
2554
- return {};
2555
- };
2556
- const de_UpdateMapRunOutput = (output, context) => {
2557
- return {};
2558
1673
  };
2559
1674
  const de_UpdateStateMachineOutput = (output, context) => {
2560
- return {
2561
- updateDate: output.updateDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updateDate))) : undefined,
2562
- };
2563
- };
2564
- const de_ValidationException = (output, context) => {
2565
- return {
2566
- message: __expectString(output.message),
2567
- reason: __expectString(output.reason),
2568
- };
1675
+ return take(output, {
1676
+ updateDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1677
+ });
2569
1678
  };
2570
1679
  const deserializeMetadata = (output) => ({
2571
1680
  httpStatusCode: output.statusCode,
@@ -2580,6 +1689,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
2580
1689
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
2581
1690
  };
2582
1691
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
1692
+ const throwDefaultError = withBaseException(__BaseException);
2583
1693
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
2584
1694
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2585
1695
  const contents = {
@@ -2598,6 +1708,12 @@ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, bod
2598
1708
  }
2599
1709
  return new __HttpRequest(contents);
2600
1710
  };
1711
+ function sharedHeaders(operation) {
1712
+ return {
1713
+ "content-type": "application/x-amz-json-1.0",
1714
+ "x-amz-target": `AWSStepFunctions.${operation}`,
1715
+ };
1716
+ }
2601
1717
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2602
1718
  if (encoded.length) {
2603
1719
  return JSON.parse(encoded);