@aws-sdk/client-migrationhuborchestrator 3.181.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 (204) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/LICENSE +201 -0
  3. package/README.md +209 -0
  4. package/dist-cjs/MigrationHubOrchestrator.js +427 -0
  5. package/dist-cjs/MigrationHubOrchestratorClient.js +37 -0
  6. package/dist-cjs/commands/CreateWorkflowCommand.js +36 -0
  7. package/dist-cjs/commands/CreateWorkflowStepCommand.js +36 -0
  8. package/dist-cjs/commands/CreateWorkflowStepGroupCommand.js +36 -0
  9. package/dist-cjs/commands/DeleteWorkflowCommand.js +36 -0
  10. package/dist-cjs/commands/DeleteWorkflowStepCommand.js +36 -0
  11. package/dist-cjs/commands/DeleteWorkflowStepGroupCommand.js +36 -0
  12. package/dist-cjs/commands/GetTemplateCommand.js +36 -0
  13. package/dist-cjs/commands/GetTemplateStepCommand.js +36 -0
  14. package/dist-cjs/commands/GetTemplateStepGroupCommand.js +36 -0
  15. package/dist-cjs/commands/GetWorkflowCommand.js +36 -0
  16. package/dist-cjs/commands/GetWorkflowStepCommand.js +36 -0
  17. package/dist-cjs/commands/GetWorkflowStepGroupCommand.js +36 -0
  18. package/dist-cjs/commands/ListPluginsCommand.js +36 -0
  19. package/dist-cjs/commands/ListTagsForResourceCommand.js +36 -0
  20. package/dist-cjs/commands/ListTemplateStepGroupsCommand.js +36 -0
  21. package/dist-cjs/commands/ListTemplateStepsCommand.js +36 -0
  22. package/dist-cjs/commands/ListTemplatesCommand.js +36 -0
  23. package/dist-cjs/commands/ListWorkflowStepGroupsCommand.js +36 -0
  24. package/dist-cjs/commands/ListWorkflowStepsCommand.js +36 -0
  25. package/dist-cjs/commands/ListWorkflowsCommand.js +36 -0
  26. package/dist-cjs/commands/RetryWorkflowStepCommand.js +36 -0
  27. package/dist-cjs/commands/StartWorkflowCommand.js +36 -0
  28. package/dist-cjs/commands/StopWorkflowCommand.js +36 -0
  29. package/dist-cjs/commands/TagResourceCommand.js +36 -0
  30. package/dist-cjs/commands/UntagResourceCommand.js +36 -0
  31. package/dist-cjs/commands/UpdateWorkflowCommand.js +36 -0
  32. package/dist-cjs/commands/UpdateWorkflowStepCommand.js +36 -0
  33. package/dist-cjs/commands/UpdateWorkflowStepGroupCommand.js +36 -0
  34. package/dist-cjs/commands/index.js +31 -0
  35. package/dist-cjs/endpoints.js +132 -0
  36. package/dist-cjs/index.js +11 -0
  37. package/dist-cjs/models/MigrationHubOrchestratorServiceException.js +11 -0
  38. package/dist-cjs/models/index.js +4 -0
  39. package/dist-cjs/models/models_0.js +491 -0
  40. package/dist-cjs/pagination/Interfaces.js +2 -0
  41. package/dist-cjs/pagination/ListPluginsPaginator.js +36 -0
  42. package/dist-cjs/pagination/ListTemplateStepGroupsPaginator.js +36 -0
  43. package/dist-cjs/pagination/ListTemplateStepsPaginator.js +36 -0
  44. package/dist-cjs/pagination/ListTemplatesPaginator.js +36 -0
  45. package/dist-cjs/pagination/ListWorkflowStepGroupsPaginator.js +36 -0
  46. package/dist-cjs/pagination/ListWorkflowStepsPaginator.js +36 -0
  47. package/dist-cjs/pagination/ListWorkflowsPaginator.js +36 -0
  48. package/dist-cjs/pagination/index.js +11 -0
  49. package/dist-cjs/protocols/Aws_restJson1.js +2816 -0
  50. package/dist-cjs/runtimeConfig.browser.js +45 -0
  51. package/dist-cjs/runtimeConfig.js +52 -0
  52. package/dist-cjs/runtimeConfig.native.js +16 -0
  53. package/dist-cjs/runtimeConfig.shared.js +17 -0
  54. package/dist-es/MigrationHubOrchestrator.js +430 -0
  55. package/dist-es/MigrationHubOrchestratorClient.js +39 -0
  56. package/dist-es/commands/CreateWorkflowCommand.js +39 -0
  57. package/dist-es/commands/CreateWorkflowStepCommand.js +39 -0
  58. package/dist-es/commands/CreateWorkflowStepGroupCommand.js +39 -0
  59. package/dist-es/commands/DeleteWorkflowCommand.js +39 -0
  60. package/dist-es/commands/DeleteWorkflowStepCommand.js +39 -0
  61. package/dist-es/commands/DeleteWorkflowStepGroupCommand.js +39 -0
  62. package/dist-es/commands/GetTemplateCommand.js +39 -0
  63. package/dist-es/commands/GetTemplateStepCommand.js +39 -0
  64. package/dist-es/commands/GetTemplateStepGroupCommand.js +39 -0
  65. package/dist-es/commands/GetWorkflowCommand.js +39 -0
  66. package/dist-es/commands/GetWorkflowStepCommand.js +39 -0
  67. package/dist-es/commands/GetWorkflowStepGroupCommand.js +39 -0
  68. package/dist-es/commands/ListPluginsCommand.js +39 -0
  69. package/dist-es/commands/ListTagsForResourceCommand.js +39 -0
  70. package/dist-es/commands/ListTemplateStepGroupsCommand.js +39 -0
  71. package/dist-es/commands/ListTemplateStepsCommand.js +39 -0
  72. package/dist-es/commands/ListTemplatesCommand.js +39 -0
  73. package/dist-es/commands/ListWorkflowStepGroupsCommand.js +39 -0
  74. package/dist-es/commands/ListWorkflowStepsCommand.js +39 -0
  75. package/dist-es/commands/ListWorkflowsCommand.js +39 -0
  76. package/dist-es/commands/RetryWorkflowStepCommand.js +39 -0
  77. package/dist-es/commands/StartWorkflowCommand.js +39 -0
  78. package/dist-es/commands/StopWorkflowCommand.js +39 -0
  79. package/dist-es/commands/TagResourceCommand.js +39 -0
  80. package/dist-es/commands/UntagResourceCommand.js +39 -0
  81. package/dist-es/commands/UpdateWorkflowCommand.js +39 -0
  82. package/dist-es/commands/UpdateWorkflowStepCommand.js +39 -0
  83. package/dist-es/commands/UpdateWorkflowStepGroupCommand.js +39 -0
  84. package/dist-es/commands/index.js +28 -0
  85. package/dist-es/endpoints.js +128 -0
  86. package/dist-es/index.js +6 -0
  87. package/dist-es/models/MigrationHubOrchestratorServiceException.js +12 -0
  88. package/dist-es/models/index.js +1 -0
  89. package/dist-es/models/models_0.js +261 -0
  90. package/dist-es/pagination/Interfaces.js +1 -0
  91. package/dist-es/pagination/ListPluginsPaginator.js +75 -0
  92. package/dist-es/pagination/ListTemplateStepGroupsPaginator.js +75 -0
  93. package/dist-es/pagination/ListTemplateStepsPaginator.js +75 -0
  94. package/dist-es/pagination/ListTemplatesPaginator.js +75 -0
  95. package/dist-es/pagination/ListWorkflowStepGroupsPaginator.js +75 -0
  96. package/dist-es/pagination/ListWorkflowStepsPaginator.js +75 -0
  97. package/dist-es/pagination/ListWorkflowsPaginator.js +75 -0
  98. package/dist-es/pagination/index.js +8 -0
  99. package/dist-es/protocols/Aws_restJson1.js +3593 -0
  100. package/dist-es/runtimeConfig.browser.js +26 -0
  101. package/dist-es/runtimeConfig.js +30 -0
  102. package/dist-es/runtimeConfig.native.js +8 -0
  103. package/dist-es/runtimeConfig.shared.js +13 -0
  104. package/dist-types/MigrationHubOrchestrator.d.ts +209 -0
  105. package/dist-types/MigrationHubOrchestratorClient.d.ts +176 -0
  106. package/dist-types/commands/CreateWorkflowCommand.d.ts +35 -0
  107. package/dist-types/commands/CreateWorkflowStepCommand.d.ts +35 -0
  108. package/dist-types/commands/CreateWorkflowStepGroupCommand.d.ts +35 -0
  109. package/dist-types/commands/DeleteWorkflowCommand.d.ts +36 -0
  110. package/dist-types/commands/DeleteWorkflowStepCommand.d.ts +36 -0
  111. package/dist-types/commands/DeleteWorkflowStepGroupCommand.d.ts +35 -0
  112. package/dist-types/commands/GetTemplateCommand.d.ts +35 -0
  113. package/dist-types/commands/GetTemplateStepCommand.d.ts +35 -0
  114. package/dist-types/commands/GetTemplateStepGroupCommand.d.ts +35 -0
  115. package/dist-types/commands/GetWorkflowCommand.d.ts +35 -0
  116. package/dist-types/commands/GetWorkflowStepCommand.d.ts +35 -0
  117. package/dist-types/commands/GetWorkflowStepGroupCommand.d.ts +35 -0
  118. package/dist-types/commands/ListPluginsCommand.d.ts +35 -0
  119. package/dist-types/commands/ListTagsForResourceCommand.d.ts +35 -0
  120. package/dist-types/commands/ListTemplateStepGroupsCommand.d.ts +35 -0
  121. package/dist-types/commands/ListTemplateStepsCommand.d.ts +35 -0
  122. package/dist-types/commands/ListTemplatesCommand.d.ts +35 -0
  123. package/dist-types/commands/ListWorkflowStepGroupsCommand.d.ts +35 -0
  124. package/dist-types/commands/ListWorkflowStepsCommand.d.ts +35 -0
  125. package/dist-types/commands/ListWorkflowsCommand.d.ts +35 -0
  126. package/dist-types/commands/RetryWorkflowStepCommand.d.ts +35 -0
  127. package/dist-types/commands/StartWorkflowCommand.d.ts +35 -0
  128. package/dist-types/commands/StopWorkflowCommand.d.ts +35 -0
  129. package/dist-types/commands/TagResourceCommand.d.ts +35 -0
  130. package/dist-types/commands/UntagResourceCommand.d.ts +35 -0
  131. package/dist-types/commands/UpdateWorkflowCommand.d.ts +35 -0
  132. package/dist-types/commands/UpdateWorkflowStepCommand.d.ts +35 -0
  133. package/dist-types/commands/UpdateWorkflowStepGroupCommand.d.ts +35 -0
  134. package/dist-types/commands/index.d.ts +28 -0
  135. package/dist-types/endpoints.d.ts +2 -0
  136. package/dist-types/index.d.ts +6 -0
  137. package/dist-types/models/MigrationHubOrchestratorServiceException.d.ts +10 -0
  138. package/dist-types/models/index.d.ts +1 -0
  139. package/dist-types/models/models_0.d.ts +2063 -0
  140. package/dist-types/pagination/Interfaces.d.ts +6 -0
  141. package/dist-types/pagination/ListPluginsPaginator.d.ts +4 -0
  142. package/dist-types/pagination/ListTemplateStepGroupsPaginator.d.ts +4 -0
  143. package/dist-types/pagination/ListTemplateStepsPaginator.d.ts +4 -0
  144. package/dist-types/pagination/ListTemplatesPaginator.d.ts +4 -0
  145. package/dist-types/pagination/ListWorkflowStepGroupsPaginator.d.ts +4 -0
  146. package/dist-types/pagination/ListWorkflowStepsPaginator.d.ts +4 -0
  147. package/dist-types/pagination/ListWorkflowsPaginator.d.ts +4 -0
  148. package/dist-types/pagination/index.d.ts +8 -0
  149. package/dist-types/protocols/Aws_restJson1.d.ts +86 -0
  150. package/dist-types/runtimeConfig.browser.d.ts +40 -0
  151. package/dist-types/runtimeConfig.d.ts +40 -0
  152. package/dist-types/runtimeConfig.native.d.ts +39 -0
  153. package/dist-types/runtimeConfig.shared.d.ts +13 -0
  154. package/dist-types/ts3.4/MigrationHubOrchestrator.d.ts +480 -0
  155. package/dist-types/ts3.4/MigrationHubOrchestratorClient.d.ts +273 -0
  156. package/dist-types/ts3.4/commands/CreateWorkflowCommand.d.ts +36 -0
  157. package/dist-types/ts3.4/commands/CreateWorkflowStepCommand.d.ts +36 -0
  158. package/dist-types/ts3.4/commands/CreateWorkflowStepGroupCommand.d.ts +39 -0
  159. package/dist-types/ts3.4/commands/DeleteWorkflowCommand.d.ts +36 -0
  160. package/dist-types/ts3.4/commands/DeleteWorkflowStepCommand.d.ts +36 -0
  161. package/dist-types/ts3.4/commands/DeleteWorkflowStepGroupCommand.d.ts +39 -0
  162. package/dist-types/ts3.4/commands/GetTemplateCommand.d.ts +36 -0
  163. package/dist-types/ts3.4/commands/GetTemplateStepCommand.d.ts +35 -0
  164. package/dist-types/ts3.4/commands/GetTemplateStepGroupCommand.d.ts +39 -0
  165. package/dist-types/ts3.4/commands/GetWorkflowCommand.d.ts +35 -0
  166. package/dist-types/ts3.4/commands/GetWorkflowStepCommand.d.ts +35 -0
  167. package/dist-types/ts3.4/commands/GetWorkflowStepGroupCommand.d.ts +39 -0
  168. package/dist-types/ts3.4/commands/ListPluginsCommand.d.ts +32 -0
  169. package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +36 -0
  170. package/dist-types/ts3.4/commands/ListTemplateStepGroupsCommand.d.ts +39 -0
  171. package/dist-types/ts3.4/commands/ListTemplateStepsCommand.d.ts +36 -0
  172. package/dist-types/ts3.4/commands/ListTemplatesCommand.d.ts +36 -0
  173. package/dist-types/ts3.4/commands/ListWorkflowStepGroupsCommand.d.ts +39 -0
  174. package/dist-types/ts3.4/commands/ListWorkflowStepsCommand.d.ts +36 -0
  175. package/dist-types/ts3.4/commands/ListWorkflowsCommand.d.ts +36 -0
  176. package/dist-types/ts3.4/commands/RetryWorkflowStepCommand.d.ts +36 -0
  177. package/dist-types/ts3.4/commands/StartWorkflowCommand.d.ts +36 -0
  178. package/dist-types/ts3.4/commands/StopWorkflowCommand.d.ts +36 -0
  179. package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +32 -0
  180. package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +35 -0
  181. package/dist-types/ts3.4/commands/UpdateWorkflowCommand.d.ts +36 -0
  182. package/dist-types/ts3.4/commands/UpdateWorkflowStepCommand.d.ts +36 -0
  183. package/dist-types/ts3.4/commands/UpdateWorkflowStepGroupCommand.d.ts +39 -0
  184. package/dist-types/ts3.4/commands/index.d.ts +28 -0
  185. package/dist-types/ts3.4/endpoints.d.ts +2 -0
  186. package/dist-types/ts3.4/index.d.ts +6 -0
  187. package/dist-types/ts3.4/models/MigrationHubOrchestratorServiceException.d.ts +7 -0
  188. package/dist-types/ts3.4/models/index.d.ts +1 -0
  189. package/dist-types/ts3.4/models/models_0.d.ts +880 -0
  190. package/dist-types/ts3.4/pagination/Interfaces.d.ts +7 -0
  191. package/dist-types/ts3.4/pagination/ListPluginsPaginator.d.ts +11 -0
  192. package/dist-types/ts3.4/pagination/ListTemplateStepGroupsPaginator.d.ts +11 -0
  193. package/dist-types/ts3.4/pagination/ListTemplateStepsPaginator.d.ts +11 -0
  194. package/dist-types/ts3.4/pagination/ListTemplatesPaginator.d.ts +11 -0
  195. package/dist-types/ts3.4/pagination/ListWorkflowStepGroupsPaginator.d.ts +11 -0
  196. package/dist-types/ts3.4/pagination/ListWorkflowStepsPaginator.d.ts +11 -0
  197. package/dist-types/ts3.4/pagination/ListWorkflowsPaginator.d.ts +11 -0
  198. package/dist-types/ts3.4/pagination/index.d.ts +8 -0
  199. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +341 -0
  200. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +69 -0
  201. package/dist-types/ts3.4/runtimeConfig.d.ts +69 -0
  202. package/dist-types/ts3.4/runtimeConfig.native.d.ts +70 -0
  203. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +12 -0
  204. package/package.json +100 -0
