@aws-sdk/client-sfn 3.183.0 → 3.186.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.
Files changed (40) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist-cjs/protocols/Aws_json1_0.js +2 -2
  3. package/dist-es/SFN.js +101 -94
  4. package/dist-es/SFNClient.js +28 -22
  5. package/dist-es/commands/CreateActivityCommand.js +28 -21
  6. package/dist-es/commands/CreateStateMachineCommand.js +28 -21
  7. package/dist-es/commands/DeleteActivityCommand.js +28 -21
  8. package/dist-es/commands/DeleteStateMachineCommand.js +28 -21
  9. package/dist-es/commands/DescribeActivityCommand.js +28 -21
  10. package/dist-es/commands/DescribeExecutionCommand.js +28 -21
  11. package/dist-es/commands/DescribeStateMachineCommand.js +28 -21
  12. package/dist-es/commands/DescribeStateMachineForExecutionCommand.js +28 -21
  13. package/dist-es/commands/GetActivityTaskCommand.js +28 -21
  14. package/dist-es/commands/GetExecutionHistoryCommand.js +28 -21
  15. package/dist-es/commands/ListActivitiesCommand.js +28 -21
  16. package/dist-es/commands/ListExecutionsCommand.js +28 -21
  17. package/dist-es/commands/ListStateMachinesCommand.js +28 -21
  18. package/dist-es/commands/ListTagsForResourceCommand.js +28 -21
  19. package/dist-es/commands/SendTaskFailureCommand.js +28 -21
  20. package/dist-es/commands/SendTaskHeartbeatCommand.js +28 -21
  21. package/dist-es/commands/SendTaskSuccessCommand.js +28 -21
  22. package/dist-es/commands/StartExecutionCommand.js +28 -21
  23. package/dist-es/commands/StartSyncExecutionCommand.js +28 -21
  24. package/dist-es/commands/StopExecutionCommand.js +28 -21
  25. package/dist-es/commands/TagResourceCommand.js +28 -21
  26. package/dist-es/commands/UntagResourceCommand.js +28 -21
  27. package/dist-es/commands/UpdateStateMachineCommand.js +28 -21
  28. package/dist-es/endpoints.js +8 -8
  29. package/dist-es/models/SFNServiceException.js +10 -5
  30. package/dist-es/models/models_0.js +404 -660
  31. package/dist-es/pagination/GetExecutionHistoryPaginator.js +68 -25
  32. package/dist-es/pagination/ListActivitiesPaginator.js +68 -25
  33. package/dist-es/pagination/ListExecutionsPaginator.js +68 -25
  34. package/dist-es/pagination/ListStateMachinesPaginator.js +68 -25
  35. package/dist-es/protocols/Aws_json1_0.js +2103 -1656
  36. package/dist-es/runtimeConfig.browser.js +12 -26
  37. package/dist-es/runtimeConfig.js +12 -30
  38. package/dist-es/runtimeConfig.native.js +5 -8
  39. package/dist-es/runtimeConfig.shared.js +11 -8
  40. package/package.json +33 -33
@@ -1,1579 +1,2003 @@
1
+ import { __assign, __awaiter, __generator } from "tslib";
1
2
  import { HttpRequest as __HttpRequest, isValidHostname as __isValidHostname, } from "@aws-sdk/protocol-http";
2
3
  import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, throwDefaultError, } from "@aws-sdk/smithy-client";
3
4
  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, } from "../models/models_0";
4
5
  import { SFNServiceException as __BaseException } from "../models/SFNServiceException";
5
- export const serializeAws_json1_0CreateActivityCommand = async (input, context) => {
6
- const headers = {
7
- "content-type": "application/x-amz-json-1.0",
8
- "x-amz-target": "AWSStepFunctions.CreateActivity",
9
- };
10
- let body;
11
- body = JSON.stringify(serializeAws_json1_0CreateActivityInput(input, context));
12
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
13
- };
14
- export const serializeAws_json1_0CreateStateMachineCommand = async (input, context) => {
15
- const headers = {
16
- "content-type": "application/x-amz-json-1.0",
17
- "x-amz-target": "AWSStepFunctions.CreateStateMachine",
18
- };
19
- let body;
20
- body = JSON.stringify(serializeAws_json1_0CreateStateMachineInput(input, context));
21
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
22
- };
23
- export const serializeAws_json1_0DeleteActivityCommand = async (input, context) => {
24
- const headers = {
25
- "content-type": "application/x-amz-json-1.0",
26
- "x-amz-target": "AWSStepFunctions.DeleteActivity",
27
- };
28
- let body;
29
- body = JSON.stringify(serializeAws_json1_0DeleteActivityInput(input, context));
30
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
31
- };
32
- export const serializeAws_json1_0DeleteStateMachineCommand = async (input, context) => {
33
- const headers = {
34
- "content-type": "application/x-amz-json-1.0",
35
- "x-amz-target": "AWSStepFunctions.DeleteStateMachine",
36
- };
37
- let body;
38
- body = JSON.stringify(serializeAws_json1_0DeleteStateMachineInput(input, context));
39
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
40
- };
41
- export const serializeAws_json1_0DescribeActivityCommand = async (input, context) => {
42
- const headers = {
43
- "content-type": "application/x-amz-json-1.0",
44
- "x-amz-target": "AWSStepFunctions.DescribeActivity",
45
- };
46
- let body;
47
- body = JSON.stringify(serializeAws_json1_0DescribeActivityInput(input, context));
48
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
49
- };
50
- export const serializeAws_json1_0DescribeExecutionCommand = async (input, context) => {
51
- const headers = {
52
- "content-type": "application/x-amz-json-1.0",
53
- "x-amz-target": "AWSStepFunctions.DescribeExecution",
54
- };
55
- let body;
56
- body = JSON.stringify(serializeAws_json1_0DescribeExecutionInput(input, context));
57
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
58
- };
59
- export const serializeAws_json1_0DescribeStateMachineCommand = async (input, context) => {
60
- const headers = {
61
- "content-type": "application/x-amz-json-1.0",
62
- "x-amz-target": "AWSStepFunctions.DescribeStateMachine",
63
- };
64
- let body;
65
- body = JSON.stringify(serializeAws_json1_0DescribeStateMachineInput(input, context));
66
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
67
- };
68
- export const serializeAws_json1_0DescribeStateMachineForExecutionCommand = async (input, context) => {
69
- const headers = {
70
- "content-type": "application/x-amz-json-1.0",
71
- "x-amz-target": "AWSStepFunctions.DescribeStateMachineForExecution",
72
- };
73
- let body;
74
- body = JSON.stringify(serializeAws_json1_0DescribeStateMachineForExecutionInput(input, context));
75
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
76
- };
77
- export const serializeAws_json1_0GetActivityTaskCommand = async (input, context) => {
78
- const headers = {
79
- "content-type": "application/x-amz-json-1.0",
80
- "x-amz-target": "AWSStepFunctions.GetActivityTask",
81
- };
82
- let body;
83
- body = JSON.stringify(serializeAws_json1_0GetActivityTaskInput(input, context));
84
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
85
- };
86
- export const serializeAws_json1_0GetExecutionHistoryCommand = async (input, context) => {
87
- const headers = {
88
- "content-type": "application/x-amz-json-1.0",
89
- "x-amz-target": "AWSStepFunctions.GetExecutionHistory",
90
- };
91
- let body;
92
- body = JSON.stringify(serializeAws_json1_0GetExecutionHistoryInput(input, context));
93
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
94
- };
95
- export const serializeAws_json1_0ListActivitiesCommand = async (input, context) => {
96
- const headers = {
97
- "content-type": "application/x-amz-json-1.0",
98
- "x-amz-target": "AWSStepFunctions.ListActivities",
99
- };
100
- let body;
101
- body = JSON.stringify(serializeAws_json1_0ListActivitiesInput(input, context));
102
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
103
- };
104
- export const serializeAws_json1_0ListExecutionsCommand = async (input, context) => {
105
- const headers = {
106
- "content-type": "application/x-amz-json-1.0",
107
- "x-amz-target": "AWSStepFunctions.ListExecutions",
108
- };
109
- let body;
110
- body = JSON.stringify(serializeAws_json1_0ListExecutionsInput(input, context));
111
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
112
- };
113
- export const serializeAws_json1_0ListStateMachinesCommand = async (input, context) => {
114
- const headers = {
115
- "content-type": "application/x-amz-json-1.0",
116
- "x-amz-target": "AWSStepFunctions.ListStateMachines",
117
- };
118
- let body;
119
- body = JSON.stringify(serializeAws_json1_0ListStateMachinesInput(input, context));
120
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
121
- };
122
- export const serializeAws_json1_0ListTagsForResourceCommand = async (input, context) => {
123
- const headers = {
124
- "content-type": "application/x-amz-json-1.0",
125
- "x-amz-target": "AWSStepFunctions.ListTagsForResource",
126
- };
127
- let body;
128
- body = JSON.stringify(serializeAws_json1_0ListTagsForResourceInput(input, context));
129
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
130
- };
131
- export const serializeAws_json1_0SendTaskFailureCommand = async (input, context) => {
132
- const headers = {
133
- "content-type": "application/x-amz-json-1.0",
134
- "x-amz-target": "AWSStepFunctions.SendTaskFailure",
135
- };
136
- let body;
137
- body = JSON.stringify(serializeAws_json1_0SendTaskFailureInput(input, context));
138
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
139
- };
140
- export const serializeAws_json1_0SendTaskHeartbeatCommand = async (input, context) => {
141
- const headers = {
142
- "content-type": "application/x-amz-json-1.0",
143
- "x-amz-target": "AWSStepFunctions.SendTaskHeartbeat",
144
- };
145
- let body;
146
- body = JSON.stringify(serializeAws_json1_0SendTaskHeartbeatInput(input, context));
147
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
148
- };
149
- export const serializeAws_json1_0SendTaskSuccessCommand = async (input, context) => {
150
- const headers = {
151
- "content-type": "application/x-amz-json-1.0",
152
- "x-amz-target": "AWSStepFunctions.SendTaskSuccess",
153
- };
154
- let body;
155
- body = JSON.stringify(serializeAws_json1_0SendTaskSuccessInput(input, context));
156
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
157
- };
158
- export const serializeAws_json1_0StartExecutionCommand = async (input, context) => {
159
- const headers = {
160
- "content-type": "application/x-amz-json-1.0",
161
- "x-amz-target": "AWSStepFunctions.StartExecution",
162
- };
163
- let body;
164
- body = JSON.stringify(serializeAws_json1_0StartExecutionInput(input, context));
165
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
166
- };
167
- export const serializeAws_json1_0StartSyncExecutionCommand = async (input, context) => {
168
- const headers = {
169
- "content-type": "application/x-amz-json-1.0",
170
- "x-amz-target": "AWSStepFunctions.StartSyncExecution",
171
- };
172
- let body;
173
- body = JSON.stringify(serializeAws_json1_0StartSyncExecutionInput(input, context));
174
- let { hostname: resolvedHostname } = await context.endpoint();
175
- if (context.disableHostPrefix !== true) {
176
- resolvedHostname = "sync-" + resolvedHostname;
177
- if (!__isValidHostname(resolvedHostname)) {
178
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
6
+ export var serializeAws_json1_0CreateActivityCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
7
+ var headers, body;
8
+ return __generator(this, function (_a) {
9
+ headers = {
10
+ "content-type": "application/x-amz-json-1.0",
11
+ "x-amz-target": "AWSStepFunctions.CreateActivity",
12
+ };
13
+ body = JSON.stringify(serializeAws_json1_0CreateActivityInput(input, context));
14
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
15
+ });
16
+ }); };
17
+ export var serializeAws_json1_0CreateStateMachineCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
18
+ var headers, body;
19
+ return __generator(this, function (_a) {
20
+ headers = {
21
+ "content-type": "application/x-amz-json-1.0",
22
+ "x-amz-target": "AWSStepFunctions.CreateStateMachine",
23
+ };
24
+ body = JSON.stringify(serializeAws_json1_0CreateStateMachineInput(input, context));
25
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
26
+ });
27
+ }); };
28
+ export var serializeAws_json1_0DeleteActivityCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
29
+ var headers, body;
30
+ return __generator(this, function (_a) {
31
+ headers = {
32
+ "content-type": "application/x-amz-json-1.0",
33
+ "x-amz-target": "AWSStepFunctions.DeleteActivity",
34
+ };
35
+ body = JSON.stringify(serializeAws_json1_0DeleteActivityInput(input, context));
36
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
37
+ });
38
+ }); };
39
+ export var serializeAws_json1_0DeleteStateMachineCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
40
+ var headers, body;
41
+ return __generator(this, function (_a) {
42
+ headers = {
43
+ "content-type": "application/x-amz-json-1.0",
44
+ "x-amz-target": "AWSStepFunctions.DeleteStateMachine",
45
+ };
46
+ body = JSON.stringify(serializeAws_json1_0DeleteStateMachineInput(input, context));
47
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
48
+ });
49
+ }); };
50
+ export var serializeAws_json1_0DescribeActivityCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
51
+ var headers, body;
52
+ return __generator(this, function (_a) {
53
+ headers = {
54
+ "content-type": "application/x-amz-json-1.0",
55
+ "x-amz-target": "AWSStepFunctions.DescribeActivity",
56
+ };
57
+ body = JSON.stringify(serializeAws_json1_0DescribeActivityInput(input, context));
58
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
59
+ });
60
+ }); };
61
+ export var serializeAws_json1_0DescribeExecutionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
62
+ var headers, body;
63
+ return __generator(this, function (_a) {
64
+ headers = {
65
+ "content-type": "application/x-amz-json-1.0",
66
+ "x-amz-target": "AWSStepFunctions.DescribeExecution",
67
+ };
68
+ body = JSON.stringify(serializeAws_json1_0DescribeExecutionInput(input, context));
69
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
70
+ });
71
+ }); };
72
+ export var serializeAws_json1_0DescribeStateMachineCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
73
+ var headers, body;
74
+ return __generator(this, function (_a) {
75
+ headers = {
76
+ "content-type": "application/x-amz-json-1.0",
77
+ "x-amz-target": "AWSStepFunctions.DescribeStateMachine",
78
+ };
79
+ body = JSON.stringify(serializeAws_json1_0DescribeStateMachineInput(input, context));
80
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
81
+ });
82
+ }); };
83
+ export var serializeAws_json1_0DescribeStateMachineForExecutionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
84
+ var headers, body;
85
+ return __generator(this, function (_a) {
86
+ headers = {
87
+ "content-type": "application/x-amz-json-1.0",
88
+ "x-amz-target": "AWSStepFunctions.DescribeStateMachineForExecution",
89
+ };
90
+ body = JSON.stringify(serializeAws_json1_0DescribeStateMachineForExecutionInput(input, context));
91
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
92
+ });
93
+ }); };
94
+ export var serializeAws_json1_0GetActivityTaskCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
95
+ var headers, body;
96
+ return __generator(this, function (_a) {
97
+ headers = {
98
+ "content-type": "application/x-amz-json-1.0",
99
+ "x-amz-target": "AWSStepFunctions.GetActivityTask",
100
+ };
101
+ body = JSON.stringify(serializeAws_json1_0GetActivityTaskInput(input, context));
102
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
103
+ });
104
+ }); };
105
+ export var serializeAws_json1_0GetExecutionHistoryCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
106
+ var headers, body;
107
+ return __generator(this, function (_a) {
108
+ headers = {
109
+ "content-type": "application/x-amz-json-1.0",
110
+ "x-amz-target": "AWSStepFunctions.GetExecutionHistory",
111
+ };
112
+ body = JSON.stringify(serializeAws_json1_0GetExecutionHistoryInput(input, context));
113
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
114
+ });
115
+ }); };
116
+ export var serializeAws_json1_0ListActivitiesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
117
+ var headers, body;
118
+ return __generator(this, function (_a) {
119
+ headers = {
120
+ "content-type": "application/x-amz-json-1.0",
121
+ "x-amz-target": "AWSStepFunctions.ListActivities",
122
+ };
123
+ body = JSON.stringify(serializeAws_json1_0ListActivitiesInput(input, context));
124
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
125
+ });
126
+ }); };
127
+ export var serializeAws_json1_0ListExecutionsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
128
+ var headers, body;
129
+ return __generator(this, function (_a) {
130
+ headers = {
131
+ "content-type": "application/x-amz-json-1.0",
132
+ "x-amz-target": "AWSStepFunctions.ListExecutions",
133
+ };
134
+ body = JSON.stringify(serializeAws_json1_0ListExecutionsInput(input, context));
135
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
136
+ });
137
+ }); };
138
+ export var serializeAws_json1_0ListStateMachinesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
139
+ var headers, body;
140
+ return __generator(this, function (_a) {
141
+ headers = {
142
+ "content-type": "application/x-amz-json-1.0",
143
+ "x-amz-target": "AWSStepFunctions.ListStateMachines",
144
+ };
145
+ body = JSON.stringify(serializeAws_json1_0ListStateMachinesInput(input, context));
146
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
147
+ });
148
+ }); };
149
+ export var serializeAws_json1_0ListTagsForResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
150
+ var headers, body;
151
+ return __generator(this, function (_a) {
152
+ headers = {
153
+ "content-type": "application/x-amz-json-1.0",
154
+ "x-amz-target": "AWSStepFunctions.ListTagsForResource",
155
+ };
156
+ body = JSON.stringify(serializeAws_json1_0ListTagsForResourceInput(input, context));
157
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
158
+ });
159
+ }); };
160
+ export var serializeAws_json1_0SendTaskFailureCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
161
+ var headers, body;
162
+ return __generator(this, function (_a) {
163
+ headers = {
164
+ "content-type": "application/x-amz-json-1.0",
165
+ "x-amz-target": "AWSStepFunctions.SendTaskFailure",
166
+ };
167
+ body = JSON.stringify(serializeAws_json1_0SendTaskFailureInput(input, context));
168
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
169
+ });
170
+ }); };
171
+ export var serializeAws_json1_0SendTaskHeartbeatCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
172
+ var headers, body;
173
+ return __generator(this, function (_a) {
174
+ headers = {
175
+ "content-type": "application/x-amz-json-1.0",
176
+ "x-amz-target": "AWSStepFunctions.SendTaskHeartbeat",
177
+ };
178
+ body = JSON.stringify(serializeAws_json1_0SendTaskHeartbeatInput(input, context));
179
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
180
+ });
181
+ }); };
182
+ export var serializeAws_json1_0SendTaskSuccessCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
183
+ var headers, body;
184
+ return __generator(this, function (_a) {
185
+ headers = {
186
+ "content-type": "application/x-amz-json-1.0",
187
+ "x-amz-target": "AWSStepFunctions.SendTaskSuccess",
188
+ };
189
+ body = JSON.stringify(serializeAws_json1_0SendTaskSuccessInput(input, context));
190
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
191
+ });
192
+ }); };
193
+ export var serializeAws_json1_0StartExecutionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
194
+ var headers, body;
195
+ return __generator(this, function (_a) {
196
+ headers = {
197
+ "content-type": "application/x-amz-json-1.0",
198
+ "x-amz-target": "AWSStepFunctions.StartExecution",
199
+ };
200
+ body = JSON.stringify(serializeAws_json1_0StartExecutionInput(input, context));
201
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
202
+ });
203
+ }); };
204
+ export var serializeAws_json1_0StartSyncExecutionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
205
+ var headers, body, resolvedHostname;
206
+ return __generator(this, function (_a) {
207
+ switch (_a.label) {
208
+ case 0:
209
+ headers = {
210
+ "content-type": "application/x-amz-json-1.0",
211
+ "x-amz-target": "AWSStepFunctions.StartSyncExecution",
212
+ };
213
+ body = JSON.stringify(serializeAws_json1_0StartSyncExecutionInput(input, context));
214
+ return [4, context.endpoint()];
215
+ case 1:
216
+ resolvedHostname = (_a.sent()).hostname;
217
+ if (context.disableHostPrefix !== true) {
218
+ resolvedHostname = "sync-" + resolvedHostname;
219
+ if (!__isValidHostname(resolvedHostname)) {
220
+ throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
221
+ }
222
+ }
223
+ return [2, buildHttpRpcRequest(context, headers, "/", resolvedHostname, body)];
179
224
  }
180
- }
181
- return buildHttpRpcRequest(context, headers, "/", resolvedHostname, body);
182
- };
183
- export const serializeAws_json1_0StopExecutionCommand = async (input, context) => {
184
- const headers = {
185
- "content-type": "application/x-amz-json-1.0",
186
- "x-amz-target": "AWSStepFunctions.StopExecution",
187
- };
188
- let body;
189
- body = JSON.stringify(serializeAws_json1_0StopExecutionInput(input, context));
190
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
191
- };
192
- export const serializeAws_json1_0TagResourceCommand = async (input, context) => {
193
- const headers = {
194
- "content-type": "application/x-amz-json-1.0",
195
- "x-amz-target": "AWSStepFunctions.TagResource",
196
- };
197
- let body;
198
- body = JSON.stringify(serializeAws_json1_0TagResourceInput(input, context));
199
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
200
- };
201
- export const serializeAws_json1_0UntagResourceCommand = async (input, context) => {
202
- const headers = {
203
- "content-type": "application/x-amz-json-1.0",
204
- "x-amz-target": "AWSStepFunctions.UntagResource",
205
- };
206
- let body;
207
- body = JSON.stringify(serializeAws_json1_0UntagResourceInput(input, context));
208
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
209
- };
210
- export const serializeAws_json1_0UpdateStateMachineCommand = async (input, context) => {
211
- const headers = {
212
- "content-type": "application/x-amz-json-1.0",
213
- "x-amz-target": "AWSStepFunctions.UpdateStateMachine",
214
- };
215
- let body;
216
- body = JSON.stringify(serializeAws_json1_0UpdateStateMachineInput(input, context));
217
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
218
- };
219
- export const deserializeAws_json1_0CreateActivityCommand = async (output, context) => {
220
- if (output.statusCode >= 300) {
221
- return deserializeAws_json1_0CreateActivityCommandError(output, context);
222
- }
223
- const data = await parseBody(output.body, context);
224
- let contents = {};
225
- contents = deserializeAws_json1_0CreateActivityOutput(data, context);
226
- const response = {
227
- $metadata: deserializeMetadata(output),
228
- ...contents,
229
- };
230
- return Promise.resolve(response);
231
- };
232
- const deserializeAws_json1_0CreateActivityCommandError = async (output, context) => {
233
- const parsedOutput = {
234
- ...output,
235
- body: await parseErrorBody(output.body, context),
236
- };
237
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
238
- switch (errorCode) {
239
- case "ActivityLimitExceeded":
240
- case "com.amazonaws.sfn#ActivityLimitExceeded":
241
- throw await deserializeAws_json1_0ActivityLimitExceededResponse(parsedOutput, context);
242
- case "InvalidName":
243
- case "com.amazonaws.sfn#InvalidName":
244
- throw await deserializeAws_json1_0InvalidNameResponse(parsedOutput, context);
245
- case "TooManyTags":
246
- case "com.amazonaws.sfn#TooManyTags":
247
- throw await deserializeAws_json1_0TooManyTagsResponse(parsedOutput, context);
248
- default:
249
- const parsedBody = parsedOutput.body;
250
- throwDefaultError({
251
- output,
252
- parsedBody,
253
- exceptionCtor: __BaseException,
254
- errorCode,
255
- });
256
- }
257
- };
258
- export const deserializeAws_json1_0CreateStateMachineCommand = async (output, context) => {
259
- if (output.statusCode >= 300) {
260
- return deserializeAws_json1_0CreateStateMachineCommandError(output, context);
261
- }
262
- const data = await parseBody(output.body, context);
263
- let contents = {};
264
- contents = deserializeAws_json1_0CreateStateMachineOutput(data, context);
265
- const response = {
266
- $metadata: deserializeMetadata(output),
267
- ...contents,
268
- };
269
- return Promise.resolve(response);
270
- };
271
- const deserializeAws_json1_0CreateStateMachineCommandError = async (output, context) => {
272
- const parsedOutput = {
273
- ...output,
274
- body: await parseErrorBody(output.body, context),
275
- };
276
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
277
- switch (errorCode) {
278
- case "InvalidArn":
279
- case "com.amazonaws.sfn#InvalidArn":
280
- throw await deserializeAws_json1_0InvalidArnResponse(parsedOutput, context);
281
- case "InvalidDefinition":
282
- case "com.amazonaws.sfn#InvalidDefinition":
283
- throw await deserializeAws_json1_0InvalidDefinitionResponse(parsedOutput, context);
284
- case "InvalidLoggingConfiguration":
285
- case "com.amazonaws.sfn#InvalidLoggingConfiguration":
286
- throw await deserializeAws_json1_0InvalidLoggingConfigurationResponse(parsedOutput, context);
287
- case "InvalidName":
288
- case "com.amazonaws.sfn#InvalidName":
289
- throw await deserializeAws_json1_0InvalidNameResponse(parsedOutput, context);
290
- case "InvalidTracingConfiguration":
291
- case "com.amazonaws.sfn#InvalidTracingConfiguration":
292
- throw await deserializeAws_json1_0InvalidTracingConfigurationResponse(parsedOutput, context);
293
- case "StateMachineAlreadyExists":
294
- case "com.amazonaws.sfn#StateMachineAlreadyExists":
295
- throw await deserializeAws_json1_0StateMachineAlreadyExistsResponse(parsedOutput, context);
296
- case "StateMachineDeleting":
297
- case "com.amazonaws.sfn#StateMachineDeleting":
298
- throw await deserializeAws_json1_0StateMachineDeletingResponse(parsedOutput, context);
299
- case "StateMachineLimitExceeded":
300
- case "com.amazonaws.sfn#StateMachineLimitExceeded":
301
- throw await deserializeAws_json1_0StateMachineLimitExceededResponse(parsedOutput, context);
302
- case "StateMachineTypeNotSupported":
303
- case "com.amazonaws.sfn#StateMachineTypeNotSupported":
304
- throw await deserializeAws_json1_0StateMachineTypeNotSupportedResponse(parsedOutput, context);
305
- case "TooManyTags":
306
- case "com.amazonaws.sfn#TooManyTags":
307
- throw await deserializeAws_json1_0TooManyTagsResponse(parsedOutput, context);
308
- default:
309
- const parsedBody = parsedOutput.body;
310
- throwDefaultError({
311
- output,
312
- parsedBody,
313
- exceptionCtor: __BaseException,
314
- errorCode,
315
- });
316
- }
317
- };
318
- export const deserializeAws_json1_0DeleteActivityCommand = async (output, context) => {
319
- if (output.statusCode >= 300) {
320
- return deserializeAws_json1_0DeleteActivityCommandError(output, context);
321
- }
322
- const data = await parseBody(output.body, context);
323
- let contents = {};
324
- contents = deserializeAws_json1_0DeleteActivityOutput(data, context);
325
- const response = {
326
- $metadata: deserializeMetadata(output),
327
- ...contents,
328
- };
329
- return Promise.resolve(response);
330
- };
331
- const deserializeAws_json1_0DeleteActivityCommandError = async (output, context) => {
332
- const parsedOutput = {
333
- ...output,
334
- body: await parseErrorBody(output.body, context),
335
- };
336
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
337
- switch (errorCode) {
338
- case "InvalidArn":
339
- case "com.amazonaws.sfn#InvalidArn":
340
- throw await deserializeAws_json1_0InvalidArnResponse(parsedOutput, context);
341
- default:
342
- const parsedBody = parsedOutput.body;
343
- throwDefaultError({
344
- output,
345
- parsedBody,
346
- exceptionCtor: __BaseException,
347
- errorCode,
348
- });
349
- }
350
- };
351
- export const deserializeAws_json1_0DeleteStateMachineCommand = async (output, context) => {
352
- if (output.statusCode >= 300) {
353
- return deserializeAws_json1_0DeleteStateMachineCommandError(output, context);
354
- }
355
- const data = await parseBody(output.body, context);
356
- let contents = {};
357
- contents = deserializeAws_json1_0DeleteStateMachineOutput(data, context);
358
- const response = {
359
- $metadata: deserializeMetadata(output),
360
- ...contents,
361
- };
362
- return Promise.resolve(response);
363
- };
364
- const deserializeAws_json1_0DeleteStateMachineCommandError = async (output, context) => {
365
- const parsedOutput = {
366
- ...output,
367
- body: await parseErrorBody(output.body, context),
368
- };
369
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
370
- switch (errorCode) {
371
- case "InvalidArn":
372
- case "com.amazonaws.sfn#InvalidArn":
373
- throw await deserializeAws_json1_0InvalidArnResponse(parsedOutput, context);
374
- default:
375
- const parsedBody = parsedOutput.body;
376
- throwDefaultError({
377
- output,
378
- parsedBody,
379
- exceptionCtor: __BaseException,
380
- errorCode,
381
- });
382
- }
383
- };
384
- export const deserializeAws_json1_0DescribeActivityCommand = async (output, context) => {
385
- if (output.statusCode >= 300) {
386
- return deserializeAws_json1_0DescribeActivityCommandError(output, context);
387
- }
388
- const data = await parseBody(output.body, context);
389
- let contents = {};
390
- contents = deserializeAws_json1_0DescribeActivityOutput(data, context);
391
- const response = {
392
- $metadata: deserializeMetadata(output),
393
- ...contents,
394
- };
395
- return Promise.resolve(response);
396
- };
397
- const deserializeAws_json1_0DescribeActivityCommandError = async (output, context) => {
398
- const parsedOutput = {
399
- ...output,
400
- body: await parseErrorBody(output.body, context),
401
- };
402
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
403
- switch (errorCode) {
404
- case "ActivityDoesNotExist":
405
- case "com.amazonaws.sfn#ActivityDoesNotExist":
406
- throw await deserializeAws_json1_0ActivityDoesNotExistResponse(parsedOutput, context);
407
- case "InvalidArn":
408
- case "com.amazonaws.sfn#InvalidArn":
409
- throw await deserializeAws_json1_0InvalidArnResponse(parsedOutput, context);
410
- default:
411
- const parsedBody = parsedOutput.body;
412
- throwDefaultError({
413
- output,
414
- parsedBody,
415
- exceptionCtor: __BaseException,
416
- errorCode,
417
- });
418
- }
419
- };
420
- export const deserializeAws_json1_0DescribeExecutionCommand = async (output, context) => {
421
- if (output.statusCode >= 300) {
422
- return deserializeAws_json1_0DescribeExecutionCommandError(output, context);
423
- }
424
- const data = await parseBody(output.body, context);
425
- let contents = {};
426
- contents = deserializeAws_json1_0DescribeExecutionOutput(data, context);
427
- const response = {
428
- $metadata: deserializeMetadata(output),
429
- ...contents,
430
- };
431
- return Promise.resolve(response);
432
- };
433
- const deserializeAws_json1_0DescribeExecutionCommandError = async (output, context) => {
434
- const parsedOutput = {
435
- ...output,
436
- body: await parseErrorBody(output.body, context),
437
- };
438
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
439
- switch (errorCode) {
440
- case "ExecutionDoesNotExist":
441
- case "com.amazonaws.sfn#ExecutionDoesNotExist":
442
- throw await deserializeAws_json1_0ExecutionDoesNotExistResponse(parsedOutput, context);
443
- case "InvalidArn":
444
- case "com.amazonaws.sfn#InvalidArn":
445
- throw await deserializeAws_json1_0InvalidArnResponse(parsedOutput, context);
446
- default:
447
- const parsedBody = parsedOutput.body;
448
- throwDefaultError({
449
- output,
450
- parsedBody,
451
- exceptionCtor: __BaseException,
452
- errorCode,
453
- });
454
- }
455
- };
456
- export const deserializeAws_json1_0DescribeStateMachineCommand = async (output, context) => {
457
- if (output.statusCode >= 300) {
458
- return deserializeAws_json1_0DescribeStateMachineCommandError(output, context);
459
- }
460
- const data = await parseBody(output.body, context);
461
- let contents = {};
462
- contents = deserializeAws_json1_0DescribeStateMachineOutput(data, context);
463
- const response = {
464
- $metadata: deserializeMetadata(output),
465
- ...contents,
466
- };
467
- return Promise.resolve(response);
468
- };
469
- const deserializeAws_json1_0DescribeStateMachineCommandError = async (output, context) => {
470
- const parsedOutput = {
471
- ...output,
472
- body: await parseErrorBody(output.body, context),
473
- };
474
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
475
- switch (errorCode) {
476
- case "InvalidArn":
477
- case "com.amazonaws.sfn#InvalidArn":
478
- throw await deserializeAws_json1_0InvalidArnResponse(parsedOutput, context);
479
- case "StateMachineDoesNotExist":
480
- case "com.amazonaws.sfn#StateMachineDoesNotExist":
481
- throw await deserializeAws_json1_0StateMachineDoesNotExistResponse(parsedOutput, context);
482
- default:
483
- const parsedBody = parsedOutput.body;
484
- throwDefaultError({
485
- output,
486
- parsedBody,
487
- exceptionCtor: __BaseException,
488
- errorCode,
489
- });
490
- }
491
- };
492
- export const deserializeAws_json1_0DescribeStateMachineForExecutionCommand = async (output, context) => {
493
- if (output.statusCode >= 300) {
494
- return deserializeAws_json1_0DescribeStateMachineForExecutionCommandError(output, context);
495
- }
496
- const data = await parseBody(output.body, context);
497
- let contents = {};
498
- contents = deserializeAws_json1_0DescribeStateMachineForExecutionOutput(data, context);
499
- const response = {
500
- $metadata: deserializeMetadata(output),
501
- ...contents,
502
- };
503
- return Promise.resolve(response);
504
- };
505
- const deserializeAws_json1_0DescribeStateMachineForExecutionCommandError = async (output, context) => {
506
- const parsedOutput = {
507
- ...output,
508
- body: await parseErrorBody(output.body, context),
509
- };
510
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
511
- switch (errorCode) {
512
- case "ExecutionDoesNotExist":
513
- case "com.amazonaws.sfn#ExecutionDoesNotExist":
514
- throw await deserializeAws_json1_0ExecutionDoesNotExistResponse(parsedOutput, context);
515
- case "InvalidArn":
516
- case "com.amazonaws.sfn#InvalidArn":
517
- throw await deserializeAws_json1_0InvalidArnResponse(parsedOutput, context);
518
- default:
519
- const parsedBody = parsedOutput.body;
520
- throwDefaultError({
521
- output,
522
- parsedBody,
523
- exceptionCtor: __BaseException,
524
- errorCode,
525
- });
526
- }
527
- };
528
- export const deserializeAws_json1_0GetActivityTaskCommand = async (output, context) => {
529
- if (output.statusCode >= 300) {
530
- return deserializeAws_json1_0GetActivityTaskCommandError(output, context);
531
- }
532
- const data = await parseBody(output.body, context);
533
- let contents = {};
534
- contents = deserializeAws_json1_0GetActivityTaskOutput(data, context);
535
- const response = {
536
- $metadata: deserializeMetadata(output),
537
- ...contents,
538
- };
539
- return Promise.resolve(response);
540
- };
541
- const deserializeAws_json1_0GetActivityTaskCommandError = async (output, context) => {
542
- const parsedOutput = {
543
- ...output,
544
- body: await parseErrorBody(output.body, context),
545
- };
546
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
547
- switch (errorCode) {
548
- case "ActivityDoesNotExist":
549
- case "com.amazonaws.sfn#ActivityDoesNotExist":
550
- throw await deserializeAws_json1_0ActivityDoesNotExistResponse(parsedOutput, context);
551
- case "ActivityWorkerLimitExceeded":
552
- case "com.amazonaws.sfn#ActivityWorkerLimitExceeded":
553
- throw await deserializeAws_json1_0ActivityWorkerLimitExceededResponse(parsedOutput, context);
554
- case "InvalidArn":
555
- case "com.amazonaws.sfn#InvalidArn":
556
- throw await deserializeAws_json1_0InvalidArnResponse(parsedOutput, context);
557
- default:
558
- const parsedBody = parsedOutput.body;
559
- throwDefaultError({
560
- output,
561
- parsedBody,
562
- exceptionCtor: __BaseException,
563
- errorCode,
564
- });
565
- }
566
- };
567
- export const deserializeAws_json1_0GetExecutionHistoryCommand = async (output, context) => {
568
- if (output.statusCode >= 300) {
569
- return deserializeAws_json1_0GetExecutionHistoryCommandError(output, context);
570
- }
571
- const data = await parseBody(output.body, context);
572
- let contents = {};
573
- contents = deserializeAws_json1_0GetExecutionHistoryOutput(data, context);
574
- const response = {
575
- $metadata: deserializeMetadata(output),
576
- ...contents,
577
- };
578
- return Promise.resolve(response);
579
- };
580
- const deserializeAws_json1_0GetExecutionHistoryCommandError = async (output, context) => {
581
- const parsedOutput = {
582
- ...output,
583
- body: await parseErrorBody(output.body, context),
584
- };
585
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
586
- switch (errorCode) {
587
- case "ExecutionDoesNotExist":
588
- case "com.amazonaws.sfn#ExecutionDoesNotExist":
589
- throw await deserializeAws_json1_0ExecutionDoesNotExistResponse(parsedOutput, context);
590
- case "InvalidArn":
591
- case "com.amazonaws.sfn#InvalidArn":
592
- throw await deserializeAws_json1_0InvalidArnResponse(parsedOutput, context);
593
- case "InvalidToken":
594
- case "com.amazonaws.sfn#InvalidToken":
595
- throw await deserializeAws_json1_0InvalidTokenResponse(parsedOutput, context);
596
- default:
597
- const parsedBody = parsedOutput.body;
598
- throwDefaultError({
599
- output,
600
- parsedBody,
601
- exceptionCtor: __BaseException,
602
- errorCode,
603
- });
604
- }
605
- };
606
- export const deserializeAws_json1_0ListActivitiesCommand = async (output, context) => {
607
- if (output.statusCode >= 300) {
608
- return deserializeAws_json1_0ListActivitiesCommandError(output, context);
609
- }
610
- const data = await parseBody(output.body, context);
611
- let contents = {};
612
- contents = deserializeAws_json1_0ListActivitiesOutput(data, context);
613
- const response = {
614
- $metadata: deserializeMetadata(output),
615
- ...contents,
616
- };
617
- return Promise.resolve(response);
618
- };
619
- const deserializeAws_json1_0ListActivitiesCommandError = async (output, context) => {
620
- const parsedOutput = {
621
- ...output,
622
- body: await parseErrorBody(output.body, context),
623
- };
624
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
625
- switch (errorCode) {
626
- case "InvalidToken":
627
- case "com.amazonaws.sfn#InvalidToken":
628
- throw await deserializeAws_json1_0InvalidTokenResponse(parsedOutput, context);
629
- default:
630
- const parsedBody = parsedOutput.body;
631
- throwDefaultError({
632
- output,
633
- parsedBody,
634
- exceptionCtor: __BaseException,
635
- errorCode,
636
- });
637
- }
638
- };
639
- export const deserializeAws_json1_0ListExecutionsCommand = async (output, context) => {
640
- if (output.statusCode >= 300) {
641
- return deserializeAws_json1_0ListExecutionsCommandError(output, context);
642
- }
643
- const data = await parseBody(output.body, context);
644
- let contents = {};
645
- contents = deserializeAws_json1_0ListExecutionsOutput(data, context);
646
- const response = {
647
- $metadata: deserializeMetadata(output),
648
- ...contents,
649
- };
650
- return Promise.resolve(response);
651
- };
652
- const deserializeAws_json1_0ListExecutionsCommandError = async (output, context) => {
653
- const parsedOutput = {
654
- ...output,
655
- body: await parseErrorBody(output.body, context),
656
- };
657
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
658
- switch (errorCode) {
659
- case "InvalidArn":
660
- case "com.amazonaws.sfn#InvalidArn":
661
- throw await deserializeAws_json1_0InvalidArnResponse(parsedOutput, context);
662
- case "InvalidToken":
663
- case "com.amazonaws.sfn#InvalidToken":
664
- throw await deserializeAws_json1_0InvalidTokenResponse(parsedOutput, context);
665
- case "StateMachineDoesNotExist":
666
- case "com.amazonaws.sfn#StateMachineDoesNotExist":
667
- throw await deserializeAws_json1_0StateMachineDoesNotExistResponse(parsedOutput, context);
668
- case "StateMachineTypeNotSupported":
669
- case "com.amazonaws.sfn#StateMachineTypeNotSupported":
670
- throw await deserializeAws_json1_0StateMachineTypeNotSupportedResponse(parsedOutput, context);
671
- default:
672
- const parsedBody = parsedOutput.body;
673
- throwDefaultError({
674
- output,
675
- parsedBody,
676
- exceptionCtor: __BaseException,
677
- errorCode,
678
- });
679
- }
680
- };
681
- export const deserializeAws_json1_0ListStateMachinesCommand = async (output, context) => {
682
- if (output.statusCode >= 300) {
683
- return deserializeAws_json1_0ListStateMachinesCommandError(output, context);
684
- }
685
- const data = await parseBody(output.body, context);
686
- let contents = {};
687
- contents = deserializeAws_json1_0ListStateMachinesOutput(data, context);
688
- const response = {
689
- $metadata: deserializeMetadata(output),
690
- ...contents,
691
- };
692
- return Promise.resolve(response);
693
- };
694
- const deserializeAws_json1_0ListStateMachinesCommandError = async (output, context) => {
695
- const parsedOutput = {
696
- ...output,
697
- body: await parseErrorBody(output.body, context),
698
- };
699
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
700
- switch (errorCode) {
701
- case "InvalidToken":
702
- case "com.amazonaws.sfn#InvalidToken":
703
- throw await deserializeAws_json1_0InvalidTokenResponse(parsedOutput, context);
704
- default:
705
- const parsedBody = parsedOutput.body;
706
- throwDefaultError({
707
- output,
708
- parsedBody,
709
- exceptionCtor: __BaseException,
710
- errorCode,
711
- });
712
- }
713
- };
714
- export const deserializeAws_json1_0ListTagsForResourceCommand = async (output, context) => {
715
- if (output.statusCode >= 300) {
716
- return deserializeAws_json1_0ListTagsForResourceCommandError(output, context);
717
- }
718
- const data = await parseBody(output.body, context);
719
- let contents = {};
720
- contents = deserializeAws_json1_0ListTagsForResourceOutput(data, context);
721
- const response = {
722
- $metadata: deserializeMetadata(output),
723
- ...contents,
724
- };
725
- return Promise.resolve(response);
726
- };
727
- const deserializeAws_json1_0ListTagsForResourceCommandError = async (output, context) => {
728
- const parsedOutput = {
729
- ...output,
730
- body: await parseErrorBody(output.body, context),
731
- };
732
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
733
- switch (errorCode) {
734
- case "InvalidArn":
735
- case "com.amazonaws.sfn#InvalidArn":
736
- throw await deserializeAws_json1_0InvalidArnResponse(parsedOutput, context);
737
- case "ResourceNotFound":
738
- case "com.amazonaws.sfn#ResourceNotFound":
739
- throw await deserializeAws_json1_0ResourceNotFoundResponse(parsedOutput, context);
740
- default:
741
- const parsedBody = parsedOutput.body;
742
- throwDefaultError({
743
- output,
744
- parsedBody,
745
- exceptionCtor: __BaseException,
746
- errorCode,
747
- });
748
- }
749
- };
750
- export const deserializeAws_json1_0SendTaskFailureCommand = async (output, context) => {
751
- if (output.statusCode >= 300) {
752
- return deserializeAws_json1_0SendTaskFailureCommandError(output, context);
753
- }
754
- const data = await parseBody(output.body, context);
755
- let contents = {};
756
- contents = deserializeAws_json1_0SendTaskFailureOutput(data, context);
757
- const response = {
758
- $metadata: deserializeMetadata(output),
759
- ...contents,
760
- };
761
- return Promise.resolve(response);
762
- };
763
- const deserializeAws_json1_0SendTaskFailureCommandError = async (output, context) => {
764
- const parsedOutput = {
765
- ...output,
766
- body: await parseErrorBody(output.body, context),
767
- };
768
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
769
- switch (errorCode) {
770
- case "InvalidToken":
771
- case "com.amazonaws.sfn#InvalidToken":
772
- throw await deserializeAws_json1_0InvalidTokenResponse(parsedOutput, context);
773
- case "TaskDoesNotExist":
774
- case "com.amazonaws.sfn#TaskDoesNotExist":
775
- throw await deserializeAws_json1_0TaskDoesNotExistResponse(parsedOutput, context);
776
- case "TaskTimedOut":
777
- case "com.amazonaws.sfn#TaskTimedOut":
778
- throw await deserializeAws_json1_0TaskTimedOutResponse(parsedOutput, context);
779
- default:
780
- const parsedBody = parsedOutput.body;
781
- throwDefaultError({
782
- output,
783
- parsedBody,
784
- exceptionCtor: __BaseException,
785
- errorCode,
786
- });
787
- }
788
- };
789
- export const deserializeAws_json1_0SendTaskHeartbeatCommand = async (output, context) => {
790
- if (output.statusCode >= 300) {
791
- return deserializeAws_json1_0SendTaskHeartbeatCommandError(output, context);
792
- }
793
- const data = await parseBody(output.body, context);
794
- let contents = {};
795
- contents = deserializeAws_json1_0SendTaskHeartbeatOutput(data, context);
796
- const response = {
797
- $metadata: deserializeMetadata(output),
798
- ...contents,
799
- };
800
- return Promise.resolve(response);
801
- };
802
- const deserializeAws_json1_0SendTaskHeartbeatCommandError = async (output, context) => {
803
- const parsedOutput = {
804
- ...output,
805
- body: await parseErrorBody(output.body, context),
806
- };
807
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
808
- switch (errorCode) {
809
- case "InvalidToken":
810
- case "com.amazonaws.sfn#InvalidToken":
811
- throw await deserializeAws_json1_0InvalidTokenResponse(parsedOutput, context);
812
- case "TaskDoesNotExist":
813
- case "com.amazonaws.sfn#TaskDoesNotExist":
814
- throw await deserializeAws_json1_0TaskDoesNotExistResponse(parsedOutput, context);
815
- case "TaskTimedOut":
816
- case "com.amazonaws.sfn#TaskTimedOut":
817
- throw await deserializeAws_json1_0TaskTimedOutResponse(parsedOutput, context);
818
- default:
819
- const parsedBody = parsedOutput.body;
820
- throwDefaultError({
821
- output,
822
- parsedBody,
823
- exceptionCtor: __BaseException,
824
- errorCode,
825
- });
826
- }
827
- };
828
- export const deserializeAws_json1_0SendTaskSuccessCommand = async (output, context) => {
829
- if (output.statusCode >= 300) {
830
- return deserializeAws_json1_0SendTaskSuccessCommandError(output, context);
831
- }
832
- const data = await parseBody(output.body, context);
833
- let contents = {};
834
- contents = deserializeAws_json1_0SendTaskSuccessOutput(data, context);
835
- const response = {
836
- $metadata: deserializeMetadata(output),
837
- ...contents,
838
- };
839
- return Promise.resolve(response);
840
- };
841
- const deserializeAws_json1_0SendTaskSuccessCommandError = async (output, context) => {
842
- const parsedOutput = {
843
- ...output,
844
- body: await parseErrorBody(output.body, context),
845
- };
846
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
847
- switch (errorCode) {
848
- case "InvalidOutput":
849
- case "com.amazonaws.sfn#InvalidOutput":
850
- throw await deserializeAws_json1_0InvalidOutputResponse(parsedOutput, context);
851
- case "InvalidToken":
852
- case "com.amazonaws.sfn#InvalidToken":
853
- throw await deserializeAws_json1_0InvalidTokenResponse(parsedOutput, context);
854
- case "TaskDoesNotExist":
855
- case "com.amazonaws.sfn#TaskDoesNotExist":
856
- throw await deserializeAws_json1_0TaskDoesNotExistResponse(parsedOutput, context);
857
- case "TaskTimedOut":
858
- case "com.amazonaws.sfn#TaskTimedOut":
859
- throw await deserializeAws_json1_0TaskTimedOutResponse(parsedOutput, context);
860
- default:
861
- const parsedBody = parsedOutput.body;
862
- throwDefaultError({
863
- output,
864
- parsedBody,
865
- exceptionCtor: __BaseException,
866
- errorCode,
867
- });
868
- }
869
- };
870
- export const deserializeAws_json1_0StartExecutionCommand = async (output, context) => {
871
- if (output.statusCode >= 300) {
872
- return deserializeAws_json1_0StartExecutionCommandError(output, context);
873
- }
874
- const data = await parseBody(output.body, context);
875
- let contents = {};
876
- contents = deserializeAws_json1_0StartExecutionOutput(data, context);
877
- const response = {
878
- $metadata: deserializeMetadata(output),
879
- ...contents,
880
- };
881
- return Promise.resolve(response);
882
- };
883
- const deserializeAws_json1_0StartExecutionCommandError = async (output, context) => {
884
- const parsedOutput = {
885
- ...output,
886
- body: await parseErrorBody(output.body, context),
887
- };
888
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
889
- switch (errorCode) {
890
- case "ExecutionAlreadyExists":
891
- case "com.amazonaws.sfn#ExecutionAlreadyExists":
892
- throw await deserializeAws_json1_0ExecutionAlreadyExistsResponse(parsedOutput, context);
893
- case "ExecutionLimitExceeded":
894
- case "com.amazonaws.sfn#ExecutionLimitExceeded":
895
- throw await deserializeAws_json1_0ExecutionLimitExceededResponse(parsedOutput, context);
896
- case "InvalidArn":
897
- case "com.amazonaws.sfn#InvalidArn":
898
- throw await deserializeAws_json1_0InvalidArnResponse(parsedOutput, context);
899
- case "InvalidExecutionInput":
900
- case "com.amazonaws.sfn#InvalidExecutionInput":
901
- throw await deserializeAws_json1_0InvalidExecutionInputResponse(parsedOutput, context);
902
- case "InvalidName":
903
- case "com.amazonaws.sfn#InvalidName":
904
- throw await deserializeAws_json1_0InvalidNameResponse(parsedOutput, context);
905
- case "StateMachineDeleting":
906
- case "com.amazonaws.sfn#StateMachineDeleting":
907
- throw await deserializeAws_json1_0StateMachineDeletingResponse(parsedOutput, context);
908
- case "StateMachineDoesNotExist":
909
- case "com.amazonaws.sfn#StateMachineDoesNotExist":
910
- throw await deserializeAws_json1_0StateMachineDoesNotExistResponse(parsedOutput, context);
911
- default:
912
- const parsedBody = parsedOutput.body;
913
- throwDefaultError({
914
- output,
915
- parsedBody,
916
- exceptionCtor: __BaseException,
917
- errorCode,
918
- });
919
- }
920
- };
921
- export const deserializeAws_json1_0StartSyncExecutionCommand = async (output, context) => {
922
- if (output.statusCode >= 300) {
923
- return deserializeAws_json1_0StartSyncExecutionCommandError(output, context);
924
- }
925
- const data = await parseBody(output.body, context);
926
- let contents = {};
927
- contents = deserializeAws_json1_0StartSyncExecutionOutput(data, context);
928
- const response = {
929
- $metadata: deserializeMetadata(output),
930
- ...contents,
931
- };
932
- return Promise.resolve(response);
933
- };
934
- const deserializeAws_json1_0StartSyncExecutionCommandError = async (output, context) => {
935
- const parsedOutput = {
936
- ...output,
937
- body: await parseErrorBody(output.body, context),
938
- };
939
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
940
- switch (errorCode) {
941
- case "InvalidArn":
942
- case "com.amazonaws.sfn#InvalidArn":
943
- throw await deserializeAws_json1_0InvalidArnResponse(parsedOutput, context);
944
- case "InvalidExecutionInput":
945
- case "com.amazonaws.sfn#InvalidExecutionInput":
946
- throw await deserializeAws_json1_0InvalidExecutionInputResponse(parsedOutput, context);
947
- case "InvalidName":
948
- case "com.amazonaws.sfn#InvalidName":
949
- throw await deserializeAws_json1_0InvalidNameResponse(parsedOutput, context);
950
- case "StateMachineDeleting":
951
- case "com.amazonaws.sfn#StateMachineDeleting":
952
- throw await deserializeAws_json1_0StateMachineDeletingResponse(parsedOutput, context);
953
- case "StateMachineDoesNotExist":
954
- case "com.amazonaws.sfn#StateMachineDoesNotExist":
955
- throw await deserializeAws_json1_0StateMachineDoesNotExistResponse(parsedOutput, context);
956
- case "StateMachineTypeNotSupported":
957
- case "com.amazonaws.sfn#StateMachineTypeNotSupported":
958
- throw await deserializeAws_json1_0StateMachineTypeNotSupportedResponse(parsedOutput, context);
959
- default:
960
- const parsedBody = parsedOutput.body;
961
- throwDefaultError({
962
- output,
963
- parsedBody,
964
- exceptionCtor: __BaseException,
965
- errorCode,
966
- });
967
- }
968
- };
969
- export const deserializeAws_json1_0StopExecutionCommand = async (output, context) => {
970
- if (output.statusCode >= 300) {
971
- return deserializeAws_json1_0StopExecutionCommandError(output, context);
972
- }
973
- const data = await parseBody(output.body, context);
974
- let contents = {};
975
- contents = deserializeAws_json1_0StopExecutionOutput(data, context);
976
- const response = {
977
- $metadata: deserializeMetadata(output),
978
- ...contents,
979
- };
980
- return Promise.resolve(response);
981
- };
982
- const deserializeAws_json1_0StopExecutionCommandError = async (output, context) => {
983
- const parsedOutput = {
984
- ...output,
985
- body: await parseErrorBody(output.body, context),
986
- };
987
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
988
- switch (errorCode) {
989
- case "ExecutionDoesNotExist":
990
- case "com.amazonaws.sfn#ExecutionDoesNotExist":
991
- throw await deserializeAws_json1_0ExecutionDoesNotExistResponse(parsedOutput, context);
992
- case "InvalidArn":
993
- case "com.amazonaws.sfn#InvalidArn":
994
- throw await deserializeAws_json1_0InvalidArnResponse(parsedOutput, context);
995
- default:
996
- const parsedBody = parsedOutput.body;
997
- throwDefaultError({
998
- output,
999
- parsedBody,
1000
- exceptionCtor: __BaseException,
1001
- errorCode,
1002
- });
1003
- }
1004
- };
1005
- export const deserializeAws_json1_0TagResourceCommand = async (output, context) => {
1006
- if (output.statusCode >= 300) {
1007
- return deserializeAws_json1_0TagResourceCommandError(output, context);
1008
- }
1009
- const data = await parseBody(output.body, context);
1010
- let contents = {};
1011
- contents = deserializeAws_json1_0TagResourceOutput(data, context);
1012
- const response = {
1013
- $metadata: deserializeMetadata(output),
1014
- ...contents,
1015
- };
1016
- return Promise.resolve(response);
1017
- };
1018
- const deserializeAws_json1_0TagResourceCommandError = async (output, context) => {
1019
- const parsedOutput = {
1020
- ...output,
1021
- body: await parseErrorBody(output.body, context),
1022
- };
1023
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1024
- switch (errorCode) {
1025
- case "InvalidArn":
1026
- case "com.amazonaws.sfn#InvalidArn":
1027
- throw await deserializeAws_json1_0InvalidArnResponse(parsedOutput, context);
1028
- case "ResourceNotFound":
1029
- case "com.amazonaws.sfn#ResourceNotFound":
1030
- throw await deserializeAws_json1_0ResourceNotFoundResponse(parsedOutput, context);
1031
- case "TooManyTags":
1032
- case "com.amazonaws.sfn#TooManyTags":
1033
- throw await deserializeAws_json1_0TooManyTagsResponse(parsedOutput, context);
1034
- default:
1035
- const parsedBody = parsedOutput.body;
1036
- throwDefaultError({
1037
- output,
1038
- parsedBody,
1039
- exceptionCtor: __BaseException,
1040
- errorCode,
1041
- });
1042
- }
1043
- };
1044
- export const deserializeAws_json1_0UntagResourceCommand = async (output, context) => {
1045
- if (output.statusCode >= 300) {
1046
- return deserializeAws_json1_0UntagResourceCommandError(output, context);
1047
- }
1048
- const data = await parseBody(output.body, context);
1049
- let contents = {};
1050
- contents = deserializeAws_json1_0UntagResourceOutput(data, context);
1051
- const response = {
1052
- $metadata: deserializeMetadata(output),
1053
- ...contents,
1054
- };
1055
- return Promise.resolve(response);
1056
- };
1057
- const deserializeAws_json1_0UntagResourceCommandError = async (output, context) => {
1058
- const parsedOutput = {
1059
- ...output,
1060
- body: await parseErrorBody(output.body, context),
1061
- };
1062
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1063
- switch (errorCode) {
1064
- case "InvalidArn":
1065
- case "com.amazonaws.sfn#InvalidArn":
1066
- throw await deserializeAws_json1_0InvalidArnResponse(parsedOutput, context);
1067
- case "ResourceNotFound":
1068
- case "com.amazonaws.sfn#ResourceNotFound":
1069
- throw await deserializeAws_json1_0ResourceNotFoundResponse(parsedOutput, context);
1070
- default:
1071
- const parsedBody = parsedOutput.body;
1072
- throwDefaultError({
1073
- output,
1074
- parsedBody,
1075
- exceptionCtor: __BaseException,
1076
- errorCode,
1077
- });
1078
- }
1079
- };
1080
- export const deserializeAws_json1_0UpdateStateMachineCommand = async (output, context) => {
1081
- if (output.statusCode >= 300) {
1082
- return deserializeAws_json1_0UpdateStateMachineCommandError(output, context);
1083
- }
1084
- const data = await parseBody(output.body, context);
1085
- let contents = {};
1086
- contents = deserializeAws_json1_0UpdateStateMachineOutput(data, context);
1087
- const response = {
1088
- $metadata: deserializeMetadata(output),
1089
- ...contents,
1090
- };
1091
- return Promise.resolve(response);
1092
- };
1093
- const deserializeAws_json1_0UpdateStateMachineCommandError = async (output, context) => {
1094
- const parsedOutput = {
1095
- ...output,
1096
- body: await parseErrorBody(output.body, context),
1097
- };
1098
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1099
- switch (errorCode) {
1100
- case "InvalidArn":
1101
- case "com.amazonaws.sfn#InvalidArn":
1102
- throw await deserializeAws_json1_0InvalidArnResponse(parsedOutput, context);
1103
- case "InvalidDefinition":
1104
- case "com.amazonaws.sfn#InvalidDefinition":
1105
- throw await deserializeAws_json1_0InvalidDefinitionResponse(parsedOutput, context);
1106
- case "InvalidLoggingConfiguration":
1107
- case "com.amazonaws.sfn#InvalidLoggingConfiguration":
1108
- throw await deserializeAws_json1_0InvalidLoggingConfigurationResponse(parsedOutput, context);
1109
- case "InvalidTracingConfiguration":
1110
- case "com.amazonaws.sfn#InvalidTracingConfiguration":
1111
- throw await deserializeAws_json1_0InvalidTracingConfigurationResponse(parsedOutput, context);
1112
- case "MissingRequiredParameter":
1113
- case "com.amazonaws.sfn#MissingRequiredParameter":
1114
- throw await deserializeAws_json1_0MissingRequiredParameterResponse(parsedOutput, context);
1115
- case "StateMachineDeleting":
1116
- case "com.amazonaws.sfn#StateMachineDeleting":
1117
- throw await deserializeAws_json1_0StateMachineDeletingResponse(parsedOutput, context);
1118
- case "StateMachineDoesNotExist":
1119
- case "com.amazonaws.sfn#StateMachineDoesNotExist":
1120
- throw await deserializeAws_json1_0StateMachineDoesNotExistResponse(parsedOutput, context);
1121
- default:
1122
- const parsedBody = parsedOutput.body;
1123
- throwDefaultError({
1124
- output,
1125
- parsedBody,
1126
- exceptionCtor: __BaseException,
1127
- errorCode,
1128
- });
1129
- }
1130
- };
1131
- const deserializeAws_json1_0ActivityDoesNotExistResponse = async (parsedOutput, context) => {
1132
- const body = parsedOutput.body;
1133
- const deserialized = deserializeAws_json1_0ActivityDoesNotExist(body, context);
1134
- const exception = new ActivityDoesNotExist({
1135
- $metadata: deserializeMetadata(parsedOutput),
1136
- ...deserialized,
1137
- });
1138
- return __decorateServiceException(exception, body);
1139
- };
1140
- const deserializeAws_json1_0ActivityLimitExceededResponse = async (parsedOutput, context) => {
1141
- const body = parsedOutput.body;
1142
- const deserialized = deserializeAws_json1_0ActivityLimitExceeded(body, context);
1143
- const exception = new ActivityLimitExceeded({
1144
- $metadata: deserializeMetadata(parsedOutput),
1145
- ...deserialized,
1146
- });
1147
- return __decorateServiceException(exception, body);
1148
- };
1149
- const deserializeAws_json1_0ActivityWorkerLimitExceededResponse = async (parsedOutput, context) => {
1150
- const body = parsedOutput.body;
1151
- const deserialized = deserializeAws_json1_0ActivityWorkerLimitExceeded(body, context);
1152
- const exception = new ActivityWorkerLimitExceeded({
1153
- $metadata: deserializeMetadata(parsedOutput),
1154
- ...deserialized,
1155
- });
1156
- return __decorateServiceException(exception, body);
1157
- };
1158
- const deserializeAws_json1_0ExecutionAlreadyExistsResponse = async (parsedOutput, context) => {
1159
- const body = parsedOutput.body;
1160
- const deserialized = deserializeAws_json1_0ExecutionAlreadyExists(body, context);
1161
- const exception = new ExecutionAlreadyExists({
1162
- $metadata: deserializeMetadata(parsedOutput),
1163
- ...deserialized,
1164
- });
1165
- return __decorateServiceException(exception, body);
1166
- };
1167
- const deserializeAws_json1_0ExecutionDoesNotExistResponse = async (parsedOutput, context) => {
1168
- const body = parsedOutput.body;
1169
- const deserialized = deserializeAws_json1_0ExecutionDoesNotExist(body, context);
1170
- const exception = new ExecutionDoesNotExist({
1171
- $metadata: deserializeMetadata(parsedOutput),
1172
- ...deserialized,
1173
- });
1174
- return __decorateServiceException(exception, body);
1175
- };
1176
- const deserializeAws_json1_0ExecutionLimitExceededResponse = async (parsedOutput, context) => {
1177
- const body = parsedOutput.body;
1178
- const deserialized = deserializeAws_json1_0ExecutionLimitExceeded(body, context);
1179
- const exception = new ExecutionLimitExceeded({
1180
- $metadata: deserializeMetadata(parsedOutput),
1181
- ...deserialized,
1182
- });
1183
- return __decorateServiceException(exception, body);
1184
- };
1185
- const deserializeAws_json1_0InvalidArnResponse = async (parsedOutput, context) => {
1186
- const body = parsedOutput.body;
1187
- const deserialized = deserializeAws_json1_0InvalidArn(body, context);
1188
- const exception = new InvalidArn({
1189
- $metadata: deserializeMetadata(parsedOutput),
1190
- ...deserialized,
1191
- });
1192
- return __decorateServiceException(exception, body);
1193
- };
1194
- const deserializeAws_json1_0InvalidDefinitionResponse = async (parsedOutput, context) => {
1195
- const body = parsedOutput.body;
1196
- const deserialized = deserializeAws_json1_0InvalidDefinition(body, context);
1197
- const exception = new InvalidDefinition({
1198
- $metadata: deserializeMetadata(parsedOutput),
1199
- ...deserialized,
1200
- });
1201
- return __decorateServiceException(exception, body);
1202
- };
1203
- const deserializeAws_json1_0InvalidExecutionInputResponse = async (parsedOutput, context) => {
1204
- const body = parsedOutput.body;
1205
- const deserialized = deserializeAws_json1_0InvalidExecutionInput(body, context);
1206
- const exception = new InvalidExecutionInput({
1207
- $metadata: deserializeMetadata(parsedOutput),
1208
- ...deserialized,
1209
- });
1210
- return __decorateServiceException(exception, body);
1211
- };
1212
- const deserializeAws_json1_0InvalidLoggingConfigurationResponse = async (parsedOutput, context) => {
1213
- const body = parsedOutput.body;
1214
- const deserialized = deserializeAws_json1_0InvalidLoggingConfiguration(body, context);
1215
- const exception = new InvalidLoggingConfiguration({
1216
- $metadata: deserializeMetadata(parsedOutput),
1217
- ...deserialized,
1218
- });
1219
- return __decorateServiceException(exception, body);
1220
- };
1221
- const deserializeAws_json1_0InvalidNameResponse = async (parsedOutput, context) => {
1222
- const body = parsedOutput.body;
1223
- const deserialized = deserializeAws_json1_0InvalidName(body, context);
1224
- const exception = new InvalidName({
1225
- $metadata: deserializeMetadata(parsedOutput),
1226
- ...deserialized,
1227
- });
1228
- return __decorateServiceException(exception, body);
1229
- };
1230
- const deserializeAws_json1_0InvalidOutputResponse = async (parsedOutput, context) => {
1231
- const body = parsedOutput.body;
1232
- const deserialized = deserializeAws_json1_0InvalidOutput(body, context);
1233
- const exception = new InvalidOutput({
1234
- $metadata: deserializeMetadata(parsedOutput),
1235
- ...deserialized,
1236
- });
1237
- return __decorateServiceException(exception, body);
1238
- };
1239
- const deserializeAws_json1_0InvalidTokenResponse = async (parsedOutput, context) => {
1240
- const body = parsedOutput.body;
1241
- const deserialized = deserializeAws_json1_0InvalidToken(body, context);
1242
- const exception = new InvalidToken({
1243
- $metadata: deserializeMetadata(parsedOutput),
1244
- ...deserialized,
1245
- });
1246
- return __decorateServiceException(exception, body);
1247
- };
1248
- const deserializeAws_json1_0InvalidTracingConfigurationResponse = async (parsedOutput, context) => {
1249
- const body = parsedOutput.body;
1250
- const deserialized = deserializeAws_json1_0InvalidTracingConfiguration(body, context);
1251
- const exception = new InvalidTracingConfiguration({
1252
- $metadata: deserializeMetadata(parsedOutput),
1253
- ...deserialized,
1254
- });
1255
- return __decorateServiceException(exception, body);
1256
- };
1257
- const deserializeAws_json1_0MissingRequiredParameterResponse = async (parsedOutput, context) => {
1258
- const body = parsedOutput.body;
1259
- const deserialized = deserializeAws_json1_0MissingRequiredParameter(body, context);
1260
- const exception = new MissingRequiredParameter({
1261
- $metadata: deserializeMetadata(parsedOutput),
1262
- ...deserialized,
1263
- });
1264
- return __decorateServiceException(exception, body);
1265
- };
1266
- const deserializeAws_json1_0ResourceNotFoundResponse = async (parsedOutput, context) => {
1267
- const body = parsedOutput.body;
1268
- const deserialized = deserializeAws_json1_0ResourceNotFound(body, context);
1269
- const exception = new ResourceNotFound({
1270
- $metadata: deserializeMetadata(parsedOutput),
1271
- ...deserialized,
1272
- });
1273
- return __decorateServiceException(exception, body);
1274
- };
1275
- const deserializeAws_json1_0StateMachineAlreadyExistsResponse = async (parsedOutput, context) => {
1276
- const body = parsedOutput.body;
1277
- const deserialized = deserializeAws_json1_0StateMachineAlreadyExists(body, context);
1278
- const exception = new StateMachineAlreadyExists({
1279
- $metadata: deserializeMetadata(parsedOutput),
1280
- ...deserialized,
1281
225
  });
1282
- return __decorateServiceException(exception, body);
1283
- };
1284
- const deserializeAws_json1_0StateMachineDeletingResponse = async (parsedOutput, context) => {
1285
- const body = parsedOutput.body;
1286
- const deserialized = deserializeAws_json1_0StateMachineDeleting(body, context);
1287
- const exception = new StateMachineDeleting({
1288
- $metadata: deserializeMetadata(parsedOutput),
1289
- ...deserialized,
226
+ }); };
227
+ export var serializeAws_json1_0StopExecutionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
228
+ var headers, body;
229
+ return __generator(this, function (_a) {
230
+ headers = {
231
+ "content-type": "application/x-amz-json-1.0",
232
+ "x-amz-target": "AWSStepFunctions.StopExecution",
233
+ };
234
+ body = JSON.stringify(serializeAws_json1_0StopExecutionInput(input, context));
235
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
1290
236
  });