@@ -0,0 +1,3593 @@
1
+ import { __assign, __awaiter, __generator, __read } from "tslib";
2
+ import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
3
+ import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, expectUnion as __expectUnion, map as __map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
4
+ import { MigrationHubOrchestratorServiceException as __BaseException } from "../models/MigrationHubOrchestratorServiceException";
5
+ import { AccessDeniedException, InternalServerException, ResourceNotFoundException, StepInput, ThrottlingException, ValidationException, WorkflowStepOutputUnion, } from "../models/models_0";
6
+ export var serializeAws_restJson1CreateWorkflowCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
7
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
8
+ return __generator(this, function (_c) {
9
+ switch (_c.label) {
10
+ case 0: return [4, context.endpoint()];
11
+ case 1:
12
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
13
+ headers = {
14
+ "content-type": "application/json",
15
+ };
16
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/migrationworkflow";
17
+ body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.applicationConfigurationId != null && { applicationConfigurationId: input.applicationConfigurationId })), (input.description != null && { description: input.description })), (input.inputParameters != null && {
18
+ inputParameters: serializeAws_restJson1StepInputParameters(input.inputParameters, context),
19
+ })), (input.name != null && { name: input.name })), (input.stepTargets != null && { stepTargets: serializeAws_restJson1StringList(input.stepTargets, context) })), (input.tags != null && { tags: serializeAws_restJson1StringMap(input.tags, context) })), (input.templateId != null && { templateId: input.templateId })));
20
+ return [2, new __HttpRequest({
21
+ protocol: protocol,
22
+ hostname: hostname,
23
+ port: port,
24
+ method: "POST",
25
+ headers: headers,
26
+ path: resolvedPath,
27
+ body: body,
28
+ })];
29
+ }
30
+ });
31
+ }); };
32
+ export var serializeAws_restJson1CreateWorkflowStepCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
33
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
34
+ return __generator(this, function (_c) {
35
+ switch (_c.label) {
36
+ case 0: return [4, context.endpoint()];
37
+ case 1:
38
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
39
+ headers = {
40
+ "content-type": "application/json",
41
+ };
42
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/workflowstep";
43
+ body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.description != null && { description: input.description })), (input.name != null && { name: input.name })), (input.next != null && { next: serializeAws_restJson1StringList(input.next, context) })), (input.outputs != null && { outputs: serializeAws_restJson1WorkflowStepOutputList(input.outputs, context) })), (input.previous != null && { previous: serializeAws_restJson1StringList(input.previous, context) })), (input.stepActionType != null && { stepActionType: input.stepActionType })), (input.stepGroupId != null && { stepGroupId: input.stepGroupId })), (input.stepTarget != null && { stepTarget: serializeAws_restJson1StringList(input.stepTarget, context) })), (input.workflowId != null && { workflowId: input.workflowId })), (input.workflowStepAutomationConfiguration != null && {
44
+ workflowStepAutomationConfiguration: serializeAws_restJson1WorkflowStepAutomationConfiguration(input.workflowStepAutomationConfiguration, context),
45
+ })));
46
+ return [2, new __HttpRequest({
47
+ protocol: protocol,
48
+ hostname: hostname,
49
+ port: port,
50
+ method: "POST",
51
+ headers: headers,
52
+ path: resolvedPath,
53
+ body: body,
54
+ })];
55
+ }
56
+ });
57
+ }); };
58
+ export var serializeAws_restJson1CreateWorkflowStepGroupCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
59
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
60
+ return __generator(this, function (_c) {
61
+ switch (_c.label) {
62
+ case 0: return [4, context.endpoint()];
63
+ case 1:
64
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
65
+ headers = {
66
+ "content-type": "application/json",
67
+ };
68
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/workflowstepgroups";
69
+ body = JSON.stringify(__assign(__assign(__assign(__assign(__assign({}, (input.description != null && { description: input.description })), (input.name != null && { name: input.name })), (input.next != null && { next: serializeAws_restJson1StringList(input.next, context) })), (input.previous != null && { previous: serializeAws_restJson1StringList(input.previous, context) })), (input.workflowId != null && { workflowId: input.workflowId })));
70
+ return [2, new __HttpRequest({
71
+ protocol: protocol,
72
+ hostname: hostname,
73
+ port: port,
74
+ method: "POST",
75
+ headers: headers,
76
+ path: resolvedPath,
77
+ body: body,
78
+ })];
79
+ }
80
+ });
81
+ }); };
82
+ export var serializeAws_restJson1DeleteWorkflowCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
83
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
84
+ return __generator(this, function (_c) {
85
+ switch (_c.label) {
86
+ case 0: return [4, context.endpoint()];
87
+ case 1:
88
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
89
+ headers = {};
90
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/migrationworkflow/{id}";
91
+ resolvedPath = __resolvedPath(resolvedPath, input, "id", function () { return input.id; }, "{id}", false);
92
+ return [2, new __HttpRequest({
93
+ protocol: protocol,
94
+ hostname: hostname,
95
+ port: port,
96
+ method: "DELETE",
97
+ headers: headers,
98
+ path: resolvedPath,
99
+ body: body,
100
+ })];
101
+ }
102
+ });
103
+ }); };
104
+ export var serializeAws_restJson1DeleteWorkflowStepCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
105
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
106
+ return __generator(this, function (_c) {
107
+ switch (_c.label) {
108
+ case 0: return [4, context.endpoint()];
109
+ case 1:
110
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
111
+ headers = {};
112
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/workflowstep/{id}";
113
+ resolvedPath = __resolvedPath(resolvedPath, input, "id", function () { return input.id; }, "{id}", false);
114
+ query = map({
115
+ stepGroupId: [, input.stepGroupId],
116
+ workflowId: [, input.workflowId],
117
+ });
118
+ return [2, new __HttpRequest({
119
+ protocol: protocol,
120
+ hostname: hostname,
121
+ port: port,
122
+ method: "DELETE",
123
+ headers: headers,
124
+ path: resolvedPath,
125
+ query: query,
126
+ body: body,
127
+ })];
128
+ }
129
+ });
130
+ }); };
131
+ export var serializeAws_restJson1DeleteWorkflowStepGroupCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
132
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
133
+ return __generator(this, function (_c) {
134
+ switch (_c.label) {
135
+ case 0: return [4, context.endpoint()];
136
+ case 1:
137
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
138
+ headers = {};
139
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/workflowstepgroup/{id}";
140
+ resolvedPath = __resolvedPath(resolvedPath, input, "id", function () { return input.id; }, "{id}", false);
141
+ query = map({
142
+ workflowId: [, input.workflowId],
143
+ });
144
+ return [2, new __HttpRequest({
145
+ protocol: protocol,
146
+ hostname: hostname,
147
+ port: port,
148
+ method: "DELETE",
149
+ headers: headers,
150
+ path: resolvedPath,
151
+ query: query,
152
+ body: body,
153
+ })];
154
+ }
155
+ });
156
+ }); };
157
+ export var serializeAws_restJson1GetTemplateCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
158
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
159
+ return __generator(this, function (_c) {
160
+ switch (_c.label) {
161
+ case 0: return [4, context.endpoint()];
162
+ case 1:
163
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
164
+ headers = {};
165
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/migrationworkflowtemplate/{id}";
166
+ resolvedPath = __resolvedPath(resolvedPath, input, "id", function () { return input.id; }, "{id}", false);
167
+ return [2, new __HttpRequest({
168
+ protocol: protocol,
169
+ hostname: hostname,
170
+ port: port,
171
+ method: "GET",
172
+ headers: headers,
173
+ path: resolvedPath,
174
+ body: body,
175
+ })];
176
+ }
177
+ });
178
+ }); };
179
+ export var serializeAws_restJson1GetTemplateStepCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
180
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
181
+ return __generator(this, function (_c) {
182
+ switch (_c.label) {
183
+ case 0: return [4, context.endpoint()];
184
+ case 1:
185
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
186
+ headers = {};
187
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/templatestep/{id}";
188
+ resolvedPath = __resolvedPath(resolvedPath, input, "id", function () { return input.id; }, "{id}", false);
189
+ query = map({
190
+ templateId: [, input.templateId],
191
+ stepGroupId: [, input.stepGroupId],
192
+ });
193
+ return [2, new __HttpRequest({
194
+ protocol: protocol,
195
+ hostname: hostname,
196
+ port: port,
197
+ method: "GET",
198
+ headers: headers,
199
+ path: resolvedPath,
200
+ query: query,
201
+ body: body,
202
+ })];
203
+ }
204
+ });
205
+ }); };
206
+ export var serializeAws_restJson1GetTemplateStepGroupCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
207
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
208
+ return __generator(this, function (_c) {
209
+ switch (_c.label) {
210
+ case 0: return [4, context.endpoint()];
211
+ case 1:
212
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
213
+ headers = {};
214
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/templates/{templateId}/stepgroups/{id}";
215
+ resolvedPath = __resolvedPath(resolvedPath, input, "templateId", function () { return input.templateId; }, "{templateId}", false);
216
+ resolvedPath = __resolvedPath(resolvedPath, input, "id", function () { return input.id; }, "{id}", false);
217
+ return [2, new __HttpRequest({
218
+ protocol: protocol,
219
+ hostname: hostname,
220
+ port: port,
221
+ method: "GET",
222
+ headers: headers,
223
+ path: resolvedPath,
224
+ body: body,
225
+ })];
226
+ }
227
+ });
228
+ }); };
229
+ export var serializeAws_restJson1GetWorkflowCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
230
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
231
+ return __generator(this, function (_c) {
232
+ switch (_c.label) {
233
+ case 0: return [4, context.endpoint()];
234
+ case 1:
235
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
236
+ headers = {};
237
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/migrationworkflow/{id}";
238
+ resolvedPath = __resolvedPath(resolvedPath, input, "id", function () { return input.id; }, "{id}", false);
239
+ return [2, new __HttpRequest({
240
+ protocol: protocol,
241
+ hostname: hostname,
242
+ port: port,
243
+ method: "GET",
244
+ headers: headers,
245
+ path: resolvedPath,
246
+ body: body,
247
+ })];
248
+ }
249
+ });
250
+ }); };
251
+ export var serializeAws_restJson1GetWorkflowStepCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
252
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
253
+ return __generator(this, function (_c) {
254
+ switch (_c.label) {
255
+ case 0: return [4, context.endpoint()];
256
+ case 1:
257
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
258
+ headers = {};
259
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/workflowstep/{id}";
260
+ resolvedPath = __resolvedPath(resolvedPath, input, "id", function () { return input.id; }, "{id}", false);
261
+ query = map({
262
+ workflowId: [, input.workflowId],
263
+ stepGroupId: [, input.stepGroupId],
264
+ });
265
+ return [2, new __HttpRequest({
266
+ protocol: protocol,
267
+ hostname: hostname,
268
+ port: port,
269
+ method: "GET",
270
+ headers: headers,
271
+ path: resolvedPath,
272
+ query: query,
273
+ body: body,
274
+ })];
275
+ }
276
+ });
277
+ }); };
278
+ export var serializeAws_restJson1GetWorkflowStepGroupCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
279
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
280
+ return __generator(this, function (_c) {
281
+ switch (_c.label) {
282
+ case 0: return [4, context.endpoint()];
283
+ case 1:
284
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
285
+ headers = {};
286
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/workflowstepgroup/{id}";
287
+ resolvedPath = __resolvedPath(resolvedPath, input, "id", function () { return input.id; }, "{id}", false);
288
+ query = map({
289
+ workflowId: [, input.workflowId],
290
+ });
291
+ return [2, new __HttpRequest({
292
+ protocol: protocol,
293
+ hostname: hostname,
294
+ port: port,
295
+ method: "GET",
296
+ headers: headers,
297
+ path: resolvedPath,
298
+ query: query,
299
+ body: body,
300
+ })];
301
+ }
302
+ });
303
+ }); };
304
+ export var serializeAws_restJson1ListPluginsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
305
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
306
+ return __generator(this, function (_c) {
307
+ switch (_c.label) {
308
+ case 0: return [4, context.endpoint()];
309
+ case 1:
310
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
311
+ headers = {};
312
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/plugins";
313
+ query = map({
314
+ maxResults: [function () { return input.maxResults !== void 0; }, function () { return input.maxResults.toString(); }],
315
+ nextToken: [, input.nextToken],
316
+ });
317
+ return [2, new __HttpRequest({
318
+ protocol: protocol,
319
+ hostname: hostname,
320
+ port: port,
321
+ method: "GET",
322
+ headers: headers,
323
+ path: resolvedPath,
324
+ query: query,
325
+ body: body,
326
+ })];
327
+ }
328
+ });
329
+ }); };
330
+ export var serializeAws_restJson1ListTagsForResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
331
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
332
+ return __generator(this, function (_c) {
333
+ switch (_c.label) {
334
+ case 0: return [4, context.endpoint()];
335
+ case 1:
336
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
337
+ headers = {};
338
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags/{resourceArn}";
339
+ resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", function () { return input.resourceArn; }, "{resourceArn}", false);
340
+ return [2, new __HttpRequest({
341
+ protocol: protocol,
342
+ hostname: hostname,
343
+ port: port,
344
+ method: "GET",
345
+ headers: headers,
346
+ path: resolvedPath,
347
+ body: body,
348
+ })];
349
+ }
350
+ });
351
+ }); };
352
+ export var serializeAws_restJson1ListTemplatesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
353
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
354
+ return __generator(this, function (_c) {
355
+ switch (_c.label) {
356
+ case 0: return [4, context.endpoint()];
357
+ case 1:
358
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
359
+ headers = {};
360
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/migrationworkflowtemplates";
361
+ query = map({
362
+ maxResults: [function () { return input.maxResults !== void 0; }, function () { return input.maxResults.toString(); }],
363
+ nextToken: [, input.nextToken],
364
+ name: [, input.name],
365
+ });
366
+ return [2, new __HttpRequest({
367
+ protocol: protocol,
368
+ hostname: hostname,
369
+ port: port,
370
+ method: "GET",
371
+ headers: headers,
372
+ path: resolvedPath,
373
+ query: query,
374
+ body: body,
375
+ })];
376
+ }
377
+ });
378
+ }); };
379
+ export var serializeAws_restJson1ListTemplateStepGroupsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
380
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
381
+ return __generator(this, function (_c) {
382
+ switch (_c.label) {
383
+ case 0: return [4, context.endpoint()];
384
+ case 1:
385
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
386
+ headers = {};
387
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/templatestepgroups/{templateId}";
388
+ resolvedPath = __resolvedPath(resolvedPath, input, "templateId", function () { return input.templateId; }, "{templateId}", false);
389
+ query = map({
390
+ maxResults: [function () { return input.maxResults !== void 0; }, function () { return input.maxResults.toString(); }],
391
+ nextToken: [, input.nextToken],
392
+ });
393
+ return [2, new __HttpRequest({
394
+ protocol: protocol,
395
+ hostname: hostname,
396
+ port: port,
397
+ method: "GET",
398
+ headers: headers,
399
+ path: resolvedPath,
400
+ query: query,
401
+ body: body,
402
+ })];
403
+ }
404
+ });
405
+ }); };
406
+ export var serializeAws_restJson1ListTemplateStepsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
407
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
408
+ return __generator(this, function (_c) {
409
+ switch (_c.label) {
410
+ case 0: return [4, context.endpoint()];
411
+ case 1:
412
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
413
+ headers = {};
414
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/templatesteps";
415
+ query = map({
416
+ maxResults: [function () { return input.maxResults !== void 0; }, function () { return input.maxResults.toString(); }],
417
+ nextToken: [, input.nextToken],
418
+ templateId: [, input.templateId],
419
+ stepGroupId: [, input.stepGroupId],
420
+ });
421
+ return [2, new __HttpRequest({
422
+ protocol: protocol,
423
+ hostname: hostname,
424
+ port: port,
425
+ method: "GET",
426
+ headers: headers,
427
+ path: resolvedPath,
428
+ query: query,
429
+ body: body,
430
+ })];
431
+ }
432
+ });
433
+ }); };
434
+ export var serializeAws_restJson1ListWorkflowsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
435
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
436
+ return __generator(this, function (_c) {
437
+ switch (_c.label) {
438
+ case 0: return [4, context.endpoint()];
439
+ case 1:
440
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
441
+ headers = {};
442
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/migrationworkflows";
443
+ query = map({
444
+ maxResults: [function () { return input.maxResults !== void 0; }, function () { return input.maxResults.toString(); }],
445
+ nextToken: [, input.nextToken],
446
+ templateId: [, input.templateId],
447
+ adsApplicationConfigurationName: [, input.adsApplicationConfigurationName],
448
+ status: [, input.status],
449
+ name: [, input.name],
450
+ });
451
+ return [2, new __HttpRequest({
452
+ protocol: protocol,
453
+ hostname: hostname,
454
+ port: port,
455
+ method: "GET",
456
+ headers: headers,
457
+ path: resolvedPath,
458
+ query: query,
459
+ body: body,
460
+ })];
461
+ }
462
+ });
463
+ }); };
464
+ export var serializeAws_restJson1ListWorkflowStepGroupsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
465
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
466
+ return __generator(this, function (_c) {
467
+ switch (_c.label) {
468
+ case 0: return [4, context.endpoint()];
469
+ case 1:
470
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
471
+ headers = {};
472
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/workflowstepgroups";
473
+ query = map({
474
+ nextToken: [, input.nextToken],
475
+ maxResults: [function () { return input.maxResults !== void 0; }, function () { return input.maxResults.toString(); }],
476
+ workflowId: [, input.workflowId],
477
+ });
478
+ return [2, new __HttpRequest({
479
+ protocol: protocol,
480
+ hostname: hostname,
481
+ port: port,
482
+ method: "GET",
483
+ headers: headers,
484
+ path: resolvedPath,
485
+ query: query,
486
+ body: body,
487
+ })];
488
+ }
489
+ });
490
+ }); };
491
+ export var serializeAws_restJson1ListWorkflowStepsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
492
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
493
+ return __generator(this, function (_c) {
494
+ switch (_c.label) {
495
+ case 0: return [4, context.endpoint()];
496
+ case 1:
497
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
498
+ headers = {};
499
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
500
+ "/workflow/{workflowId}/workflowstepgroups/{stepGroupId}/workflowsteps";
501
+ resolvedPath = __resolvedPath(resolvedPath, input, "workflowId", function () { return input.workflowId; }, "{workflowId}", false);
502
+ resolvedPath = __resolvedPath(resolvedPath, input, "stepGroupId", function () { return input.stepGroupId; }, "{stepGroupId}", false);
503
+ query = map({
504
+ nextToken: [, input.nextToken],
505
+ maxResults: [function () { return input.maxResults !== void 0; }, function () { return input.maxResults.toString(); }],
506
+ });
507
+ return [2, new __HttpRequest({
508
+ protocol: protocol,
509
+ hostname: hostname,
510
+ port: port,
511
+ method: "GET",
512
+ headers: headers,
513
+ path: resolvedPath,
514
+ query: query,
515
+ body: body,
516
+ })];
517
+ }
518
+ });
519
+ }); };
520
+ export var serializeAws_restJson1RetryWorkflowStepCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
521
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
522
+ return __generator(this, function (_c) {
523
+ switch (_c.label) {
524
+ case 0: return [4, context.endpoint()];
525
+ case 1:
526
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
527
+ headers = {};
528
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/retryworkflowstep/{id}";
529
+ resolvedPath = __resolvedPath(resolvedPath, input, "id", function () { return input.id; }, "{id}", false);
530
+ query = map({
531
+ workflowId: [, input.workflowId],
532
+ stepGroupId: [, input.stepGroupId],
533
+ });
534
+ return [2, new __HttpRequest({
535
+ protocol: protocol,
536
+ hostname: hostname,
537
+ port: port,
538
+ method: "POST",
539
+ headers: headers,
540
+ path: resolvedPath,
541
+ query: query,
542
+ body: body,
543
+ })];
544
+ }
545
+ });
546
+ }); };
547
+ export var serializeAws_restJson1StartWorkflowCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
548
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
549
+ return __generator(this, function (_c) {
550
+ switch (_c.label) {
551
+ case 0: return [4, context.endpoint()];
552
+ case 1:
553
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
554
+ headers = {};
555
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/migrationworkflow/{id}/start";
556
+ resolvedPath = __resolvedPath(resolvedPath, input, "id", function () { return input.id; }, "{id}", false);
557
+ return [2, new __HttpRequest({
558
+ protocol: protocol,
559
+ hostname: hostname,
560
+ port: port,
561
+ method: "POST",
562
+ headers: headers,
563
+ path: resolvedPath,
564
+ body: body,
565
+ })];
566
+ }
567
+ });
568
+ }); };
569
+ export var serializeAws_restJson1StopWorkflowCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
570
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
571
+ return __generator(this, function (_c) {
572
+ switch (_c.label) {
573
+ case 0: return [4, context.endpoint()];
574
+ case 1:
575
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
576
+ headers = {};
577
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/migrationworkflow/{id}/stop";
578
+ resolvedPath = __resolvedPath(resolvedPath, input, "id", function () { return input.id; }, "{id}", false);
579
+ return [2, new __HttpRequest({
580
+ protocol: protocol,
581
+ hostname: hostname,
582
+ port: port,
583
+ method: "POST",
584
+ headers: headers,
585
+ path: resolvedPath,
586
+ body: body,
587
+ })];
588
+ }
589
+ });
590
+ }); };
591
+ export var serializeAws_restJson1TagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
592
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
593
+ return __generator(this, function (_c) {
594
+ switch (_c.label) {
595
+ case 0: return [4, context.endpoint()];
596
+ case 1:
597
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
598
+ headers = {
599
+ "content-type": "application/json",
600
+ };
601
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags/{resourceArn}";
602
+ resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", function () { return input.resourceArn; }, "{resourceArn}", false);
603
+ body = JSON.stringify(__assign({}, (input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) })));
604
+ return [2, new __HttpRequest({
605
+ protocol: protocol,
606
+ hostname: hostname,
607
+ port: port,
608
+ method: "POST",
609
+ headers: headers,
610
+ path: resolvedPath,
611
+ body: body,
612
+ })];
613
+ }
614
+ });
615
+ }); };
616
+ export var serializeAws_restJson1UntagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
617
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
618
+ return __generator(this, function (_c) {
619
+ switch (_c.label) {
620
+ case 0: return [4, context.endpoint()];
621
+ case 1:
622
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
623
+ headers = {};
624
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags/{resourceArn}";
625
+ resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", function () { return input.resourceArn; }, "{resourceArn}", false);
626
+ query = map({
627
+ tagKeys: [function () { return input.tagKeys !== void 0; }, function () { return (input.tagKeys || []).map(function (_entry) { return _entry; }); }],
628
+ });
629
+ return [2, new __HttpRequest({
630
+ protocol: protocol,
631
+ hostname: hostname,
632
+ port: port,
633
+ method: "DELETE",
634
+ headers: headers,
635
+ path: resolvedPath,
636
+ query: query,
637
+ body: body,
638
+ })];
639
+ }
640
+ });
641
+ }); };
642
+ export var serializeAws_restJson1UpdateWorkflowCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
643
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
644
+ return __generator(this, function (_c) {
645
+ switch (_c.label) {
646
+ case 0: return [4, context.endpoint()];
647
+ case 1:
648
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
649
+ headers = {
650
+ "content-type": "application/json",
651
+ };
652
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/migrationworkflow/{id}";
653
+ resolvedPath = __resolvedPath(resolvedPath, input, "id", function () { return input.id; }, "{id}", false);
654
+ body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.description != null && { description: input.description })), (input.inputParameters != null && {
655
+ inputParameters: serializeAws_restJson1StepInputParameters(input.inputParameters, context),
656
+ })), (input.name != null && { name: input.name })), (input.stepTargets != null && { stepTargets: serializeAws_restJson1StringList(input.stepTargets, context) })));
657
+ return [2, new __HttpRequest({
658
+ protocol: protocol,
659
+ hostname: hostname,
660
+ port: port,
661
+ method: "POST",
662
+ headers: headers,
663
+ path: resolvedPath,
664
+ body: body,
665
+ })];
666
+ }
667
+ });
668
+ }); };
669
+ export var serializeAws_restJson1UpdateWorkflowStepCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
670
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
671
+ return __generator(this, function (_c) {
672
+ switch (_c.label) {
673
+ case 0: return [4, context.endpoint()];
674
+ case 1:
675
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
676
+ headers = {
677
+ "content-type": "application/json",
678
+ };
679
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/workflowstep/{id}";
680
+ resolvedPath = __resolvedPath(resolvedPath, input, "id", function () { return input.id; }, "{id}", false);
681
+ body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.description != null && { description: input.description })), (input.name != null && { name: input.name })), (input.next != null && { next: serializeAws_restJson1StringList(input.next, context) })), (input.outputs != null && { outputs: serializeAws_restJson1WorkflowStepOutputList(input.outputs, context) })), (input.previous != null && { previous: serializeAws_restJson1StringList(input.previous, context) })), (input.status != null && { status: input.status })), (input.stepActionType != null && { stepActionType: input.stepActionType })), (input.stepGroupId != null && { stepGroupId: input.stepGroupId })), (input.stepTarget != null && { stepTarget: serializeAws_restJson1StringList(input.stepTarget, context) })), (input.workflowId != null && { workflowId: input.workflowId })), (input.workflowStepAutomationConfiguration != null && {
682
+ workflowStepAutomationConfiguration: serializeAws_restJson1WorkflowStepAutomationConfiguration(input.workflowStepAutomationConfiguration, context),
683
+ })));
684
+ return [2, new __HttpRequest({
685
+ protocol: protocol,
686
+ hostname: hostname,
687
+ port: port,
688
+ method: "POST",
689
+ headers: headers,
690
+ path: resolvedPath,
691
+ body: body,
692
+ })];
693
+ }
694
+ });
695
+ }); };
696
+ export var serializeAws_restJson1UpdateWorkflowStepGroupCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
697
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
698
+ return __generator(this, function (_c) {
699
+ switch (_c.label) {
700
+ case 0: return [4, context.endpoint()];
701
+ case 1:
702
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
703
+ headers = {
704
+ "content-type": "application/json",
705
+ };
706
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/workflowstepgroup/{id}";
707
+ resolvedPath = __resolvedPath(resolvedPath, input, "id", function () { return input.id; }, "{id}", false);
708
+ query = map({
709
+ workflowId: [, input.workflowId],
710
+ });
711
+ body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.description != null && { description: input.description })), (input.name != null && { name: input.name })), (input.next != null && { next: serializeAws_restJson1StringList(input.next, context) })), (input.previous != null && { previous: serializeAws_restJson1StringList(input.previous, context) })));
712
+ return [2, new __HttpRequest({
713
+ protocol: protocol,
714
+ hostname: hostname,
715
+ port: port,
716
+ method: "POST",
717
+ headers: headers,
718
+ path: resolvedPath,
719
+ query: query,
720
+ body: body,
721
+ })];
722
+ }
723
+ });
724
+ }); };
725
+ export var deserializeAws_restJson1CreateWorkflowCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
726
+ var contents, data, _a, _b;
727
+ return __generator(this, function (_c) {
728
+ switch (_c.label) {
729
+ case 0:
730
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
731
+ return [2, deserializeAws_restJson1CreateWorkflowCommandError(output, context)];
732
+ }
733
+ contents = map({
734
+ $metadata: deserializeMetadata(output),
735
+ });
736
+ _a = __expectNonNull;
737
+ _b = __expectObject;
738
+ return [4, parseBody(output.body, context)];
739
+ case 1:
740
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
741
+ if (data.adsApplicationConfigurationId != null) {
742
+ contents.adsApplicationConfigurationId = __expectString(data.adsApplicationConfigurationId);
743
+ }
744
+ if (data.arn != null) {
745
+ contents.arn = __expectString(data.arn);
746
+ }
747
+ if (data.creationTime != null) {
748
+ contents.creationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationTime)));
749
+ }
750
+ if (data.description != null) {
751
+ contents.description = __expectString(data.description);
752
+ }
753
+ if (data.id != null) {
754
+ contents.id = __expectString(data.id);
755
+ }
756
+ if (data.name != null) {
757
+ contents.name = __expectString(data.name);
758
+ }
759
+ if (data.status != null) {
760
+ contents.status = __expectString(data.status);
761
+ }
762
+ if (data.stepTargets != null) {
763
+ contents.stepTargets = deserializeAws_restJson1StringList(data.stepTargets, context);
764
+ }
765
+ if (data.tags != null) {
766
+ contents.tags = deserializeAws_restJson1StringMap(data.tags, context);
767
+ }
768
+ if (data.templateId != null) {
769
+ contents.templateId = __expectString(data.templateId);
770
+ }
771
+ if (data.workflowInputs != null) {
772
+ contents.workflowInputs = deserializeAws_restJson1StepInputParameters(data.workflowInputs, context);
773
+ }
774
+ return [2, contents];
775
+ }
776
+ });
777
+ }); };
778
+ var deserializeAws_restJson1CreateWorkflowCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
779
+ var parsedOutput, _a, errorCode, _b, parsedBody;
780
+ var _c;
781
+ return __generator(this, function (_d) {
782
+ switch (_d.label) {
783
+ case 0:
784
+ _a = [__assign({}, output)];
785
+ _c = {};
786
+ return [4, parseErrorBody(output.body, context)];
787
+ case 1:
788
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
789
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
790
+ _b = errorCode;
791
+ switch (_b) {
792
+ case "AccessDeniedException": return [3, 2];
793
+ case "com.amazonaws.migrationhuborchestrator#AccessDeniedException": return [3, 2];
794
+ case "InternalServerException": return [3, 4];
795
+ case "com.amazonaws.migrationhuborchestrator#InternalServerException": return [3, 4];
796
+ case "ThrottlingException": return [3, 6];
797
+ case "com.amazonaws.migrationhuborchestrator#ThrottlingException": return [3, 6];
798
+ case "ValidationException": return [3, 8];
799
+ case "com.amazonaws.migrationhuborchestrator#ValidationException": return [3, 8];
800
+ }
801
+ return [3, 10];
802
+ case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
803
+ case 3: throw _d.sent();
804
+ case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
805
+ case 5: throw _d.sent();
806
+ case 6: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
807
+ case 7: throw _d.sent();
808
+ case 8: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
809
+ case 9: throw _d.sent();
810
+ case 10:
811
+ parsedBody = parsedOutput.body;
812
+ throwDefaultError({
813
+ output: output,
814
+ parsedBody: parsedBody,
815
+ exceptionCtor: __BaseException,
816
+ errorCode: errorCode,
817
+ });
818
+ _d.label = 11;
819
+ case 11: return [2];
820
+ }
821
+ });
822
+ }); };
823
+ export var deserializeAws_restJson1CreateWorkflowStepCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
824
+ var contents, data, _a, _b;
825
+ return __generator(this, function (_c) {
826
+ switch (_c.label) {
827
+ case 0:
828
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
829
+ return [2, deserializeAws_restJson1CreateWorkflowStepCommandError(output, context)];
830
+ }
831
+ contents = map({
832
+ $metadata: deserializeMetadata(output),
833
+ });
834
+ _a = __expectNonNull;
835
+ _b = __expectObject;
836
+ return [4, parseBody(output.body, context)];
837
+ case 1:
838
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
839
+ if (data.id != null) {
840
+ contents.id = __expectString(data.id);
841
+ }
842
+ if (data.name != null) {
843
+ contents.name = __expectString(data.name);
844
+ }
845
+ if (data.stepGroupId != null) {
846
+ contents.stepGroupId = __expectString(data.stepGroupId);
847
+ }
848
+ if (data.workflowId != null) {
849
+ contents.workflowId = __expectString(data.workflowId);
850
+ }
851
+ return [2, contents];
852
+ }
853
+ });
854
+ }); };
855
+ var deserializeAws_restJson1CreateWorkflowStepCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
856
+ var parsedOutput, _a, errorCode, _b, parsedBody;
857
+ var _c;
858
+ return __generator(this, function (_d) {
859
+ switch (_d.label) {
860
+ case 0:
861
+ _a = [__assign({}, output)];
862
+ _c = {};
863
+ return [4, parseErrorBody(output.body, context)];
864
+ case 1:
865
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
866
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
867
+ _b = errorCode;
868
+ switch (_b) {
869
+ case "AccessDeniedException": return [3, 2];
870
+ case "com.amazonaws.migrationhuborchestrator#AccessDeniedException": return [3, 2];
871
+ case "InternalServerException": return [3, 4];
872
+ case "com.amazonaws.migrationhuborchestrator#InternalServerException": return [3, 4];
873
+ case "ThrottlingException": return [3, 6];
874
+ case "com.amazonaws.migrationhuborchestrator#ThrottlingException": return [3, 6];
875
+ case "ValidationException": return [3, 8];
876
+ case "com.amazonaws.migrationhuborchestrator#ValidationException": return [3, 8];
877
+ }
878
+ return [3, 10];
879
+ case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
880
+ case 3: throw _d.sent();
881
+ case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
882
+ case 5: throw _d.sent();
883
+ case 6: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
884
+ case 7: throw _d.sent();
885
+ case 8: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
886
+ case 9: throw _d.sent();
887
+ case 10:
888
+ parsedBody = parsedOutput.body;
889
+ throwDefaultError({
890
+ output: output,
891
+ parsedBody: parsedBody,
892
+ exceptionCtor: __BaseException,
893
+ errorCode: errorCode,
894
+ });
895
+ _d.label = 11;
896
+ case 11: return [2];
897
+ }
898
+ });
899
+ }); };
900
+ export var deserializeAws_restJson1CreateWorkflowStepGroupCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
901
+ var contents, data, _a, _b;
902
+ return __generator(this, function (_c) {
903
+ switch (_c.label) {
904
+ case 0:
905
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
906
+ return [2, deserializeAws_restJson1CreateWorkflowStepGroupCommandError(output, context)];
907
+ }
908
+ contents = map({
909
+ $metadata: deserializeMetadata(output),
910
+ });
911
+ _a = __expectNonNull;
912
+ _b = __expectObject;
913
+ return [4, parseBody(output.body, context)];
914
+ case 1:
915
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
916
+ if (data.creationTime != null) {
917
+ contents.creationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationTime)));
918
+ }
919
+ if (data.description != null) {
920
+ contents.description = __expectString(data.description);
921
+ }
922
+ if (data.id != null) {
923
+ contents.id = __expectString(data.id);
924
+ }
925
+ if (data.name != null) {
926
+ contents.name = __expectString(data.name);
927
+ }
928
+ if (data.next != null) {
929
+ contents.next = deserializeAws_restJson1StringList(data.next, context);
930
+ }
931
+ if (data.previous != null) {
932
+ contents.previous = deserializeAws_restJson1StringList(data.previous, context);
933
+ }
934
+ if (data.tools != null) {
935
+ contents.tools = deserializeAws_restJson1ToolsList(data.tools, context);
936
+ }
937
+ if (data.workflowId != null) {
938
+ contents.workflowId = __expectString(data.workflowId);
939
+ }
940
+ return [2, contents];
941
+ }
942
+ });
943
+ }); };
944
+ var deserializeAws_restJson1CreateWorkflowStepGroupCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
945
+ var parsedOutput, _a, errorCode, _b, parsedBody;
946
+ var _c;
947
+ return __generator(this, function (_d) {
948
+ switch (_d.label) {
949
+ case 0:
950
+ _a = [__assign({}, output)];
951
+ _c = {};
952
+ return [4, parseErrorBody(output.body, context)];
953
+ case 1:
954
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
955
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
956
+ _b = errorCode;
957
+ switch (_b) {
958
+ case "AccessDeniedException": return [3, 2];
959
+ case "com.amazonaws.migrationhuborchestrator#AccessDeniedException": return [3, 2];
960
+ case "InternalServerException": return [3, 4];
961
+ case "com.amazonaws.migrationhuborchestrator#InternalServerException": return [3, 4];
962
+ case "ThrottlingException": return [3, 6];
963
+ case "com.amazonaws.migrationhuborchestrator#ThrottlingException": return [3, 6];
964
+ case "ValidationException": return [3, 8];
965
+ case "com.amazonaws.migrationhuborchestrator#ValidationException": return [3, 8];
966
+ }
967
+ return [3, 10];
968
+ case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
969
+ case 3: throw _d.sent();
970
+ case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
971
+ case 5: throw _d.sent();
972
+ case 6: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
973
+ case 7: throw _d.sent();
974
+ case 8: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
975
+ case 9: throw _d.sent();
976
+ case 10:
977
+ parsedBody = parsedOutput.body;
978
+ throwDefaultError({
979
+ output: output,
980
+ parsedBody: parsedBody,
981
+ exceptionCtor: __BaseException,
982
+ errorCode: errorCode,
983
+ });
984
+ _d.label = 11;
985
+ case 11: return [2];
986
+ }
987
+ });
988
+ }); };
989
+ export var deserializeAws_restJson1DeleteWorkflowCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
990
+ var contents, data, _a, _b;
991
+ return __generator(this, function (_c) {
992
+ switch (_c.label) {
993
+ case 0:
994
+ if (output.statusCode !== 202 && output.statusCode >= 300) {
995
+ return [2, deserializeAws_restJson1DeleteWorkflowCommandError(output, context)];
996
+ }
997
+ contents = map({
998
+ $metadata: deserializeMetadata(output),
999
+ });
1000
+ _a = __expectNonNull;
1001
+ _b = __expectObject;
1002
+ return [4, parseBody(output.body, context)];
1003
+ case 1:
1004
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1005
+ if (data.arn != null) {
1006
+ contents.arn = __expectString(data.arn);
1007
+ }
1008
+ if (data.id != null) {
1009
+ contents.id = __expectString(data.id);
1010
+ }
1011
+ if (data.status != null) {
1012
+ contents.status = __expectString(data.status);
1013
+ }
1014
+ return [2, contents];
1015
+ }
1016
+ });
1017
+ }); };
1018
+ var deserializeAws_restJson1DeleteWorkflowCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1019
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1020
+ var _c;
1021
+ return __generator(this, function (_d) {
1022
+ switch (_d.label) {
1023
+ case 0:
1024
+ _a = [__assign({}, output)];
1025
+ _c = {};
1026
+ return [4, parseErrorBody(output.body, context)];
1027
+ case 1:
1028
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1029
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1030
+ _b = errorCode;
1031
+ switch (_b) {
1032
+ case "AccessDeniedException": return [3, 2];
1033
+ case "com.amazonaws.migrationhuborchestrator#AccessDeniedException": return [3, 2];
1034
+ case "InternalServerException": return [3, 4];
1035
+ case "com.amazonaws.migrationhuborchestrator#InternalServerException": return [3, 4];
1036
+ case "ResourceNotFoundException": return [3, 6];
1037
+ case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException": return [3, 6];
1038
+ case "ThrottlingException": return [3, 8];
1039
+ case "com.amazonaws.migrationhuborchestrator#ThrottlingException": return [3, 8];
1040
+ case "ValidationException": return [3, 10];
1041
+ case "com.amazonaws.migrationhuborchestrator#ValidationException": return [3, 10];
1042
+ }
1043
+ return [3, 12];
1044
+ case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
1045
+ case 3: throw _d.sent();
1046
+ case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
1047
+ case 5: throw _d.sent();
1048
+ case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1049
+ case 7: throw _d.sent();
1050
+ case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
1051
+ case 9: throw _d.sent();
1052
+ case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
1053
+ case 11: throw _d.sent();
1054
+ case 12:
1055
+ parsedBody = parsedOutput.body;
1056
+ throwDefaultError({
1057
+ output: output,
1058
+ parsedBody: parsedBody,
1059
+ exceptionCtor: __BaseException,
1060
+ errorCode: errorCode,
1061
+ });
1062
+ _d.label = 13;
1063
+ case 13: return [2];
1064
+ }
1065
+ });
1066
+ }); };
1067
+ export var deserializeAws_restJson1DeleteWorkflowStepCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1068
+ var contents;
1069
+ return __generator(this, function (_a) {
1070
+ switch (_a.label) {
1071
+ case 0:
1072
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1073
+ return [2, deserializeAws_restJson1DeleteWorkflowStepCommandError(output, context)];
1074
+ }
1075
+ contents = map({
1076
+ $metadata: deserializeMetadata(output),
1077
+ });
1078
+ return [4, collectBody(output.body, context)];
1079
+ case 1:
1080
+ _a.sent();
1081
+ return [2, contents];
1082
+ }
1083
+ });
1084
+ }); };
1085
+ var deserializeAws_restJson1DeleteWorkflowStepCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1086
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1087
+ var _c;
1088
+ return __generator(this, function (_d) {
1089
+ switch (_d.label) {
1090
+ case 0:
1091
+ _a = [__assign({}, output)];
1092
+ _c = {};
1093
+ return [4, parseErrorBody(output.body, context)];
1094
+ case 1:
1095
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1096
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1097
+ _b = errorCode;
1098
+ switch (_b) {
1099
+ case "AccessDeniedException": return [3, 2];
1100
+ case "com.amazonaws.migrationhuborchestrator#AccessDeniedException": return [3, 2];
1101
+ case "InternalServerException": return [3, 4];
1102
+ case "com.amazonaws.migrationhuborchestrator#InternalServerException": return [3, 4];
1103
+ case "ResourceNotFoundException": return [3, 6];
1104
+ case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException": return [3, 6];
1105
+ case "ThrottlingException": return [3, 8];
1106
+ case "com.amazonaws.migrationhuborchestrator#ThrottlingException": return [3, 8];
1107
+ case "ValidationException": return [3, 10];
1108
+ case "com.amazonaws.migrationhuborchestrator#ValidationException": return [3, 10];
1109
+ }
1110
+ return [3, 12];
1111
+ case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
1112
+ case 3: throw _d.sent();
1113
+ case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
1114
+ case 5: throw _d.sent();
1115
+ case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1116
+ case 7: throw _d.sent();
1117
+ case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
1118
+ case 9: throw _d.sent();
1119
+ case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
1120
+ case 11: throw _d.sent();
1121
+ case 12:
1122
+ parsedBody = parsedOutput.body;
1123
+ throwDefaultError({
1124
+ output: output,
1125
+ parsedBody: parsedBody,
1126
+ exceptionCtor: __BaseException,
1127
+ errorCode: errorCode,
1128
+ });
1129
+ _d.label = 13;
1130
+ case 13: return [2];
1131
+ }
1132
+ });
1133
+ }); };
1134
+ export var deserializeAws_restJson1DeleteWorkflowStepGroupCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1135
+ var contents;
1136
+ return __generator(this, function (_a) {
1137
+ switch (_a.label) {
1138
+ case 0:
1139
+ if (output.statusCode !== 202 && output.statusCode >= 300) {
1140
+ return [2, deserializeAws_restJson1DeleteWorkflowStepGroupCommandError(output, context)];
1141
+ }
1142
+ contents = map({
1143
+ $metadata: deserializeMetadata(output),
1144
+ });
1145
+ return [4, collectBody(output.body, context)];
1146
+ case 1:
1147
+ _a.sent();
1148
+ return [2, contents];
1149
+ }
1150
+ });
1151
+ }); };
1152
+ var deserializeAws_restJson1DeleteWorkflowStepGroupCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1153
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1154
+ var _c;
1155
+ return __generator(this, function (_d) {
1156
+ switch (_d.label) {
1157
+ case 0:
1158
+ _a = [__assign({}, output)];
1159
+ _c = {};
1160
+ return [4, parseErrorBody(output.body, context)];
1161
+ case 1:
1162
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1163
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1164
+ _b = errorCode;
1165
+ switch (_b) {
1166
+ case "AccessDeniedException": return [3, 2];
1167
+ case "com.amazonaws.migrationhuborchestrator#AccessDeniedException": return [3, 2];
1168
+ case "InternalServerException": return [3, 4];
1169
+ case "com.amazonaws.migrationhuborchestrator#InternalServerException": return [3, 4];
1170
+ case "ResourceNotFoundException": return [3, 6];
1171
+ case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException": return [3, 6];
1172
+ case "ThrottlingException": return [3, 8];
1173
+ case "com.amazonaws.migrationhuborchestrator#ThrottlingException": return [3, 8];
1174
+ case "ValidationException": return [3, 10];
1175
+ case "com.amazonaws.migrationhuborchestrator#ValidationException": return [3, 10];
1176
+ }
1177
+ return [3, 12];
1178
+ case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
1179
+ case 3: throw _d.sent();
1180
+ case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
1181
+ case 5: throw _d.sent();
1182
+ case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1183
+ case 7: throw _d.sent();
1184
+ case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
1185
+ case 9: throw _d.sent();
1186
+ case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
1187
+ case 11: throw _d.sent();
1188
+ case 12:
1189
+ parsedBody = parsedOutput.body;
1190
+ throwDefaultError({
1191
+ output: output,
1192
+ parsedBody: parsedBody,
1193
+ exceptionCtor: __BaseException,
1194
+ errorCode: errorCode,
1195
+ });
1196
+ _d.label = 13;
1197
+ case 13: return [2];
1198
+ }
1199
+ });
1200
+ }); };
1201
+ export var deserializeAws_restJson1GetTemplateCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1202
+ var contents, data, _a, _b;
1203
+ return __generator(this, function (_c) {
1204
+ switch (_c.label) {
1205
+ case 0:
1206
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1207
+ return [2, deserializeAws_restJson1GetTemplateCommandError(output, context)];
1208
+ }
1209
+ contents = map({
1210
+ $metadata: deserializeMetadata(output),
1211
+ });
1212
+ _a = __expectNonNull;
1213
+ _b = __expectObject;
1214
+ return [4, parseBody(output.body, context)];
1215
+ case 1:
1216
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1217
+ if (data.creationTime != null) {
1218
+ contents.creationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationTime)));
1219
+ }
1220
+ if (data.description != null) {
1221
+ contents.description = __expectString(data.description);
1222
+ }
1223
+ if (data.id != null) {
1224
+ contents.id = __expectString(data.id);
1225
+ }
1226
+ if (data.inputs != null) {
1227
+ contents.inputs = deserializeAws_restJson1TemplateInputList(data.inputs, context);
1228
+ }
1229
+ if (data.name != null) {
1230
+ contents.name = __expectString(data.name);
1231
+ }
1232
+ if (data.status != null) {
1233
+ contents.status = __expectString(data.status);
1234
+ }
1235
+ if (data.tools != null) {
1236
+ contents.tools = deserializeAws_restJson1ToolsList(data.tools, context);
1237
+ }
1238
+ return [2, contents];
1239
+ }
1240
+ });
1241
+ }); };
1242
+ var deserializeAws_restJson1GetTemplateCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1243
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1244
+ var _c;
1245
+ return __generator(this, function (_d) {
1246
+ switch (_d.label) {
1247
+ case 0:
1248
+ _a = [__assign({}, output)];
1249
+ _c = {};
1250
+ return [4, parseErrorBody(output.body, context)];
1251
+ case 1:
1252
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1253
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1254
+ _b = errorCode;
1255
+ switch (_b) {
1256
+ case "AccessDeniedException": return [3, 2];
1257
+ case "com.amazonaws.migrationhuborchestrator#AccessDeniedException": return [3, 2];
1258
+ case "InternalServerException": return [3, 4];
1259
+ case "com.amazonaws.migrationhuborchestrator#InternalServerException": return [3, 4];
1260
+ case "ResourceNotFoundException": return [3, 6];
1261
+ case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException": return [3, 6];
1262
+ case "ThrottlingException": return [3, 8];
1263
+ case "com.amazonaws.migrationhuborchestrator#ThrottlingException": return [3, 8];
1264
+ }
1265
+ return [3, 10];
1266
+ case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
1267
+ case 3: throw _d.sent();
1268
+ case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
1269
+ case 5: throw _d.sent();
1270
+ case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1271
+ case 7: throw _d.sent();
1272
+ case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
1273
+ case 9: throw _d.sent();
1274
+ case 10:
1275
+ parsedBody = parsedOutput.body;
1276
+ throwDefaultError({
1277
+ output: output,
1278
+ parsedBody: parsedBody,
1279
+ exceptionCtor: __BaseException,
1280
+ errorCode: errorCode,
1281
+ });
1282
+ _d.label = 11;
1283
+ case 11: return [2];
1284
+ }
1285
+ });
1286
+ }); };
1287
+ export var deserializeAws_restJson1GetTemplateStepCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1288
+ var contents, data, _a, _b;
1289
+ return __generator(this, function (_c) {
1290
+ switch (_c.label) {
1291
+ case 0:
1292
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1293
+ return [2, deserializeAws_restJson1GetTemplateStepCommandError(output, context)];
1294
+ }
1295
+ contents = map({
1296
+ $metadata: deserializeMetadata(output),
1297
+ });
1298
+ _a = __expectNonNull;
1299
+ _b = __expectObject;
1300
+ return [4, parseBody(output.body, context)];
1301
+ case 1:
1302
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1303
+ if (data.creationTime != null) {
1304
+ contents.creationTime = __expectString(data.creationTime);
1305
+ }
1306
+ if (data.description != null) {
1307
+ contents.description = __expectString(data.description);
1308
+ }
1309
+ if (data.id != null) {
1310
+ contents.id = __expectString(data.id);
1311
+ }
1312
+ if (data.name != null) {
1313
+ contents.name = __expectString(data.name);
1314
+ }
1315
+ if (data.next != null) {
1316
+ contents.next = deserializeAws_restJson1StringList(data.next, context);
1317
+ }
1318
+ if (data.outputs != null) {
1319
+ contents.outputs = deserializeAws_restJson1StepOutputList(data.outputs, context);
1320
+ }
1321
+ if (data.previous != null) {
1322
+ contents.previous = deserializeAws_restJson1StringList(data.previous, context);
1323
+ }
1324
+ if (data.stepActionType != null) {
1325
+ contents.stepActionType = __expectString(data.stepActionType);
1326
+ }
1327
+ if (data.stepAutomationConfiguration != null) {
1328
+ contents.stepAutomationConfiguration = deserializeAws_restJson1StepAutomationConfiguration(data.stepAutomationConfiguration, context);
1329
+ }
1330
+ if (data.stepGroupId != null) {
1331
+ contents.stepGroupId = __expectString(data.stepGroupId);
1332
+ }
1333
+ if (data.templateId != null) {
1334
+ contents.templateId = __expectString(data.templateId);
1335
+ }
1336
+ return [2, contents];
1337
+ }
1338
+ });
1339
+ }); };
1340
+ var deserializeAws_restJson1GetTemplateStepCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1341
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1342
+ var _c;
1343
+ return __generator(this, function (_d) {
1344
+ switch (_d.label) {
1345
+ case 0:
1346
+ _a = [__assign({}, output)];
1347
+ _c = {};
1348
+ return [4, parseErrorBody(output.body, context)];
1349
+ case 1:
1350
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1351
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1352
+ _b = errorCode;
1353
+ switch (_b) {
1354
+ case "AccessDeniedException": return [3, 2];
1355
+ case "com.amazonaws.migrationhuborchestrator#AccessDeniedException": return [3, 2];
1356
+ case "InternalServerException": return [3, 4];
1357
+ case "com.amazonaws.migrationhuborchestrator#InternalServerException": return [3, 4];
1358
+ case "ResourceNotFoundException": return [3, 6];
1359
+ case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException": return [3, 6];
1360
+ case "ThrottlingException": return [3, 8];
1361
+ case "com.amazonaws.migrationhuborchestrator#ThrottlingException": return [3, 8];
1362
+ case "ValidationException": return [3, 10];
1363
+ case "com.amazonaws.migrationhuborchestrator#ValidationException": return [3, 10];
1364
+ }
1365
+ return [3, 12];
1366
+ case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
1367
+ case 3: throw _d.sent();
1368
+ case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
1369
+ case 5: throw _d.sent();
1370
+ case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1371
+ case 7: throw _d.sent();
1372
+ case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
1373
+ case 9: throw _d.sent();
1374
+ case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
1375
+ case 11: throw _d.sent();
1376
+ case 12:
1377
+ parsedBody = parsedOutput.body;
1378
+ throwDefaultError({
1379
+ output: output,
1380
+ parsedBody: parsedBody,
1381
+ exceptionCtor: __BaseException,
1382
+ errorCode: errorCode,
1383
+ });
1384
+ _d.label = 13;
1385
+ case 13: return [2];
1386
+ }
1387
+ });
1388
+ }); };
1389
+ export var deserializeAws_restJson1GetTemplateStepGroupCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1390
+ var contents, data, _a, _b;
1391
+ return __generator(this, function (_c) {
1392
+ switch (_c.label) {
1393
+ case 0:
1394
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1395
+ return [2, deserializeAws_restJson1GetTemplateStepGroupCommandError(output, context)];
1396
+ }
1397
+ contents = map({
1398
+ $metadata: deserializeMetadata(output),
1399
+ });
1400
+ _a = __expectNonNull;
1401
+ _b = __expectObject;
1402
+ return [4, parseBody(output.body, context)];
1403
+ case 1:
1404
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1405
+ if (data.creationTime != null) {
1406
+ contents.creationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationTime)));
1407
+ }
1408
+ if (data.description != null) {
1409
+ contents.description = __expectString(data.description);
1410
+ }
1411
+ if (data.id != null) {
1412
+ contents.id = __expectString(data.id);
1413
+ }
1414
+ if (data.lastModifiedTime != null) {
1415
+ contents.lastModifiedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastModifiedTime)));
1416
+ }
1417
+ if (data.name != null) {
1418
+ contents.name = __expectString(data.name);
1419
+ }
1420
+ if (data.next != null) {
1421
+ contents.next = deserializeAws_restJson1StringList(data.next, context);
1422
+ }
1423
+ if (data.previous != null) {
1424
+ contents.previous = deserializeAws_restJson1StringList(data.previous, context);
1425
+ }
1426
+ if (data.status != null) {
1427
+ contents.status = __expectString(data.status);
1428
+ }
1429
+ if (data.templateId != null) {
1430
+ contents.templateId = __expectString(data.templateId);
1431
+ }
1432
+ if (data.tools != null) {
1433
+ contents.tools = deserializeAws_restJson1ToolsList(data.tools, context);
1434
+ }
1435
+ return [2, contents];
1436
+ }
1437
+ });
1438
+ }); };
1439
+ var deserializeAws_restJson1GetTemplateStepGroupCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1440
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1441
+ var _c;
1442
+ return __generator(this, function (_d) {
1443
+ switch (_d.label) {
1444
+ case 0:
1445
+ _a = [__assign({}, output)];
1446
+ _c = {};
1447
+ return [4, parseErrorBody(output.body, context)];
1448
+ case 1:
1449
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1450
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1451
+ _b = errorCode;
1452
+ switch (_b) {
1453
+ case "AccessDeniedException": return [3, 2];
1454
+ case "com.amazonaws.migrationhuborchestrator#AccessDeniedException": return [3, 2];
1455
+ case "InternalServerException": return [3, 4];
1456
+ case "com.amazonaws.migrationhuborchestrator#InternalServerException": return [3, 4];
1457
+ case "ResourceNotFoundException": return [3, 6];
1458
+ case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException": return [3, 6];
1459
+ case "ThrottlingException": return [3, 8];
1460
+ case "com.amazonaws.migrationhuborchestrator#ThrottlingException": return [3, 8];
1461
+ case "ValidationException": return [3, 10];
1462
+ case "com.amazonaws.migrationhuborchestrator#ValidationException": return [3, 10];
1463
+ }
1464
+ return [3, 12];
1465
+ case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
1466
+ case 3: throw _d.sent();
1467
+ case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
1468
+ case 5: throw _d.sent();
1469
+ case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1470
+ case 7: throw _d.sent();
1471
+ case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
1472
+ case 9: throw _d.sent();
1473
+ case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
1474
+ case 11: throw _d.sent();
1475
+ case 12:
1476
+ parsedBody = parsedOutput.body;
1477
+ throwDefaultError({
1478
+ output: output,
1479
+ parsedBody: parsedBody,
1480
+ exceptionCtor: __BaseException,
1481
+ errorCode: errorCode,
1482
+ });
1483
+ _d.label = 13;
1484
+ case 13: return [2];
1485
+ }
1486
+ });
1487
+ }); };
1488
+ export var deserializeAws_restJson1GetWorkflowCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1489
+ var contents, data, _a, _b;
1490
+ return __generator(this, function (_c) {
1491
+ switch (_c.label) {
1492
+ case 0:
1493
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1494
+ return [2, deserializeAws_restJson1GetWorkflowCommandError(output, context)];
1495
+ }
1496
+ contents = map({
1497
+ $metadata: deserializeMetadata(output),
1498
+ });
1499
+ _a = __expectNonNull;
1500
+ _b = __expectObject;
1501
+ return [4, parseBody(output.body, context)];
1502
+ case 1:
1503
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1504
+ if (data.adsApplicationConfigurationId != null) {
1505
+ contents.adsApplicationConfigurationId = __expectString(data.adsApplicationConfigurationId);
1506
+ }
1507
+ if (data.adsApplicationName != null) {
1508
+ contents.adsApplicationName = __expectString(data.adsApplicationName);
1509
+ }
1510
+ if (data.arn != null) {
1511
+ contents.arn = __expectString(data.arn);
1512
+ }
1513
+ if (data.completedSteps != null) {
1514
+ contents.completedSteps = __expectInt32(data.completedSteps);
1515
+ }
1516
+ if (data.creationTime != null) {
1517
+ contents.creationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationTime)));
1518
+ }
1519
+ if (data.description != null) {
1520
+ contents.description = __expectString(data.description);
1521
+ }
1522
+ if (data.endTime != null) {
1523
+ contents.endTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.endTime)));
1524
+ }
1525
+ if (data.id != null) {
1526
+ contents.id = __expectString(data.id);
1527
+ }
1528
+ if (data.lastModifiedTime != null) {
1529
+ contents.lastModifiedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastModifiedTime)));
1530
+ }
1531
+ if (data.lastStartTime != null) {
1532
+ contents.lastStartTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastStartTime)));
1533
+ }
1534
+ if (data.lastStopTime != null) {
1535
+ contents.lastStopTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastStopTime)));
1536
+ }
1537
+ if (data.name != null) {
1538
+ contents.name = __expectString(data.name);
1539
+ }
1540
+ if (data.status != null) {
1541
+ contents.status = __expectString(data.status);
1542
+ }
1543
+ if (data.statusMessage != null) {
1544
+ contents.statusMessage = __expectString(data.statusMessage);
1545
+ }
1546
+ if (data.tags != null) {
1547
+ contents.tags = deserializeAws_restJson1StringMap(data.tags, context);
1548
+ }
1549
+ if (data.templateId != null) {
1550
+ contents.templateId = __expectString(data.templateId);
1551
+ }
1552
+ if (data.tools != null) {
1553
+ contents.tools = deserializeAws_restJson1ToolsList(data.tools, context);
1554
+ }
1555
+ if (data.totalSteps != null) {
1556
+ contents.totalSteps = __expectInt32(data.totalSteps);
1557
+ }
1558
+ if (data.workflowBucket != null) {
1559
+ contents.workflowBucket = __expectString(data.workflowBucket);
1560
+ }
1561
+ if (data.workflowInputs != null) {
1562
+ contents.workflowInputs = deserializeAws_restJson1StepInputParameters(data.workflowInputs, context);
1563
+ }
1564
+ return [2, contents];
1565
+ }
1566
+ });
1567
+ }); };
1568
+ var deserializeAws_restJson1GetWorkflowCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1569
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1570
+ var _c;
1571
+ return __generator(this, function (_d) {
1572
+ switch (_d.label) {
1573
+ case 0:
1574
+ _a = [__assign({}, output)];
1575
+ _c = {};
1576
+ return [4, parseErrorBody(output.body, context)];
1577
+ case 1:
1578
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1579
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1580
+ _b = errorCode;
1581
+ switch (_b) {
1582
+ case "AccessDeniedException": return [3, 2];
1583
+ case "com.amazonaws.migrationhuborchestrator#AccessDeniedException": return [3, 2];
1584
+ case "InternalServerException": return [3, 4];
1585
+ case "com.amazonaws.migrationhuborchestrator#InternalServerException": return [3, 4];
1586
+ case "ResourceNotFoundException": return [3, 6];
1587
+ case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException": return [3, 6];
1588
+ case "ThrottlingException": return [3, 8];
1589
+ case "com.amazonaws.migrationhuborchestrator#ThrottlingException": return [3, 8];
1590
+ case "ValidationException": return [3, 10];
1591
+ case "com.amazonaws.migrationhuborchestrator#ValidationException": return [3, 10];
1592
+ }
1593
+ return [3, 12];
1594
+ case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
1595
+ case 3: throw _d.sent();
1596
+ case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
1597
+ case 5: throw _d.sent();
1598
+ case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1599
+ case 7: throw _d.sent();
1600
+ case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
1601
+ case 9: throw _d.sent();
1602
+ case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
1603
+ case 11: throw _d.sent();
1604
+ case 12:
1605
+ parsedBody = parsedOutput.body;
1606
+ throwDefaultError({
1607
+ output: output,
1608
+ parsedBody: parsedBody,
1609
+ exceptionCtor: __BaseException,
1610
+ errorCode: errorCode,
1611
+ });
1612
+ _d.label = 13;
1613
+ case 13: return [2];
1614
+ }
1615
+ });
1616
+ }); };
1617
+ export var deserializeAws_restJson1GetWorkflowStepCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1618
+ var contents, data, _a, _b;
1619
+ return __generator(this, function (_c) {
1620
+ switch (_c.label) {
1621
+ case 0:
1622
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1623
+ return [2, deserializeAws_restJson1GetWorkflowStepCommandError(output, context)];
1624
+ }
1625
+ contents = map({
1626
+ $metadata: deserializeMetadata(output),
1627
+ });
1628
+ _a = __expectNonNull;
1629
+ _b = __expectObject;
1630
+ return [4, parseBody(output.body, context)];
1631
+ case 1:
1632
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1633
+ if (data.creationTime != null) {
1634
+ contents.creationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationTime)));
1635
+ }
1636
+ if (data.description != null) {
1637
+ contents.description = __expectString(data.description);
1638
+ }
1639
+ if (data.endTime != null) {
1640
+ contents.endTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.endTime)));
1641
+ }
1642
+ if (data.lastStartTime != null) {
1643
+ contents.lastStartTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastStartTime)));
1644
+ }
1645
+ if (data.name != null) {
1646
+ contents.name = __expectString(data.name);
1647
+ }
1648
+ if (data.next != null) {
1649
+ contents.next = deserializeAws_restJson1StringList(data.next, context);
1650
+ }
1651
+ if (data.noOfSrvCompleted != null) {
1652
+ contents.noOfSrvCompleted = __expectInt32(data.noOfSrvCompleted);
1653
+ }
1654
+ if (data.noOfSrvFailed != null) {
1655
+ contents.noOfSrvFailed = __expectInt32(data.noOfSrvFailed);
1656
+ }
1657
+ if (data.outputs != null) {
1658
+ contents.outputs = deserializeAws_restJson1WorkflowStepOutputList(data.outputs, context);
1659
+ }
1660
+ if (data.owner != null) {
1661
+ contents.owner = __expectString(data.owner);
1662
+ }
1663
+ if (data.previous != null) {
1664
+ contents.previous = deserializeAws_restJson1StringList(data.previous, context);
1665
+ }
1666
+ if (data.scriptOutputLocation != null) {
1667
+ contents.scriptOutputLocation = __expectString(data.scriptOutputLocation);
1668
+ }
1669
+ if (data.status != null) {
1670
+ contents.status = __expectString(data.status);
1671
+ }
1672
+ if (data.statusMessage != null) {
1673
+ contents.statusMessage = __expectString(data.statusMessage);
1674
+ }
1675
+ if (data.stepActionType != null) {
1676
+ contents.stepActionType = __expectString(data.stepActionType);
1677
+ }
1678
+ if (data.stepGroupId != null) {
1679
+ contents.stepGroupId = __expectString(data.stepGroupId);
1680
+ }
1681
+ if (data.stepId != null) {
1682
+ contents.stepId = __expectString(data.stepId);
1683
+ }
1684
+ if (data.stepTarget != null) {
1685
+ contents.stepTarget = deserializeAws_restJson1StringList(data.stepTarget, context);
1686
+ }
1687
+ if (data.totalNoOfSrv != null) {
1688
+ contents.totalNoOfSrv = __expectInt32(data.totalNoOfSrv);
1689
+ }
1690
+ if (data.workflowId != null) {
1691
+ contents.workflowId = __expectString(data.workflowId);
1692
+ }
1693
+ if (data.workflowStepAutomationConfiguration != null) {
1694
+ contents.workflowStepAutomationConfiguration = deserializeAws_restJson1WorkflowStepAutomationConfiguration(data.workflowStepAutomationConfiguration, context);
1695
+ }
1696
+ return [2, contents];
1697
+ }
1698
+ });
1699
+ }); };
1700
+ var deserializeAws_restJson1GetWorkflowStepCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1701
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1702
+ var _c;
1703
+ return __generator(this, function (_d) {
1704
+ switch (_d.label) {
1705
+ case 0:
1706
+ _a = [__assign({}, output)];
1707
+ _c = {};
1708
+ return [4, parseErrorBody(output.body, context)];
1709
+ case 1:
1710
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1711
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1712
+ _b = errorCode;
1713
+ switch (_b) {
1714
+ case "AccessDeniedException": return [3, 2];
1715
+ case "com.amazonaws.migrationhuborchestrator#AccessDeniedException": return [3, 2];
1716
+ case "InternalServerException": return [3, 4];
1717
+ case "com.amazonaws.migrationhuborchestrator#InternalServerException": return [3, 4];
1718
+ case "ResourceNotFoundException": return [3, 6];
1719
+ case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException": return [3, 6];
1720
+ case "ThrottlingException": return [3, 8];
1721
+ case "com.amazonaws.migrationhuborchestrator#ThrottlingException": return [3, 8];
1722
+ }
1723
+ return [3, 10];
1724
+ case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
1725
+ case 3: throw _d.sent();
1726
+ case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
1727
+ case 5: throw _d.sent();
1728
+ case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1729
+ case 7: throw _d.sent();
1730
+ case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
1731
+ case 9: throw _d.sent();
1732
+ case 10:
1733
+ parsedBody = parsedOutput.body;
1734
+ throwDefaultError({
1735
+ output: output,
1736
+ parsedBody: parsedBody,
1737
+ exceptionCtor: __BaseException,
1738
+ errorCode: errorCode,
1739
+ });
1740
+ _d.label = 11;
1741
+ case 11: return [2];
1742
+ }
1743
+ });
1744
+ }); };
1745
+ export var deserializeAws_restJson1GetWorkflowStepGroupCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1746
+ var contents, data, _a, _b;
1747
+ return __generator(this, function (_c) {
1748
+ switch (_c.label) {
1749
+ case 0:
1750
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1751
+ return [2, deserializeAws_restJson1GetWorkflowStepGroupCommandError(output, context)];
1752
+ }
1753
+ contents = map({
1754
+ $metadata: deserializeMetadata(output),
1755
+ });
1756
+ _a = __expectNonNull;
1757
+ _b = __expectObject;
1758
+ return [4, parseBody(output.body, context)];
1759
+ case 1:
1760
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1761
+ if (data.creationTime != null) {
1762
+ contents.creationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationTime)));
1763
+ }
1764
+ if (data.description != null) {
1765
+ contents.description = __expectString(data.description);
1766
+ }
1767
+ if (data.endTime != null) {
1768
+ contents.endTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.endTime)));
1769
+ }
1770
+ if (data.id != null) {
1771
+ contents.id = __expectString(data.id);
1772
+ }
1773
+ if (data.lastModifiedTime != null) {
1774
+ contents.lastModifiedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastModifiedTime)));
1775
+ }
1776
+ if (data.name != null) {
1777
+ contents.name = __expectString(data.name);
1778
+ }
1779
+ if (data.next != null) {
1780
+ contents.next = deserializeAws_restJson1StringList(data.next, context);
1781
+ }
1782
+ if (data.owner != null) {
1783
+ contents.owner = __expectString(data.owner);
1784
+ }
1785
+ if (data.previous != null) {
1786
+ contents.previous = deserializeAws_restJson1StringList(data.previous, context);
1787
+ }
1788
+ if (data.status != null) {
1789
+ contents.status = __expectString(data.status);
1790
+ }
1791
+ if (data.tools != null) {
1792
+ contents.tools = deserializeAws_restJson1ToolsList(data.tools, context);
1793
+ }
1794
+ if (data.workflowId != null) {
1795
+ contents.workflowId = __expectString(data.workflowId);
1796
+ }
1797
+ return [2, contents];
1798
+ }
1799
+ });
1800
+ }); };
1801
+ var deserializeAws_restJson1GetWorkflowStepGroupCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1802
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1803
+ var _c;
1804
+ return __generator(this, function (_d) {
1805
+ switch (_d.label) {
1806
+ case 0:
1807
+ _a = [__assign({}, output)];
1808
+ _c = {};
1809
+ return [4, parseErrorBody(output.body, context)];
1810
+ case 1:
1811
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1812
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1813
+ _b = errorCode;
1814
+ switch (_b) {
1815
+ case "AccessDeniedException": return [3, 2];
1816
+ case "com.amazonaws.migrationhuborchestrator#AccessDeniedException": return [3, 2];
1817
+ case "InternalServerException": return [3, 4];
1818
+ case "com.amazonaws.migrationhuborchestrator#InternalServerException": return [3, 4];
1819
+ case "ResourceNotFoundException": return [3, 6];
1820
+ case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException": return [3, 6];
1821
+ case "ThrottlingException": return [3, 8];
1822
+ case "com.amazonaws.migrationhuborchestrator#ThrottlingException": return [3, 8];
1823
+ case "ValidationException": return [3, 10];
1824
+ case "com.amazonaws.migrationhuborchestrator#ValidationException": return [3, 10];
1825
+ }
1826
+ return [3, 12];
1827
+ case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
1828
+ case 3: throw _d.sent();
1829
+ case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
1830
+ case 5: throw _d.sent();
1831
+ case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1832
+ case 7: throw _d.sent();
1833
+ case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
1834
+ case 9: throw _d.sent();
1835
+ case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
1836
+ case 11: throw _d.sent();
1837
+ case 12:
1838
+ parsedBody = parsedOutput.body;
1839
+ throwDefaultError({
1840
+ output: output,
1841
+ parsedBody: parsedBody,
1842
+ exceptionCtor: __BaseException,
1843
+ errorCode: errorCode,
1844
+ });
1845
+ _d.label = 13;
1846
+ case 13: return [2];
1847
+ }
1848
+ });
1849
+ }); };
1850
+ export var deserializeAws_restJson1ListPluginsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1851
+ var contents, data, _a, _b;
1852
+ return __generator(this, function (_c) {
1853
+ switch (_c.label) {
1854
+ case 0:
1855
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1856
+ return [2, deserializeAws_restJson1ListPluginsCommandError(output, context)];
1857
+ }
1858
+ contents = map({
1859
+ $metadata: deserializeMetadata(output),
1860
+ });
1861
+ _a = __expectNonNull;
1862
+ _b = __expectObject;
1863
+ return [4, parseBody(output.body, context)];
1864
+ case 1:
1865
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1866
+ if (data.nextToken != null) {
1867
+ contents.nextToken = __expectString(data.nextToken);
1868
+ }
1869
+ if (data.plugins != null) {
1870
+ contents.plugins = deserializeAws_restJson1PluginSummaries(data.plugins, context);
1871
+ }
1872
+ return [2, contents];
1873
+ }
1874
+ });
1875
+ }); };
1876
+ var deserializeAws_restJson1ListPluginsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1877
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1878
+ var _c;
1879
+ return __generator(this, function (_d) {
1880
+ switch (_d.label) {
1881
+ case 0:
1882
+ _a = [__assign({}, output)];
1883
+ _c = {};
1884
+ return [4, parseErrorBody(output.body, context)];
1885
+ case 1:
1886
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1887
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1888
+ _b = errorCode;
1889
+ switch (_b) {
1890
+ case "AccessDeniedException": return [3, 2];
1891
+ case "com.amazonaws.migrationhuborchestrator#AccessDeniedException": return [3, 2];
1892
+ case "InternalServerException": return [3, 4];
1893
+ case "com.amazonaws.migrationhuborchestrator#InternalServerException": return [3, 4];
1894
+ case "ValidationException": return [3, 6];
1895
+ case "com.amazonaws.migrationhuborchestrator#ValidationException": return [3, 6];
1896
+ }
1897
+ return [3, 8];
1898
+ case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
1899
+ case 3: throw _d.sent();
1900
+ case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
1901
+ case 5: throw _d.sent();
1902
+ case 6: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
1903
+ case 7: throw _d.sent();
1904
+ case 8:
1905
+ parsedBody = parsedOutput.body;
1906
+ throwDefaultError({
1907
+ output: output,
1908
+ parsedBody: parsedBody,
1909
+ exceptionCtor: __BaseException,
1910
+ errorCode: errorCode,
1911
+ });
1912
+ _d.label = 9;
1913
+ case 9: return [2];
1914
+ }
1915
+ });
1916
+ }); };
1917
+ export var deserializeAws_restJson1ListTagsForResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1918
+ var contents, data, _a, _b;
1919
+ return __generator(this, function (_c) {
1920
+ switch (_c.label) {
1921
+ case 0:
1922
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1923
+ return [2, deserializeAws_restJson1ListTagsForResourceCommandError(output, context)];
1924
+ }
1925
+ contents = map({
1926
+ $metadata: deserializeMetadata(output),
1927
+ });
1928
+ _a = __expectNonNull;
1929
+ _b = __expectObject;
1930
+ return [4, parseBody(output.body, context)];
1931
+ case 1:
1932
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1933
+ if (data.tags != null) {
1934
+ contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
1935
+ }
1936
+ return [2, contents];
1937
+ }
1938
+ });
1939
+ }); };
1940
+ var deserializeAws_restJson1ListTagsForResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1941
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1942
+ var _c;
1943
+ return __generator(this, function (_d) {
1944
+ switch (_d.label) {
1945
+ case 0:
1946
+ _a = [__assign({}, output)];
1947
+ _c = {};
1948
+ return [4, parseErrorBody(output.body, context)];
1949
+ case 1:
1950
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1951
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1952
+ _b = errorCode;
1953
+ switch (_b) {
1954
+ case "ResourceNotFoundException": return [3, 2];
1955
+ case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException": return [3, 2];
1956
+ case "ValidationException": return [3, 4];
1957
+ case "com.amazonaws.migrationhuborchestrator#ValidationException": return [3, 4];
1958
+ }
1959
+ return [3, 6];
1960
+ case 2: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1961
+ case 3: throw _d.sent();
1962
+ case 4: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
1963
+ case 5: throw _d.sent();
1964
+ case 6:
1965
+ parsedBody = parsedOutput.body;
1966
+ throwDefaultError({
1967
+ output: output,
1968
+ parsedBody: parsedBody,
1969
+ exceptionCtor: __BaseException,
1970
+ errorCode: errorCode,
1971
+ });
1972
+ _d.label = 7;
1973
+ case 7: return [2];
1974
+ }
1975
+ });
1976
+ }); };
1977
+ export var deserializeAws_restJson1ListTemplatesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1978
+ var contents, data, _a, _b;
1979
+ return __generator(this, function (_c) {
1980
+ switch (_c.label) {
1981
+ case 0:
1982
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1983
+ return [2, deserializeAws_restJson1ListTemplatesCommandError(output, context)];
1984
+ }
1985
+ contents = map({
1986
+ $metadata: deserializeMetadata(output),
1987
+ });
1988
+ _a = __expectNonNull;
1989
+ _b = __expectObject;
1990
+ return [4, parseBody(output.body, context)];
1991
+ case 1:
1992
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1993
+ if (data.nextToken != null) {
1994
+ contents.nextToken = __expectString(data.nextToken);
1995
+ }
1996
+ if (data.templateSummary != null) {
1997
+ contents.templateSummary = deserializeAws_restJson1TemplateSummaryList(data.templateSummary, context);
1998
+ }
1999
+ return [2, contents];
2000
+ }
2001
+ });
2002
+ }); };
2003
+ var deserializeAws_restJson1ListTemplatesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2004
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2005
+ var _c;
2006
+ return __generator(this, function (_d) {
2007
+ switch (_d.label) {
2008
+ case 0:
2009
+ _a = [__assign({}, output)];
2010
+ _c = {};
2011
+ return [4, parseErrorBody(output.body, context)];
2012
+ case 1:
2013
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2014
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2015
+ _b = errorCode;
2016
+ switch (_b) {
2017
+ case "AccessDeniedException": return [3, 2];
2018
+ case "com.amazonaws.migrationhuborchestrator#AccessDeniedException": return [3, 2];
2019
+ case "InternalServerException": return [3, 4];
2020
+ case "com.amazonaws.migrationhuborchestrator#InternalServerException": return [3, 4];
2021
+ case "ThrottlingException": return [3, 6];
2022
+ case "com.amazonaws.migrationhuborchestrator#ThrottlingException": return [3, 6];
2023
+ }
2024
+ return [3, 8];
2025
+ case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
2026
+ case 3: throw _d.sent();
2027
+ case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
2028
+ case 5: throw _d.sent();
2029
+ case 6: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
2030
+ case 7: throw _d.sent();
2031
+ case 8:
2032
+ parsedBody = parsedOutput.body;
2033
+ throwDefaultError({
2034
+ output: output,
2035
+ parsedBody: parsedBody,
2036
+ exceptionCtor: __BaseException,
2037
+ errorCode: errorCode,
2038
+ });
2039
+ _d.label = 9;
2040
+ case 9: return [2];
2041
+ }
2042
+ });
2043
+ }); };
2044
+ export var deserializeAws_restJson1ListTemplateStepGroupsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2045
+ var contents, data, _a, _b;
2046
+ return __generator(this, function (_c) {
2047
+ switch (_c.label) {
2048
+ case 0:
2049
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2050
+ return [2, deserializeAws_restJson1ListTemplateStepGroupsCommandError(output, context)];
2051
+ }
2052
+ contents = map({
2053
+ $metadata: deserializeMetadata(output),
2054
+ });
2055
+ _a = __expectNonNull;
2056
+ _b = __expectObject;
2057
+ return [4, parseBody(output.body, context)];
2058
+ case 1:
2059
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2060
+ if (data.nextToken != null) {
2061
+ contents.nextToken = __expectString(data.nextToken);
2062
+ }
2063
+ if (data.templateStepGroupSummary != null) {
2064
+ contents.templateStepGroupSummary = deserializeAws_restJson1TemplateStepGroupSummaryList(data.templateStepGroupSummary, context);
2065
+ }
2066
+ return [2, contents];
2067
+ }
2068
+ });
2069
+ }); };
2070
+ var deserializeAws_restJson1ListTemplateStepGroupsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2071
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2072
+ var _c;
2073
+ return __generator(this, function (_d) {
2074
+ switch (_d.label) {
2075
+ case 0:
2076
+ _a = [__assign({}, output)];
2077
+ _c = {};
2078
+ return [4, parseErrorBody(output.body, context)];
2079
+ case 1:
2080
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2081
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2082
+ _b = errorCode;
2083
+ switch (_b) {
2084
+ case "AccessDeniedException": return [3, 2];
2085
+ case "com.amazonaws.migrationhuborchestrator#AccessDeniedException": return [3, 2];
2086
+ case "InternalServerException": return [3, 4];
2087
+ case "com.amazonaws.migrationhuborchestrator#InternalServerException": return [3, 4];
2088
+ case "ResourceNotFoundException": return [3, 6];
2089
+ case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException": return [3, 6];
2090
+ case "ThrottlingException": return [3, 8];
2091
+ case "com.amazonaws.migrationhuborchestrator#ThrottlingException": return [3, 8];
2092
+ }
2093
+ return [3, 10];
2094
+ case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
2095
+ case 3: throw _d.sent();
2096
+ case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
2097
+ case 5: throw _d.sent();
2098
+ case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
2099
+ case 7: throw _d.sent();
2100
+ case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
2101
+ case 9: throw _d.sent();
2102
+ case 10:
2103
+ parsedBody = parsedOutput.body;
2104
+ throwDefaultError({
2105
+ output: output,
2106
+ parsedBody: parsedBody,
2107
+ exceptionCtor: __BaseException,
2108
+ errorCode: errorCode,
2109
+ });
2110
+ _d.label = 11;
2111
+ case 11: return [2];
2112
+ }
2113
+ });
2114
+ }); };
2115
+ export var deserializeAws_restJson1ListTemplateStepsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2116
+ var contents, data, _a, _b;
2117
+ return __generator(this, function (_c) {
2118
+ switch (_c.label) {
2119
+ case 0:
2120
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2121
+ return [2, deserializeAws_restJson1ListTemplateStepsCommandError(output, context)];
2122
+ }
2123
+ contents = map({
2124
+ $metadata: deserializeMetadata(output),
2125
+ });
2126
+ _a = __expectNonNull;
2127
+ _b = __expectObject;
2128
+ return [4, parseBody(output.body, context)];
2129
+ case 1:
2130
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2131
+ if (data.nextToken != null) {
2132
+ contents.nextToken = __expectString(data.nextToken);
2133
+ }
2134
+ if (data.templateStepSummaryList != null) {
2135
+ contents.templateStepSummaryList = deserializeAws_restJson1TemplateStepSummaryList(data.templateStepSummaryList, context);
2136
+ }
2137
+ return [2, contents];
2138
+ }
2139
+ });
2140
+ }); };
2141
+ var deserializeAws_restJson1ListTemplateStepsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2142
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2143
+ var _c;
2144
+ return __generator(this, function (_d) {
2145
+ switch (_d.label) {
2146
+ case 0:
2147
+ _a = [__assign({}, output)];
2148
+ _c = {};
2149
+ return [4, parseErrorBody(output.body, context)];
2150
+ case 1:
2151
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2152
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2153
+ _b = errorCode;
2154
+ switch (_b) {
2155
+ case "AccessDeniedException": return [3, 2];
2156
+ case "com.amazonaws.migrationhuborchestrator#AccessDeniedException": return [3, 2];
2157
+ case "InternalServerException": return [3, 4];
2158
+ case "com.amazonaws.migrationhuborchestrator#InternalServerException": return [3, 4];
2159
+ case "ResourceNotFoundException": return [3, 6];
2160
+ case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException": return [3, 6];
2161
+ case "ThrottlingException": return [3, 8];
2162
+ case "com.amazonaws.migrationhuborchestrator#ThrottlingException": return [3, 8];
2163
+ case "ValidationException": return [3, 10];
2164
+ case "com.amazonaws.migrationhuborchestrator#ValidationException": return [3, 10];
2165
+ }
2166
+ return [3, 12];
2167
+ case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
2168
+ case 3: throw _d.sent();
2169
+ case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
2170
+ case 5: throw _d.sent();
2171
+ case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
2172
+ case 7: throw _d.sent();
2173
+ case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
2174
+ case 9: throw _d.sent();
2175
+ case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
2176
+ case 11: throw _d.sent();
2177
+ case 12:
2178
+ parsedBody = parsedOutput.body;
2179
+ throwDefaultError({
2180
+ output: output,
2181
+ parsedBody: parsedBody,
2182
+ exceptionCtor: __BaseException,
2183
+ errorCode: errorCode,
2184
+ });
2185
+ _d.label = 13;
2186
+ case 13: return [2];
2187
+ }
2188
+ });
2189
+ }); };
2190
+ export var deserializeAws_restJson1ListWorkflowsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2191
+ var contents, data, _a, _b;
2192
+ return __generator(this, function (_c) {
2193
+ switch (_c.label) {
2194
+ case 0:
2195
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2196
+ return [2, deserializeAws_restJson1ListWorkflowsCommandError(output, context)];
2197
+ }
2198
+ contents = map({
2199
+ $metadata: deserializeMetadata(output),
2200
+ });
2201
+ _a = __expectNonNull;
2202
+ _b = __expectObject;
2203
+ return [4, parseBody(output.body, context)];
2204
+ case 1:
2205
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2206
+ if (data.migrationWorkflowSummary != null) {
2207
+ contents.migrationWorkflowSummary = deserializeAws_restJson1MigrationWorkflowSummaryList(data.migrationWorkflowSummary, context);
2208
+ }
2209
+ if (data.nextToken != null) {
2210
+ contents.nextToken = __expectString(data.nextToken);
2211
+ }
2212
+ return [2, contents];
2213
+ }
2214
+ });
2215
+ }); };
2216
+ var deserializeAws_restJson1ListWorkflowsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2217
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2218
+ var _c;
2219
+ return __generator(this, function (_d) {
2220
+ switch (_d.label) {
2221
+ case 0:
2222
+ _a = [__assign({}, output)];
2223
+ _c = {};
2224
+ return [4, parseErrorBody(output.body, context)];
2225
+ case 1:
2226
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2227
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2228
+ _b = errorCode;
2229
+ switch (_b) {
2230
+ case "AccessDeniedException": return [3, 2];
2231
+ case "com.amazonaws.migrationhuborchestrator#AccessDeniedException": return [3, 2];
2232
+ case "InternalServerException": return [3, 4];
2233
+ case "com.amazonaws.migrationhuborchestrator#InternalServerException": return [3, 4];
2234
+ case "ResourceNotFoundException": return [3, 6];
2235
+ case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException": return [3, 6];
2236
+ case "ThrottlingException": return [3, 8];
2237
+ case "com.amazonaws.migrationhuborchestrator#ThrottlingException": return [3, 8];
2238
+ case "ValidationException": return [3, 10];
2239
+ case "com.amazonaws.migrationhuborchestrator#ValidationException": return [3, 10];
2240
+ }
2241
+ return [3, 12];
2242
+ case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
2243
+ case 3: throw _d.sent();
2244
+ case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
2245
+ case 5: throw _d.sent();
2246
+ case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
2247
+ case 7: throw _d.sent();
2248
+ case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
2249
+ case 9: throw _d.sent();
2250
+ case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
2251
+ case 11: throw _d.sent();
2252
+ case 12:
2253
+ parsedBody = parsedOutput.body;
2254
+ throwDefaultError({
2255
+ output: output,
2256
+ parsedBody: parsedBody,
2257
+ exceptionCtor: __BaseException,
2258
+ errorCode: errorCode,
2259
+ });
2260
+ _d.label = 13;
2261
+ case 13: return [2];
2262
+ }
2263
+ });
2264
+ }); };
2265
+ export var deserializeAws_restJson1ListWorkflowStepGroupsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2266
+ var contents, data, _a, _b;
2267
+ return __generator(this, function (_c) {
2268
+ switch (_c.label) {
2269
+ case 0:
2270
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2271
+ return [2, deserializeAws_restJson1ListWorkflowStepGroupsCommandError(output, context)];
2272
+ }
2273
+ contents = map({
2274
+ $metadata: deserializeMetadata(output),
2275
+ });
2276
+ _a = __expectNonNull;
2277
+ _b = __expectObject;
2278
+ return [4, parseBody(output.body, context)];
2279
+ case 1:
2280
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2281
+ if (data.nextToken != null) {
2282
+ contents.nextToken = __expectString(data.nextToken);
2283
+ }
2284
+ if (data.workflowStepGroupsSummary != null) {
2285
+ contents.workflowStepGroupsSummary = deserializeAws_restJson1WorkflowStepGroupsSummaryList(data.workflowStepGroupsSummary, context);
2286
+ }
2287
+ return [2, contents];
2288
+ }
2289
+ });
2290
+ }); };
2291
+ var deserializeAws_restJson1ListWorkflowStepGroupsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2292
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2293
+ var _c;
2294
+ return __generator(this, function (_d) {
2295
+ switch (_d.label) {
2296
+ case 0:
2297
+ _a = [__assign({}, output)];
2298
+ _c = {};
2299
+ return [4, parseErrorBody(output.body, context)];
2300
+ case 1:
2301
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2302
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2303
+ _b = errorCode;
2304
+ switch (_b) {
2305
+ case "AccessDeniedException": return [3, 2];
2306
+ case "com.amazonaws.migrationhuborchestrator#AccessDeniedException": return [3, 2];
2307
+ case "InternalServerException": return [3, 4];
2308
+ case "com.amazonaws.migrationhuborchestrator#InternalServerException": return [3, 4];
2309
+ case "ResourceNotFoundException": return [3, 6];
2310
+ case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException": return [3, 6];
2311
+ case "ThrottlingException": return [3, 8];
2312
+ case "com.amazonaws.migrationhuborchestrator#ThrottlingException": return [3, 8];
2313
+ case "ValidationException": return [3, 10];
2314
+ case "com.amazonaws.migrationhuborchestrator#ValidationException": return [3, 10];
2315
+ }
2316
+ return [3, 12];
2317
+ case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
2318
+ case 3: throw _d.sent();
2319
+ case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
2320
+ case 5: throw _d.sent();
2321
+ case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
2322
+ case 7: throw _d.sent();
2323
+ case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
2324
+ case 9: throw _d.sent();
2325
+ case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
2326
+ case 11: throw _d.sent();
2327
+ case 12:
2328
+ parsedBody = parsedOutput.body;
2329
+ throwDefaultError({
2330
+ output: output,
2331
+ parsedBody: parsedBody,
2332
+ exceptionCtor: __BaseException,
2333
+ errorCode: errorCode,
2334
+ });
2335
+ _d.label = 13;
2336
+ case 13: return [2];
2337
+ }
2338
+ });
2339
+ }); };
2340
+ export var deserializeAws_restJson1ListWorkflowStepsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2341
+ var contents, data, _a, _b;
2342
+ return __generator(this, function (_c) {
2343
+ switch (_c.label) {
2344
+ case 0:
2345
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2346
+ return [2, deserializeAws_restJson1ListWorkflowStepsCommandError(output, context)];
2347
+ }
2348
+ contents = map({
2349
+ $metadata: deserializeMetadata(output),
2350
+ });
2351
+ _a = __expectNonNull;
2352
+ _b = __expectObject;
2353
+ return [4, parseBody(output.body, context)];
2354
+ case 1:
2355
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2356
+ if (data.nextToken != null) {
2357
+ contents.nextToken = __expectString(data.nextToken);
2358
+ }
2359
+ if (data.workflowStepsSummary != null) {
2360
+ contents.workflowStepsSummary = deserializeAws_restJson1WorkflowStepsSummaryList(data.workflowStepsSummary, context);
2361
+ }
2362
+ return [2, contents];
2363
+ }
2364
+ });
2365
+ }); };
2366
+ var deserializeAws_restJson1ListWorkflowStepsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2367
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2368
+ var _c;
2369
+ return __generator(this, function (_d) {
2370
+ switch (_d.label) {
2371
+ case 0:
2372
+ _a = [__assign({}, output)];
2373
+ _c = {};
2374
+ return [4, parseErrorBody(output.body, context)];
2375
+ case 1:
2376
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2377
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2378
+ _b = errorCode;
2379
+ switch (_b) {
2380
+ case "AccessDeniedException": return [3, 2];
2381
+ case "com.amazonaws.migrationhuborchestrator#AccessDeniedException": return [3, 2];
2382
+ case "InternalServerException": return [3, 4];
2383
+ case "com.amazonaws.migrationhuborchestrator#InternalServerException": return [3, 4];
2384
+ case "ThrottlingException": return [3, 6];
2385
+ case "com.amazonaws.migrationhuborchestrator#ThrottlingException": return [3, 6];
2386
+ case "ValidationException": return [3, 8];
2387
+ case "com.amazonaws.migrationhuborchestrator#ValidationException": return [3, 8];
2388
+ }
2389
+ return [3, 10];
2390
+ case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
2391
+ case 3: throw _d.sent();
2392
+ case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
2393
+ case 5: throw _d.sent();
2394
+ case 6: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
2395
+ case 7: throw _d.sent();
2396
+ case 8: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
2397
+ case 9: throw _d.sent();
2398
+ case 10:
2399
+ parsedBody = parsedOutput.body;
2400
+ throwDefaultError({
2401
+ output: output,
2402
+ parsedBody: parsedBody,
2403
+ exceptionCtor: __BaseException,
2404
+ errorCode: errorCode,
2405
+ });
2406
+ _d.label = 11;
2407
+ case 11: return [2];
2408
+ }
2409
+ });
2410
+ }); };
2411
+ export var deserializeAws_restJson1RetryWorkflowStepCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2412
+ var contents, data, _a, _b;
2413
+ return __generator(this, function (_c) {
2414
+ switch (_c.label) {
2415
+ case 0:
2416
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2417
+ return [2, deserializeAws_restJson1RetryWorkflowStepCommandError(output, context)];
2418
+ }
2419
+ contents = map({
2420
+ $metadata: deserializeMetadata(output),
2421
+ });
2422
+ _a = __expectNonNull;
2423
+ _b = __expectObject;
2424
+ return [4, parseBody(output.body, context)];
2425
+ case 1:
2426
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2427
+ if (data.id != null) {
2428
+ contents.id = __expectString(data.id);
2429
+ }
2430
+ if (data.status != null) {
2431
+ contents.status = __expectString(data.status);
2432
+ }
2433
+ if (data.stepGroupId != null) {
2434
+ contents.stepGroupId = __expectString(data.stepGroupId);
2435
+ }
2436
+ if (data.workflowId != null) {
2437
+ contents.workflowId = __expectString(data.workflowId);
2438
+ }
2439
+ return [2, contents];
2440
+ }
2441
+ });
2442
+ }); };
2443
+ var deserializeAws_restJson1RetryWorkflowStepCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2444
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2445
+ var _c;
2446
+ return __generator(this, function (_d) {
2447
+ switch (_d.label) {
2448
+ case 0:
2449
+ _a = [__assign({}, output)];
2450
+ _c = {};
2451
+ return [4, parseErrorBody(output.body, context)];
2452
+ case 1:
2453
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2454
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2455
+ _b = errorCode;
2456
+ switch (_b) {
2457
+ case "AccessDeniedException": return [3, 2];
2458
+ case "com.amazonaws.migrationhuborchestrator#AccessDeniedException": return [3, 2];
2459
+ case "InternalServerException": return [3, 4];
2460
+ case "com.amazonaws.migrationhuborchestrator#InternalServerException": return [3, 4];
2461
+ case "ResourceNotFoundException": return [3, 6];
2462
+ case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException": return [3, 6];
2463
+ case "ThrottlingException": return [3, 8];
2464
+ case "com.amazonaws.migrationhuborchestrator#ThrottlingException": return [3, 8];
2465
+ }
2466
+ return [3, 10];
2467
+ case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
2468
+ case 3: throw _d.sent();
2469
+ case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
2470
+ case 5: throw _d.sent();
2471
+ case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
2472
+ case 7: throw _d.sent();
2473
+ case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
2474
+ case 9: throw _d.sent();
2475
+ case 10:
2476
+ parsedBody = parsedOutput.body;
2477
+ throwDefaultError({
2478
+ output: output,
2479
+ parsedBody: parsedBody,
2480
+ exceptionCtor: __BaseException,
2481
+ errorCode: errorCode,
2482
+ });
2483
+ _d.label = 11;
2484
+ case 11: return [2];
2485
+ }
2486
+ });
2487
+ }); };
2488
+ export var deserializeAws_restJson1StartWorkflowCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2489
+ var contents, data, _a, _b;
2490
+ return __generator(this, function (_c) {
2491
+ switch (_c.label) {
2492
+ case 0:
2493
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2494
+ return [2, deserializeAws_restJson1StartWorkflowCommandError(output, context)];
2495
+ }
2496
+ contents = map({
2497
+ $metadata: deserializeMetadata(output),
2498
+ });
2499
+ _a = __expectNonNull;
2500
+ _b = __expectObject;
2501
+ return [4, parseBody(output.body, context)];
2502
+ case 1:
2503
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2504
+ if (data.arn != null) {
2505
+ contents.arn = __expectString(data.arn);
2506
+ }
2507
+ if (data.id != null) {
2508
+ contents.id = __expectString(data.id);
2509
+ }
2510
+ if (data.lastStartTime != null) {
2511
+ contents.lastStartTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastStartTime)));
2512
+ }
2513
+ if (data.status != null) {
2514
+ contents.status = __expectString(data.status);
2515
+ }
2516
+ if (data.statusMessage != null) {
2517
+ contents.statusMessage = __expectString(data.statusMessage);
2518
+ }
2519
+ return [2, contents];
2520
+ }
2521
+ });
2522
+ }); };
2523
+ var deserializeAws_restJson1StartWorkflowCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2524
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2525
+ var _c;
2526
+ return __generator(this, function (_d) {
2527
+ switch (_d.label) {
2528
+ case 0:
2529
+ _a = [__assign({}, output)];
2530
+ _c = {};
2531
+ return [4, parseErrorBody(output.body, context)];
2532
+ case 1:
2533
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2534
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2535
+ _b = errorCode;
2536
+ switch (_b) {
2537
+ case "AccessDeniedException": return [3, 2];
2538
+ case "com.amazonaws.migrationhuborchestrator#AccessDeniedException": return [3, 2];
2539
+ case "InternalServerException": return [3, 4];
2540
+ case "com.amazonaws.migrationhuborchestrator#InternalServerException": return [3, 4];
2541
+ case "ResourceNotFoundException": return [3, 6];
2542
+ case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException": return [3, 6];
2543
+ case "ThrottlingException": return [3, 8];
2544
+ case "com.amazonaws.migrationhuborchestrator#ThrottlingException": return [3, 8];
2545
+ case "ValidationException": return [3, 10];
2546
+ case "com.amazonaws.migrationhuborchestrator#ValidationException": return [3, 10];
2547
+ }
2548
+ return [3, 12];
2549
+ case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
2550
+ case 3: throw _d.sent();
2551
+ case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
2552
+ case 5: throw _d.sent();
2553
+ case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
2554
+ case 7: throw _d.sent();
2555
+ case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
2556
+ case 9: throw _d.sent();
2557
+ case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
2558
+ case 11: throw _d.sent();
2559
+ case 12:
2560
+ parsedBody = parsedOutput.body;
2561
+ throwDefaultError({
2562
+ output: output,
2563
+ parsedBody: parsedBody,
2564
+ exceptionCtor: __BaseException,
2565
+ errorCode: errorCode,
2566
+ });
2567
+ _d.label = 13;
2568
+ case 13: return [2];
2569
+ }
2570
+ });
2571
+ }); };
2572
+ export var deserializeAws_restJson1StopWorkflowCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2573
+ var contents, data, _a, _b;
2574
+ return __generator(this, function (_c) {
2575
+ switch (_c.label) {
2576
+ case 0:
2577
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2578
+ return [2, deserializeAws_restJson1StopWorkflowCommandError(output, context)];
2579
+ }
2580
+ contents = map({
2581
+ $metadata: deserializeMetadata(output),
2582
+ });
2583
+ _a = __expectNonNull;
2584
+ _b = __expectObject;
2585
+ return [4, parseBody(output.body, context)];
2586
+ case 1:
2587
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2588
+ if (data.arn != null) {
2589
+ contents.arn = __expectString(data.arn);
2590
+ }
2591
+ if (data.id != null) {
2592
+ contents.id = __expectString(data.id);
2593
+ }
2594
+ if (data.lastStopTime != null) {
2595
+ contents.lastStopTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastStopTime)));
2596
+ }
2597
+ if (data.status != null) {
2598
+ contents.status = __expectString(data.status);
2599
+ }
2600
+ if (data.statusMessage != null) {
2601
+ contents.statusMessage = __expectString(data.statusMessage);
2602
+ }
2603
+ return [2, contents];
2604
+ }
2605
+ });
2606
+ }); };
2607
+ var deserializeAws_restJson1StopWorkflowCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2608
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2609
+ var _c;
2610
+ return __generator(this, function (_d) {
2611
+ switch (_d.label) {
2612
+ case 0:
2613
+ _a = [__assign({}, output)];
2614
+ _c = {};
2615
+ return [4, parseErrorBody(output.body, context)];
2616
+ case 1:
2617
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2618
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2619
+ _b = errorCode;
2620
+ switch (_b) {
2621
+ case "AccessDeniedException": return [3, 2];
2622
+ case "com.amazonaws.migrationhuborchestrator#AccessDeniedException": return [3, 2];
2623
+ case "InternalServerException": return [3, 4];
2624
+ case "com.amazonaws.migrationhuborchestrator#InternalServerException": return [3, 4];
2625
+ case "ResourceNotFoundException": return [3, 6];
2626
+ case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException": return [3, 6];
2627
+ case "ThrottlingException": return [3, 8];
2628
+ case "com.amazonaws.migrationhuborchestrator#ThrottlingException": return [3, 8];
2629
+ case "ValidationException": return [3, 10];
2630
+ case "com.amazonaws.migrationhuborchestrator#ValidationException": return [3, 10];
2631
+ }
2632
+ return [3, 12];
2633
+ case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
2634
+ case 3: throw _d.sent();
2635
+ case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
2636
+ case 5: throw _d.sent();
2637
+ case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
2638
+ case 7: throw _d.sent();
2639
+ case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
2640
+ case 9: throw _d.sent();
2641
+ case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
2642
+ case 11: throw _d.sent();
2643
+ case 12:
2644
+ parsedBody = parsedOutput.body;
2645
+ throwDefaultError({
2646
+ output: output,
2647
+ parsedBody: parsedBody,
2648
+ exceptionCtor: __BaseException,
2649
+ errorCode: errorCode,
2650
+ });
2651
+ _d.label = 13;
2652
+ case 13: return [2];
2653
+ }
2654
+ });
2655
+ }); };
2656
+ export var deserializeAws_restJson1TagResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2657
+ var contents;
2658
+ return __generator(this, function (_a) {
2659
+ switch (_a.label) {
2660
+ case 0:
2661
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2662
+ return [2, deserializeAws_restJson1TagResourceCommandError(output, context)];
2663
+ }
2664
+ contents = map({
2665
+ $metadata: deserializeMetadata(output),
2666
+ });
2667
+ return [4, collectBody(output.body, context)];
2668
+ case 1:
2669
+ _a.sent();
2670
+ return [2, contents];
2671
+ }
2672
+ });
2673
+ }); };
2674
+ var deserializeAws_restJson1TagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2675
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2676
+ var _c;
2677
+ return __generator(this, function (_d) {
2678
+ switch (_d.label) {
2679
+ case 0:
2680
+ _a = [__assign({}, output)];
2681
+ _c = {};
2682
+ return [4, parseErrorBody(output.body, context)];
2683
+ case 1:
2684
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2685
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2686
+ _b = errorCode;
2687
+ switch (_b) {
2688
+ case "ResourceNotFoundException": return [3, 2];
2689
+ case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException": return [3, 2];
2690
+ case "ValidationException": return [3, 4];
2691
+ case "com.amazonaws.migrationhuborchestrator#ValidationException": return [3, 4];
2692
+ }
2693
+ return [3, 6];
2694
+ case 2: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
2695
+ case 3: throw _d.sent();
2696
+ case 4: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
2697
+ case 5: throw _d.sent();
2698
+ case 6:
2699
+ parsedBody = parsedOutput.body;
2700
+ throwDefaultError({
2701
+ output: output,
2702
+ parsedBody: parsedBody,
2703
+ exceptionCtor: __BaseException,
2704
+ errorCode: errorCode,
2705
+ });
2706
+ _d.label = 7;
2707
+ case 7: return [2];
2708
+ }
2709
+ });
2710
+ }); };
2711
+ export var deserializeAws_restJson1UntagResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2712
+ var contents;
2713
+ return __generator(this, function (_a) {
2714
+ switch (_a.label) {
2715
+ case 0:
2716
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2717
+ return [2, deserializeAws_restJson1UntagResourceCommandError(output, context)];
2718
+ }
2719
+ contents = map({
2720
+ $metadata: deserializeMetadata(output),
2721
+ });
2722
+ return [4, collectBody(output.body, context)];
2723
+ case 1:
2724
+ _a.sent();
2725
+ return [2, contents];
2726
+ }
2727
+ });
2728
+ }); };
2729
+ var deserializeAws_restJson1UntagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2730
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2731
+ var _c;
2732
+ return __generator(this, function (_d) {
2733
+ switch (_d.label) {
2734
+ case 0:
2735
+ _a = [__assign({}, output)];
2736
+ _c = {};
2737
+ return [4, parseErrorBody(output.body, context)];
2738
+ case 1:
2739
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2740
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2741
+ _b = errorCode;
2742
+ switch (_b) {
2743
+ case "ResourceNotFoundException": return [3, 2];
2744
+ case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException": return [3, 2];
2745
+ case "ValidationException": return [3, 4];
2746
+ case "com.amazonaws.migrationhuborchestrator#ValidationException": return [3, 4];
2747
+ }
2748
+ return [3, 6];
2749
+ case 2: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
2750
+ case 3: throw _d.sent();
2751
+ case 4: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
2752
+ case 5: throw _d.sent();
2753
+ case 6:
2754
+ parsedBody = parsedOutput.body;
2755
+ throwDefaultError({
2756
+ output: output,
2757
+ parsedBody: parsedBody,
2758
+ exceptionCtor: __BaseException,
2759
+ errorCode: errorCode,
2760
+ });
2761
+ _d.label = 7;
2762
+ case 7: return [2];
2763
+ }
2764
+ });
2765
+ }); };
2766
+ export var deserializeAws_restJson1UpdateWorkflowCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2767
+ var contents, data, _a, _b;
2768
+ return __generator(this, function (_c) {
2769
+ switch (_c.label) {
2770
+ case 0:
2771
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2772
+ return [2, deserializeAws_restJson1UpdateWorkflowCommandError(output, context)];
2773
+ }
2774
+ contents = map({
2775
+ $metadata: deserializeMetadata(output),
2776
+ });
2777
+ _a = __expectNonNull;
2778
+ _b = __expectObject;
2779
+ return [4, parseBody(output.body, context)];
2780
+ case 1:
2781
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2782
+ if (data.adsApplicationConfigurationId != null) {
2783
+ contents.adsApplicationConfigurationId = __expectString(data.adsApplicationConfigurationId);
2784
+ }
2785
+ if (data.arn != null) {
2786
+ contents.arn = __expectString(data.arn);
2787
+ }
2788
+ if (data.creationTime != null) {
2789
+ contents.creationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationTime)));
2790
+ }
2791
+ if (data.description != null) {
2792
+ contents.description = __expectString(data.description);
2793
+ }
2794
+ if (data.id != null) {
2795
+ contents.id = __expectString(data.id);
2796
+ }
2797
+ if (data.lastModifiedTime != null) {
2798
+ contents.lastModifiedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastModifiedTime)));
2799
+ }
2800
+ if (data.name != null) {
2801
+ contents.name = __expectString(data.name);
2802
+ }
2803
+ if (data.status != null) {
2804
+ contents.status = __expectString(data.status);
2805
+ }
2806
+ if (data.stepTargets != null) {
2807
+ contents.stepTargets = deserializeAws_restJson1StringList(data.stepTargets, context);
2808
+ }
2809
+ if (data.tags != null) {
2810
+ contents.tags = deserializeAws_restJson1StringMap(data.tags, context);
2811
+ }
2812
+ if (data.templateId != null) {
2813
+ contents.templateId = __expectString(data.templateId);
2814
+ }
2815
+ if (data.workflowInputs != null) {
2816
+ contents.workflowInputs = deserializeAws_restJson1StepInputParameters(data.workflowInputs, context);
2817
+ }
2818
+ return [2, contents];
2819
+ }
2820
+ });
2821
+ }); };
2822
+ var deserializeAws_restJson1UpdateWorkflowCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2823
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2824
+ var _c;
2825
+ return __generator(this, function (_d) {
2826
+ switch (_d.label) {
2827
+ case 0:
2828
+ _a = [__assign({}, output)];
2829
+ _c = {};
2830
+ return [4, parseErrorBody(output.body, context)];
2831
+ case 1:
2832
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2833
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2834
+ _b = errorCode;
2835
+ switch (_b) {
2836
+ case "AccessDeniedException": return [3, 2];
2837
+ case "com.amazonaws.migrationhuborchestrator#AccessDeniedException": return [3, 2];
2838
+ case "InternalServerException": return [3, 4];
2839
+ case "com.amazonaws.migrationhuborchestrator#InternalServerException": return [3, 4];
2840
+ case "ResourceNotFoundException": return [3, 6];
2841
+ case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException": return [3, 6];
2842
+ case "ThrottlingException": return [3, 8];
2843
+ case "com.amazonaws.migrationhuborchestrator#ThrottlingException": return [3, 8];
2844
+ case "ValidationException": return [3, 10];
2845
+ case "com.amazonaws.migrationhuborchestrator#ValidationException": return [3, 10];
2846
+ }
2847
+ return [3, 12];
2848
+ case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
2849
+ case 3: throw _d.sent();
2850
+ case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
2851
+ case 5: throw _d.sent();
2852
+ case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
2853
+ case 7: throw _d.sent();
2854
+ case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
2855
+ case 9: throw _d.sent();
2856
+ case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
2857
+ case 11: throw _d.sent();
2858
+ case 12:
2859
+ parsedBody = parsedOutput.body;
2860
+ throwDefaultError({
2861
+ output: output,
2862
+ parsedBody: parsedBody,
2863
+ exceptionCtor: __BaseException,
2864
+ errorCode: errorCode,
2865
+ });
2866
+ _d.label = 13;
2867
+ case 13: return [2];
2868
+ }
2869
+ });
2870
+ }); };
2871
+ export var deserializeAws_restJson1UpdateWorkflowStepCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2872
+ var contents, data, _a, _b;
2873
+ return __generator(this, function (_c) {
2874
+ switch (_c.label) {
2875
+ case 0:
2876
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2877
+ return [2, deserializeAws_restJson1UpdateWorkflowStepCommandError(output, context)];
2878
+ }
2879
+ contents = map({
2880
+ $metadata: deserializeMetadata(output),
2881
+ });
2882
+ _a = __expectNonNull;
2883
+ _b = __expectObject;
2884
+ return [4, parseBody(output.body, context)];
2885
+ case 1:
2886
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2887
+ if (data.id != null) {
2888
+ contents.id = __expectString(data.id);
2889
+ }
2890
+ if (data.name != null) {
2891
+ contents.name = __expectString(data.name);
2892
+ }
2893
+ if (data.stepGroupId != null) {
2894
+ contents.stepGroupId = __expectString(data.stepGroupId);
2895
+ }
2896
+ if (data.workflowId != null) {
2897
+ contents.workflowId = __expectString(data.workflowId);
2898
+ }
2899
+ return [2, contents];
2900
+ }
2901
+ });
2902
+ }); };
2903
+ var deserializeAws_restJson1UpdateWorkflowStepCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2904
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2905
+ var _c;
2906
+ return __generator(this, function (_d) {
2907
+ switch (_d.label) {
2908
+ case 0:
2909
+ _a = [__assign({}, output)];
2910
+ _c = {};
2911
+ return [4, parseErrorBody(output.body, context)];
2912
+ case 1:
2913
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2914
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2915
+ _b = errorCode;
2916
+ switch (_b) {
2917
+ case "AccessDeniedException": return [3, 2];
2918
+ case "com.amazonaws.migrationhuborchestrator#AccessDeniedException": return [3, 2];
2919
+ case "InternalServerException": return [3, 4];
2920
+ case "com.amazonaws.migrationhuborchestrator#InternalServerException": return [3, 4];
2921
+ case "ThrottlingException": return [3, 6];
2922
+ case "com.amazonaws.migrationhuborchestrator#ThrottlingException": return [3, 6];
2923
+ case "ValidationException": return [3, 8];
2924
+ case "com.amazonaws.migrationhuborchestrator#ValidationException": return [3, 8];
2925
+ }
2926
+ return [3, 10];
2927
+ case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
2928
+ case 3: throw _d.sent();
2929
+ case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
2930
+ case 5: throw _d.sent();
2931
+ case 6: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
2932
+ case 7: throw _d.sent();
2933
+ case 8: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
2934
+ case 9: throw _d.sent();
2935
+ case 10:
2936
+ parsedBody = parsedOutput.body;
2937
+ throwDefaultError({
2938
+ output: output,
2939
+ parsedBody: parsedBody,
2940
+ exceptionCtor: __BaseException,
2941
+ errorCode: errorCode,
2942
+ });
2943
+ _d.label = 11;
2944
+ case 11: return [2];
2945
+ }
2946
+ });
2947
+ }); };
2948
+ export var deserializeAws_restJson1UpdateWorkflowStepGroupCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2949
+ var contents, data, _a, _b;
2950
+ return __generator(this, function (_c) {
2951
+ switch (_c.label) {
2952
+ case 0:
2953
+ if (output.statusCode !== 202 && output.statusCode >= 300) {
2954
+ return [2, deserializeAws_restJson1UpdateWorkflowStepGroupCommandError(output, context)];
2955
+ }
2956
+ contents = map({
2957
+ $metadata: deserializeMetadata(output),
2958
+ });
2959
+ _a = __expectNonNull;
2960
+ _b = __expectObject;
2961
+ return [4, parseBody(output.body, context)];
2962
+ case 1:
2963
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2964
+ if (data.description != null) {
2965
+ contents.description = __expectString(data.description);
2966
+ }
2967
+ if (data.id != null) {
2968
+ contents.id = __expectString(data.id);
2969
+ }
2970
+ if (data.lastModifiedTime != null) {
2971
+ contents.lastModifiedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastModifiedTime)));
2972
+ }
2973
+ if (data.name != null) {
2974
+ contents.name = __expectString(data.name);
2975
+ }
2976
+ if (data.next != null) {
2977
+ contents.next = deserializeAws_restJson1StringList(data.next, context);
2978
+ }
2979
+ if (data.previous != null) {
2980
+ contents.previous = deserializeAws_restJson1StringList(data.previous, context);
2981
+ }
2982
+ if (data.tools != null) {
2983
+ contents.tools = deserializeAws_restJson1ToolsList(data.tools, context);
2984
+ }
2985
+ if (data.workflowId != null) {
2986
+ contents.workflowId = __expectString(data.workflowId);
2987
+ }
2988
+ return [2, contents];
2989
+ }
2990
+ });
2991
+ }); };
2992
+ var deserializeAws_restJson1UpdateWorkflowStepGroupCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2993
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2994
+ var _c;
2995
+ return __generator(this, function (_d) {
2996
+ switch (_d.label) {
2997
+ case 0:
2998
+ _a = [__assign({}, output)];
2999
+ _c = {};
3000
+ return [4, parseErrorBody(output.body, context)];
3001
+ case 1:
3002
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3003
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3004
+ _b = errorCode;
3005
+ switch (_b) {
3006
+ case "AccessDeniedException": return [3, 2];
3007
+ case "com.amazonaws.migrationhuborchestrator#AccessDeniedException": return [3, 2];
3008
+ case "InternalServerException": return [3, 4];
3009
+ case "com.amazonaws.migrationhuborchestrator#InternalServerException": return [3, 4];
3010
+ case "ResourceNotFoundException": return [3, 6];
3011
+ case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException": return [3, 6];
3012
+ case "ThrottlingException": return [3, 8];
3013
+ case "com.amazonaws.migrationhuborchestrator#ThrottlingException": return [3, 8];
3014
+ case "ValidationException": return [3, 10];
3015
+ case "com.amazonaws.migrationhuborchestrator#ValidationException": return [3, 10];
3016
+ }
3017
+ return [3, 12];
3018
+ case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
3019
+ case 3: throw _d.sent();
3020
+ case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
3021
+ case 5: throw _d.sent();
3022
+ case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
3023
+ case 7: throw _d.sent();
3024
+ case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
3025
+ case 9: throw _d.sent();
3026
+ case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
3027
+ case 11: throw _d.sent();
3028
+ case 12:
3029
+ parsedBody = parsedOutput.body;
3030
+ throwDefaultError({
3031
+ output: output,
3032
+ parsedBody: parsedBody,
3033
+ exceptionCtor: __BaseException,
3034
+ errorCode: errorCode,
3035
+ });
3036
+ _d.label = 13;
3037
+ case 13: return [2];
3038
+ }
3039
+ });
3040
+ }); };
3041
+ var map = __map;
3042
+ var deserializeAws_restJson1AccessDeniedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
3043
+ var contents, data, exception;
3044
+ return __generator(this, function (_a) {
3045
+ contents = map({});
3046
+ data = parsedOutput.body;
3047
+ if (data.message != null) {
3048
+ contents.message = __expectString(data.message);
3049
+ }
3050
+ exception = new AccessDeniedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
3051
+ return [2, __decorateServiceException(exception, parsedOutput.body)];
3052
+ });
3053
+ }); };
3054
+ var deserializeAws_restJson1InternalServerExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
3055
+ var contents, data, exception;
3056
+ return __generator(this, function (_a) {
3057
+ contents = map({});
3058
+ data = parsedOutput.body;
3059
+ if (data.message != null) {
3060
+ contents.message = __expectString(data.message);
3061
+ }
3062
+ exception = new InternalServerException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
3063
+ return [2, __decorateServiceException(exception, parsedOutput.body)];
3064
+ });
3065
+ }); };
3066
+ var deserializeAws_restJson1ResourceNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
3067
+ var contents, data, exception;
3068
+ return __generator(this, function (_a) {
3069
+ contents = map({});
3070
+ data = parsedOutput.body;
3071
+ if (data.message != null) {
3072
+ contents.message = __expectString(data.message);
3073
+ }
3074
+ exception = new ResourceNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
3075
+ return [2, __decorateServiceException(exception, parsedOutput.body)];
3076
+ });
3077
+ }); };
3078
+ var deserializeAws_restJson1ThrottlingExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
3079
+ var contents, data, exception;
3080
+ return __generator(this, function (_a) {
3081
+ contents = map({});
3082
+ data = parsedOutput.body;
3083
+ if (data.message != null) {
3084
+ contents.message = __expectString(data.message);
3085
+ }
3086
+ exception = new ThrottlingException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
3087
+ return [2, __decorateServiceException(exception, parsedOutput.body)];
3088
+ });
3089
+ }); };
3090
+ var deserializeAws_restJson1ValidationExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
3091
+ var contents, data, exception;
3092
+ return __generator(this, function (_a) {
3093
+ contents = map({});
3094
+ data = parsedOutput.body;
3095
+ if (data.message != null) {
3096
+ contents.message = __expectString(data.message);
3097
+ }
3098
+ exception = new ValidationException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
3099
+ return [2, __decorateServiceException(exception, parsedOutput.body)];
3100
+ });
3101
+ }); };
3102
+ var serializeAws_restJson1PlatformCommand = function (input, context) {
3103
+ return __assign(__assign({}, (input.linux != null && { linux: input.linux })), (input.windows != null && { windows: input.windows }));
3104
+ };
3105
+ var serializeAws_restJson1PlatformScriptKey = function (input, context) {
3106
+ return __assign(__assign({}, (input.linux != null && { linux: input.linux })), (input.windows != null && { windows: input.windows }));
3107
+ };
3108
+ var serializeAws_restJson1StepInput = function (input, context) {
3109
+ return StepInput.visit(input, {
3110
+ integerValue: function (value) { return ({ integerValue: value }); },
3111
+ listOfStringsValue: function (value) { return ({ listOfStringsValue: serializeAws_restJson1StringList(value, context) }); },
3112
+ mapOfStringValue: function (value) { return ({ mapOfStringValue: serializeAws_restJson1StringMap(value, context) }); },
3113
+ stringValue: function (value) { return ({ stringValue: value }); },
3114
+ _: function (name, value) { return ({ name: value }); },
3115
+ });
3116
+ };
3117
+ var serializeAws_restJson1StepInputParameters = function (input, context) {
3118
+ return Object.entries(input).reduce(function (acc, _a) {
3119
+ var _b;
3120
+ var _c = __read(_a, 2), key = _c[0], value = _c[1];
3121
+ if (value === null) {
3122
+ return acc;
3123
+ }
3124
+ return __assign(__assign({}, acc), (_b = {}, _b[key] = serializeAws_restJson1StepInput(value, context), _b));
3125
+ }, {});
3126
+ };
3127
+ var serializeAws_restJson1StringList = function (input, context) {
3128
+ return input
3129
+ .filter(function (e) { return e != null; })
3130
+ .map(function (entry) {
3131
+ return entry;
3132
+ });
3133
+ };
3134
+ var serializeAws_restJson1StringMap = function (input, context) {
3135
+ return Object.entries(input).reduce(function (acc, _a) {
3136
+ var _b;
3137
+ var _c = __read(_a, 2), key = _c[0], value = _c[1];
3138
+ if (value === null) {
3139
+ return acc;
3140
+ }
3141
+ return __assign(__assign({}, acc), (_b = {}, _b[key] = value, _b));
3142
+ }, {});
3143
+ };
3144
+ var serializeAws_restJson1TagMap = function (input, context) {
3145
+ return Object.entries(input).reduce(function (acc, _a) {
3146
+ var _b;
3147
+ var _c = __read(_a, 2), key = _c[0], value = _c[1];
3148
+ if (value === null) {
3149
+ return acc;
3150
+ }
3151
+ return __assign(__assign({}, acc), (_b = {}, _b[key] = value, _b));
3152
+ }, {});
3153
+ };
3154
+ var serializeAws_restJson1WorkflowStepAutomationConfiguration = function (input, context) {
3155
+ return __assign(__assign(__assign(__assign(__assign({}, (input.command != null && { command: serializeAws_restJson1PlatformCommand(input.command, context) })), (input.runEnvironment != null && { runEnvironment: input.runEnvironment })), (input.scriptLocationS3Bucket != null && { scriptLocationS3Bucket: input.scriptLocationS3Bucket })), (input.scriptLocationS3Key != null && {
3156
+ scriptLocationS3Key: serializeAws_restJson1PlatformScriptKey(input.scriptLocationS3Key, context),
3157
+ })), (input.targetType != null && { targetType: input.targetType }));
3158
+ };
3159
+ var serializeAws_restJson1WorkflowStepOutput = function (input, context) {
3160
+ return __assign(__assign(__assign(__assign({}, (input.dataType != null && { dataType: input.dataType })), (input.name != null && { name: input.name })), (input.required != null && { required: input.required })), (input.value != null && { value: serializeAws_restJson1WorkflowStepOutputUnion(input.value, context) }));
3161
+ };
3162
+ var serializeAws_restJson1WorkflowStepOutputList = function (input, context) {
3163
+ return input
3164
+ .filter(function (e) { return e != null; })
3165
+ .map(function (entry) {
3166
+ return serializeAws_restJson1WorkflowStepOutput(entry, context);
3167
+ });
3168
+ };
3169
+ var serializeAws_restJson1WorkflowStepOutputUnion = function (input, context) {
3170
+ return WorkflowStepOutputUnion.visit(input, {
3171
+ integerValue: function (value) { return ({ integerValue: value }); },
3172
+ listOfStringValue: function (value) { return ({ listOfStringValue: serializeAws_restJson1StringList(value, context) }); },
3173
+ stringValue: function (value) { return ({ stringValue: value }); },
3174
+ _: function (name, value) { return ({ name: value }); },
3175
+ });
3176
+ };
3177
+ var deserializeAws_restJson1MigrationWorkflowSummary = function (output, context) {
3178
+ return {
3179
+ adsApplicationConfigurationName: __expectString(output.adsApplicationConfigurationName),
3180
+ completedSteps: __expectInt32(output.completedSteps),
3181
+ creationTime: output.creationTime != null
3182
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime)))
3183
+ : undefined,
3184
+ endTime: output.endTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.endTime))) : undefined,
3185
+ id: __expectString(output.id),
3186
+ name: __expectString(output.name),
3187
+ status: __expectString(output.status),
3188
+ statusMessage: __expectString(output.statusMessage),
3189
+ templateId: __expectString(output.templateId),
3190
+ totalSteps: __expectInt32(output.totalSteps),
3191
+ };
3192
+ };
3193
+ var deserializeAws_restJson1MigrationWorkflowSummaryList = function (output, context) {
3194
+ var retVal = (output || [])
3195
+ .filter(function (e) { return e != null; })
3196
+ .map(function (entry) {
3197
+ if (entry === null) {
3198
+ return null;
3199
+ }
3200
+ return deserializeAws_restJson1MigrationWorkflowSummary(entry, context);
3201
+ });
3202
+ return retVal;
3203
+ };
3204
+ var deserializeAws_restJson1PlatformCommand = function (output, context) {
3205
+ return {
3206
+ linux: __expectString(output.linux),
3207
+ windows: __expectString(output.windows),
3208
+ };
3209
+ };
3210
+ var deserializeAws_restJson1PlatformScriptKey = function (output, context) {
3211
+ return {
3212
+ linux: __expectString(output.linux),
3213
+ windows: __expectString(output.windows),
3214
+ };
3215
+ };
3216
+ var deserializeAws_restJson1PluginSummaries = function (output, context) {
3217
+ var retVal = (output || [])
3218
+ .filter(function (e) { return e != null; })
3219
+ .map(function (entry) {
3220
+ if (entry === null) {
3221
+ return null;
3222
+ }
3223
+ return deserializeAws_restJson1PluginSummary(entry, context);
3224
+ });
3225
+ return retVal;
3226
+ };
3227
+ var deserializeAws_restJson1PluginSummary = function (output, context) {
3228
+ return {
3229
+ hostname: __expectString(output.hostname),
3230
+ ipAddress: __expectString(output.ipAddress),
3231
+ pluginId: __expectString(output.pluginId),
3232
+ registeredTime: __expectString(output.registeredTime),
3233
+ status: __expectString(output.status),
3234
+ version: __expectString(output.version),
3235
+ };
3236
+ };
3237
+ var deserializeAws_restJson1StepAutomationConfiguration = function (output, context) {
3238
+ return {
3239
+ command: output.command != null ? deserializeAws_restJson1PlatformCommand(output.command, context) : undefined,
3240
+ runEnvironment: __expectString(output.runEnvironment),
3241
+ scriptLocationS3Bucket: __expectString(output.scriptLocationS3Bucket),
3242
+ scriptLocationS3Key: output.scriptLocationS3Key != null
3243
+ ? deserializeAws_restJson1PlatformScriptKey(output.scriptLocationS3Key, context)
3244
+ : undefined,
3245
+ targetType: __expectString(output.targetType),
3246
+ };
3247
+ };
3248
+ var deserializeAws_restJson1StepInput = function (output, context) {
3249
+ if (__expectInt32(output.integerValue) !== undefined) {
3250
+ return { integerValue: __expectInt32(output.integerValue) };
3251
+ }
3252
+ if (output.listOfStringsValue != null) {
3253
+ return {
3254
+ listOfStringsValue: deserializeAws_restJson1StringList(output.listOfStringsValue, context),
3255
+ };
3256
+ }
3257
+ if (output.mapOfStringValue != null) {
3258
+ return {
3259
+ mapOfStringValue: deserializeAws_restJson1StringMap(output.mapOfStringValue, context),
3260
+ };
3261
+ }
3262
+ if (__expectString(output.stringValue) !== undefined) {
3263
+ return { stringValue: __expectString(output.stringValue) };
3264
+ }
3265
+ return { $unknown: Object.entries(output)[0] };
3266
+ };
3267
+ var deserializeAws_restJson1StepInputParameters = function (output, context) {
3268
+ return Object.entries(output).reduce(function (acc, _a) {
3269
+ var _b;
3270
+ var _c = __read(_a, 2), key = _c[0], value = _c[1];
3271
+ if (value === null) {
3272
+ return acc;
3273
+ }
3274
+ return __assign(__assign({}, acc), (_b = {}, _b[key] = deserializeAws_restJson1StepInput(__expectUnion(value), context), _b));
3275
+ }, {});
3276
+ };
3277
+ var deserializeAws_restJson1StepOutput = function (output, context) {
3278
+ return {
3279
+ dataType: __expectString(output.dataType),
3280
+ name: __expectString(output.name),
3281
+ required: __expectBoolean(output.required),
3282
+ };
3283
+ };
3284
+ var deserializeAws_restJson1StepOutputList = function (output, context) {
3285
+ var retVal = (output || [])
3286
+ .filter(function (e) { return e != null; })
3287
+ .map(function (entry) {
3288
+ if (entry === null) {
3289
+ return null;
3290
+ }
3291
+ return deserializeAws_restJson1StepOutput(entry, context);
3292
+ });
3293
+ return retVal;
3294
+ };
3295
+ var deserializeAws_restJson1StringList = function (output, context) {
3296
+ var retVal = (output || [])
3297
+ .filter(function (e) { return e != null; })
3298
+ .map(function (entry) {
3299
+ if (entry === null) {
3300
+ return null;
3301
+ }
3302
+ return __expectString(entry);
3303
+ });
3304
+ return retVal;
3305
+ };
3306
+ var deserializeAws_restJson1StringMap = function (output, context) {
3307
+ return Object.entries(output).reduce(function (acc, _a) {
3308
+ var _b;
3309
+ var _c = __read(_a, 2), key = _c[0], value = _c[1];
3310
+ if (value === null) {
3311
+ return acc;
3312
+ }
3313
+ return __assign(__assign({}, acc), (_b = {}, _b[key] = __expectString(value), _b));
3314
+ }, {});
3315
+ };
3316
+ var deserializeAws_restJson1TagMap = function (output, context) {
3317
+ return Object.entries(output).reduce(function (acc, _a) {
3318
+ var _b;
3319
+ var _c = __read(_a, 2), key = _c[0], value = _c[1];
3320
+ if (value === null) {
3321
+ return acc;
3322
+ }
3323
+ return __assign(__assign({}, acc), (_b = {}, _b[key] = __expectString(value), _b));
3324
+ }, {});
3325
+ };
3326
+ var deserializeAws_restJson1TemplateInput = function (output, context) {
3327
+ return {
3328
+ dataType: __expectString(output.dataType),
3329
+ inputName: __expectString(output.inputName),
3330
+ required: __expectBoolean(output.required),
3331
+ };
3332
+ };
3333
+ var deserializeAws_restJson1TemplateInputList = function (output, context) {
3334
+ var retVal = (output || [])
3335
+ .filter(function (e) { return e != null; })
3336
+ .map(function (entry) {
3337
+ if (entry === null) {
3338
+ return null;
3339
+ }
3340
+ return deserializeAws_restJson1TemplateInput(entry, context);
3341
+ });
3342
+ return retVal;
3343
+ };
3344
+ var deserializeAws_restJson1TemplateStepGroupSummary = function (output, context) {
3345
+ return {
3346
+ id: __expectString(output.id),
3347
+ name: __expectString(output.name),
3348
+ next: output.next != null ? deserializeAws_restJson1StringList(output.next, context) : undefined,
3349
+ previous: output.previous != null ? deserializeAws_restJson1StringList(output.previous, context) : undefined,
3350
+ };
3351
+ };
3352
+ var deserializeAws_restJson1TemplateStepGroupSummaryList = function (output, context) {
3353
+ var retVal = (output || [])
3354
+ .filter(function (e) { return e != null; })
3355
+ .map(function (entry) {
3356
+ if (entry === null) {
3357
+ return null;
3358
+ }
3359
+ return deserializeAws_restJson1TemplateStepGroupSummary(entry, context);
3360
+ });
3361
+ return retVal;
3362
+ };
3363
+ var deserializeAws_restJson1TemplateStepSummary = function (output, context) {
3364
+ return {
3365
+ id: __expectString(output.id),
3366
+ name: __expectString(output.name),
3367
+ next: output.next != null ? deserializeAws_restJson1StringList(output.next, context) : undefined,
3368
+ owner: __expectString(output.owner),
3369
+ previous: output.previous != null ? deserializeAws_restJson1StringList(output.previous, context) : undefined,
3370
+ stepActionType: __expectString(output.stepActionType),
3371
+ stepGroupId: __expectString(output.stepGroupId),
3372
+ targetType: __expectString(output.targetType),
3373
+ templateId: __expectString(output.templateId),
3374
+ };
3375
+ };
3376
+ var deserializeAws_restJson1TemplateStepSummaryList = function (output, context) {
3377
+ var retVal = (output || [])
3378
+ .filter(function (e) { return e != null; })
3379
+ .map(function (entry) {
3380
+ if (entry === null) {
3381
+ return null;
3382
+ }
3383
+ return deserializeAws_restJson1TemplateStepSummary(entry, context);
3384
+ });
3385
+ return retVal;
3386
+ };
3387
+ var deserializeAws_restJson1TemplateSummary = function (output, context) {
3388
+ return {
3389
+ arn: __expectString(output.arn),
3390
+ description: __expectString(output.description),
3391
+ id: __expectString(output.id),
3392
+ name: __expectString(output.name),
3393
+ };
3394
+ };
3395
+ var deserializeAws_restJson1TemplateSummaryList = function (output, context) {
3396
+ var retVal = (output || [])
3397
+ .filter(function (e) { return e != null; })
3398
+ .map(function (entry) {
3399
+ if (entry === null) {
3400
+ return null;
3401
+ }
3402
+ return deserializeAws_restJson1TemplateSummary(entry, context);
3403
+ });
3404
+ return retVal;
3405
+ };
3406
+ var deserializeAws_restJson1Tool = function (output, context) {
3407
+ return {
3408
+ name: __expectString(output.name),
3409
+ url: __expectString(output.url),
3410
+ };
3411
+ };
3412
+ var deserializeAws_restJson1ToolsList = function (output, context) {
3413
+ var retVal = (output || [])
3414
+ .filter(function (e) { return e != null; })
3415
+ .map(function (entry) {
3416
+ if (entry === null) {
3417
+ return null;
3418
+ }
3419
+ return deserializeAws_restJson1Tool(entry, context);
3420
+ });
3421
+ return retVal;
3422
+ };
3423
+ var deserializeAws_restJson1WorkflowStepAutomationConfiguration = function (output, context) {
3424
+ return {
3425
+ command: output.command != null ? deserializeAws_restJson1PlatformCommand(output.command, context) : undefined,
3426
+ runEnvironment: __expectString(output.runEnvironment),
3427
+ scriptLocationS3Bucket: __expectString(output.scriptLocationS3Bucket),
3428
+ scriptLocationS3Key: output.scriptLocationS3Key != null
3429
+ ? deserializeAws_restJson1PlatformScriptKey(output.scriptLocationS3Key, context)
3430
+ : undefined,
3431
+ targetType: __expectString(output.targetType),
3432
+ };
3433
+ };
3434
+ var deserializeAws_restJson1WorkflowStepGroupsSummaryList = function (output, context) {
3435
+ var retVal = (output || [])
3436
+ .filter(function (e) { return e != null; })
3437
+ .map(function (entry) {
3438
+ if (entry === null) {
3439
+ return null;
3440
+ }
3441
+ return deserializeAws_restJson1WorkflowStepGroupSummary(entry, context);
3442
+ });
3443
+ return retVal;
3444
+ };
3445
+ var deserializeAws_restJson1WorkflowStepGroupSummary = function (output, context) {
3446
+ return {
3447
+ id: __expectString(output.id),
3448
+ name: __expectString(output.name),
3449
+ next: output.next != null ? deserializeAws_restJson1StringList(output.next, context) : undefined,
3450
+ owner: __expectString(output.owner),
3451
+ previous: output.previous != null ? deserializeAws_restJson1StringList(output.previous, context) : undefined,
3452
+ status: __expectString(output.status),
3453
+ };
3454
+ };
3455
+ var deserializeAws_restJson1WorkflowStepOutput = function (output, context) {
3456
+ return {
3457
+ dataType: __expectString(output.dataType),
3458
+ name: __expectString(output.name),
3459
+ required: __expectBoolean(output.required),
3460
+ value: output.value != null
3461
+ ? deserializeAws_restJson1WorkflowStepOutputUnion(__expectUnion(output.value), context)
3462
+ : undefined,
3463
+ };
3464
+ };
3465
+ var deserializeAws_restJson1WorkflowStepOutputList = function (output, context) {
3466
+ var retVal = (output || [])
3467
+ .filter(function (e) { return e != null; })
3468
+ .map(function (entry) {
3469
+ if (entry === null) {
3470
+ return null;
3471
+ }
3472
+ return deserializeAws_restJson1WorkflowStepOutput(entry, context);
3473
+ });
3474
+ return retVal;
3475
+ };
3476
+ var deserializeAws_restJson1WorkflowStepOutputUnion = function (output, context) {
3477
+ if (__expectInt32(output.integerValue) !== undefined) {
3478
+ return { integerValue: __expectInt32(output.integerValue) };
3479
+ }
3480
+ if (output.listOfStringValue != null) {
3481
+ return {
3482
+ listOfStringValue: deserializeAws_restJson1StringList(output.listOfStringValue, context),
3483
+ };
3484
+ }
3485
+ if (__expectString(output.stringValue) !== undefined) {
3486
+ return { stringValue: __expectString(output.stringValue) };
3487
+ }
3488
+ return { $unknown: Object.entries(output)[0] };
3489
+ };
3490
+ var deserializeAws_restJson1WorkflowStepsSummaryList = function (output, context) {
3491
+ var retVal = (output || [])
3492
+ .filter(function (e) { return e != null; })
3493
+ .map(function (entry) {
3494
+ if (entry === null) {
3495
+ return null;
3496
+ }
3497
+ return deserializeAws_restJson1WorkflowStepSummary(entry, context);
3498
+ });
3499
+ return retVal;
3500
+ };
3501
+ var deserializeAws_restJson1WorkflowStepSummary = function (output, context) {
3502
+ return {
3503
+ description: __expectString(output.description),
3504
+ name: __expectString(output.name),
3505
+ next: output.next != null ? deserializeAws_restJson1StringList(output.next, context) : undefined,
3506
+ noOfSrvCompleted: __expectInt32(output.noOfSrvCompleted),
3507
+ noOfSrvFailed: __expectInt32(output.noOfSrvFailed),
3508
+ owner: __expectString(output.owner),
3509
+ previous: output.previous != null ? deserializeAws_restJson1StringList(output.previous, context) : undefined,
3510
+ scriptLocation: __expectString(output.scriptLocation),
3511
+ status: __expectString(output.status),
3512
+ statusMessage: __expectString(output.statusMessage),
3513
+ stepActionType: __expectString(output.stepActionType),
3514
+ stepId: __expectString(output.stepId),
3515
+ totalNoOfSrv: __expectInt32(output.totalNoOfSrv),
3516
+ };
3517
+ };
3518
+ var deserializeMetadata = function (output) {
3519
+ var _a;
3520
+ return ({
3521
+ httpStatusCode: output.statusCode,
3522
+ requestId: (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"],
3523
+ extendedRequestId: output.headers["x-amz-id-2"],
3524
+ cfId: output.headers["x-amz-cf-id"],
3525
+ });
3526
+ };
3527
+ var collectBody = function (streamBody, context) {
3528
+ if (streamBody === void 0) { streamBody = new Uint8Array(); }
3529
+ if (streamBody instanceof Uint8Array) {
3530
+ return Promise.resolve(streamBody);
3531
+ }
3532
+ return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
3533
+ };
3534
+ var collectBodyString = function (streamBody, context) {
3535
+ return collectBody(streamBody, context).then(function (body) { return context.utf8Encoder(body); });
3536
+ };
3537
+ var isSerializableHeaderValue = function (value) {
3538
+ return value !== undefined &&
3539
+ value !== null &&
3540
+ value !== "" &&
3541
+ (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
3542
+ (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
3543
+ };
3544
+ var parseBody = function (streamBody, context) {
3545
+ return collectBodyString(streamBody, context).then(function (encoded) {
3546
+ if (encoded.length) {
3547
+ return JSON.parse(encoded);
3548
+ }
3549
+ return {};
3550
+ });
3551
+ };
3552
+ var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
3553
+ var value;
3554
+ var _a;
3555
+ return __generator(this, function (_b) {
3556
+ switch (_b.label) {
3557
+ case 0: return [4, parseBody(errorBody, context)];
3558
+ case 1:
3559
+ value = _b.sent();
3560
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
3561
+ return [2, value];
3562
+ }
3563
+ });
3564
+ }); };
3565
+ var loadRestJsonErrorCode = function (output, data) {
3566
+ var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
3567
+ var sanitizeErrorCode = function (rawValue) {
3568
+ var cleanValue = rawValue;
3569
+ if (typeof cleanValue === "number") {
3570
+ cleanValue = cleanValue.toString();
3571
+ }
3572
+ if (cleanValue.indexOf(",") >= 0) {
3573
+ cleanValue = cleanValue.split(",")[0];
3574
+ }
3575
+ if (cleanValue.indexOf(":") >= 0) {
3576
+ cleanValue = cleanValue.split(":")[0];
3577
+ }
3578
+ if (cleanValue.indexOf("#") >= 0) {
3579
+ cleanValue = cleanValue.split("#")[1];
3580
+ }
3581
+ return cleanValue;
3582
+ };
3583
+ var headerKey = findKey(output.headers, "x-amzn-errortype");
3584
+ if (headerKey !== undefined) {
3585
+ return sanitizeErrorCode(output.headers[headerKey]);
3586
+ }
3587
+ if (data.code !== undefined) {
3588
+ return sanitizeErrorCode(data.code);
3589
+ }
3590
+ if (data["__type"] !== undefined) {
3591
+ return sanitizeErrorCode(data["__type"]);
3592
+ }
3593
+ };