1291
- return __decorateServiceException(exception, body);
1292
- };
1293
- const deserializeAws_json1_0StateMachineDoesNotExistResponse = async (parsedOutput, context) => {
1294
- const body = parsedOutput.body;
1295
- const deserialized = deserializeAws_json1_0StateMachineDoesNotExist(body, context);
1296
- const exception = new StateMachineDoesNotExist({
1297
- $metadata: deserializeMetadata(parsedOutput),
1298
- ...deserialized,
237
+ }); };
238
+ export var serializeAws_json1_0TagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
239
+ var headers, body;
240
+ return __generator(this, function (_a) {
241
+ headers = {
242
+ "content-type": "application/x-amz-json-1.0",
243
+ "x-amz-target": "AWSStepFunctions.TagResource",
244
+ };
245
+ body = JSON.stringify(serializeAws_json1_0TagResourceInput(input, context));
246
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
1299
247
  });
1300
- return __decorateServiceException(exception, body);
1301
- };
1302
- const deserializeAws_json1_0StateMachineLimitExceededResponse = async (parsedOutput, context) => {
1303
- const body = parsedOutput.body;
1304
- const deserialized = deserializeAws_json1_0StateMachineLimitExceeded(body, context);
1305
- const exception = new StateMachineLimitExceeded({
1306
- $metadata: deserializeMetadata(parsedOutput),
1307
- ...deserialized,
248
+ }); };
249
+ export var serializeAws_json1_0UntagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
250
+ var headers, body;
251
+ return __generator(this, function (_a) {
252
+ headers = {
253
+ "content-type": "application/x-amz-json-1.0",
254
+ "x-amz-target": "AWSStepFunctions.UntagResource",
255
+ };
256
+ body = JSON.stringify(serializeAws_json1_0UntagResourceInput(input, context));
257
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
1308
258
  });
1309
- return __decorateServiceException(exception, body);
1310
- };
1311
- const deserializeAws_json1_0StateMachineTypeNotSupportedResponse = async (parsedOutput, context) => {
1312
- const body = parsedOutput.body;
1313
- const deserialized = deserializeAws_json1_0StateMachineTypeNotSupported(body, context);
1314
- const exception = new StateMachineTypeNotSupported({
1315
- $metadata: deserializeMetadata(parsedOutput),
1316
- ...deserialized,
259
+ }); };
260
+ export var serializeAws_json1_0UpdateStateMachineCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
261
+ var headers, body;
262
+ return __generator(this, function (_a) {
263
+ headers = {
264
+ "content-type": "application/x-amz-json-1.0",
265
+ "x-amz-target": "AWSStepFunctions.UpdateStateMachine",
266
+ };
267
+ body = JSON.stringify(serializeAws_json1_0UpdateStateMachineInput(input, context));
268
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
1317
269
  });
1318
- return __decorateServiceException(exception, body);
1319
- };
1320
- const deserializeAws_json1_0TaskDoesNotExistResponse = async (parsedOutput, context) => {
1321
- const body = parsedOutput.body;
1322
- const deserialized = deserializeAws_json1_0TaskDoesNotExist(body, context);
1323
- const exception = new TaskDoesNotExist({
1324
- $metadata: deserializeMetadata(parsedOutput),
1325
- ...deserialized,
270
+ }); };
271
+ export var deserializeAws_json1_0CreateActivityCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
272
+ var data, contents, response;
273
+ return __generator(this, function (_a) {
274
+ switch (_a.label) {
275
+ case 0:
276
+ if (output.statusCode >= 300) {
277
+ return [2, deserializeAws_json1_0CreateActivityCommandError(output, context)];
278
+ }
279
+ return [4, parseBody(output.body, context)];
280
+ case 1:
281
+ data = _a.sent();
282
+ contents = {};
283
+ contents = deserializeAws_json1_0CreateActivityOutput(data, context);
284
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
285
+ return [2, Promise.resolve(response)];
286
+ }
1326
287
  });
1327
- return __decorateServiceException(exception, body);
1328
- };
1329
- const deserializeAws_json1_0TaskTimedOutResponse = async (parsedOutput, context) => {
1330
- const body = parsedOutput.body;
1331
- const deserialized = deserializeAws_json1_0TaskTimedOut(body, context);
1332
- const exception = new TaskTimedOut({
1333
- $metadata: deserializeMetadata(parsedOutput),
1334
- ...deserialized,
288
+ }); };
289
+ var deserializeAws_json1_0CreateActivityCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
290
+ var parsedOutput, _a, errorCode, _b, parsedBody;
291
+ var _c;
292
+ return __generator(this, function (_d) {
293
+ switch (_d.label) {
294
+ case 0:
295
+ _a = [__assign({}, output)];
296
+ _c = {};
297
+ return [4, parseErrorBody(output.body, context)];
298
+ case 1:
299
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
300
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
301
+ _b = errorCode;
302
+ switch (_b) {
303
+ case "ActivityLimitExceeded": return [3, 2];
304
+ case "com.amazonaws.sfn#ActivityLimitExceeded": return [3, 2];
305
+ case "InvalidName": return [3, 4];
306
+ case "com.amazonaws.sfn#InvalidName": return [3, 4];
307
+ case "TooManyTags": return [3, 6];
308
+ case "com.amazonaws.sfn#TooManyTags": return [3, 6];
309
+ }
310
+ return [3, 8];
311
+ case 2: return [4, deserializeAws_json1_0ActivityLimitExceededResponse(parsedOutput, context)];
312
+ case 3: throw _d.sent();
313
+ case 4: return [4, deserializeAws_json1_0InvalidNameResponse(parsedOutput, context)];
314
+ case 5: throw _d.sent();
315
+ case 6: return [4, deserializeAws_json1_0TooManyTagsResponse(parsedOutput, context)];
316
+ case 7: throw _d.sent();
317
+ case 8:
318
+ parsedBody = parsedOutput.body;
319
+ throwDefaultError({
320
+ output: output,
321
+ parsedBody: parsedBody,
322
+ exceptionCtor: __BaseException,
323
+ errorCode: errorCode,
324
+ });
325
+ _d.label = 9;
326
+ case 9: return [2];
327
+ }
1335
328
  });
1336
- return __decorateServiceException(exception, body);
1337
- };
1338
- const deserializeAws_json1_0TooManyTagsResponse = async (parsedOutput, context) => {
1339
- const body = parsedOutput.body;
1340
- const deserialized = deserializeAws_json1_0TooManyTags(body, context);
1341
- const exception = new TooManyTags({
1342
- $metadata: deserializeMetadata(parsedOutput),
1343
- ...deserialized,
329
+ }); };
330
+ export var deserializeAws_json1_0CreateStateMachineCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
331
+ var data, contents, response;
332
+ return __generator(this, function (_a) {
333
+ switch (_a.label) {
334
+ case 0:
335
+ if (output.statusCode >= 300) {
336
+ return [2, deserializeAws_json1_0CreateStateMachineCommandError(output, context)];
337
+ }
338
+ return [4, parseBody(output.body, context)];
339
+ case 1:
340
+ data = _a.sent();
341
+ contents = {};
342
+ contents = deserializeAws_json1_0CreateStateMachineOutput(data, context);
343
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
344
+ return [2, Promise.resolve(response)];
345
+ }
1344
346
  });
1345
- return __decorateServiceException(exception, body);
1346
- };
1347
- const serializeAws_json1_0CloudWatchLogsLogGroup = (input, context) => {
1348
- return {
1349
- ...(input.logGroupArn != null && { logGroupArn: input.logGroupArn }),
1350
- };
347
+ }); };
348
+ var deserializeAws_json1_0CreateStateMachineCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
349
+ var parsedOutput, _a, errorCode, _b, parsedBody;
350
+ var _c;
351
+ return __generator(this, function (_d) {
352
+ switch (_d.label) {
353
+ case 0:
354
+ _a = [__assign({}, output)];
355
+ _c = {};
356
+ return [4, parseErrorBody(output.body, context)];
357
+ case 1:
358
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
359
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
360
+ _b = errorCode;
361
+ switch (_b) {
362
+ case "InvalidArn": return [3, 2];
363
+ case "com.amazonaws.sfn#InvalidArn": return [3, 2];
364
+ case "InvalidDefinition": return [3, 4];
365
+ case "com.amazonaws.sfn#InvalidDefinition": return [3, 4];
366
+ case "InvalidLoggingConfiguration": return [3, 6];
367
+ case "com.amazonaws.sfn#InvalidLoggingConfiguration": return [3, 6];
368
+ case "InvalidName": return [3, 8];
369
+ case "com.amazonaws.sfn#InvalidName": return [3, 8];
370
+ case "InvalidTracingConfiguration": return [3, 10];
371
+ case "com.amazonaws.sfn#InvalidTracingConfiguration": return [3, 10];
372
+ case "StateMachineAlreadyExists": return [3, 12];
373
+ case "com.amazonaws.sfn#StateMachineAlreadyExists": return [3, 12];
374
+ case "StateMachineDeleting": return [3, 14];
375
+ case "com.amazonaws.sfn#StateMachineDeleting": return [3, 14];
376
+ case "StateMachineLimitExceeded": return [3, 16];
377
+ case "com.amazonaws.sfn#StateMachineLimitExceeded": return [3, 16];
378
+ case "StateMachineTypeNotSupported": return [3, 18];
379
+ case "com.amazonaws.sfn#StateMachineTypeNotSupported": return [3, 18];
380
+ case "TooManyTags": return [3, 20];
381
+ case "com.amazonaws.sfn#TooManyTags": return [3, 20];
382
+ }
383
+ return [3, 22];
384
+ case 2: return [4, deserializeAws_json1_0InvalidArnResponse(parsedOutput, context)];
385
+ case 3: throw _d.sent();
386
+ case 4: return [4, deserializeAws_json1_0InvalidDefinitionResponse(parsedOutput, context)];
387
+ case 5: throw _d.sent();
388
+ case 6: return [4, deserializeAws_json1_0InvalidLoggingConfigurationResponse(parsedOutput, context)];
389
+ case 7: throw _d.sent();
390
+ case 8: return [4, deserializeAws_json1_0InvalidNameResponse(parsedOutput, context)];
391
+ case 9: throw _d.sent();
392
+ case 10: return [4, deserializeAws_json1_0InvalidTracingConfigurationResponse(parsedOutput, context)];
393
+ case 11: throw _d.sent();
394
+ case 12: return [4, deserializeAws_json1_0StateMachineAlreadyExistsResponse(parsedOutput, context)];
395
+ case 13: throw _d.sent();
396
+ case 14: return [4, deserializeAws_json1_0StateMachineDeletingResponse(parsedOutput, context)];
397
+ case 15: throw _d.sent();
398
+ case 16: return [4, deserializeAws_json1_0StateMachineLimitExceededResponse(parsedOutput, context)];
399
+ case 17: throw _d.sent();
400
+ case 18: return [4, deserializeAws_json1_0StateMachineTypeNotSupportedResponse(parsedOutput, context)];
401
+ case 19: throw _d.sent();
402
+ case 20: return [4, deserializeAws_json1_0TooManyTagsResponse(parsedOutput, context)];
403
+ case 21: throw _d.sent();
404
+ case 22:
405
+ parsedBody = parsedOutput.body;
406
+ throwDefaultError({
407
+ output: output,
408
+ parsedBody: parsedBody,
409
+ exceptionCtor: __BaseException,
410
+ errorCode: errorCode,
411
+ });
412
+ _d.label = 23;
413
+ case 23: return [2];
414
+ }
415
+ });
416
+ }); };
417
+ export var deserializeAws_json1_0DeleteActivityCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
418
+ var data, contents, response;
419
+ return __generator(this, function (_a) {
420
+ switch (_a.label) {
421
+ case 0:
422
+ if (output.statusCode >= 300) {
423
+ return [2, deserializeAws_json1_0DeleteActivityCommandError(output, context)];
424
+ }
425
+ return [4, parseBody(output.body, context)];
426
+ case 1:
427
+ data = _a.sent();
428
+ contents = {};
429
+ contents = deserializeAws_json1_0DeleteActivityOutput(data, context);
430
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
431
+ return [2, Promise.resolve(response)];
432
+ }
433
+ });
434
+ }); };
435
+ var deserializeAws_json1_0DeleteActivityCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
436
+ var parsedOutput, _a, errorCode, _b, parsedBody;
437
+ var _c;
438
+ return __generator(this, function (_d) {
439
+ switch (_d.label) {
440
+ case 0:
441
+ _a = [__assign({}, output)];
442
+ _c = {};
443
+ return [4, parseErrorBody(output.body, context)];
444
+ case 1:
445
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
446
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
447
+ _b = errorCode;
448
+ switch (_b) {
449
+ case "InvalidArn": return [3, 2];
450
+ case "com.amazonaws.sfn#InvalidArn": return [3, 2];
451
+ }
452
+ return [3, 4];
453
+ case 2: return [4, deserializeAws_json1_0InvalidArnResponse(parsedOutput, context)];
454
+ case 3: throw _d.sent();
455
+ case 4:
456
+ parsedBody = parsedOutput.body;
457
+ throwDefaultError({
458
+ output: output,
459
+ parsedBody: parsedBody,
460
+ exceptionCtor: __BaseException,
461
+ errorCode: errorCode,
462
+ });
463
+ _d.label = 5;
464
+ case 5: return [2];
465
+ }
466
+ });
467
+ }); };
468
+ export var deserializeAws_json1_0DeleteStateMachineCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
469
+ var data, contents, response;
470
+ return __generator(this, function (_a) {
471
+ switch (_a.label) {
472
+ case 0:
473
+ if (output.statusCode >= 300) {
474
+ return [2, deserializeAws_json1_0DeleteStateMachineCommandError(output, context)];
475
+ }
476
+ return [4, parseBody(output.body, context)];
477
+ case 1:
478
+ data = _a.sent();
479
+ contents = {};
480
+ contents = deserializeAws_json1_0DeleteStateMachineOutput(data, context);
481
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
482
+ return [2, Promise.resolve(response)];
483
+ }
484
+ });
485
+ }); };
486
+ var deserializeAws_json1_0DeleteStateMachineCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
487
+ var parsedOutput, _a, errorCode, _b, parsedBody;
488
+ var _c;
489
+ return __generator(this, function (_d) {
490
+ switch (_d.label) {
491
+ case 0:
492
+ _a = [__assign({}, output)];
493
+ _c = {};
494
+ return [4, parseErrorBody(output.body, context)];
495
+ case 1:
496
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
497
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
498
+ _b = errorCode;
499
+ switch (_b) {
500
+ case "InvalidArn": return [3, 2];
501
+ case "com.amazonaws.sfn#InvalidArn": return [3, 2];
502
+ }
503
+ return [3, 4];
504
+ case 2: return [4, deserializeAws_json1_0InvalidArnResponse(parsedOutput, context)];
505
+ case 3: throw _d.sent();
506
+ case 4:
507
+ parsedBody = parsedOutput.body;
508
+ throwDefaultError({
509
+ output: output,
510
+ parsedBody: parsedBody,
511
+ exceptionCtor: __BaseException,
512
+ errorCode: errorCode,
513
+ });
514
+ _d.label = 5;
515
+ case 5: return [2];
516
+ }
517
+ });
518
+ }); };
519
+ export var deserializeAws_json1_0DescribeActivityCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
520
+ var data, contents, response;
521
+ return __generator(this, function (_a) {
522
+ switch (_a.label) {
523
+ case 0:
524
+ if (output.statusCode >= 300) {
525
+ return [2, deserializeAws_json1_0DescribeActivityCommandError(output, context)];
526
+ }
527
+ return [4, parseBody(output.body, context)];
528
+ case 1:
529
+ data = _a.sent();
530
+ contents = {};
531
+ contents = deserializeAws_json1_0DescribeActivityOutput(data, context);
532
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
533
+ return [2, Promise.resolve(response)];
534
+ }
535
+ });
536
+ }); };
537
+ var deserializeAws_json1_0DescribeActivityCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
538
+ var parsedOutput, _a, errorCode, _b, parsedBody;
539
+ var _c;
540
+ return __generator(this, function (_d) {
541
+ switch (_d.label) {
542
+ case 0:
543
+ _a = [__assign({}, output)];
544
+ _c = {};
545
+ return [4, parseErrorBody(output.body, context)];
546
+ case 1:
547
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
548
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
549
+ _b = errorCode;
550
+ switch (_b) {
551
+ case "ActivityDoesNotExist": return [3, 2];
552
+ case "com.amazonaws.sfn#ActivityDoesNotExist": return [3, 2];
553
+ case "InvalidArn": return [3, 4];
554
+ case "com.amazonaws.sfn#InvalidArn": return [3, 4];
555
+ }
556
+ return [3, 6];
557
+ case 2: return [4, deserializeAws_json1_0ActivityDoesNotExistResponse(parsedOutput, context)];
558
+ case 3: throw _d.sent();
559
+ case 4: return [4, deserializeAws_json1_0InvalidArnResponse(parsedOutput, context)];
560
+ case 5: throw _d.sent();
561
+ case 6:
562
+ parsedBody = parsedOutput.body;
563
+ throwDefaultError({
564
+ output: output,
565
+ parsedBody: parsedBody,
566
+ exceptionCtor: __BaseException,
567
+ errorCode: errorCode,
568
+ });
569
+ _d.label = 7;
570
+ case 7: return [2];
571
+ }
572
+ });
573
+ }); };
574
+ export var deserializeAws_json1_0DescribeExecutionCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
575
+ var data, contents, response;
576
+ return __generator(this, function (_a) {
577
+ switch (_a.label) {
578
+ case 0:
579
+ if (output.statusCode >= 300) {
580
+ return [2, deserializeAws_json1_0DescribeExecutionCommandError(output, context)];
581
+ }
582
+ return [4, parseBody(output.body, context)];
583
+ case 1:
584
+ data = _a.sent();
585
+ contents = {};
586
+ contents = deserializeAws_json1_0DescribeExecutionOutput(data, context);
587
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
588
+ return [2, Promise.resolve(response)];
589
+ }
590
+ });
591
+ }); };
592
+ var deserializeAws_json1_0DescribeExecutionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
593
+ var parsedOutput, _a, errorCode, _b, parsedBody;
594
+ var _c;
595
+ return __generator(this, function (_d) {
596
+ switch (_d.label) {
597
+ case 0:
598
+ _a = [__assign({}, output)];
599
+ _c = {};
600
+ return [4, parseErrorBody(output.body, context)];
601
+ case 1:
602
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
603
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
604
+ _b = errorCode;
605
+ switch (_b) {
606
+ case "ExecutionDoesNotExist": return [3, 2];
607
+ case "com.amazonaws.sfn#ExecutionDoesNotExist": return [3, 2];
608
+ case "InvalidArn": return [3, 4];
609
+ case "com.amazonaws.sfn#InvalidArn": return [3, 4];
610
+ }
611
+ return [3, 6];
612
+ case 2: return [4, deserializeAws_json1_0ExecutionDoesNotExistResponse(parsedOutput, context)];
613
+ case 3: throw _d.sent();
614
+ case 4: return [4, deserializeAws_json1_0InvalidArnResponse(parsedOutput, context)];
615
+ case 5: throw _d.sent();
616
+ case 6:
617
+ parsedBody = parsedOutput.body;
618
+ throwDefaultError({
619
+ output: output,
620
+ parsedBody: parsedBody,
621
+ exceptionCtor: __BaseException,
622
+ errorCode: errorCode,
623
+ });
624
+ _d.label = 7;
625
+ case 7: return [2];
626
+ }
627
+ });
628
+ }); };
629
+ export var deserializeAws_json1_0DescribeStateMachineCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
630
+ var data, contents, response;
631
+ return __generator(this, function (_a) {
632
+ switch (_a.label) {
633
+ case 0:
634
+ if (output.statusCode >= 300) {
635
+ return [2, deserializeAws_json1_0DescribeStateMachineCommandError(output, context)];
636
+ }
637
+ return [4, parseBody(output.body, context)];
638
+ case 1:
639
+ data = _a.sent();
640
+ contents = {};
641
+ contents = deserializeAws_json1_0DescribeStateMachineOutput(data, context);
642
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
643
+ return [2, Promise.resolve(response)];
644
+ }
645
+ });
646
+ }); };
647
+ var deserializeAws_json1_0DescribeStateMachineCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
648
+ var parsedOutput, _a, errorCode, _b, parsedBody;
649
+ var _c;
650
+ return __generator(this, function (_d) {
651
+ switch (_d.label) {
652
+ case 0:
653
+ _a = [__assign({}, output)];
654
+ _c = {};
655
+ return [4, parseErrorBody(output.body, context)];
656
+ case 1:
657
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
658
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
659
+ _b = errorCode;
660
+ switch (_b) {
661
+ case "InvalidArn": return [3, 2];
662
+ case "com.amazonaws.sfn#InvalidArn": return [3, 2];
663
+ case "StateMachineDoesNotExist": return [3, 4];
664
+ case "com.amazonaws.sfn#StateMachineDoesNotExist": return [3, 4];
665
+ }
666
+ return [3, 6];
667
+ case 2: return [4, deserializeAws_json1_0InvalidArnResponse(parsedOutput, context)];
668
+ case 3: throw _d.sent();
669
+ case 4: return [4, deserializeAws_json1_0StateMachineDoesNotExistResponse(parsedOutput, context)];
670
+ case 5: throw _d.sent();
671
+ case 6:
672
+ parsedBody = parsedOutput.body;
673
+ throwDefaultError({
674
+ output: output,
675
+ parsedBody: parsedBody,
676
+ exceptionCtor: __BaseException,
677
+ errorCode: errorCode,
678
+ });
679
+ _d.label = 7;
680
+ case 7: return [2];
681
+ }
682
+ });
683
+ }); };
684
+ export var deserializeAws_json1_0DescribeStateMachineForExecutionCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
685
+ var data, contents, response;
686
+ return __generator(this, function (_a) {
687
+ switch (_a.label) {
688
+ case 0:
689
+ if (output.statusCode >= 300) {
690
+ return [2, deserializeAws_json1_0DescribeStateMachineForExecutionCommandError(output, context)];
691
+ }
692
+ return [4, parseBody(output.body, context)];
693
+ case 1:
694
+ data = _a.sent();
695
+ contents = {};
696
+ contents = deserializeAws_json1_0DescribeStateMachineForExecutionOutput(data, context);
697
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
698
+ return [2, Promise.resolve(response)];
699
+ }
700
+ });
701
+ }); };
702
+ var deserializeAws_json1_0DescribeStateMachineForExecutionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
703
+ var parsedOutput, _a, errorCode, _b, parsedBody;
704
+ var _c;
705
+ return __generator(this, function (_d) {
706
+ switch (_d.label) {
707
+ case 0:
708
+ _a = [__assign({}, output)];
709
+ _c = {};
710
+ return [4, parseErrorBody(output.body, context)];
711
+ case 1:
712
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
713
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
714
+ _b = errorCode;
715
+ switch (_b) {
716
+ case "ExecutionDoesNotExist": return [3, 2];
717
+ case "com.amazonaws.sfn#ExecutionDoesNotExist": return [3, 2];
718
+ case "InvalidArn": return [3, 4];
719
+ case "com.amazonaws.sfn#InvalidArn": return [3, 4];
720
+ }
721
+ return [3, 6];
722
+ case 2: return [4, deserializeAws_json1_0ExecutionDoesNotExistResponse(parsedOutput, context)];
723
+ case 3: throw _d.sent();
724
+ case 4: return [4, deserializeAws_json1_0InvalidArnResponse(parsedOutput, context)];
725
+ case 5: throw _d.sent();
726
+ case 6:
727
+ parsedBody = parsedOutput.body;
728
+ throwDefaultError({
729
+ output: output,
730
+ parsedBody: parsedBody,
731
+ exceptionCtor: __BaseException,
732
+ errorCode: errorCode,
733
+ });
734
+ _d.label = 7;
735
+ case 7: return [2];
736
+ }
737
+ });
738
+ }); };
739
+ export var deserializeAws_json1_0GetActivityTaskCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
740
+ var data, contents, response;
741
+ return __generator(this, function (_a) {
742
+ switch (_a.label) {
743
+ case 0:
744
+ if (output.statusCode >= 300) {
745
+ return [2, deserializeAws_json1_0GetActivityTaskCommandError(output, context)];
746
+ }
747
+ return [4, parseBody(output.body, context)];
748
+ case 1:
749
+ data = _a.sent();
750
+ contents = {};
751
+ contents = deserializeAws_json1_0GetActivityTaskOutput(data, context);
752
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
753
+ return [2, Promise.resolve(response)];
754
+ }
755
+ });
756
+ }); };
757
+ var deserializeAws_json1_0GetActivityTaskCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
758
+ var parsedOutput, _a, errorCode, _b, parsedBody;
759
+ var _c;
760
+ return __generator(this, function (_d) {
761
+ switch (_d.label) {
762
+ case 0:
763
+ _a = [__assign({}, output)];
764
+ _c = {};
765
+ return [4, parseErrorBody(output.body, context)];
766
+ case 1:
767
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
768
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
769
+ _b = errorCode;
770
+ switch (_b) {
771
+ case "ActivityDoesNotExist": return [3, 2];
772
+ case "com.amazonaws.sfn#ActivityDoesNotExist": return [3, 2];
773
+ case "ActivityWorkerLimitExceeded": return [3, 4];
774
+ case "com.amazonaws.sfn#ActivityWorkerLimitExceeded": return [3, 4];
775
+ case "InvalidArn": return [3, 6];
776
+ case "com.amazonaws.sfn#InvalidArn": return [3, 6];
777
+ }
778
+ return [3, 8];
779
+ case 2: return [4, deserializeAws_json1_0ActivityDoesNotExistResponse(parsedOutput, context)];
780
+ case 3: throw _d.sent();
781
+ case 4: return [4, deserializeAws_json1_0ActivityWorkerLimitExceededResponse(parsedOutput, context)];
782
+ case 5: throw _d.sent();
783
+ case 6: return [4, deserializeAws_json1_0InvalidArnResponse(parsedOutput, context)];
784
+ case 7: throw _d.sent();
785
+ case 8:
786
+ parsedBody = parsedOutput.body;
787
+ throwDefaultError({
788
+ output: output,
789
+ parsedBody: parsedBody,
790
+ exceptionCtor: __BaseException,
791
+ errorCode: errorCode,
792
+ });
793
+ _d.label = 9;
794
+ case 9: return [2];
795
+ }
796
+ });
797
+ }); };
798
+ export var deserializeAws_json1_0GetExecutionHistoryCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
799
+ var data, contents, response;
800
+ return __generator(this, function (_a) {
801
+ switch (_a.label) {
802
+ case 0:
803
+ if (output.statusCode >= 300) {
804
+ return [2, deserializeAws_json1_0GetExecutionHistoryCommandError(output, context)];
805
+ }
806
+ return [4, parseBody(output.body, context)];
807
+ case 1:
808
+ data = _a.sent();
809
+ contents = {};
810
+ contents = deserializeAws_json1_0GetExecutionHistoryOutput(data, context);
811
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
812
+ return [2, Promise.resolve(response)];
813
+ }
814
+ });
815
+ }); };
816
+ var deserializeAws_json1_0GetExecutionHistoryCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
817
+ var parsedOutput, _a, errorCode, _b, parsedBody;
818
+ var _c;
819
+ return __generator(this, function (_d) {
820
+ switch (_d.label) {
821
+ case 0:
822
+ _a = [__assign({}, output)];
823
+ _c = {};
824
+ return [4, parseErrorBody(output.body, context)];
825
+ case 1:
826
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
827
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
828
+ _b = errorCode;
829
+ switch (_b) {
830
+ case "ExecutionDoesNotExist": return [3, 2];
831
+ case "com.amazonaws.sfn#ExecutionDoesNotExist": return [3, 2];
832
+ case "InvalidArn": return [3, 4];
833
+ case "com.amazonaws.sfn#InvalidArn": return [3, 4];
834
+ case "InvalidToken": return [3, 6];
835
+ case "com.amazonaws.sfn#InvalidToken": return [3, 6];
836
+ }
837
+ return [3, 8];
838
+ case 2: return [4, deserializeAws_json1_0ExecutionDoesNotExistResponse(parsedOutput, context)];
839
+ case 3: throw _d.sent();
840
+ case 4: return [4, deserializeAws_json1_0InvalidArnResponse(parsedOutput, context)];
841
+ case 5: throw _d.sent();
842
+ case 6: return [4, deserializeAws_json1_0InvalidTokenResponse(parsedOutput, context)];
843
+ case 7: throw _d.sent();
844
+ case 8:
845
+ parsedBody = parsedOutput.body;
846
+ throwDefaultError({
847
+ output: output,
848
+ parsedBody: parsedBody,
849
+ exceptionCtor: __BaseException,
850
+ errorCode: errorCode,
851
+ });
852
+ _d.label = 9;
853
+ case 9: return [2];
854
+ }
855
+ });
856
+ }); };
857
+ export var deserializeAws_json1_0ListActivitiesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
858
+ var data, contents, response;
859
+ return __generator(this, function (_a) {
860
+ switch (_a.label) {
861
+ case 0:
862
+ if (output.statusCode >= 300) {
863
+ return [2, deserializeAws_json1_0ListActivitiesCommandError(output, context)];
864
+ }
865
+ return [4, parseBody(output.body, context)];
866
+ case 1:
867
+ data = _a.sent();
868
+ contents = {};
869
+ contents = deserializeAws_json1_0ListActivitiesOutput(data, context);
870
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
871
+ return [2, Promise.resolve(response)];
872
+ }
873
+ });
874
+ }); };
875
+ var deserializeAws_json1_0ListActivitiesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
876
+ var parsedOutput, _a, errorCode, _b, parsedBody;
877
+ var _c;
878
+ return __generator(this, function (_d) {
879
+ switch (_d.label) {
880
+ case 0:
881
+ _a = [__assign({}, output)];
882
+ _c = {};
883
+ return [4, parseErrorBody(output.body, context)];
884
+ case 1:
885
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
886
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
887
+ _b = errorCode;
888
+ switch (_b) {
889
+ case "InvalidToken": return [3, 2];
890
+ case "com.amazonaws.sfn#InvalidToken": return [3, 2];
891
+ }
892
+ return [3, 4];
893
+ case 2: return [4, deserializeAws_json1_0InvalidTokenResponse(parsedOutput, context)];
894
+ case 3: throw _d.sent();
895
+ case 4:
896
+ parsedBody = parsedOutput.body;
897
+ throwDefaultError({
898
+ output: output,
899
+ parsedBody: parsedBody,
900
+ exceptionCtor: __BaseException,
901
+ errorCode: errorCode,
902
+ });
903
+ _d.label = 5;
904
+ case 5: return [2];
905
+ }
906
+ });
907
+ }); };
908
+ export var deserializeAws_json1_0ListExecutionsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
909
+ var data, contents, response;
910
+ return __generator(this, function (_a) {
911
+ switch (_a.label) {
912
+ case 0:
913
+ if (output.statusCode >= 300) {
914
+ return [2, deserializeAws_json1_0ListExecutionsCommandError(output, context)];
915
+ }
916
+ return [4, parseBody(output.body, context)];
917
+ case 1:
918
+ data = _a.sent();
919
+ contents = {};
920
+ contents = deserializeAws_json1_0ListExecutionsOutput(data, context);
921
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
922
+ return [2, Promise.resolve(response)];
923
+ }
924
+ });
925
+ }); };
926
+ var deserializeAws_json1_0ListExecutionsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
927
+ var parsedOutput, _a, errorCode, _b, parsedBody;
928
+ var _c;
929
+ return __generator(this, function (_d) {
930
+ switch (_d.label) {
931
+ case 0:
932
+ _a = [__assign({}, output)];
933
+ _c = {};
934
+ return [4, parseErrorBody(output.body, context)];
935
+ case 1:
936
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
937
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
938
+ _b = errorCode;
939
+ switch (_b) {
940
+ case "InvalidArn": return [3, 2];
941
+ case "com.amazonaws.sfn#InvalidArn": return [3, 2];
942
+ case "InvalidToken": return [3, 4];
943
+ case "com.amazonaws.sfn#InvalidToken": return [3, 4];
944
+ case "StateMachineDoesNotExist": return [3, 6];
945
+ case "com.amazonaws.sfn#StateMachineDoesNotExist": return [3, 6];
946
+ case "StateMachineTypeNotSupported": return [3, 8];
947
+ case "com.amazonaws.sfn#StateMachineTypeNotSupported": return [3, 8];
948
+ }
949
+ return [3, 10];
950
+ case 2: return [4, deserializeAws_json1_0InvalidArnResponse(parsedOutput, context)];
951
+ case 3: throw _d.sent();
952
+ case 4: return [4, deserializeAws_json1_0InvalidTokenResponse(parsedOutput, context)];
953
+ case 5: throw _d.sent();
954
+ case 6: return [4, deserializeAws_json1_0StateMachineDoesNotExistResponse(parsedOutput, context)];
955
+ case 7: throw _d.sent();
956
+ case 8: return [4, deserializeAws_json1_0StateMachineTypeNotSupportedResponse(parsedOutput, context)];
957
+ case 9: throw _d.sent();
958
+ case 10:
959
+ parsedBody = parsedOutput.body;
960
+ throwDefaultError({
961
+ output: output,
962
+ parsedBody: parsedBody,
963
+ exceptionCtor: __BaseException,
964
+ errorCode: errorCode,
965
+ });
966
+ _d.label = 11;
967
+ case 11: return [2];
968
+ }
969
+ });
970
+ }); };
971
+ export var deserializeAws_json1_0ListStateMachinesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
972
+ var data, contents, response;
973
+ return __generator(this, function (_a) {
974
+ switch (_a.label) {
975
+ case 0:
976
+ if (output.statusCode >= 300) {
977
+ return [2, deserializeAws_json1_0ListStateMachinesCommandError(output, context)];
978
+ }
979
+ return [4, parseBody(output.body, context)];
980
+ case 1:
981
+ data = _a.sent();
982
+ contents = {};
983
+ contents = deserializeAws_json1_0ListStateMachinesOutput(data, context);
984
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
985
+ return [2, Promise.resolve(response)];
986
+ }
987
+ });
988
+ }); };
989
+ var deserializeAws_json1_0ListStateMachinesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
990
+ var parsedOutput, _a, errorCode, _b, parsedBody;
991
+ var _c;
992
+ return __generator(this, function (_d) {
993
+ switch (_d.label) {
994
+ case 0:
995
+ _a = [__assign({}, output)];
996
+ _c = {};
997
+ return [4, parseErrorBody(output.body, context)];
998
+ case 1:
999
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1000
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1001
+ _b = errorCode;
1002
+ switch (_b) {
1003
+ case "InvalidToken": return [3, 2];
1004
+ case "com.amazonaws.sfn#InvalidToken": return [3, 2];
1005
+ }
1006
+ return [3, 4];
1007
+ case 2: return [4, deserializeAws_json1_0InvalidTokenResponse(parsedOutput, context)];
1008
+ case 3: throw _d.sent();
1009
+ case 4:
1010
+ parsedBody = parsedOutput.body;
1011
+ throwDefaultError({
1012
+ output: output,
1013
+ parsedBody: parsedBody,
1014
+ exceptionCtor: __BaseException,
1015
+ errorCode: errorCode,
1016
+ });
1017
+ _d.label = 5;
1018
+ case 5: return [2];
1019
+ }
1020
+ });
1021
+ }); };
1022
+ export var deserializeAws_json1_0ListTagsForResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1023
+ var data, contents, response;
1024
+ return __generator(this, function (_a) {
1025
+ switch (_a.label) {
1026
+ case 0:
1027
+ if (output.statusCode >= 300) {
1028
+ return [2, deserializeAws_json1_0ListTagsForResourceCommandError(output, context)];
1029
+ }
1030
+ return [4, parseBody(output.body, context)];
1031
+ case 1:
1032
+ data = _a.sent();
1033
+ contents = {};
1034
+ contents = deserializeAws_json1_0ListTagsForResourceOutput(data, context);
1035
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1036
+ return [2, Promise.resolve(response)];
1037
+ }
1038
+ });
1039
+ }); };
1040
+ var deserializeAws_json1_0ListTagsForResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1041
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1042
+ var _c;
1043
+ return __generator(this, function (_d) {
1044
+ switch (_d.label) {
1045
+ case 0:
1046
+ _a = [__assign({}, output)];
1047
+ _c = {};
1048
+ return [4, parseErrorBody(output.body, context)];
1049
+ case 1:
1050
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1051
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1052
+ _b = errorCode;
1053
+ switch (_b) {
1054
+ case "InvalidArn": return [3, 2];
1055
+ case "com.amazonaws.sfn#InvalidArn": return [3, 2];
1056
+ case "ResourceNotFound": return [3, 4];
1057
+ case "com.amazonaws.sfn#ResourceNotFound": return [3, 4];
1058
+ }
1059
+ return [3, 6];
1060
+ case 2: return [4, deserializeAws_json1_0InvalidArnResponse(parsedOutput, context)];
1061
+ case 3: throw _d.sent();
1062
+ case 4: return [4, deserializeAws_json1_0ResourceNotFoundResponse(parsedOutput, context)];
1063
+ case 5: throw _d.sent();
1064
+ case 6:
1065
+ parsedBody = parsedOutput.body;
1066
+ throwDefaultError({
1067
+ output: output,
1068
+ parsedBody: parsedBody,
1069
+ exceptionCtor: __BaseException,
1070
+ errorCode: errorCode,
1071
+ });
1072
+ _d.label = 7;
1073
+ case 7: return [2];
1074
+ }
1075
+ });
1076
+ }); };
1077
+ export var deserializeAws_json1_0SendTaskFailureCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1078
+ var data, contents, response;
1079
+ return __generator(this, function (_a) {
1080
+ switch (_a.label) {
1081
+ case 0:
1082
+ if (output.statusCode >= 300) {
1083
+ return [2, deserializeAws_json1_0SendTaskFailureCommandError(output, context)];
1084
+ }
1085
+ return [4, parseBody(output.body, context)];
1086
+ case 1:
1087
+ data = _a.sent();
1088
+ contents = {};
1089
+ contents = deserializeAws_json1_0SendTaskFailureOutput(data, context);
1090
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1091
+ return [2, Promise.resolve(response)];
1092
+ }
1093
+ });
1094
+ }); };
1095
+ var deserializeAws_json1_0SendTaskFailureCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1096
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1097
+ var _c;
1098
+ return __generator(this, function (_d) {
1099
+ switch (_d.label) {
1100
+ case 0:
1101
+ _a = [__assign({}, output)];
1102
+ _c = {};
1103
+ return [4, parseErrorBody(output.body, context)];
1104
+ case 1:
1105
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1106
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1107
+ _b = errorCode;
1108
+ switch (_b) {
1109
+ case "InvalidToken": return [3, 2];
1110
+ case "com.amazonaws.sfn#InvalidToken": return [3, 2];
1111
+ case "TaskDoesNotExist": return [3, 4];
1112
+ case "com.amazonaws.sfn#TaskDoesNotExist": return [3, 4];
1113
+ case "TaskTimedOut": return [3, 6];
1114
+ case "com.amazonaws.sfn#TaskTimedOut": return [3, 6];
1115
+ }
1116
+ return [3, 8];
1117
+ case 2: return [4, deserializeAws_json1_0InvalidTokenResponse(parsedOutput, context)];
1118
+ case 3: throw _d.sent();
1119
+ case 4: return [4, deserializeAws_json1_0TaskDoesNotExistResponse(parsedOutput, context)];
1120
+ case 5: throw _d.sent();
1121
+ case 6: return [4, deserializeAws_json1_0TaskTimedOutResponse(parsedOutput, context)];
1122
+ case 7: throw _d.sent();
1123
+ case 8:
1124
+ parsedBody = parsedOutput.body;
1125
+ throwDefaultError({
1126
+ output: output,
1127
+ parsedBody: parsedBody,
1128
+ exceptionCtor: __BaseException,
1129
+ errorCode: errorCode,
1130
+ });
1131
+ _d.label = 9;
1132
+ case 9: return [2];
1133
+ }
1134
+ });
1135
+ }); };
1136
+ export var deserializeAws_json1_0SendTaskHeartbeatCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1137
+ var data, contents, response;
1138
+ return __generator(this, function (_a) {
1139
+ switch (_a.label) {
1140
+ case 0:
1141
+ if (output.statusCode >= 300) {
1142
+ return [2, deserializeAws_json1_0SendTaskHeartbeatCommandError(output, context)];
1143
+ }
1144
+ return [4, parseBody(output.body, context)];
1145
+ case 1:
1146
+ data = _a.sent();
1147
+ contents = {};
1148
+ contents = deserializeAws_json1_0SendTaskHeartbeatOutput(data, context);
1149
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1150
+ return [2, Promise.resolve(response)];
1151
+ }
1152
+ });
1153
+ }); };
1154
+ var deserializeAws_json1_0SendTaskHeartbeatCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1155
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1156
+ var _c;
1157
+ return __generator(this, function (_d) {
1158
+ switch (_d.label) {
1159
+ case 0:
1160
+ _a = [__assign({}, output)];
1161
+ _c = {};
1162
+ return [4, parseErrorBody(output.body, context)];
1163
+ case 1:
1164
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1165
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1166
+ _b = errorCode;
1167
+ switch (_b) {
1168
+ case "InvalidToken": return [3, 2];
1169
+ case "com.amazonaws.sfn#InvalidToken": return [3, 2];
1170
+ case "TaskDoesNotExist": return [3, 4];
1171
+ case "com.amazonaws.sfn#TaskDoesNotExist": return [3, 4];
1172
+ case "TaskTimedOut": return [3, 6];
1173
+ case "com.amazonaws.sfn#TaskTimedOut": return [3, 6];
1174
+ }
1175
+ return [3, 8];
1176
+ case 2: return [4, deserializeAws_json1_0InvalidTokenResponse(parsedOutput, context)];
1177
+ case 3: throw _d.sent();
1178
+ case 4: return [4, deserializeAws_json1_0TaskDoesNotExistResponse(parsedOutput, context)];
1179
+ case 5: throw _d.sent();
1180
+ case 6: return [4, deserializeAws_json1_0TaskTimedOutResponse(parsedOutput, context)];
1181
+ case 7: throw _d.sent();
1182
+ case 8:
1183
+ parsedBody = parsedOutput.body;
1184
+ throwDefaultError({
1185
+ output: output,
1186
+ parsedBody: parsedBody,
1187
+ exceptionCtor: __BaseException,
1188
+ errorCode: errorCode,
1189
+ });
1190
+ _d.label = 9;
1191
+ case 9: return [2];
1192
+ }
1193
+ });
1194
+ }); };
1195
+ export var deserializeAws_json1_0SendTaskSuccessCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1196
+ var data, contents, response;
1197
+ return __generator(this, function (_a) {
1198
+ switch (_a.label) {
1199
+ case 0:
1200
+ if (output.statusCode >= 300) {
1201
+ return [2, deserializeAws_json1_0SendTaskSuccessCommandError(output, context)];
1202
+ }
1203
+ return [4, parseBody(output.body, context)];
1204
+ case 1:
1205
+ data = _a.sent();
1206
+ contents = {};
1207
+ contents = deserializeAws_json1_0SendTaskSuccessOutput(data, context);
1208
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1209
+ return [2, Promise.resolve(response)];
1210
+ }
1211
+ });
1212
+ }); };
1213
+ var deserializeAws_json1_0SendTaskSuccessCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1214
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1215
+ var _c;
1216
+ return __generator(this, function (_d) {
1217
+ switch (_d.label) {
1218
+ case 0:
1219
+ _a = [__assign({}, output)];
1220
+ _c = {};
1221
+ return [4, parseErrorBody(output.body, context)];
1222
+ case 1:
1223
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1224
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1225
+ _b = errorCode;
1226
+ switch (_b) {
1227
+ case "InvalidOutput": return [3, 2];
1228
+ case "com.amazonaws.sfn#InvalidOutput": return [3, 2];
1229
+ case "InvalidToken": return [3, 4];
1230
+ case "com.amazonaws.sfn#InvalidToken": return [3, 4];
1231
+ case "TaskDoesNotExist": return [3, 6];
1232
+ case "com.amazonaws.sfn#TaskDoesNotExist": return [3, 6];
1233
+ case "TaskTimedOut": return [3, 8];
1234
+ case "com.amazonaws.sfn#TaskTimedOut": return [3, 8];
1235
+ }
1236
+ return [3, 10];
1237
+ case 2: return [4, deserializeAws_json1_0InvalidOutputResponse(parsedOutput, context)];
1238
+ case 3: throw _d.sent();
1239
+ case 4: return [4, deserializeAws_json1_0InvalidTokenResponse(parsedOutput, context)];
1240
+ case 5: throw _d.sent();
1241
+ case 6: return [4, deserializeAws_json1_0TaskDoesNotExistResponse(parsedOutput, context)];
1242
+ case 7: throw _d.sent();
1243
+ case 8: return [4, deserializeAws_json1_0TaskTimedOutResponse(parsedOutput, context)];
1244
+ case 9: throw _d.sent();
1245
+ case 10:
1246
+ parsedBody = parsedOutput.body;
1247
+ throwDefaultError({
1248
+ output: output,
1249
+ parsedBody: parsedBody,
1250
+ exceptionCtor: __BaseException,
1251
+ errorCode: errorCode,
1252
+ });
1253
+ _d.label = 11;
1254
+ case 11: return [2];
1255
+ }
1256
+ });
1257
+ }); };
1258
+ export var deserializeAws_json1_0StartExecutionCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1259
+ var data, contents, response;
1260
+ return __generator(this, function (_a) {
1261
+ switch (_a.label) {
1262
+ case 0:
1263
+ if (output.statusCode >= 300) {
1264
+ return [2, deserializeAws_json1_0StartExecutionCommandError(output, context)];
1265
+ }
1266
+ return [4, parseBody(output.body, context)];
1267
+ case 1:
1268
+ data = _a.sent();
1269
+ contents = {};
1270
+ contents = deserializeAws_json1_0StartExecutionOutput(data, context);
1271
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1272
+ return [2, Promise.resolve(response)];
1273
+ }
1274
+ });
1275
+ }); };
1276
+ var deserializeAws_json1_0StartExecutionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1277
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1278
+ var _c;
1279
+ return __generator(this, function (_d) {
1280
+ switch (_d.label) {
1281
+ case 0:
1282
+ _a = [__assign({}, output)];
1283
+ _c = {};
1284
+ return [4, parseErrorBody(output.body, context)];
1285
+ case 1:
1286
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1287
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1288
+ _b = errorCode;
1289
+ switch (_b) {
1290
+ case "ExecutionAlreadyExists": return [3, 2];
1291
+ case "com.amazonaws.sfn#ExecutionAlreadyExists": return [3, 2];
1292
+ case "ExecutionLimitExceeded": return [3, 4];
1293
+ case "com.amazonaws.sfn#ExecutionLimitExceeded": return [3, 4];
1294
+ case "InvalidArn": return [3, 6];
1295
+ case "com.amazonaws.sfn#InvalidArn": return [3, 6];
1296
+ case "InvalidExecutionInput": return [3, 8];
1297
+ case "com.amazonaws.sfn#InvalidExecutionInput": return [3, 8];
1298
+ case "InvalidName": return [3, 10];
1299
+ case "com.amazonaws.sfn#InvalidName": return [3, 10];
1300
+ case "StateMachineDeleting": return [3, 12];
1301
+ case "com.amazonaws.sfn#StateMachineDeleting": return [3, 12];
1302
+ case "StateMachineDoesNotExist": return [3, 14];
1303
+ case "com.amazonaws.sfn#StateMachineDoesNotExist": return [3, 14];
1304
+ }
1305
+ return [3, 16];
1306
+ case 2: return [4, deserializeAws_json1_0ExecutionAlreadyExistsResponse(parsedOutput, context)];
1307
+ case 3: throw _d.sent();
1308
+ case 4: return [4, deserializeAws_json1_0ExecutionLimitExceededResponse(parsedOutput, context)];
1309
+ case 5: throw _d.sent();
1310
+ case 6: return [4, deserializeAws_json1_0InvalidArnResponse(parsedOutput, context)];
1311
+ case 7: throw _d.sent();
1312
+ case 8: return [4, deserializeAws_json1_0InvalidExecutionInputResponse(parsedOutput, context)];
1313
+ case 9: throw _d.sent();
1314
+ case 10: return [4, deserializeAws_json1_0InvalidNameResponse(parsedOutput, context)];
1315
+ case 11: throw _d.sent();
1316
+ case 12: return [4, deserializeAws_json1_0StateMachineDeletingResponse(parsedOutput, context)];
1317
+ case 13: throw _d.sent();
1318
+ case 14: return [4, deserializeAws_json1_0StateMachineDoesNotExistResponse(parsedOutput, context)];
1319
+ case 15: throw _d.sent();
1320
+ case 16:
1321
+ parsedBody = parsedOutput.body;
1322
+ throwDefaultError({
1323
+ output: output,
1324
+ parsedBody: parsedBody,
1325
+ exceptionCtor: __BaseException,
1326
+ errorCode: errorCode,
1327
+ });
1328
+ _d.label = 17;
1329
+ case 17: return [2];
1330
+ }
1331
+ });
1332
+ }); };
1333
+ export var deserializeAws_json1_0StartSyncExecutionCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1334
+ var data, contents, response;
1335
+ return __generator(this, function (_a) {
1336
+ switch (_a.label) {
1337
+ case 0:
1338
+ if (output.statusCode >= 300) {
1339
+ return [2, deserializeAws_json1_0StartSyncExecutionCommandError(output, context)];
1340
+ }
1341
+ return [4, parseBody(output.body, context)];
1342
+ case 1:
1343
+ data = _a.sent();
1344
+ contents = {};
1345
+ contents = deserializeAws_json1_0StartSyncExecutionOutput(data, context);
1346
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1347
+ return [2, Promise.resolve(response)];
1348
+ }
1349
+ });
1350
+ }); };
1351
+ var deserializeAws_json1_0StartSyncExecutionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1352
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1353
+ var _c;
1354
+ return __generator(this, function (_d) {
1355
+ switch (_d.label) {
1356
+ case 0:
1357
+ _a = [__assign({}, output)];
1358
+ _c = {};
1359
+ return [4, parseErrorBody(output.body, context)];
1360
+ case 1:
1361
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1362
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1363
+ _b = errorCode;
1364
+ switch (_b) {
1365
+ case "InvalidArn": return [3, 2];
1366
+ case "com.amazonaws.sfn#InvalidArn": return [3, 2];
1367
+ case "InvalidExecutionInput": return [3, 4];
1368
+ case "com.amazonaws.sfn#InvalidExecutionInput": return [3, 4];
1369
+ case "InvalidName": return [3, 6];
1370
+ case "com.amazonaws.sfn#InvalidName": return [3, 6];
1371
+ case "StateMachineDeleting": return [3, 8];
1372
+ case "com.amazonaws.sfn#StateMachineDeleting": return [3, 8];
1373
+ case "StateMachineDoesNotExist": return [3, 10];
1374
+ case "com.amazonaws.sfn#StateMachineDoesNotExist": return [3, 10];
1375
+ case "StateMachineTypeNotSupported": return [3, 12];
1376
+ case "com.amazonaws.sfn#StateMachineTypeNotSupported": return [3, 12];
1377
+ }
1378
+ return [3, 14];
1379
+ case 2: return [4, deserializeAws_json1_0InvalidArnResponse(parsedOutput, context)];
1380
+ case 3: throw _d.sent();
1381
+ case 4: return [4, deserializeAws_json1_0InvalidExecutionInputResponse(parsedOutput, context)];
1382
+ case 5: throw _d.sent();
1383
+ case 6: return [4, deserializeAws_json1_0InvalidNameResponse(parsedOutput, context)];
1384
+ case 7: throw _d.sent();
1385
+ case 8: return [4, deserializeAws_json1_0StateMachineDeletingResponse(parsedOutput, context)];
1386
+ case 9: throw _d.sent();
1387
+ case 10: return [4, deserializeAws_json1_0StateMachineDoesNotExistResponse(parsedOutput, context)];
1388
+ case 11: throw _d.sent();
1389
+ case 12: return [4, deserializeAws_json1_0StateMachineTypeNotSupportedResponse(parsedOutput, context)];
1390
+ case 13: throw _d.sent();
1391
+ case 14:
1392
+ parsedBody = parsedOutput.body;
1393
+ throwDefaultError({
1394
+ output: output,
1395
+ parsedBody: parsedBody,
1396
+ exceptionCtor: __BaseException,
1397
+ errorCode: errorCode,
1398
+ });
1399
+ _d.label = 15;
1400
+ case 15: return [2];
1401
+ }
1402
+ });
1403
+ }); };
1404
+ export var deserializeAws_json1_0StopExecutionCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1405
+ var data, contents, response;
1406
+ return __generator(this, function (_a) {
1407
+ switch (_a.label) {
1408
+ case 0:
1409
+ if (output.statusCode >= 300) {
1410
+ return [2, deserializeAws_json1_0StopExecutionCommandError(output, context)];
1411
+ }
1412
+ return [4, parseBody(output.body, context)];
1413
+ case 1:
1414
+ data = _a.sent();
1415
+ contents = {};
1416
+ contents = deserializeAws_json1_0StopExecutionOutput(data, context);
1417
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1418
+ return [2, Promise.resolve(response)];
1419
+ }
1420
+ });
1421
+ }); };
1422
+ var deserializeAws_json1_0StopExecutionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1423
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1424
+ var _c;
1425
+ return __generator(this, function (_d) {
1426
+ switch (_d.label) {
1427
+ case 0:
1428
+ _a = [__assign({}, output)];
1429
+ _c = {};
1430
+ return [4, parseErrorBody(output.body, context)];
1431
+ case 1:
1432
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1433
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1434
+ _b = errorCode;
1435
+ switch (_b) {
1436
+ case "ExecutionDoesNotExist": return [3, 2];
1437
+ case "com.amazonaws.sfn#ExecutionDoesNotExist": return [3, 2];
1438
+ case "InvalidArn": return [3, 4];
1439
+ case "com.amazonaws.sfn#InvalidArn": return [3, 4];
1440
+ }
1441
+ return [3, 6];
1442
+ case 2: return [4, deserializeAws_json1_0ExecutionDoesNotExistResponse(parsedOutput, context)];
1443
+ case 3: throw _d.sent();
1444
+ case 4: return [4, deserializeAws_json1_0InvalidArnResponse(parsedOutput, context)];
1445
+ case 5: throw _d.sent();
1446
+ case 6:
1447
+ parsedBody = parsedOutput.body;
1448
+ throwDefaultError({
1449
+ output: output,
1450
+ parsedBody: parsedBody,
1451
+ exceptionCtor: __BaseException,
1452
+ errorCode: errorCode,
1453
+ });
1454
+ _d.label = 7;
1455
+ case 7: return [2];
1456
+ }
1457
+ });
1458
+ }); };
1459
+ export var deserializeAws_json1_0TagResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1460
+ var data, contents, response;
1461
+ return __generator(this, function (_a) {
1462
+ switch (_a.label) {
1463
+ case 0:
1464
+ if (output.statusCode >= 300) {
1465
+ return [2, deserializeAws_json1_0TagResourceCommandError(output, context)];
1466
+ }
1467
+ return [4, parseBody(output.body, context)];
1468
+ case 1:
1469
+ data = _a.sent();
1470
+ contents = {};
1471
+ contents = deserializeAws_json1_0TagResourceOutput(data, context);
1472
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1473
+ return [2, Promise.resolve(response)];
1474
+ }
1475
+ });
1476
+ }); };
1477
+ var deserializeAws_json1_0TagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1478
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1479
+ var _c;
1480
+ return __generator(this, function (_d) {
1481
+ switch (_d.label) {
1482
+ case 0:
1483
+ _a = [__assign({}, output)];
1484
+ _c = {};
1485
+ return [4, parseErrorBody(output.body, context)];
1486
+ case 1:
1487
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1488
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1489
+ _b = errorCode;
1490
+ switch (_b) {
1491
+ case "InvalidArn": return [3, 2];
1492
+ case "com.amazonaws.sfn#InvalidArn": return [3, 2];
1493
+ case "ResourceNotFound": return [3, 4];
1494
+ case "com.amazonaws.sfn#ResourceNotFound": return [3, 4];
1495
+ case "TooManyTags": return [3, 6];
1496
+ case "com.amazonaws.sfn#TooManyTags": return [3, 6];
1497
+ }
1498
+ return [3, 8];
1499
+ case 2: return [4, deserializeAws_json1_0InvalidArnResponse(parsedOutput, context)];
1500
+ case 3: throw _d.sent();
1501
+ case 4: return [4, deserializeAws_json1_0ResourceNotFoundResponse(parsedOutput, context)];
1502
+ case 5: throw _d.sent();
1503
+ case 6: return [4, deserializeAws_json1_0TooManyTagsResponse(parsedOutput, context)];
1504
+ case 7: throw _d.sent();
1505
+ case 8:
1506
+ parsedBody = parsedOutput.body;
1507
+ throwDefaultError({
1508
+ output: output,
1509
+ parsedBody: parsedBody,
1510
+ exceptionCtor: __BaseException,
1511
+ errorCode: errorCode,
1512
+ });
1513
+ _d.label = 9;
1514
+ case 9: return [2];
1515
+ }
1516
+ });
1517
+ }); };
1518
+ export var deserializeAws_json1_0UntagResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1519
+ var data, contents, response;
1520
+ return __generator(this, function (_a) {
1521
+ switch (_a.label) {
1522
+ case 0:
1523
+ if (output.statusCode >= 300) {
1524
+ return [2, deserializeAws_json1_0UntagResourceCommandError(output, context)];
1525
+ }
1526
+ return [4, parseBody(output.body, context)];
1527
+ case 1:
1528
+ data = _a.sent();
1529
+ contents = {};
1530
+ contents = deserializeAws_json1_0UntagResourceOutput(data, context);
1531
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1532
+ return [2, Promise.resolve(response)];
1533
+ }
1534
+ });
1535
+ }); };
1536
+ var deserializeAws_json1_0UntagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1537
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1538
+ var _c;
1539
+ return __generator(this, function (_d) {
1540
+ switch (_d.label) {
1541
+ case 0:
1542
+ _a = [__assign({}, output)];
1543
+ _c = {};
1544
+ return [4, parseErrorBody(output.body, context)];
1545
+ case 1:
1546
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1547
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1548
+ _b = errorCode;
1549
+ switch (_b) {
1550
+ case "InvalidArn": return [3, 2];
1551
+ case "com.amazonaws.sfn#InvalidArn": return [3, 2];
1552
+ case "ResourceNotFound": return [3, 4];
1553
+ case "com.amazonaws.sfn#ResourceNotFound": return [3, 4];
1554
+ }
1555
+ return [3, 6];
1556
+ case 2: return [4, deserializeAws_json1_0InvalidArnResponse(parsedOutput, context)];
1557
+ case 3: throw _d.sent();
1558
+ case 4: return [4, deserializeAws_json1_0ResourceNotFoundResponse(parsedOutput, context)];
1559
+ case 5: throw _d.sent();
1560
+ case 6:
1561
+ parsedBody = parsedOutput.body;
1562
+ throwDefaultError({
1563
+ output: output,
1564
+ parsedBody: parsedBody,
1565
+ exceptionCtor: __BaseException,
1566
+ errorCode: errorCode,
1567
+ });
1568
+ _d.label = 7;
1569
+ case 7: return [2];
1570
+ }
1571
+ });
1572
+ }); };
1573
+ export var deserializeAws_json1_0UpdateStateMachineCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1574
+ var data, contents, response;
1575
+ return __generator(this, function (_a) {
1576
+ switch (_a.label) {
1577
+ case 0:
1578
+ if (output.statusCode >= 300) {
1579
+ return [2, deserializeAws_json1_0UpdateStateMachineCommandError(output, context)];
1580
+ }
1581
+ return [4, parseBody(output.body, context)];
1582
+ case 1:
1583
+ data = _a.sent();
1584
+ contents = {};
1585
+ contents = deserializeAws_json1_0UpdateStateMachineOutput(data, context);
1586
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1587
+ return [2, Promise.resolve(response)];
1588
+ }
1589
+ });
1590
+ }); };
1591
+ var deserializeAws_json1_0UpdateStateMachineCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1592
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1593
+ var _c;
1594
+ return __generator(this, function (_d) {
1595
+ switch (_d.label) {
1596
+ case 0:
1597
+ _a = [__assign({}, output)];
1598
+ _c = {};
1599
+ return [4, parseErrorBody(output.body, context)];
1600
+ case 1:
1601
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1602
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1603
+ _b = errorCode;
1604
+ switch (_b) {
1605
+ case "InvalidArn": return [3, 2];
1606
+ case "com.amazonaws.sfn#InvalidArn": return [3, 2];
1607
+ case "InvalidDefinition": return [3, 4];
1608
+ case "com.amazonaws.sfn#InvalidDefinition": return [3, 4];
1609
+ case "InvalidLoggingConfiguration": return [3, 6];
1610
+ case "com.amazonaws.sfn#InvalidLoggingConfiguration": return [3, 6];
1611
+ case "InvalidTracingConfiguration": return [3, 8];
1612
+ case "com.amazonaws.sfn#InvalidTracingConfiguration": return [3, 8];
1613
+ case "MissingRequiredParameter": return [3, 10];
1614
+ case "com.amazonaws.sfn#MissingRequiredParameter": return [3, 10];
1615
+ case "StateMachineDeleting": return [3, 12];
1616
+ case "com.amazonaws.sfn#StateMachineDeleting": return [3, 12];
1617
+ case "StateMachineDoesNotExist": return [3, 14];
1618
+ case "com.amazonaws.sfn#StateMachineDoesNotExist": return [3, 14];
1619
+ }
1620
+ return [3, 16];
1621
+ case 2: return [4, deserializeAws_json1_0InvalidArnResponse(parsedOutput, context)];
1622
+ case 3: throw _d.sent();
1623
+ case 4: return [4, deserializeAws_json1_0InvalidDefinitionResponse(parsedOutput, context)];
1624
+ case 5: throw _d.sent();
1625
+ case 6: return [4, deserializeAws_json1_0InvalidLoggingConfigurationResponse(parsedOutput, context)];
1626
+ case 7: throw _d.sent();
1627
+ case 8: return [4, deserializeAws_json1_0InvalidTracingConfigurationResponse(parsedOutput, context)];
1628
+ case 9: throw _d.sent();
1629
+ case 10: return [4, deserializeAws_json1_0MissingRequiredParameterResponse(parsedOutput, context)];
1630
+ case 11: throw _d.sent();
1631
+ case 12: return [4, deserializeAws_json1_0StateMachineDeletingResponse(parsedOutput, context)];
1632
+ case 13: throw _d.sent();
1633
+ case 14: return [4, deserializeAws_json1_0StateMachineDoesNotExistResponse(parsedOutput, context)];
1634
+ case 15: throw _d.sent();
1635
+ case 16:
1636
+ parsedBody = parsedOutput.body;
1637
+ throwDefaultError({
1638
+ output: output,
1639
+ parsedBody: parsedBody,
1640
+ exceptionCtor: __BaseException,
1641
+ errorCode: errorCode,
1642
+ });
1643
+ _d.label = 17;
1644
+ case 17: return [2];
1645
+ }
1646
+ });
1647
+ }); };
1648
+ var deserializeAws_json1_0ActivityDoesNotExistResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1649
+ var body, deserialized, exception;
1650
+ return __generator(this, function (_a) {
1651
+ body = parsedOutput.body;
1652
+ deserialized = deserializeAws_json1_0ActivityDoesNotExist(body, context);
1653
+ exception = new ActivityDoesNotExist(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1654
+ return [2, __decorateServiceException(exception, body)];
1655
+ });
1656
+ }); };
1657
+ var deserializeAws_json1_0ActivityLimitExceededResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1658
+ var body, deserialized, exception;
1659
+ return __generator(this, function (_a) {
1660
+ body = parsedOutput.body;
1661
+ deserialized = deserializeAws_json1_0ActivityLimitExceeded(body, context);
1662
+ exception = new ActivityLimitExceeded(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1663
+ return [2, __decorateServiceException(exception, body)];
1664
+ });
1665
+ }); };
1666
+ var deserializeAws_json1_0ActivityWorkerLimitExceededResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1667
+ var body, deserialized, exception;
1668
+ return __generator(this, function (_a) {
1669
+ body = parsedOutput.body;
1670
+ deserialized = deserializeAws_json1_0ActivityWorkerLimitExceeded(body, context);
1671
+ exception = new ActivityWorkerLimitExceeded(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1672
+ return [2, __decorateServiceException(exception, body)];
1673
+ });
1674
+ }); };
1675
+ var deserializeAws_json1_0ExecutionAlreadyExistsResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1676
+ var body, deserialized, exception;
1677
+ return __generator(this, function (_a) {
1678
+ body = parsedOutput.body;
1679
+ deserialized = deserializeAws_json1_0ExecutionAlreadyExists(body, context);
1680
+ exception = new ExecutionAlreadyExists(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1681
+ return [2, __decorateServiceException(exception, body)];
1682
+ });
1683
+ }); };
1684
+ var deserializeAws_json1_0ExecutionDoesNotExistResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1685
+ var body, deserialized, exception;
1686
+ return __generator(this, function (_a) {
1687
+ body = parsedOutput.body;
1688
+ deserialized = deserializeAws_json1_0ExecutionDoesNotExist(body, context);
1689
+ exception = new ExecutionDoesNotExist(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1690
+ return [2, __decorateServiceException(exception, body)];
1691
+ });
1692
+ }); };
1693
+ var deserializeAws_json1_0ExecutionLimitExceededResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1694
+ var body, deserialized, exception;
1695
+ return __generator(this, function (_a) {
1696
+ body = parsedOutput.body;
1697
+ deserialized = deserializeAws_json1_0ExecutionLimitExceeded(body, context);
1698
+ exception = new ExecutionLimitExceeded(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1699
+ return [2, __decorateServiceException(exception, body)];
1700
+ });
1701
+ }); };
1702
+ var deserializeAws_json1_0InvalidArnResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1703
+ var body, deserialized, exception;
1704
+ return __generator(this, function (_a) {
1705
+ body = parsedOutput.body;
1706
+ deserialized = deserializeAws_json1_0InvalidArn(body, context);
1707
+ exception = new InvalidArn(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1708
+ return [2, __decorateServiceException(exception, body)];
1709
+ });
1710
+ }); };
1711
+ var deserializeAws_json1_0InvalidDefinitionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1712
+ var body, deserialized, exception;
1713
+ return __generator(this, function (_a) {
1714
+ body = parsedOutput.body;
1715
+ deserialized = deserializeAws_json1_0InvalidDefinition(body, context);
1716
+ exception = new InvalidDefinition(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1717
+ return [2, __decorateServiceException(exception, body)];
1718
+ });
1719
+ }); };
1720
+ var deserializeAws_json1_0InvalidExecutionInputResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1721
+ var body, deserialized, exception;
1722
+ return __generator(this, function (_a) {
1723
+ body = parsedOutput.body;
1724
+ deserialized = deserializeAws_json1_0InvalidExecutionInput(body, context);
1725
+ exception = new InvalidExecutionInput(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1726
+ return [2, __decorateServiceException(exception, body)];
1727
+ });
1728
+ }); };
1729
+ var deserializeAws_json1_0InvalidLoggingConfigurationResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1730
+ var body, deserialized, exception;
1731
+ return __generator(this, function (_a) {
1732
+ body = parsedOutput.body;
1733
+ deserialized = deserializeAws_json1_0InvalidLoggingConfiguration(body, context);
1734
+ exception = new InvalidLoggingConfiguration(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1735
+ return [2, __decorateServiceException(exception, body)];
1736
+ });
1737
+ }); };
1738
+ var deserializeAws_json1_0InvalidNameResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1739
+ var body, deserialized, exception;
1740
+ return __generator(this, function (_a) {
1741
+ body = parsedOutput.body;
1742
+ deserialized = deserializeAws_json1_0InvalidName(body, context);
1743
+ exception = new InvalidName(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1744
+ return [2, __decorateServiceException(exception, body)];
1745
+ });
1746
+ }); };
1747
+ var deserializeAws_json1_0InvalidOutputResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1748
+ var body, deserialized, exception;
1749
+ return __generator(this, function (_a) {
1750
+ body = parsedOutput.body;
1751
+ deserialized = deserializeAws_json1_0InvalidOutput(body, context);
1752
+ exception = new InvalidOutput(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1753
+ return [2, __decorateServiceException(exception, body)];
1754
+ });
1755
+ }); };
1756
+ var deserializeAws_json1_0InvalidTokenResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1757
+ var body, deserialized, exception;
1758
+ return __generator(this, function (_a) {
1759
+ body = parsedOutput.body;
1760
+ deserialized = deserializeAws_json1_0InvalidToken(body, context);
1761
+ exception = new InvalidToken(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1762
+ return [2, __decorateServiceException(exception, body)];
1763
+ });
1764
+ }); };
1765
+ var deserializeAws_json1_0InvalidTracingConfigurationResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1766
+ var body, deserialized, exception;
1767
+ return __generator(this, function (_a) {
1768
+ body = parsedOutput.body;
1769
+ deserialized = deserializeAws_json1_0InvalidTracingConfiguration(body, context);
1770
+ exception = new InvalidTracingConfiguration(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1771
+ return [2, __decorateServiceException(exception, body)];
1772
+ });
1773
+ }); };
1774
+ var deserializeAws_json1_0MissingRequiredParameterResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1775
+ var body, deserialized, exception;
1776
+ return __generator(this, function (_a) {
1777
+ body = parsedOutput.body;
1778
+ deserialized = deserializeAws_json1_0MissingRequiredParameter(body, context);
1779
+ exception = new MissingRequiredParameter(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1780
+ return [2, __decorateServiceException(exception, body)];
1781
+ });
1782
+ }); };
1783
+ var deserializeAws_json1_0ResourceNotFoundResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1784
+ var body, deserialized, exception;
1785
+ return __generator(this, function (_a) {
1786
+ body = parsedOutput.body;
1787
+ deserialized = deserializeAws_json1_0ResourceNotFound(body, context);
1788
+ exception = new ResourceNotFound(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1789
+ return [2, __decorateServiceException(exception, body)];
1790
+ });
1791
+ }); };
1792
+ var deserializeAws_json1_0StateMachineAlreadyExistsResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1793
+ var body, deserialized, exception;
1794
+ return __generator(this, function (_a) {
1795
+ body = parsedOutput.body;
1796
+ deserialized = deserializeAws_json1_0StateMachineAlreadyExists(body, context);
1797
+ exception = new StateMachineAlreadyExists(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1798
+ return [2, __decorateServiceException(exception, body)];
1799
+ });
1800
+ }); };
1801
+ var deserializeAws_json1_0StateMachineDeletingResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1802
+ var body, deserialized, exception;
1803
+ return __generator(this, function (_a) {
1804
+ body = parsedOutput.body;
1805
+ deserialized = deserializeAws_json1_0StateMachineDeleting(body, context);
1806
+ exception = new StateMachineDeleting(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1807
+ return [2, __decorateServiceException(exception, body)];
1808
+ });
1809
+ }); };
1810
+ var deserializeAws_json1_0StateMachineDoesNotExistResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1811
+ var body, deserialized, exception;
1812
+ return __generator(this, function (_a) {
1813
+ body = parsedOutput.body;
1814
+ deserialized = deserializeAws_json1_0StateMachineDoesNotExist(body, context);
1815
+ exception = new StateMachineDoesNotExist(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1816
+ return [2, __decorateServiceException(exception, body)];
1817
+ });
1818
+ }); };
1819
+ var deserializeAws_json1_0StateMachineLimitExceededResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1820
+ var body, deserialized, exception;
1821
+ return __generator(this, function (_a) {
1822
+ body = parsedOutput.body;
1823
+ deserialized = deserializeAws_json1_0StateMachineLimitExceeded(body, context);
1824
+ exception = new StateMachineLimitExceeded(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1825
+ return [2, __decorateServiceException(exception, body)];
1826
+ });
1827
+ }); };
1828
+ var deserializeAws_json1_0StateMachineTypeNotSupportedResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1829
+ var body, deserialized, exception;
1830
+ return __generator(this, function (_a) {
1831
+ body = parsedOutput.body;
1832
+ deserialized = deserializeAws_json1_0StateMachineTypeNotSupported(body, context);
1833
+ exception = new StateMachineTypeNotSupported(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1834
+ return [2, __decorateServiceException(exception, body)];
1835
+ });
1836
+ }); };
1837
+ var deserializeAws_json1_0TaskDoesNotExistResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1838
+ var body, deserialized, exception;
1839
+ return __generator(this, function (_a) {
1840
+ body = parsedOutput.body;
1841
+ deserialized = deserializeAws_json1_0TaskDoesNotExist(body, context);
1842
+ exception = new TaskDoesNotExist(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1843
+ return [2, __decorateServiceException(exception, body)];
1844
+ });
1845
+ }); };
1846
+ var deserializeAws_json1_0TaskTimedOutResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1847
+ var body, deserialized, exception;
1848
+ return __generator(this, function (_a) {
1849
+ body = parsedOutput.body;
1850
+ deserialized = deserializeAws_json1_0TaskTimedOut(body, context);
1851
+ exception = new TaskTimedOut(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1852
+ return [2, __decorateServiceException(exception, body)];
1853
+ });
1854
+ }); };
1855
+ var deserializeAws_json1_0TooManyTagsResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1856
+ var body, deserialized, exception;
1857
+ return __generator(this, function (_a) {
1858
+ body = parsedOutput.body;
1859
+ deserialized = deserializeAws_json1_0TooManyTags(body, context);
1860
+ exception = new TooManyTags(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1861
+ return [2, __decorateServiceException(exception, body)];
1862
+ });
1863
+ }); };
1864
+ var serializeAws_json1_0CloudWatchLogsLogGroup = function (input, context) {
1865
+ return __assign({}, (input.logGroupArn != null && { logGroupArn: input.logGroupArn }));
1351
1866
  };
1352
- const serializeAws_json1_0CreateActivityInput = (input, context) => {
1353
- return {
1354
- ...(input.name != null && { name: input.name }),
1355
- ...(input.tags != null && { tags: serializeAws_json1_0TagList(input.tags, context) }),
1356
- };
1867
+ var serializeAws_json1_0CreateActivityInput = function (input, context) {
1868
+ return __assign(__assign({}, (input.name != null && { name: input.name })), (input.tags != null && { tags: serializeAws_json1_0TagList(input.tags, context) }));
1357
1869
  };
1358
- const serializeAws_json1_0CreateStateMachineInput = (input, context) => {
1359
- return {
1360
- ...(input.definition != null && { definition: input.definition }),
1361
- ...(input.loggingConfiguration != null && {
1362
- loggingConfiguration: serializeAws_json1_0LoggingConfiguration(input.loggingConfiguration, context),
1363
- }),
1364
- ...(input.name != null && { name: input.name }),
1365
- ...(input.roleArn != null && { roleArn: input.roleArn }),
1366
- ...(input.tags != null && { tags: serializeAws_json1_0TagList(input.tags, context) }),
1367
- ...(input.tracingConfiguration != null && {
1368
- tracingConfiguration: serializeAws_json1_0TracingConfiguration(input.tracingConfiguration, context),
1369
- }),
1370
- ...(input.type != null && { type: input.type }),
1371
- };
1870
+ var serializeAws_json1_0CreateStateMachineInput = function (input, context) {
1871
+ return __assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.definition != null && { definition: input.definition })), (input.loggingConfiguration != null && {
1872
+ loggingConfiguration: serializeAws_json1_0LoggingConfiguration(input.loggingConfiguration, context),
1873
+ })), (input.name != null && { name: input.name })), (input.roleArn != null && { roleArn: input.roleArn })), (input.tags != null && { tags: serializeAws_json1_0TagList(input.tags, context) })), (input.tracingConfiguration != null && {
1874
+ tracingConfiguration: serializeAws_json1_0TracingConfiguration(input.tracingConfiguration, context),
1875
+ })), (input.type != null && { type: input.type }));
1372
1876
  };
1373
- const serializeAws_json1_0DeleteActivityInput = (input, context) => {
1374
- return {
1375
- ...(input.activityArn != null && { activityArn: input.activityArn }),
1376
- };
1877
+ var serializeAws_json1_0DeleteActivityInput = function (input, context) {
1878
+ return __assign({}, (input.activityArn != null && { activityArn: input.activityArn }));
1377
1879
  };
1378
- const serializeAws_json1_0DeleteStateMachineInput = (input, context) => {
1379
- return {
1380
- ...(input.stateMachineArn != null && { stateMachineArn: input.stateMachineArn }),
1381
- };
1880
+ var serializeAws_json1_0DeleteStateMachineInput = function (input, context) {
1881
+ return __assign({}, (input.stateMachineArn != null && { stateMachineArn: input.stateMachineArn }));
1382
1882
  };
1383
- const serializeAws_json1_0DescribeActivityInput = (input, context) => {
1384
- return {
1385
- ...(input.activityArn != null && { activityArn: input.activityArn }),
1386
- };
1883
+ var serializeAws_json1_0DescribeActivityInput = function (input, context) {
1884
+ return __assign({}, (input.activityArn != null && { activityArn: input.activityArn }));
1387
1885
  };
1388
- const serializeAws_json1_0DescribeExecutionInput = (input, context) => {
1389
- return {
1390
- ...(input.executionArn != null && { executionArn: input.executionArn }),
1391
- };
1886
+ var serializeAws_json1_0DescribeExecutionInput = function (input, context) {
1887
+ return __assign({}, (input.executionArn != null && { executionArn: input.executionArn }));
1392
1888
  };
1393
- const serializeAws_json1_0DescribeStateMachineForExecutionInput = (input, context) => {
1394
- return {
1395
- ...(input.executionArn != null && { executionArn: input.executionArn }),
1396
- };
1889
+ var serializeAws_json1_0DescribeStateMachineForExecutionInput = function (input, context) {
1890
+ return __assign({}, (input.executionArn != null && { executionArn: input.executionArn }));
1397
1891
  };
1398
- const serializeAws_json1_0DescribeStateMachineInput = (input, context) => {
1399
- return {
1400
- ...(input.stateMachineArn != null && { stateMachineArn: input.stateMachineArn }),
1401
- };
1892
+ var serializeAws_json1_0DescribeStateMachineInput = function (input, context) {
1893
+ return __assign({}, (input.stateMachineArn != null && { stateMachineArn: input.stateMachineArn }));
1402
1894
  };
1403
- const serializeAws_json1_0GetActivityTaskInput = (input, context) => {
1404
- return {
1405
- ...(input.activityArn != null && { activityArn: input.activityArn }),
1406
- ...(input.workerName != null && { workerName: input.workerName }),
1407
- };
1895
+ var serializeAws_json1_0GetActivityTaskInput = function (input, context) {
1896
+ return __assign(__assign({}, (input.activityArn != null && { activityArn: input.activityArn })), (input.workerName != null && { workerName: input.workerName }));
1408
1897
  };
1409
- const serializeAws_json1_0GetExecutionHistoryInput = (input, context) => {
1410
- return {
1411
- ...(input.executionArn != null && { executionArn: input.executionArn }),
1412
- ...(input.includeExecutionData != null && { includeExecutionData: input.includeExecutionData }),
1413
- ...(input.maxResults != null && { maxResults: input.maxResults }),
1414
- ...(input.nextToken != null && { nextToken: input.nextToken }),
1415
- ...(input.reverseOrder != null && { reverseOrder: input.reverseOrder }),
1416
- };
1898
+ var serializeAws_json1_0GetExecutionHistoryInput = function (input, context) {
1899
+ return __assign(__assign(__assign(__assign(__assign({}, (input.executionArn != null && { executionArn: input.executionArn })), (input.includeExecutionData != null && { includeExecutionData: input.includeExecutionData })), (input.maxResults != null && { maxResults: input.maxResults })), (input.nextToken != null && { nextToken: input.nextToken })), (input.reverseOrder != null && { reverseOrder: input.reverseOrder }));
1417
1900
  };
1418
- const serializeAws_json1_0ListActivitiesInput = (input, context) => {
1419
- return {
1420
- ...(input.maxResults != null && { maxResults: input.maxResults }),
1421
- ...(input.nextToken != null && { nextToken: input.nextToken }),
1422
- };
1901
+ var serializeAws_json1_0ListActivitiesInput = function (input, context) {
1902
+ return __assign(__assign({}, (input.maxResults != null && { maxResults: input.maxResults })), (input.nextToken != null && { nextToken: input.nextToken }));
1423
1903
  };
1424
- const serializeAws_json1_0ListExecutionsInput = (input, context) => {
1425
- return {
1426
- ...(input.maxResults != null && { maxResults: input.maxResults }),
1427
- ...(input.nextToken != null && { nextToken: input.nextToken }),
1428
- ...(input.stateMachineArn != null && { stateMachineArn: input.stateMachineArn }),
1429
- ...(input.statusFilter != null && { statusFilter: input.statusFilter }),
1430
- };
1904
+ var serializeAws_json1_0ListExecutionsInput = function (input, context) {
1905
+ return __assign(__assign(__assign(__assign({}, (input.maxResults != null && { maxResults: input.maxResults })), (input.nextToken != null && { nextToken: input.nextToken })), (input.stateMachineArn != null && { stateMachineArn: input.stateMachineArn })), (input.statusFilter != null && { statusFilter: input.statusFilter }));
1431
1906
  };
1432
- const serializeAws_json1_0ListStateMachinesInput = (input, context) => {
1433
- return {
1434
- ...(input.maxResults != null && { maxResults: input.maxResults }),
1435
- ...(input.nextToken != null && { nextToken: input.nextToken }),
1436
- };
1907
+ var serializeAws_json1_0ListStateMachinesInput = function (input, context) {
1908
+ return __assign(__assign({}, (input.maxResults != null && { maxResults: input.maxResults })), (input.nextToken != null && { nextToken: input.nextToken }));
1437
1909
  };
1438
- const serializeAws_json1_0ListTagsForResourceInput = (input, context) => {
1439
- return {
1440
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
1441
- };
1910
+ var serializeAws_json1_0ListTagsForResourceInput = function (input, context) {
1911
+ return __assign({}, (input.resourceArn != null && { resourceArn: input.resourceArn }));
1442
1912
  };
1443
- const serializeAws_json1_0LogDestination = (input, context) => {
1444
- return {
1445
- ...(input.cloudWatchLogsLogGroup != null && {
1446
- cloudWatchLogsLogGroup: serializeAws_json1_0CloudWatchLogsLogGroup(input.cloudWatchLogsLogGroup, context),
1447
- }),
1448
- };
1913
+ var serializeAws_json1_0LogDestination = function (input, context) {
1914
+ return __assign({}, (input.cloudWatchLogsLogGroup != null && {
1915
+ cloudWatchLogsLogGroup: serializeAws_json1_0CloudWatchLogsLogGroup(input.cloudWatchLogsLogGroup, context),
1916
+ }));
1449
1917
  };
1450
- const serializeAws_json1_0LogDestinationList = (input, context) => {
1918
+ var serializeAws_json1_0LogDestinationList = function (input, context) {
1451
1919
  return input
1452
- .filter((e) => e != null)
1453
- .map((entry) => {
1920
+ .filter(function (e) { return e != null; })
1921
+ .map(function (entry) {
1454
1922
  return serializeAws_json1_0LogDestination(entry, context);
1455
1923
  });
1456
1924
  };
1457
- const serializeAws_json1_0LoggingConfiguration = (input, context) => {
1458
- return {
1459
- ...(input.destinations != null && {
1460
- destinations: serializeAws_json1_0LogDestinationList(input.destinations, context),
1461
- }),
1462
- ...(input.includeExecutionData != null && { includeExecutionData: input.includeExecutionData }),
1463
- ...(input.level != null && { level: input.level }),
1464
- };
1925
+ var serializeAws_json1_0LoggingConfiguration = function (input, context) {
1926
+ return __assign(__assign(__assign({}, (input.destinations != null && {
1927
+ destinations: serializeAws_json1_0LogDestinationList(input.destinations, context),
1928
+ })), (input.includeExecutionData != null && { includeExecutionData: input.includeExecutionData })), (input.level != null && { level: input.level }));
1465
1929
  };
1466
- const serializeAws_json1_0SendTaskFailureInput = (input, context) => {
1467
- return {
1468
- ...(input.cause != null && { cause: input.cause }),
1469
- ...(input.error != null && { error: input.error }),
1470
- ...(input.taskToken != null && { taskToken: input.taskToken }),
1471
- };
1930
+ var serializeAws_json1_0SendTaskFailureInput = function (input, context) {
1931
+ return __assign(__assign(__assign({}, (input.cause != null && { cause: input.cause })), (input.error != null && { error: input.error })), (input.taskToken != null && { taskToken: input.taskToken }));
1472
1932
  };
1473
- const serializeAws_json1_0SendTaskHeartbeatInput = (input, context) => {
1474
- return {
1475
- ...(input.taskToken != null && { taskToken: input.taskToken }),
1476
- };
1933
+ var serializeAws_json1_0SendTaskHeartbeatInput = function (input, context) {
1934
+ return __assign({}, (input.taskToken != null && { taskToken: input.taskToken }));
1477
1935
  };
1478
- const serializeAws_json1_0SendTaskSuccessInput = (input, context) => {
1479
- return {
1480
- ...(input.output != null && { output: input.output }),
1481
- ...(input.taskToken != null && { taskToken: input.taskToken }),
1482
- };
1936
+ var serializeAws_json1_0SendTaskSuccessInput = function (input, context) {
1937
+ return __assign(__assign({}, (input.output != null && { output: input.output })), (input.taskToken != null && { taskToken: input.taskToken }));
1483
1938
  };
1484
- const serializeAws_json1_0StartExecutionInput = (input, context) => {
1485
- return {
1486
- ...(input.input != null && { input: input.input }),
1487
- ...(input.name != null && { name: input.name }),
1488
- ...(input.stateMachineArn != null && { stateMachineArn: input.stateMachineArn }),
1489
- ...(input.traceHeader != null && { traceHeader: input.traceHeader }),
1490
- };
1939
+ var serializeAws_json1_0StartExecutionInput = function (input, context) {
1940
+ return __assign(__assign(__assign(__assign({}, (input.input != null && { input: input.input })), (input.name != null && { name: input.name })), (input.stateMachineArn != null && { stateMachineArn: input.stateMachineArn })), (input.traceHeader != null && { traceHeader: input.traceHeader }));
1491
1941
  };
1492
- const serializeAws_json1_0StartSyncExecutionInput = (input, context) => {
1493
- return {
1494
- ...(input.input != null && { input: input.input }),
1495
- ...(input.name != null && { name: input.name }),
1496
- ...(input.stateMachineArn != null && { stateMachineArn: input.stateMachineArn }),
1497
- ...(input.traceHeader != null && { traceHeader: input.traceHeader }),
1498
- };
1942
+ var serializeAws_json1_0StartSyncExecutionInput = function (input, context) {
1943
+ return __assign(__assign(__assign(__assign({}, (input.input != null && { input: input.input })), (input.name != null && { name: input.name })), (input.stateMachineArn != null && { stateMachineArn: input.stateMachineArn })), (input.traceHeader != null && { traceHeader: input.traceHeader }));
1499
1944
  };
1500
- const serializeAws_json1_0StopExecutionInput = (input, context) => {
1501
- return {
1502
- ...(input.cause != null && { cause: input.cause }),
1503
- ...(input.error != null && { error: input.error }),
1504
- ...(input.executionArn != null && { executionArn: input.executionArn }),
1505
- };
1945
+ var serializeAws_json1_0StopExecutionInput = function (input, context) {
1946
+ return __assign(__assign(__assign({}, (input.cause != null && { cause: input.cause })), (input.error != null && { error: input.error })), (input.executionArn != null && { executionArn: input.executionArn }));
1506
1947
  };
1507
- const serializeAws_json1_0Tag = (input, context) => {
1508
- return {
1509
- ...(input.key != null && { key: input.key }),
1510
- ...(input.value != null && { value: input.value }),
1511
- };
1948
+ var serializeAws_json1_0Tag = function (input, context) {
1949
+ return __assign(__assign({}, (input.key != null && { key: input.key })), (input.value != null && { value: input.value }));
1512
1950
  };
1513
- const serializeAws_json1_0TagKeyList = (input, context) => {
1951
+ var serializeAws_json1_0TagKeyList = function (input, context) {
1514
1952
  return input
1515
- .filter((e) => e != null)
1516
- .map((entry) => {
1953
+ .filter(function (e) { return e != null; })
1954
+ .map(function (entry) {
1517
1955
  return entry;
1518
1956
  });
1519
1957
  };
1520
- const serializeAws_json1_0TagList = (input, context) => {
1958
+ var serializeAws_json1_0TagList = function (input, context) {
1521
1959
  return input
1522
- .filter((e) => e != null)
1523
- .map((entry) => {
1960
+ .filter(function (e) { return e != null; })
1961
+ .map(function (entry) {
1524
1962
  return serializeAws_json1_0Tag(entry, context);
1525
1963
  });
1526
1964
  };
1527
- const serializeAws_json1_0TagResourceInput = (input, context) => {
1528
- return {
1529
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
1530
- ...(input.tags != null && { tags: serializeAws_json1_0TagList(input.tags, context) }),
1531
- };
1965
+ var serializeAws_json1_0TagResourceInput = function (input, context) {
1966
+ return __assign(__assign({}, (input.resourceArn != null && { resourceArn: input.resourceArn })), (input.tags != null && { tags: serializeAws_json1_0TagList(input.tags, context) }));
1532
1967
  };
1533
- const serializeAws_json1_0TracingConfiguration = (input, context) => {
1534
- return {
1535
- ...(input.enabled != null && { enabled: input.enabled }),
1536
- };
1968
+ var serializeAws_json1_0TracingConfiguration = function (input, context) {
1969
+ return __assign({}, (input.enabled != null && { enabled: input.enabled }));
1537
1970
  };
1538
- const serializeAws_json1_0UntagResourceInput = (input, context) => {
1539
- return {
1540
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
1541
- ...(input.tagKeys != null && { tagKeys: serializeAws_json1_0TagKeyList(input.tagKeys, context) }),
1542
- };
1971
+ var serializeAws_json1_0UntagResourceInput = function (input, context) {
1972
+ return __assign(__assign({}, (input.resourceArn != null && { resourceArn: input.resourceArn })), (input.tagKeys != null && { tagKeys: serializeAws_json1_0TagKeyList(input.tagKeys, context) }));
1543
1973
  };
1544
- const serializeAws_json1_0UpdateStateMachineInput = (input, context) => {
1545
- return {
1546
- ...(input.definition != null && { definition: input.definition }),
1547
- ...(input.loggingConfiguration != null && {
1548
- loggingConfiguration: serializeAws_json1_0LoggingConfiguration(input.loggingConfiguration, context),
1549
- }),
1550
- ...(input.roleArn != null && { roleArn: input.roleArn }),
1551
- ...(input.stateMachineArn != null && { stateMachineArn: input.stateMachineArn }),
1552
- ...(input.tracingConfiguration != null && {
1553
- tracingConfiguration: serializeAws_json1_0TracingConfiguration(input.tracingConfiguration, context),
1554
- }),
1555
- };
1974
+ var serializeAws_json1_0UpdateStateMachineInput = function (input, context) {
1975
+ return __assign(__assign(__assign(__assign(__assign({}, (input.definition != null && { definition: input.definition })), (input.loggingConfiguration != null && {
1976
+ loggingConfiguration: serializeAws_json1_0LoggingConfiguration(input.loggingConfiguration, context),
1977
+ })), (input.roleArn != null && { roleArn: input.roleArn })), (input.stateMachineArn != null && { stateMachineArn: input.stateMachineArn })), (input.tracingConfiguration != null && {
1978
+ tracingConfiguration: serializeAws_json1_0TracingConfiguration(input.tracingConfiguration, context),
1979
+ }));
1556
1980
  };
1557
- const deserializeAws_json1_0ActivityDoesNotExist = (output, context) => {
1981
+ var deserializeAws_json1_0ActivityDoesNotExist = function (output, context) {
1558
1982
  return {
1559
1983
  message: __expectString(output.message),
1560
1984
  };
1561
1985
  };
1562
- const deserializeAws_json1_0ActivityFailedEventDetails = (output, context) => {
1986
+ var deserializeAws_json1_0ActivityFailedEventDetails = function (output, context) {
1563
1987
  return {
1564
1988
  cause: __expectString(output.cause),
1565
1989
  error: __expectString(output.error),
1566
1990
  };
1567
1991
  };
1568
- const deserializeAws_json1_0ActivityLimitExceeded = (output, context) => {
1992
+ var deserializeAws_json1_0ActivityLimitExceeded = function (output, context) {
1569
1993
  return {
1570
1994
  message: __expectString(output.message),
1571
1995
  };
1572
1996
  };
1573
- const deserializeAws_json1_0ActivityList = (output, context) => {
1574
- const retVal = (output || [])
1575
- .filter((e) => e != null)
1576
- .map((entry) => {
1997
+ var deserializeAws_json1_0ActivityList = function (output, context) {
1998
+ var retVal = (output || [])
1999
+ .filter(function (e) { return e != null; })
2000
+ .map(function (entry) {
1577
2001
  if (entry === null) {
1578
2002
  return null;
1579
2003
  }
@@ -1581,7 +2005,7 @@ const deserializeAws_json1_0ActivityList = (output, context) => {
1581
2005
  });
1582
2006
  return retVal;
1583
2007
  };
1584
- const deserializeAws_json1_0ActivityListItem = (output, context) => {
2008
+ var deserializeAws_json1_0ActivityListItem = function (output, context) {
1585
2009
  return {
1586
2010
  activityArn: __expectString(output.activityArn),
1587
2011
  creationDate: output.creationDate != null
@@ -1590,7 +2014,7 @@ const deserializeAws_json1_0ActivityListItem = (output, context) => {
1590
2014
  name: __expectString(output.name),
1591
2015
  };
1592
2016
  };
1593
- const deserializeAws_json1_0ActivityScheduledEventDetails = (output, context) => {
2017
+ var deserializeAws_json1_0ActivityScheduledEventDetails = function (output, context) {
1594
2018
  return {
1595
2019
  heartbeatInSeconds: __expectLong(output.heartbeatInSeconds),
1596
2020
  input: __expectString(output.input),
@@ -1601,18 +2025,18 @@ const deserializeAws_json1_0ActivityScheduledEventDetails = (output, context) =>
1601
2025
  timeoutInSeconds: __expectLong(output.timeoutInSeconds),
1602
2026
  };
1603
2027
  };
1604
- const deserializeAws_json1_0ActivityScheduleFailedEventDetails = (output, context) => {
2028
+ var deserializeAws_json1_0ActivityScheduleFailedEventDetails = function (output, context) {
1605
2029
  return {
1606
2030
  cause: __expectString(output.cause),
1607
2031
  error: __expectString(output.error),
1608
2032
  };
1609
2033
  };
1610
- const deserializeAws_json1_0ActivityStartedEventDetails = (output, context) => {
2034
+ var deserializeAws_json1_0ActivityStartedEventDetails = function (output, context) {
1611
2035
  return {
1612
2036
  workerName: __expectString(output.workerName),
1613
2037
  };
1614
2038
  };
1615
- const deserializeAws_json1_0ActivitySucceededEventDetails = (output, context) => {
2039
+ var deserializeAws_json1_0ActivitySucceededEventDetails = function (output, context) {
1616
2040
  return {
1617
2041
  output: __expectString(output.output),
1618
2042
  outputDetails: output.outputDetails != null
@@ -1620,34 +2044,34 @@ const deserializeAws_json1_0ActivitySucceededEventDetails = (output, context) =>
1620
2044
  : undefined,
1621
2045
  };
1622
2046
  };
1623
- const deserializeAws_json1_0ActivityTimedOutEventDetails = (output, context) => {
2047
+ var deserializeAws_json1_0ActivityTimedOutEventDetails = function (output, context) {
1624
2048
  return {
1625
2049
  cause: __expectString(output.cause),
1626
2050
  error: __expectString(output.error),
1627
2051
  };
1628
2052
  };
1629
- const deserializeAws_json1_0ActivityWorkerLimitExceeded = (output, context) => {
2053
+ var deserializeAws_json1_0ActivityWorkerLimitExceeded = function (output, context) {
1630
2054
  return {
1631
2055
  message: __expectString(output.message),
1632
2056
  };
1633
2057
  };
1634
- const deserializeAws_json1_0BillingDetails = (output, context) => {
2058
+ var deserializeAws_json1_0BillingDetails = function (output, context) {
1635
2059
  return {
1636
2060
  billedDurationInMilliseconds: __expectLong(output.billedDurationInMilliseconds),
1637
2061
  billedMemoryUsedInMB: __expectLong(output.billedMemoryUsedInMB),
1638
2062
  };
1639
2063
  };
1640
- const deserializeAws_json1_0CloudWatchEventsExecutionDataDetails = (output, context) => {
2064
+ var deserializeAws_json1_0CloudWatchEventsExecutionDataDetails = function (output, context) {
1641
2065
  return {
1642
2066
  included: __expectBoolean(output.included),
1643
2067
  };
1644
2068
  };
1645
- const deserializeAws_json1_0CloudWatchLogsLogGroup = (output, context) => {
2069
+ var deserializeAws_json1_0CloudWatchLogsLogGroup = function (output, context) {
1646
2070
  return {
1647
2071
  logGroupArn: __expectString(output.logGroupArn),
1648
2072
  };
1649
2073
  };
1650
- const deserializeAws_json1_0CreateActivityOutput = (output, context) => {
2074
+ var deserializeAws_json1_0CreateActivityOutput = function (output, context) {
1651
2075
  return {
1652
2076
  activityArn: __expectString(output.activityArn),
1653
2077
  creationDate: output.creationDate != null
@@ -1655,7 +2079,7 @@ const deserializeAws_json1_0CreateActivityOutput = (output, context) => {
1655
2079
  : undefined,
1656
2080
  };
1657
2081
  };
1658
- const deserializeAws_json1_0CreateStateMachineOutput = (output, context) => {
2082
+ var deserializeAws_json1_0CreateStateMachineOutput = function (output, context) {
1659
2083
  return {
1660
2084
  creationDate: output.creationDate != null
1661
2085
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDate)))
@@ -1663,13 +2087,13 @@ const deserializeAws_json1_0CreateStateMachineOutput = (output, context) => {
1663
2087
  stateMachineArn: __expectString(output.stateMachineArn),
1664
2088
  };
1665
2089
  };
1666
- const deserializeAws_json1_0DeleteActivityOutput = (output, context) => {
2090
+ var deserializeAws_json1_0DeleteActivityOutput = function (output, context) {
1667
2091
  return {};
1668
2092
  };
1669
- const deserializeAws_json1_0DeleteStateMachineOutput = (output, context) => {
2093
+ var deserializeAws_json1_0DeleteStateMachineOutput = function (output, context) {
1670
2094
  return {};
1671
2095
  };
1672
- const deserializeAws_json1_0DescribeActivityOutput = (output, context) => {
2096
+ var deserializeAws_json1_0DescribeActivityOutput = function (output, context) {
1673
2097
  return {
1674
2098
  activityArn: __expectString(output.activityArn),
1675
2099
  creationDate: output.creationDate != null
@@ -1678,7 +2102,7 @@ const deserializeAws_json1_0DescribeActivityOutput = (output, context) => {
1678
2102
  name: __expectString(output.name),
1679
2103
  };
1680
2104
  };
1681
- const deserializeAws_json1_0DescribeExecutionOutput = (output, context) => {
2105
+ var deserializeAws_json1_0DescribeExecutionOutput = function (output, context) {
1682
2106
  return {
1683
2107
  executionArn: __expectString(output.executionArn),
1684
2108
  input: __expectString(output.input),
@@ -1697,7 +2121,7 @@ const deserializeAws_json1_0DescribeExecutionOutput = (output, context) => {
1697
2121
  traceHeader: __expectString(output.traceHeader),
1698
2122
  };
1699
2123
  };
1700
- const deserializeAws_json1_0DescribeStateMachineForExecutionOutput = (output, context) => {
2124
+ var deserializeAws_json1_0DescribeStateMachineForExecutionOutput = function (output, context) {
1701
2125
  return {
1702
2126
  definition: __expectString(output.definition),
1703
2127
  loggingConfiguration: output.loggingConfiguration != null
@@ -1712,7 +2136,7 @@ const deserializeAws_json1_0DescribeStateMachineForExecutionOutput = (output, co
1712
2136
  updateDate: output.updateDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updateDate))) : undefined,
1713
2137
  };
1714
2138
  };
1715
- const deserializeAws_json1_0DescribeStateMachineOutput = (output, context) => {
2139
+ var deserializeAws_json1_0DescribeStateMachineOutput = function (output, context) {
1716
2140
  return {
1717
2141
  creationDate: output.creationDate != null
1718
2142
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDate)))
@@ -1731,37 +2155,37 @@ const deserializeAws_json1_0DescribeStateMachineOutput = (output, context) => {
1731
2155
  type: __expectString(output.type),
1732
2156
  };
1733
2157
  };
1734
- const deserializeAws_json1_0ExecutionAbortedEventDetails = (output, context) => {
2158
+ var deserializeAws_json1_0ExecutionAbortedEventDetails = function (output, context) {
1735
2159
  return {
1736
2160
  cause: __expectString(output.cause),
1737
2161
  error: __expectString(output.error),
1738
2162
  };
1739
2163
  };
1740
- const deserializeAws_json1_0ExecutionAlreadyExists = (output, context) => {
2164
+ var deserializeAws_json1_0ExecutionAlreadyExists = function (output, context) {
1741
2165
  return {
1742
2166
  message: __expectString(output.message),
1743
2167
  };
1744
2168
  };
1745
- const deserializeAws_json1_0ExecutionDoesNotExist = (output, context) => {
2169
+ var deserializeAws_json1_0ExecutionDoesNotExist = function (output, context) {
1746
2170
  return {
1747
2171
  message: __expectString(output.message),
1748
2172
  };
1749
2173
  };
1750
- const deserializeAws_json1_0ExecutionFailedEventDetails = (output, context) => {
2174
+ var deserializeAws_json1_0ExecutionFailedEventDetails = function (output, context) {
1751
2175
  return {
1752
2176
  cause: __expectString(output.cause),
1753
2177
  error: __expectString(output.error),
1754
2178
  };
1755
2179
  };
1756
- const deserializeAws_json1_0ExecutionLimitExceeded = (output, context) => {
2180
+ var deserializeAws_json1_0ExecutionLimitExceeded = function (output, context) {
1757
2181
  return {
1758
2182
  message: __expectString(output.message),
1759
2183
  };
1760
2184
  };
1761
- const deserializeAws_json1_0ExecutionList = (output, context) => {
1762
- const retVal = (output || [])
1763
- .filter((e) => e != null)
1764
- .map((entry) => {
2185
+ var deserializeAws_json1_0ExecutionList = function (output, context) {
2186
+ var retVal = (output || [])
2187
+ .filter(function (e) { return e != null; })
2188
+ .map(function (entry) {
1765
2189
  if (entry === null) {
1766
2190
  return null;
1767
2191
  }
@@ -1769,7 +2193,7 @@ const deserializeAws_json1_0ExecutionList = (output, context) => {
1769
2193
  });
1770
2194
  return retVal;
1771
2195
  };
1772
- const deserializeAws_json1_0ExecutionListItem = (output, context) => {
2196
+ var deserializeAws_json1_0ExecutionListItem = function (output, context) {
1773
2197
  return {
1774
2198
  executionArn: __expectString(output.executionArn),
1775
2199
  name: __expectString(output.name),
@@ -1779,7 +2203,7 @@ const deserializeAws_json1_0ExecutionListItem = (output, context) => {
1779
2203
  stopDate: output.stopDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.stopDate))) : undefined,
1780
2204
  };
1781
2205
  };
1782
- const deserializeAws_json1_0ExecutionStartedEventDetails = (output, context) => {
2206
+ var deserializeAws_json1_0ExecutionStartedEventDetails = function (output, context) {
1783
2207
  return {
1784
2208
  input: __expectString(output.input),
1785
2209
  inputDetails: output.inputDetails != null
@@ -1788,7 +2212,7 @@ const deserializeAws_json1_0ExecutionStartedEventDetails = (output, context) =>
1788
2212
  roleArn: __expectString(output.roleArn),
1789
2213
  };
1790
2214
  };
1791
- const deserializeAws_json1_0ExecutionSucceededEventDetails = (output, context) => {
2215
+ var deserializeAws_json1_0ExecutionSucceededEventDetails = function (output, context) {
1792
2216
  return {
1793
2217
  output: __expectString(output.output),
1794
2218
  outputDetails: output.outputDetails != null
@@ -1796,25 +2220,25 @@ const deserializeAws_json1_0ExecutionSucceededEventDetails = (output, context) =
1796
2220
  : undefined,
1797
2221
  };
1798
2222
  };
1799
- const deserializeAws_json1_0ExecutionTimedOutEventDetails = (output, context) => {
2223
+ var deserializeAws_json1_0ExecutionTimedOutEventDetails = function (output, context) {
1800
2224
  return {
1801
2225
  cause: __expectString(output.cause),
1802
2226
  error: __expectString(output.error),
1803
2227
  };
1804
2228
  };
1805
- const deserializeAws_json1_0GetActivityTaskOutput = (output, context) => {
2229
+ var deserializeAws_json1_0GetActivityTaskOutput = function (output, context) {
1806
2230
  return {
1807
2231
  input: __expectString(output.input),
1808
2232
  taskToken: __expectString(output.taskToken),
1809
2233
  };
1810
2234
  };
1811
- const deserializeAws_json1_0GetExecutionHistoryOutput = (output, context) => {
2235
+ var deserializeAws_json1_0GetExecutionHistoryOutput = function (output, context) {
1812
2236
  return {
1813
2237
  events: output.events != null ? deserializeAws_json1_0HistoryEventList(output.events, context) : undefined,
1814
2238
  nextToken: __expectString(output.nextToken),
1815
2239
  };
1816
2240
  };
1817
- const deserializeAws_json1_0HistoryEvent = (output, context) => {
2241
+ var deserializeAws_json1_0HistoryEvent = function (output, context) {
1818
2242
  return {
1819
2243
  activityFailedEventDetails: output.activityFailedEventDetails != null
1820
2244
  ? deserializeAws_json1_0ActivityFailedEventDetails(output.activityFailedEventDetails, context)
@@ -1918,15 +2342,15 @@ const deserializeAws_json1_0HistoryEvent = (output, context) => {
1918
2342
  type: __expectString(output.type),
1919
2343
  };
1920
2344
  };
1921
- const deserializeAws_json1_0HistoryEventExecutionDataDetails = (output, context) => {
2345
+ var deserializeAws_json1_0HistoryEventExecutionDataDetails = function (output, context) {
1922
2346
  return {
1923
2347
  truncated: __expectBoolean(output.truncated),
1924
2348
  };
1925
2349
  };
1926
- const deserializeAws_json1_0HistoryEventList = (output, context) => {
1927
- const retVal = (output || [])
1928
- .filter((e) => e != null)
1929
- .map((entry) => {
2350
+ var deserializeAws_json1_0HistoryEventList = function (output, context) {
2351
+ var retVal = (output || [])
2352
+ .filter(function (e) { return e != null; })
2353
+ .map(function (entry) {
1930
2354
  if (entry === null) {
1931
2355
  return null;
1932
2356
  }
@@ -1934,53 +2358,53 @@ const deserializeAws_json1_0HistoryEventList = (output, context) => {
1934
2358
  });
1935
2359
  return retVal;
1936
2360
  };
1937
- const deserializeAws_json1_0InvalidArn = (output, context) => {
2361
+ var deserializeAws_json1_0InvalidArn = function (output, context) {
1938
2362
  return {
1939
2363
  message: __expectString(output.message),
1940
2364
  };
1941
2365
  };
1942
- const deserializeAws_json1_0InvalidDefinition = (output, context) => {
2366
+ var deserializeAws_json1_0InvalidDefinition = function (output, context) {
1943
2367
  return {
1944
2368
  message: __expectString(output.message),
1945
2369
  };
1946
2370
  };
1947
- const deserializeAws_json1_0InvalidExecutionInput = (output, context) => {
2371
+ var deserializeAws_json1_0InvalidExecutionInput = function (output, context) {
1948
2372
  return {
1949
2373
  message: __expectString(output.message),
1950
2374
  };
1951
2375
  };
1952
- const deserializeAws_json1_0InvalidLoggingConfiguration = (output, context) => {
2376
+ var deserializeAws_json1_0InvalidLoggingConfiguration = function (output, context) {
1953
2377
  return {
1954
2378
  message: __expectString(output.message),
1955
2379
  };
1956
2380
  };
1957
- const deserializeAws_json1_0InvalidName = (output, context) => {
2381
+ var deserializeAws_json1_0InvalidName = function (output, context) {
1958
2382
  return {
1959
2383
  message: __expectString(output.message),
1960
2384
  };
1961
2385
  };
1962
- const deserializeAws_json1_0InvalidOutput = (output, context) => {
2386
+ var deserializeAws_json1_0InvalidOutput = function (output, context) {
1963
2387
  return {
1964
2388
  message: __expectString(output.message),
1965
2389
  };
1966
2390
  };
1967
- const deserializeAws_json1_0InvalidToken = (output, context) => {
2391
+ var deserializeAws_json1_0InvalidToken = function (output, context) {
1968
2392
  return {
1969
2393
  message: __expectString(output.message),
1970
2394
  };
1971
2395
  };
1972
- const deserializeAws_json1_0InvalidTracingConfiguration = (output, context) => {
2396
+ var deserializeAws_json1_0InvalidTracingConfiguration = function (output, context) {
1973
2397
  return {
1974
2398
  message: __expectString(output.message),
1975
2399
  };
1976
2400
  };
1977
- const deserializeAws_json1_0LambdaFunctionFailedEventDetails = (output, context) => {
2401
+ var deserializeAws_json1_0LambdaFunctionFailedEventDetails = function (output, context) {
1978
2402
  return {
1979
2403
  cause: __expectString(output.cause),
1980
2404
  error: __expectString(output.error),
1981
2405
  };
1982
2406
  };
1983
- const deserializeAws_json1_0LambdaFunctionScheduledEventDetails = (output, context) => {
2407
+ var deserializeAws_json1_0LambdaFunctionScheduledEventDetails = function (output, context) {
1984
2408
  return {
1985
2409
  input: __expectString(output.input),
1986
2410
  inputDetails: output.inputDetails != null
@@ -1990,19 +2414,19 @@ const deserializeAws_json1_0LambdaFunctionScheduledEventDetails = (output, conte
1990
2414
  timeoutInSeconds: __expectLong(output.timeoutInSeconds),
1991
2415
  };
1992
2416
  };
1993
- const deserializeAws_json1_0LambdaFunctionScheduleFailedEventDetails = (output, context) => {
2417
+ var deserializeAws_json1_0LambdaFunctionScheduleFailedEventDetails = function (output, context) {
1994
2418
  return {
1995
2419
  cause: __expectString(output.cause),
1996
2420
  error: __expectString(output.error),
1997
2421
  };
1998
2422
  };
1999
- const deserializeAws_json1_0LambdaFunctionStartFailedEventDetails = (output, context) => {
2423
+ var deserializeAws_json1_0LambdaFunctionStartFailedEventDetails = function (output, context) {
2000
2424
  return {
2001
2425
  cause: __expectString(output.cause),
2002
2426
  error: __expectString(output.error),
2003
2427
  };
2004
2428
  };
2005
- const deserializeAws_json1_0LambdaFunctionSucceededEventDetails = (output, context) => {
2429
+ var deserializeAws_json1_0LambdaFunctionSucceededEventDetails = function (output, context) {
2006
2430
  return {
2007
2431
  output: __expectString(output.output),
2008
2432
  outputDetails: output.outputDetails != null
@@ -2010,46 +2434,46 @@ const deserializeAws_json1_0LambdaFunctionSucceededEventDetails = (output, conte
2010
2434
  : undefined,
2011
2435
  };
2012
2436
  };
2013
- const deserializeAws_json1_0LambdaFunctionTimedOutEventDetails = (output, context) => {
2437
+ var deserializeAws_json1_0LambdaFunctionTimedOutEventDetails = function (output, context) {
2014
2438
  return {
2015
2439
  cause: __expectString(output.cause),
2016
2440
  error: __expectString(output.error),
2017
2441
  };
2018
2442
  };
2019
- const deserializeAws_json1_0ListActivitiesOutput = (output, context) => {
2443
+ var deserializeAws_json1_0ListActivitiesOutput = function (output, context) {
2020
2444
  return {
2021
2445
  activities: output.activities != null ? deserializeAws_json1_0ActivityList(output.activities, context) : undefined,
2022
2446
  nextToken: __expectString(output.nextToken),
2023
2447
  };
2024
2448
  };
2025
- const deserializeAws_json1_0ListExecutionsOutput = (output, context) => {
2449
+ var deserializeAws_json1_0ListExecutionsOutput = function (output, context) {
2026
2450
  return {
2027
2451
  executions: output.executions != null ? deserializeAws_json1_0ExecutionList(output.executions, context) : undefined,
2028
2452
  nextToken: __expectString(output.nextToken),
2029
2453
  };
2030
2454
  };
2031
- const deserializeAws_json1_0ListStateMachinesOutput = (output, context) => {
2455
+ var deserializeAws_json1_0ListStateMachinesOutput = function (output, context) {
2032
2456
  return {
2033
2457
  nextToken: __expectString(output.nextToken),
2034
2458
  stateMachines: output.stateMachines != null ? deserializeAws_json1_0StateMachineList(output.stateMachines, context) : undefined,
2035
2459
  };
2036
2460
  };
2037
- const deserializeAws_json1_0ListTagsForResourceOutput = (output, context) => {
2461
+ var deserializeAws_json1_0ListTagsForResourceOutput = function (output, context) {
2038
2462
  return {
2039
2463
  tags: output.tags != null ? deserializeAws_json1_0TagList(output.tags, context) : undefined,
2040
2464
  };
2041
2465
  };
2042
- const deserializeAws_json1_0LogDestination = (output, context) => {
2466
+ var deserializeAws_json1_0LogDestination = function (output, context) {
2043
2467
  return {
2044
2468
  cloudWatchLogsLogGroup: output.cloudWatchLogsLogGroup != null
2045
2469
  ? deserializeAws_json1_0CloudWatchLogsLogGroup(output.cloudWatchLogsLogGroup, context)
2046
2470
  : undefined,
2047
2471
  };
2048
2472
  };
2049
- const deserializeAws_json1_0LogDestinationList = (output, context) => {
2050
- const retVal = (output || [])
2051
- .filter((e) => e != null)
2052
- .map((entry) => {
2473
+ var deserializeAws_json1_0LogDestinationList = function (output, context) {
2474
+ var retVal = (output || [])
2475
+ .filter(function (e) { return e != null; })
2476
+ .map(function (entry) {
2053
2477
  if (entry === null) {
2054
2478
  return null;
2055
2479
  }
@@ -2057,51 +2481,51 @@ const deserializeAws_json1_0LogDestinationList = (output, context) => {
2057
2481
  });
2058
2482
  return retVal;
2059
2483
  };
2060
- const deserializeAws_json1_0LoggingConfiguration = (output, context) => {
2484
+ var deserializeAws_json1_0LoggingConfiguration = function (output, context) {
2061
2485
  return {
2062
2486
  destinations: output.destinations != null ? deserializeAws_json1_0LogDestinationList(output.destinations, context) : undefined,
2063
2487
  includeExecutionData: __expectBoolean(output.includeExecutionData),
2064
2488
  level: __expectString(output.level),
2065
2489
  };
2066
2490
  };
2067
- const deserializeAws_json1_0MapIterationEventDetails = (output, context) => {
2491
+ var deserializeAws_json1_0MapIterationEventDetails = function (output, context) {
2068
2492
  return {
2069
2493
  index: __expectInt32(output.index),
2070
2494
  name: __expectString(output.name),
2071
2495
  };
2072
2496
  };
2073
- const deserializeAws_json1_0MapStateStartedEventDetails = (output, context) => {
2497
+ var deserializeAws_json1_0MapStateStartedEventDetails = function (output, context) {
2074
2498
  return {
2075
2499
  length: __expectInt32(output.length),
2076
2500
  };
2077
2501
  };
2078
- const deserializeAws_json1_0MissingRequiredParameter = (output, context) => {
2502
+ var deserializeAws_json1_0MissingRequiredParameter = function (output, context) {
2079
2503
  return {
2080
2504
  message: __expectString(output.message),
2081
2505
  };
2082
2506
  };
2083
- const deserializeAws_json1_0ResourceNotFound = (output, context) => {
2507
+ var deserializeAws_json1_0ResourceNotFound = function (output, context) {
2084
2508
  return {
2085
2509
  message: __expectString(output.message),
2086
2510
  resourceName: __expectString(output.resourceName),
2087
2511
  };
2088
2512
  };
2089
- const deserializeAws_json1_0SendTaskFailureOutput = (output, context) => {
2513
+ var deserializeAws_json1_0SendTaskFailureOutput = function (output, context) {
2090
2514
  return {};
2091
2515
  };
2092
- const deserializeAws_json1_0SendTaskHeartbeatOutput = (output, context) => {
2516
+ var deserializeAws_json1_0SendTaskHeartbeatOutput = function (output, context) {
2093
2517
  return {};
2094
2518
  };
2095
- const deserializeAws_json1_0SendTaskSuccessOutput = (output, context) => {
2519
+ var deserializeAws_json1_0SendTaskSuccessOutput = function (output, context) {
2096
2520
  return {};
2097
2521
  };
2098
- const deserializeAws_json1_0StartExecutionOutput = (output, context) => {
2522
+ var deserializeAws_json1_0StartExecutionOutput = function (output, context) {
2099
2523
  return {
2100
2524
  executionArn: __expectString(output.executionArn),
2101
2525
  startDate: output.startDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startDate))) : undefined,
2102
2526
  };
2103
2527
  };
2104
- const deserializeAws_json1_0StartSyncExecutionOutput = (output, context) => {
2528
+ var deserializeAws_json1_0StartSyncExecutionOutput = function (output, context) {
2105
2529
  return {
2106
2530
  billingDetails: output.billingDetails != null ? deserializeAws_json1_0BillingDetails(output.billingDetails, context) : undefined,
2107
2531
  cause: __expectString(output.cause),
@@ -2123,7 +2547,7 @@ const deserializeAws_json1_0StartSyncExecutionOutput = (output, context) => {
2123
2547
  traceHeader: __expectString(output.traceHeader),
2124
2548
  };
2125
2549
  };
2126
- const deserializeAws_json1_0StateEnteredEventDetails = (output, context) => {
2550
+ var deserializeAws_json1_0StateEnteredEventDetails = function (output, context) {
2127
2551
  return {
2128
2552
  input: __expectString(output.input),
2129
2553
  inputDetails: output.inputDetails != null
@@ -2132,7 +2556,7 @@ const deserializeAws_json1_0StateEnteredEventDetails = (output, context) => {
2132
2556
  name: __expectString(output.name),
2133
2557
  };
2134
2558
  };
2135
- const deserializeAws_json1_0StateExitedEventDetails = (output, context) => {
2559
+ var deserializeAws_json1_0StateExitedEventDetails = function (output, context) {
2136
2560
  return {
2137
2561
  name: __expectString(output.name),
2138
2562
  output: __expectString(output.output),
@@ -2141,30 +2565,30 @@ const deserializeAws_json1_0StateExitedEventDetails = (output, context) => {
2141
2565
  : undefined,
2142
2566
  };
2143
2567
  };
2144
- const deserializeAws_json1_0StateMachineAlreadyExists = (output, context) => {
2568
+ var deserializeAws_json1_0StateMachineAlreadyExists = function (output, context) {
2145
2569
  return {
2146
2570
  message: __expectString(output.message),
2147
2571
  };
2148
2572
  };
2149
- const deserializeAws_json1_0StateMachineDeleting = (output, context) => {
2573
+ var deserializeAws_json1_0StateMachineDeleting = function (output, context) {
2150
2574
  return {
2151
2575
  message: __expectString(output.message),
2152
2576
  };
2153
2577
  };
2154
- const deserializeAws_json1_0StateMachineDoesNotExist = (output, context) => {
2578
+ var deserializeAws_json1_0StateMachineDoesNotExist = function (output, context) {
2155
2579
  return {
2156
2580
  message: __expectString(output.message),
2157
2581
  };
2158
2582
  };
2159
- const deserializeAws_json1_0StateMachineLimitExceeded = (output, context) => {
2583
+ var deserializeAws_json1_0StateMachineLimitExceeded = function (output, context) {
2160
2584
  return {
2161
2585
  message: __expectString(output.message),
2162
2586
  };
2163
2587
  };
2164
- const deserializeAws_json1_0StateMachineList = (output, context) => {
2165
- const retVal = (output || [])
2166
- .filter((e) => e != null)
2167
- .map((entry) => {
2588
+ var deserializeAws_json1_0StateMachineList = function (output, context) {
2589
+ var retVal = (output || [])
2590
+ .filter(function (e) { return e != null; })
2591
+ .map(function (entry) {
2168
2592
  if (entry === null) {
2169
2593
  return null;
2170
2594
  }
@@ -2172,7 +2596,7 @@ const deserializeAws_json1_0StateMachineList = (output, context) => {
2172
2596
  });
2173
2597
  return retVal;
2174
2598
  };
2175
- const deserializeAws_json1_0StateMachineListItem = (output, context) => {
2599
+ var deserializeAws_json1_0StateMachineListItem = function (output, context) {
2176
2600
  return {
2177
2601
  creationDate: output.creationDate != null
2178
2602
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDate)))
@@ -2182,26 +2606,26 @@ const deserializeAws_json1_0StateMachineListItem = (output, context) => {
2182
2606
  type: __expectString(output.type),
2183
2607
  };
2184
2608
  };
2185
- const deserializeAws_json1_0StateMachineTypeNotSupported = (output, context) => {
2609
+ var deserializeAws_json1_0StateMachineTypeNotSupported = function (output, context) {
2186
2610
  return {
2187
2611
  message: __expectString(output.message),
2188
2612
  };
2189
2613
  };
2190
- const deserializeAws_json1_0StopExecutionOutput = (output, context) => {
2614
+ var deserializeAws_json1_0StopExecutionOutput = function (output, context) {
2191
2615
  return {
2192
2616
  stopDate: output.stopDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.stopDate))) : undefined,
2193
2617
  };
2194
2618
  };
2195
- const deserializeAws_json1_0Tag = (output, context) => {
2619
+ var deserializeAws_json1_0Tag = function (output, context) {
2196
2620
  return {
2197
2621
  key: __expectString(output.key),
2198
2622
  value: __expectString(output.value),
2199
2623
  };
2200
2624
  };
2201
- const deserializeAws_json1_0TagList = (output, context) => {
2202
- const retVal = (output || [])
2203
- .filter((e) => e != null)
2204
- .map((entry) => {
2625
+ var deserializeAws_json1_0TagList = function (output, context) {
2626
+ var retVal = (output || [])
2627
+ .filter(function (e) { return e != null; })
2628
+ .map(function (entry) {
2205
2629
  if (entry === null) {
2206
2630
  return null;
2207
2631
  }
@@ -2209,15 +2633,15 @@ const deserializeAws_json1_0TagList = (output, context) => {
2209
2633
  });
2210
2634
  return retVal;
2211
2635
  };
2212
- const deserializeAws_json1_0TagResourceOutput = (output, context) => {
2636
+ var deserializeAws_json1_0TagResourceOutput = function (output, context) {
2213
2637
  return {};
2214
2638
  };
2215
- const deserializeAws_json1_0TaskDoesNotExist = (output, context) => {
2639
+ var deserializeAws_json1_0TaskDoesNotExist = function (output, context) {
2216
2640
  return {
2217
2641
  message: __expectString(output.message),
2218
2642
  };
2219
2643
  };
2220
- const deserializeAws_json1_0TaskFailedEventDetails = (output, context) => {
2644
+ var deserializeAws_json1_0TaskFailedEventDetails = function (output, context) {
2221
2645
  return {
2222
2646
  cause: __expectString(output.cause),
2223
2647
  error: __expectString(output.error),
@@ -2225,7 +2649,7 @@ const deserializeAws_json1_0TaskFailedEventDetails = (output, context) => {
2225
2649
  resourceType: __expectString(output.resourceType),
2226
2650
  };
2227
2651
  };
2228
- const deserializeAws_json1_0TaskScheduledEventDetails = (output, context) => {
2652
+ var deserializeAws_json1_0TaskScheduledEventDetails = function (output, context) {
2229
2653
  return {
2230
2654
  heartbeatInSeconds: __expectLong(output.heartbeatInSeconds),
2231
2655
  parameters: __expectString(output.parameters),
@@ -2235,13 +2659,13 @@ const deserializeAws_json1_0TaskScheduledEventDetails = (output, context) => {
2235
2659
  timeoutInSeconds: __expectLong(output.timeoutInSeconds),
2236
2660
  };
2237
2661
  };
2238
- const deserializeAws_json1_0TaskStartedEventDetails = (output, context) => {
2662
+ var deserializeAws_json1_0TaskStartedEventDetails = function (output, context) {
2239
2663
  return {
2240
2664
  resource: __expectString(output.resource),
2241
2665
  resourceType: __expectString(output.resourceType),
2242
2666
  };
2243
2667
  };
2244
- const deserializeAws_json1_0TaskStartFailedEventDetails = (output, context) => {
2668
+ var deserializeAws_json1_0TaskStartFailedEventDetails = function (output, context) {
2245
2669
  return {
2246
2670
  cause: __expectString(output.cause),
2247
2671
  error: __expectString(output.error),
@@ -2249,7 +2673,7 @@ const deserializeAws_json1_0TaskStartFailedEventDetails = (output, context) => {
2249
2673
  resourceType: __expectString(output.resourceType),
2250
2674
  };
2251
2675
  };
2252
- const deserializeAws_json1_0TaskSubmitFailedEventDetails = (output, context) => {
2676
+ var deserializeAws_json1_0TaskSubmitFailedEventDetails = function (output, context) {
2253
2677
  return {
2254
2678
  cause: __expectString(output.cause),
2255
2679
  error: __expectString(output.error),
@@ -2257,7 +2681,7 @@ const deserializeAws_json1_0TaskSubmitFailedEventDetails = (output, context) =>
2257
2681
  resourceType: __expectString(output.resourceType),
2258
2682
  };
2259
2683
  };
2260
- const deserializeAws_json1_0TaskSubmittedEventDetails = (output, context) => {
2684
+ var deserializeAws_json1_0TaskSubmittedEventDetails = function (output, context) {
2261
2685
  return {
2262
2686
  output: __expectString(output.output),
2263
2687
  outputDetails: output.outputDetails != null
@@ -2267,7 +2691,7 @@ const deserializeAws_json1_0TaskSubmittedEventDetails = (output, context) => {
2267
2691
  resourceType: __expectString(output.resourceType),
2268
2692
  };
2269
2693
  };
2270
- const deserializeAws_json1_0TaskSucceededEventDetails = (output, context) => {
2694
+ var deserializeAws_json1_0TaskSucceededEventDetails = function (output, context) {
2271
2695
  return {
2272
2696
  output: __expectString(output.output),
2273
2697
  outputDetails: output.outputDetails != null
@@ -2277,12 +2701,12 @@ const deserializeAws_json1_0TaskSucceededEventDetails = (output, context) => {
2277
2701
  resourceType: __expectString(output.resourceType),
2278
2702
  };
2279
2703
  };
2280
- const deserializeAws_json1_0TaskTimedOut = (output, context) => {
2704
+ var deserializeAws_json1_0TaskTimedOut = function (output, context) {
2281
2705
  return {
2282
2706
  message: __expectString(output.message),
2283
2707
  };
2284
2708
  };
2285
- const deserializeAws_json1_0TaskTimedOutEventDetails = (output, context) => {
2709
+ var deserializeAws_json1_0TaskTimedOutEventDetails = function (output, context) {
2286
2710
  return {
2287
2711
  cause: __expectString(output.cause),
2288
2712
  error: __expectString(output.error),
@@ -2290,71 +2714,94 @@ const deserializeAws_json1_0TaskTimedOutEventDetails = (output, context) => {
2290
2714
  resourceType: __expectString(output.resourceType),
2291
2715
  };
2292
2716
  };
2293
- const deserializeAws_json1_0TooManyTags = (output, context) => {
2717
+ var deserializeAws_json1_0TooManyTags = function (output, context) {
2294
2718
  return {
2295
2719
  message: __expectString(output.message),
2296
2720
  resourceName: __expectString(output.resourceName),
2297
2721
  };
2298
2722
  };
2299
- const deserializeAws_json1_0TracingConfiguration = (output, context) => {
2723
+ var deserializeAws_json1_0TracingConfiguration = function (output, context) {
2300
2724
  return {
2301
2725
  enabled: __expectBoolean(output.enabled),
2302
2726
  };
2303
2727
  };
2304
- const deserializeAws_json1_0UntagResourceOutput = (output, context) => {
2728
+ var deserializeAws_json1_0UntagResourceOutput = function (output, context) {
2305
2729
  return {};
2306
2730
  };
2307
- const deserializeAws_json1_0UpdateStateMachineOutput = (output, context) => {
2731
+ var deserializeAws_json1_0UpdateStateMachineOutput = function (output, context) {
2308
2732
  return {
2309
2733
  updateDate: output.updateDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updateDate))) : undefined,
2310
2734
  };
2311
2735
  };
2312
- const deserializeMetadata = (output) => ({
2313
- httpStatusCode: output.statusCode,
2314
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
2315
- extendedRequestId: output.headers["x-amz-id-2"],
2316
- cfId: output.headers["x-amz-cf-id"],
2317
- });
2318
- const collectBody = (streamBody = new Uint8Array(), context) => {
2736
+ var deserializeMetadata = function (output) {
2737
+ var _a, _b;
2738
+ return ({
2739
+ httpStatusCode: output.statusCode,
2740
+ requestId: (_b = (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"]) !== null && _b !== void 0 ? _b : output.headers["x-amz-request-id"],
2741
+ extendedRequestId: output.headers["x-amz-id-2"],
2742
+ cfId: output.headers["x-amz-cf-id"],
2743
+ });
2744
+ };
2745
+ var collectBody = function (streamBody, context) {
2746
+ if (streamBody === void 0) { streamBody = new Uint8Array(); }
2319
2747
  if (streamBody instanceof Uint8Array) {
2320
2748
  return Promise.resolve(streamBody);
2321
2749
  }
2322
2750
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
2323
2751
  };
2324
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
2325
- const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
2326
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2327
- const contents = {
2328
- protocol,
2329
- hostname,
2330
- port,
2331
- method: "POST",
2332
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
2333
- headers,
2334
- };
2335
- if (resolvedHostname !== undefined) {
2336
- contents.hostname = resolvedHostname;
2337
- }
2338
- if (body !== undefined) {
2339
- contents.body = body;
2340
- }
2341
- return new __HttpRequest(contents);
2752
+ var collectBodyString = function (streamBody, context) {
2753
+ return collectBody(streamBody, context).then(function (body) { return context.utf8Encoder(body); });
2754
+ };
2755
+ var buildHttpRpcRequest = function (context, headers, path, resolvedHostname, body) { return __awaiter(void 0, void 0, void 0, function () {
2756
+ var _a, hostname, _b, protocol, port, basePath, contents;
2757
+ return __generator(this, function (_c) {
2758
+ switch (_c.label) {
2759
+ case 0: return [4, context.endpoint()];
2760
+ case 1:
2761
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
2762
+ contents = {
2763
+ protocol: protocol,
2764
+ hostname: hostname,
2765
+ port: port,
2766
+ method: "POST",
2767
+ path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
2768
+ headers: headers,
2769
+ };
2770
+ if (resolvedHostname !== undefined) {
2771
+ contents.hostname = resolvedHostname;
2772
+ }
2773
+ if (body !== undefined) {
2774
+ contents.body = body;
2775
+ }
2776
+ return [2, new __HttpRequest(contents)];
2777
+ }
2778
+ });
2779
+ }); };
2780
+ var parseBody = function (streamBody, context) {
2781
+ return collectBodyString(streamBody, context).then(function (encoded) {
2782
+ if (encoded.length) {
2783
+ return JSON.parse(encoded);
2784
+ }
2785
+ return {};
2786
+ });
2342
2787
  };
2343
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2344
- if (encoded.length) {
2345
- return JSON.parse(encoded);
2346
- }
2347
- return {};
2348
- });
2349
- const parseErrorBody = async (errorBody, context) => {
2350
- const value = await parseBody(errorBody, context);
2351
- value.message = value.message ?? value.Message;
2352
- return value;
2353
- };
2354
- const loadRestJsonErrorCode = (output, data) => {
2355
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
2356
- const sanitizeErrorCode = (rawValue) => {
2357
- let cleanValue = rawValue;
2788
+ var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
2789
+ var value;
2790
+ var _a;
2791
+ return __generator(this, function (_b) {
2792
+ switch (_b.label) {
2793
+ case 0: return [4, parseBody(errorBody, context)];
2794
+ case 1:
2795
+ value = _b.sent();
2796
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
2797
+ return [2, value];
2798
+ }
2799
+ });
2800
+ }); };
2801
+ var loadRestJsonErrorCode = function (output, data) {
2802
+ var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
2803
+ var sanitizeErrorCode = function (rawValue) {
2804
+ var cleanValue = rawValue;
2358
2805
  if (typeof cleanValue === "number") {
2359
2806
  cleanValue = cleanValue.toString();
2360
2807
  }
@@ -2369,7 +2816,7 @@ const loadRestJsonErrorCode = (output, data) => {
2369
2816
  }
2370
2817
  return cleanValue;
2371
2818
  };
2372
- const headerKey = findKey(output.headers, "x-amzn-errortype");
2819
+ var headerKey = findKey(output.headers, "x-amzn-errortype");
2373
2820
  if (headerKey !== undefined) {
2374
2821
  return sanitizeErrorCode(output.headers[headerKey]);
2375
2822
  }