@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,2816 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.deserializeAws_restJson1StartWorkflowCommand = exports.deserializeAws_restJson1RetryWorkflowStepCommand = exports.deserializeAws_restJson1ListWorkflowStepsCommand = exports.deserializeAws_restJson1ListWorkflowStepGroupsCommand = exports.deserializeAws_restJson1ListWorkflowsCommand = exports.deserializeAws_restJson1ListTemplateStepsCommand = exports.deserializeAws_restJson1ListTemplateStepGroupsCommand = exports.deserializeAws_restJson1ListTemplatesCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListPluginsCommand = exports.deserializeAws_restJson1GetWorkflowStepGroupCommand = exports.deserializeAws_restJson1GetWorkflowStepCommand = exports.deserializeAws_restJson1GetWorkflowCommand = exports.deserializeAws_restJson1GetTemplateStepGroupCommand = exports.deserializeAws_restJson1GetTemplateStepCommand = exports.deserializeAws_restJson1GetTemplateCommand = exports.deserializeAws_restJson1DeleteWorkflowStepGroupCommand = exports.deserializeAws_restJson1DeleteWorkflowStepCommand = exports.deserializeAws_restJson1DeleteWorkflowCommand = exports.deserializeAws_restJson1CreateWorkflowStepGroupCommand = exports.deserializeAws_restJson1CreateWorkflowStepCommand = exports.deserializeAws_restJson1CreateWorkflowCommand = exports.serializeAws_restJson1UpdateWorkflowStepGroupCommand = exports.serializeAws_restJson1UpdateWorkflowStepCommand = exports.serializeAws_restJson1UpdateWorkflowCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1StopWorkflowCommand = exports.serializeAws_restJson1StartWorkflowCommand = exports.serializeAws_restJson1RetryWorkflowStepCommand = exports.serializeAws_restJson1ListWorkflowStepsCommand = exports.serializeAws_restJson1ListWorkflowStepGroupsCommand = exports.serializeAws_restJson1ListWorkflowsCommand = exports.serializeAws_restJson1ListTemplateStepsCommand = exports.serializeAws_restJson1ListTemplateStepGroupsCommand = exports.serializeAws_restJson1ListTemplatesCommand = exports.serializeAws_restJson1ListTagsForResourceCommand = exports.serializeAws_restJson1ListPluginsCommand = exports.serializeAws_restJson1GetWorkflowStepGroupCommand = exports.serializeAws_restJson1GetWorkflowStepCommand = exports.serializeAws_restJson1GetWorkflowCommand = exports.serializeAws_restJson1GetTemplateStepGroupCommand = exports.serializeAws_restJson1GetTemplateStepCommand = exports.serializeAws_restJson1GetTemplateCommand = exports.serializeAws_restJson1DeleteWorkflowStepGroupCommand = exports.serializeAws_restJson1DeleteWorkflowStepCommand = exports.serializeAws_restJson1DeleteWorkflowCommand = exports.serializeAws_restJson1CreateWorkflowStepGroupCommand = exports.serializeAws_restJson1CreateWorkflowStepCommand = exports.serializeAws_restJson1CreateWorkflowCommand = void 0;
4
+ exports.deserializeAws_restJson1UpdateWorkflowStepGroupCommand = exports.deserializeAws_restJson1UpdateWorkflowStepCommand = exports.deserializeAws_restJson1UpdateWorkflowCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1StopWorkflowCommand = void 0;
5
+ const protocol_http_1 = require("@aws-sdk/protocol-http");
6
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
7
+ const MigrationHubOrchestratorServiceException_1 = require("../models/MigrationHubOrchestratorServiceException");
8
+ const models_0_1 = require("../models/models_0");
9
+ const serializeAws_restJson1CreateWorkflowCommand = async (input, context) => {
10
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
11
+ const headers = {
12
+ "content-type": "application/json",
13
+ };
14
+ const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/migrationworkflow";
15
+ let body;
16
+ body = JSON.stringify({
17
+ ...(input.applicationConfigurationId != null && { applicationConfigurationId: input.applicationConfigurationId }),
18
+ ...(input.description != null && { description: input.description }),
19
+ ...(input.inputParameters != null && {
20
+ inputParameters: serializeAws_restJson1StepInputParameters(input.inputParameters, context),
21
+ }),
22
+ ...(input.name != null && { name: input.name }),
23
+ ...(input.stepTargets != null && { stepTargets: serializeAws_restJson1StringList(input.stepTargets, context) }),
24
+ ...(input.tags != null && { tags: serializeAws_restJson1StringMap(input.tags, context) }),
25
+ ...(input.templateId != null && { templateId: input.templateId }),
26
+ });
27
+ return new protocol_http_1.HttpRequest({
28
+ protocol,
29
+ hostname,
30
+ port,
31
+ method: "POST",
32
+ headers,
33
+ path: resolvedPath,
34
+ body,
35
+ });
36
+ };
37
+ exports.serializeAws_restJson1CreateWorkflowCommand = serializeAws_restJson1CreateWorkflowCommand;
38
+ const serializeAws_restJson1CreateWorkflowStepCommand = async (input, context) => {
39
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
40
+ const headers = {
41
+ "content-type": "application/json",
42
+ };
43
+ const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/workflowstep";
44
+ let body;
45
+ body = JSON.stringify({
46
+ ...(input.description != null && { description: input.description }),
47
+ ...(input.name != null && { name: input.name }),
48
+ ...(input.next != null && { next: serializeAws_restJson1StringList(input.next, context) }),
49
+ ...(input.outputs != null && { outputs: serializeAws_restJson1WorkflowStepOutputList(input.outputs, context) }),
50
+ ...(input.previous != null && { previous: serializeAws_restJson1StringList(input.previous, context) }),
51
+ ...(input.stepActionType != null && { stepActionType: input.stepActionType }),
52
+ ...(input.stepGroupId != null && { stepGroupId: input.stepGroupId }),
53
+ ...(input.stepTarget != null && { stepTarget: serializeAws_restJson1StringList(input.stepTarget, context) }),
54
+ ...(input.workflowId != null && { workflowId: input.workflowId }),
55
+ ...(input.workflowStepAutomationConfiguration != null && {
56
+ workflowStepAutomationConfiguration: serializeAws_restJson1WorkflowStepAutomationConfiguration(input.workflowStepAutomationConfiguration, context),
57
+ }),
58
+ });
59
+ return new protocol_http_1.HttpRequest({
60
+ protocol,
61
+ hostname,
62
+ port,
63
+ method: "POST",
64
+ headers,
65
+ path: resolvedPath,
66
+ body,
67
+ });
68
+ };
69
+ exports.serializeAws_restJson1CreateWorkflowStepCommand = serializeAws_restJson1CreateWorkflowStepCommand;
70
+ const serializeAws_restJson1CreateWorkflowStepGroupCommand = async (input, context) => {
71
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
72
+ const headers = {
73
+ "content-type": "application/json",
74
+ };
75
+ const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/workflowstepgroups";
76
+ let body;
77
+ body = JSON.stringify({
78
+ ...(input.description != null && { description: input.description }),
79
+ ...(input.name != null && { name: input.name }),
80
+ ...(input.next != null && { next: serializeAws_restJson1StringList(input.next, context) }),
81
+ ...(input.previous != null && { previous: serializeAws_restJson1StringList(input.previous, context) }),
82
+ ...(input.workflowId != null && { workflowId: input.workflowId }),
83
+ });
84
+ return new protocol_http_1.HttpRequest({
85
+ protocol,
86
+ hostname,
87
+ port,
88
+ method: "POST",
89
+ headers,
90
+ path: resolvedPath,
91
+ body,
92
+ });
93
+ };
94
+ exports.serializeAws_restJson1CreateWorkflowStepGroupCommand = serializeAws_restJson1CreateWorkflowStepGroupCommand;
95
+ const serializeAws_restJson1DeleteWorkflowCommand = async (input, context) => {
96
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
97
+ const headers = {};
98
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/migrationworkflow/{id}";
99
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
100
+ let body;
101
+ return new protocol_http_1.HttpRequest({
102
+ protocol,
103
+ hostname,
104
+ port,
105
+ method: "DELETE",
106
+ headers,
107
+ path: resolvedPath,
108
+ body,
109
+ });
110
+ };
111
+ exports.serializeAws_restJson1DeleteWorkflowCommand = serializeAws_restJson1DeleteWorkflowCommand;
112
+ const serializeAws_restJson1DeleteWorkflowStepCommand = async (input, context) => {
113
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
114
+ const headers = {};
115
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/workflowstep/{id}";
116
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
117
+ const query = map({
118
+ stepGroupId: [, input.stepGroupId],
119
+ workflowId: [, input.workflowId],
120
+ });
121
+ let body;
122
+ return new protocol_http_1.HttpRequest({
123
+ protocol,
124
+ hostname,
125
+ port,
126
+ method: "DELETE",
127
+ headers,
128
+ path: resolvedPath,
129
+ query,
130
+ body,
131
+ });
132
+ };
133
+ exports.serializeAws_restJson1DeleteWorkflowStepCommand = serializeAws_restJson1DeleteWorkflowStepCommand;
134
+ const serializeAws_restJson1DeleteWorkflowStepGroupCommand = async (input, context) => {
135
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
136
+ const headers = {};
137
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/workflowstepgroup/{id}";
138
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
139
+ const query = map({
140
+ workflowId: [, input.workflowId],
141
+ });
142
+ let body;
143
+ return new protocol_http_1.HttpRequest({
144
+ protocol,
145
+ hostname,
146
+ port,
147
+ method: "DELETE",
148
+ headers,
149
+ path: resolvedPath,
150
+ query,
151
+ body,
152
+ });
153
+ };
154
+ exports.serializeAws_restJson1DeleteWorkflowStepGroupCommand = serializeAws_restJson1DeleteWorkflowStepGroupCommand;
155
+ const serializeAws_restJson1GetTemplateCommand = async (input, context) => {
156
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
157
+ const headers = {};
158
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/migrationworkflowtemplate/{id}";
159
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
160
+ let body;
161
+ return new protocol_http_1.HttpRequest({
162
+ protocol,
163
+ hostname,
164
+ port,
165
+ method: "GET",
166
+ headers,
167
+ path: resolvedPath,
168
+ body,
169
+ });
170
+ };
171
+ exports.serializeAws_restJson1GetTemplateCommand = serializeAws_restJson1GetTemplateCommand;
172
+ const serializeAws_restJson1GetTemplateStepCommand = async (input, context) => {
173
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
174
+ const headers = {};
175
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/templatestep/{id}";
176
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
177
+ const query = map({
178
+ templateId: [, input.templateId],
179
+ stepGroupId: [, input.stepGroupId],
180
+ });
181
+ let body;
182
+ return new protocol_http_1.HttpRequest({
183
+ protocol,
184
+ hostname,
185
+ port,
186
+ method: "GET",
187
+ headers,
188
+ path: resolvedPath,
189
+ query,
190
+ body,
191
+ });
192
+ };
193
+ exports.serializeAws_restJson1GetTemplateStepCommand = serializeAws_restJson1GetTemplateStepCommand;
194
+ const serializeAws_restJson1GetTemplateStepGroupCommand = async (input, context) => {
195
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
196
+ const headers = {};
197
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/templates/{templateId}/stepgroups/{id}";
198
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "templateId", () => input.templateId, "{templateId}", false);
199
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
200
+ let body;
201
+ return new protocol_http_1.HttpRequest({
202
+ protocol,
203
+ hostname,
204
+ port,
205
+ method: "GET",
206
+ headers,
207
+ path: resolvedPath,
208
+ body,
209
+ });
210
+ };
211
+ exports.serializeAws_restJson1GetTemplateStepGroupCommand = serializeAws_restJson1GetTemplateStepGroupCommand;
212
+ const serializeAws_restJson1GetWorkflowCommand = async (input, context) => {
213
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
214
+ const headers = {};
215
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/migrationworkflow/{id}";
216
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
217
+ let body;
218
+ return new protocol_http_1.HttpRequest({
219
+ protocol,
220
+ hostname,
221
+ port,
222
+ method: "GET",
223
+ headers,
224
+ path: resolvedPath,
225
+ body,
226
+ });
227
+ };
228
+ exports.serializeAws_restJson1GetWorkflowCommand = serializeAws_restJson1GetWorkflowCommand;
229
+ const serializeAws_restJson1GetWorkflowStepCommand = async (input, context) => {
230
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
231
+ const headers = {};
232
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/workflowstep/{id}";
233
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
234
+ const query = map({
235
+ workflowId: [, input.workflowId],
236
+ stepGroupId: [, input.stepGroupId],
237
+ });
238
+ let body;
239
+ return new protocol_http_1.HttpRequest({
240
+ protocol,
241
+ hostname,
242
+ port,
243
+ method: "GET",
244
+ headers,
245
+ path: resolvedPath,
246
+ query,
247
+ body,
248
+ });
249
+ };
250
+ exports.serializeAws_restJson1GetWorkflowStepCommand = serializeAws_restJson1GetWorkflowStepCommand;
251
+ const serializeAws_restJson1GetWorkflowStepGroupCommand = async (input, context) => {
252
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
253
+ const headers = {};
254
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/workflowstepgroup/{id}";
255
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
256
+ const query = map({
257
+ workflowId: [, input.workflowId],
258
+ });
259
+ let body;
260
+ return new protocol_http_1.HttpRequest({
261
+ protocol,
262
+ hostname,
263
+ port,
264
+ method: "GET",
265
+ headers,
266
+ path: resolvedPath,
267
+ query,
268
+ body,
269
+ });
270
+ };
271
+ exports.serializeAws_restJson1GetWorkflowStepGroupCommand = serializeAws_restJson1GetWorkflowStepGroupCommand;
272
+ const serializeAws_restJson1ListPluginsCommand = async (input, context) => {
273
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
274
+ const headers = {};
275
+ const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/plugins";
276
+ const query = map({
277
+ maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
278
+ nextToken: [, input.nextToken],
279
+ });
280
+ let body;
281
+ return new protocol_http_1.HttpRequest({
282
+ protocol,
283
+ hostname,
284
+ port,
285
+ method: "GET",
286
+ headers,
287
+ path: resolvedPath,
288
+ query,
289
+ body,
290
+ });
291
+ };
292
+ exports.serializeAws_restJson1ListPluginsCommand = serializeAws_restJson1ListPluginsCommand;
293
+ const serializeAws_restJson1ListTagsForResourceCommand = async (input, context) => {
294
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
295
+ const headers = {};
296
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
297
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
298
+ let body;
299
+ return new protocol_http_1.HttpRequest({
300
+ protocol,
301
+ hostname,
302
+ port,
303
+ method: "GET",
304
+ headers,
305
+ path: resolvedPath,
306
+ body,
307
+ });
308
+ };
309
+ exports.serializeAws_restJson1ListTagsForResourceCommand = serializeAws_restJson1ListTagsForResourceCommand;
310
+ const serializeAws_restJson1ListTemplatesCommand = async (input, context) => {
311
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
312
+ const headers = {};
313
+ const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/migrationworkflowtemplates";
314
+ const query = map({
315
+ maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
316
+ nextToken: [, input.nextToken],
317
+ name: [, input.name],
318
+ });
319
+ let body;
320
+ return new protocol_http_1.HttpRequest({
321
+ protocol,
322
+ hostname,
323
+ port,
324
+ method: "GET",
325
+ headers,
326
+ path: resolvedPath,
327
+ query,
328
+ body,
329
+ });
330
+ };
331
+ exports.serializeAws_restJson1ListTemplatesCommand = serializeAws_restJson1ListTemplatesCommand;
332
+ const serializeAws_restJson1ListTemplateStepGroupsCommand = async (input, context) => {
333
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
334
+ const headers = {};
335
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/templatestepgroups/{templateId}";
336
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "templateId", () => input.templateId, "{templateId}", false);
337
+ const query = map({
338
+ maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
339
+ nextToken: [, input.nextToken],
340
+ });
341
+ let body;
342
+ return new protocol_http_1.HttpRequest({
343
+ protocol,
344
+ hostname,
345
+ port,
346
+ method: "GET",
347
+ headers,
348
+ path: resolvedPath,
349
+ query,
350
+ body,
351
+ });
352
+ };
353
+ exports.serializeAws_restJson1ListTemplateStepGroupsCommand = serializeAws_restJson1ListTemplateStepGroupsCommand;
354
+ const serializeAws_restJson1ListTemplateStepsCommand = async (input, context) => {
355
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
356
+ const headers = {};
357
+ const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/templatesteps";
358
+ const query = map({
359
+ maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
360
+ nextToken: [, input.nextToken],
361
+ templateId: [, input.templateId],
362
+ stepGroupId: [, input.stepGroupId],
363
+ });
364
+ let body;
365
+ return new protocol_http_1.HttpRequest({
366
+ protocol,
367
+ hostname,
368
+ port,
369
+ method: "GET",
370
+ headers,
371
+ path: resolvedPath,
372
+ query,
373
+ body,
374
+ });
375
+ };
376
+ exports.serializeAws_restJson1ListTemplateStepsCommand = serializeAws_restJson1ListTemplateStepsCommand;
377
+ const serializeAws_restJson1ListWorkflowsCommand = async (input, context) => {
378
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
379
+ const headers = {};
380
+ const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/migrationworkflows";
381
+ const query = map({
382
+ maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
383
+ nextToken: [, input.nextToken],
384
+ templateId: [, input.templateId],
385
+ adsApplicationConfigurationName: [, input.adsApplicationConfigurationName],
386
+ status: [, input.status],
387
+ name: [, input.name],
388
+ });
389
+ let body;
390
+ return new protocol_http_1.HttpRequest({
391
+ protocol,
392
+ hostname,
393
+ port,
394
+ method: "GET",
395
+ headers,
396
+ path: resolvedPath,
397
+ query,
398
+ body,
399
+ });
400
+ };
401
+ exports.serializeAws_restJson1ListWorkflowsCommand = serializeAws_restJson1ListWorkflowsCommand;
402
+ const serializeAws_restJson1ListWorkflowStepGroupsCommand = async (input, context) => {
403
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
404
+ const headers = {};
405
+ const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/workflowstepgroups";
406
+ const query = map({
407
+ nextToken: [, input.nextToken],
408
+ maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
409
+ workflowId: [, input.workflowId],
410
+ });
411
+ let body;
412
+ return new protocol_http_1.HttpRequest({
413
+ protocol,
414
+ hostname,
415
+ port,
416
+ method: "GET",
417
+ headers,
418
+ path: resolvedPath,
419
+ query,
420
+ body,
421
+ });
422
+ };
423
+ exports.serializeAws_restJson1ListWorkflowStepGroupsCommand = serializeAws_restJson1ListWorkflowStepGroupsCommand;
424
+ const serializeAws_restJson1ListWorkflowStepsCommand = async (input, context) => {
425
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
426
+ const headers = {};
427
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
428
+ "/workflow/{workflowId}/workflowstepgroups/{stepGroupId}/workflowsteps";
429
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "workflowId", () => input.workflowId, "{workflowId}", false);
430
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "stepGroupId", () => input.stepGroupId, "{stepGroupId}", false);
431
+ const query = map({
432
+ nextToken: [, input.nextToken],
433
+ maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
434
+ });
435
+ let body;
436
+ return new protocol_http_1.HttpRequest({
437
+ protocol,
438
+ hostname,
439
+ port,
440
+ method: "GET",
441
+ headers,
442
+ path: resolvedPath,
443
+ query,
444
+ body,
445
+ });
446
+ };
447
+ exports.serializeAws_restJson1ListWorkflowStepsCommand = serializeAws_restJson1ListWorkflowStepsCommand;
448
+ const serializeAws_restJson1RetryWorkflowStepCommand = async (input, context) => {
449
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
450
+ const headers = {};
451
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/retryworkflowstep/{id}";
452
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
453
+ const query = map({
454
+ workflowId: [, input.workflowId],
455
+ stepGroupId: [, input.stepGroupId],
456
+ });
457
+ let body;
458
+ return new protocol_http_1.HttpRequest({
459
+ protocol,
460
+ hostname,
461
+ port,
462
+ method: "POST",
463
+ headers,
464
+ path: resolvedPath,
465
+ query,
466
+ body,
467
+ });
468
+ };
469
+ exports.serializeAws_restJson1RetryWorkflowStepCommand = serializeAws_restJson1RetryWorkflowStepCommand;
470
+ const serializeAws_restJson1StartWorkflowCommand = async (input, context) => {
471
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
472
+ const headers = {};
473
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/migrationworkflow/{id}/start";
474
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
475
+ let body;
476
+ return new protocol_http_1.HttpRequest({
477
+ protocol,
478
+ hostname,
479
+ port,
480
+ method: "POST",
481
+ headers,
482
+ path: resolvedPath,
483
+ body,
484
+ });
485
+ };
486
+ exports.serializeAws_restJson1StartWorkflowCommand = serializeAws_restJson1StartWorkflowCommand;
487
+ const serializeAws_restJson1StopWorkflowCommand = async (input, context) => {
488
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
489
+ const headers = {};
490
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/migrationworkflow/{id}/stop";
491
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
492
+ let body;
493
+ return new protocol_http_1.HttpRequest({
494
+ protocol,
495
+ hostname,
496
+ port,
497
+ method: "POST",
498
+ headers,
499
+ path: resolvedPath,
500
+ body,
501
+ });
502
+ };
503
+ exports.serializeAws_restJson1StopWorkflowCommand = serializeAws_restJson1StopWorkflowCommand;
504
+ const serializeAws_restJson1TagResourceCommand = async (input, context) => {
505
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
506
+ const headers = {
507
+ "content-type": "application/json",
508
+ };
509
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
510
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
511
+ let body;
512
+ body = JSON.stringify({
513
+ ...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
514
+ });
515
+ return new protocol_http_1.HttpRequest({
516
+ protocol,
517
+ hostname,
518
+ port,
519
+ method: "POST",
520
+ headers,
521
+ path: resolvedPath,
522
+ body,
523
+ });
524
+ };
525
+ exports.serializeAws_restJson1TagResourceCommand = serializeAws_restJson1TagResourceCommand;
526
+ const serializeAws_restJson1UntagResourceCommand = async (input, context) => {
527
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
528
+ const headers = {};
529
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
530
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
531
+ const query = map({
532
+ tagKeys: [() => input.tagKeys !== void 0, () => (input.tagKeys || []).map((_entry) => _entry)],
533
+ });
534
+ let body;
535
+ return new protocol_http_1.HttpRequest({
536
+ protocol,
537
+ hostname,
538
+ port,
539
+ method: "DELETE",
540
+ headers,
541
+ path: resolvedPath,
542
+ query,
543
+ body,
544
+ });
545
+ };
546
+ exports.serializeAws_restJson1UntagResourceCommand = serializeAws_restJson1UntagResourceCommand;
547
+ const serializeAws_restJson1UpdateWorkflowCommand = async (input, context) => {
548
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
549
+ const headers = {
550
+ "content-type": "application/json",
551
+ };
552
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/migrationworkflow/{id}";
553
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
554
+ let body;
555
+ body = JSON.stringify({
556
+ ...(input.description != null && { description: input.description }),
557
+ ...(input.inputParameters != null && {
558
+ inputParameters: serializeAws_restJson1StepInputParameters(input.inputParameters, context),
559
+ }),
560
+ ...(input.name != null && { name: input.name }),
561
+ ...(input.stepTargets != null && { stepTargets: serializeAws_restJson1StringList(input.stepTargets, context) }),
562
+ });
563
+ return new protocol_http_1.HttpRequest({
564
+ protocol,
565
+ hostname,
566
+ port,
567
+ method: "POST",
568
+ headers,
569
+ path: resolvedPath,
570
+ body,
571
+ });
572
+ };
573
+ exports.serializeAws_restJson1UpdateWorkflowCommand = serializeAws_restJson1UpdateWorkflowCommand;
574
+ const serializeAws_restJson1UpdateWorkflowStepCommand = async (input, context) => {
575
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
576
+ const headers = {
577
+ "content-type": "application/json",
578
+ };
579
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/workflowstep/{id}";
580
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
581
+ let body;
582
+ body = JSON.stringify({
583
+ ...(input.description != null && { description: input.description }),
584
+ ...(input.name != null && { name: input.name }),
585
+ ...(input.next != null && { next: serializeAws_restJson1StringList(input.next, context) }),
586
+ ...(input.outputs != null && { outputs: serializeAws_restJson1WorkflowStepOutputList(input.outputs, context) }),
587
+ ...(input.previous != null && { previous: serializeAws_restJson1StringList(input.previous, context) }),
588
+ ...(input.status != null && { status: input.status }),
589
+ ...(input.stepActionType != null && { stepActionType: input.stepActionType }),
590
+ ...(input.stepGroupId != null && { stepGroupId: input.stepGroupId }),
591
+ ...(input.stepTarget != null && { stepTarget: serializeAws_restJson1StringList(input.stepTarget, context) }),
592
+ ...(input.workflowId != null && { workflowId: input.workflowId }),
593
+ ...(input.workflowStepAutomationConfiguration != null && {
594
+ workflowStepAutomationConfiguration: serializeAws_restJson1WorkflowStepAutomationConfiguration(input.workflowStepAutomationConfiguration, context),
595
+ }),
596
+ });
597
+ return new protocol_http_1.HttpRequest({
598
+ protocol,
599
+ hostname,
600
+ port,
601
+ method: "POST",
602
+ headers,
603
+ path: resolvedPath,
604
+ body,
605
+ });
606
+ };
607
+ exports.serializeAws_restJson1UpdateWorkflowStepCommand = serializeAws_restJson1UpdateWorkflowStepCommand;
608
+ const serializeAws_restJson1UpdateWorkflowStepGroupCommand = async (input, context) => {
609
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
610
+ const headers = {
611
+ "content-type": "application/json",
612
+ };
613
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/workflowstepgroup/{id}";
614
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
615
+ const query = map({
616
+ workflowId: [, input.workflowId],
617
+ });
618
+ let body;
619
+ body = JSON.stringify({
620
+ ...(input.description != null && { description: input.description }),
621
+ ...(input.name != null && { name: input.name }),
622
+ ...(input.next != null && { next: serializeAws_restJson1StringList(input.next, context) }),
623
+ ...(input.previous != null && { previous: serializeAws_restJson1StringList(input.previous, context) }),
624
+ });
625
+ return new protocol_http_1.HttpRequest({
626
+ protocol,
627
+ hostname,
628
+ port,
629
+ method: "POST",
630
+ headers,
631
+ path: resolvedPath,
632
+ query,
633
+ body,
634
+ });
635
+ };
636
+ exports.serializeAws_restJson1UpdateWorkflowStepGroupCommand = serializeAws_restJson1UpdateWorkflowStepGroupCommand;
637
+ const deserializeAws_restJson1CreateWorkflowCommand = async (output, context) => {
638
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
639
+ return deserializeAws_restJson1CreateWorkflowCommandError(output, context);
640
+ }
641
+ const contents = map({
642
+ $metadata: deserializeMetadata(output),
643
+ });
644
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
645
+ if (data.adsApplicationConfigurationId != null) {
646
+ contents.adsApplicationConfigurationId = (0, smithy_client_1.expectString)(data.adsApplicationConfigurationId);
647
+ }
648
+ if (data.arn != null) {
649
+ contents.arn = (0, smithy_client_1.expectString)(data.arn);
650
+ }
651
+ if (data.creationTime != null) {
652
+ contents.creationTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.creationTime)));
653
+ }
654
+ if (data.description != null) {
655
+ contents.description = (0, smithy_client_1.expectString)(data.description);
656
+ }
657
+ if (data.id != null) {
658
+ contents.id = (0, smithy_client_1.expectString)(data.id);
659
+ }
660
+ if (data.name != null) {
661
+ contents.name = (0, smithy_client_1.expectString)(data.name);
662
+ }
663
+ if (data.status != null) {
664
+ contents.status = (0, smithy_client_1.expectString)(data.status);
665
+ }
666
+ if (data.stepTargets != null) {
667
+ contents.stepTargets = deserializeAws_restJson1StringList(data.stepTargets, context);
668
+ }
669
+ if (data.tags != null) {
670
+ contents.tags = deserializeAws_restJson1StringMap(data.tags, context);
671
+ }
672
+ if (data.templateId != null) {
673
+ contents.templateId = (0, smithy_client_1.expectString)(data.templateId);
674
+ }
675
+ if (data.workflowInputs != null) {
676
+ contents.workflowInputs = deserializeAws_restJson1StepInputParameters(data.workflowInputs, context);
677
+ }
678
+ return contents;
679
+ };
680
+ exports.deserializeAws_restJson1CreateWorkflowCommand = deserializeAws_restJson1CreateWorkflowCommand;
681
+ const deserializeAws_restJson1CreateWorkflowCommandError = async (output, context) => {
682
+ const parsedOutput = {
683
+ ...output,
684
+ body: await parseErrorBody(output.body, context),
685
+ };
686
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
687
+ switch (errorCode) {
688
+ case "AccessDeniedException":
689
+ case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
690
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
691
+ case "InternalServerException":
692
+ case "com.amazonaws.migrationhuborchestrator#InternalServerException":
693
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
694
+ case "ThrottlingException":
695
+ case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
696
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
697
+ case "ValidationException":
698
+ case "com.amazonaws.migrationhuborchestrator#ValidationException":
699
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
700
+ default:
701
+ const parsedBody = parsedOutput.body;
702
+ (0, smithy_client_1.throwDefaultError)({
703
+ output,
704
+ parsedBody,
705
+ exceptionCtor: MigrationHubOrchestratorServiceException_1.MigrationHubOrchestratorServiceException,
706
+ errorCode,
707
+ });
708
+ }
709
+ };
710
+ const deserializeAws_restJson1CreateWorkflowStepCommand = async (output, context) => {
711
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
712
+ return deserializeAws_restJson1CreateWorkflowStepCommandError(output, context);
713
+ }
714
+ const contents = map({
715
+ $metadata: deserializeMetadata(output),
716
+ });
717
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
718
+ if (data.id != null) {
719
+ contents.id = (0, smithy_client_1.expectString)(data.id);
720
+ }
721
+ if (data.name != null) {
722
+ contents.name = (0, smithy_client_1.expectString)(data.name);
723
+ }
724
+ if (data.stepGroupId != null) {
725
+ contents.stepGroupId = (0, smithy_client_1.expectString)(data.stepGroupId);
726
+ }
727
+ if (data.workflowId != null) {
728
+ contents.workflowId = (0, smithy_client_1.expectString)(data.workflowId);
729
+ }
730
+ return contents;
731
+ };
732
+ exports.deserializeAws_restJson1CreateWorkflowStepCommand = deserializeAws_restJson1CreateWorkflowStepCommand;
733
+ const deserializeAws_restJson1CreateWorkflowStepCommandError = async (output, context) => {
734
+ const parsedOutput = {
735
+ ...output,
736
+ body: await parseErrorBody(output.body, context),
737
+ };
738
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
739
+ switch (errorCode) {
740
+ case "AccessDeniedException":
741
+ case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
742
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
743
+ case "InternalServerException":
744
+ case "com.amazonaws.migrationhuborchestrator#InternalServerException":
745
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
746
+ case "ThrottlingException":
747
+ case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
748
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
749
+ case "ValidationException":
750
+ case "com.amazonaws.migrationhuborchestrator#ValidationException":
751
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
752
+ default:
753
+ const parsedBody = parsedOutput.body;
754
+ (0, smithy_client_1.throwDefaultError)({
755
+ output,
756
+ parsedBody,
757
+ exceptionCtor: MigrationHubOrchestratorServiceException_1.MigrationHubOrchestratorServiceException,
758
+ errorCode,
759
+ });
760
+ }
761
+ };
762
+ const deserializeAws_restJson1CreateWorkflowStepGroupCommand = async (output, context) => {
763
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
764
+ return deserializeAws_restJson1CreateWorkflowStepGroupCommandError(output, context);
765
+ }
766
+ const contents = map({
767
+ $metadata: deserializeMetadata(output),
768
+ });
769
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
770
+ if (data.creationTime != null) {
771
+ contents.creationTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.creationTime)));
772
+ }
773
+ if (data.description != null) {
774
+ contents.description = (0, smithy_client_1.expectString)(data.description);
775
+ }
776
+ if (data.id != null) {
777
+ contents.id = (0, smithy_client_1.expectString)(data.id);
778
+ }
779
+ if (data.name != null) {
780
+ contents.name = (0, smithy_client_1.expectString)(data.name);
781
+ }
782
+ if (data.next != null) {
783
+ contents.next = deserializeAws_restJson1StringList(data.next, context);
784
+ }
785
+ if (data.previous != null) {
786
+ contents.previous = deserializeAws_restJson1StringList(data.previous, context);
787
+ }
788
+ if (data.tools != null) {
789
+ contents.tools = deserializeAws_restJson1ToolsList(data.tools, context);
790
+ }
791
+ if (data.workflowId != null) {
792
+ contents.workflowId = (0, smithy_client_1.expectString)(data.workflowId);
793
+ }
794
+ return contents;
795
+ };
796
+ exports.deserializeAws_restJson1CreateWorkflowStepGroupCommand = deserializeAws_restJson1CreateWorkflowStepGroupCommand;
797
+ const deserializeAws_restJson1CreateWorkflowStepGroupCommandError = async (output, context) => {
798
+ const parsedOutput = {
799
+ ...output,
800
+ body: await parseErrorBody(output.body, context),
801
+ };
802
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
803
+ switch (errorCode) {
804
+ case "AccessDeniedException":
805
+ case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
806
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
807
+ case "InternalServerException":
808
+ case "com.amazonaws.migrationhuborchestrator#InternalServerException":
809
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
810
+ case "ThrottlingException":
811
+ case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
812
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
813
+ case "ValidationException":
814
+ case "com.amazonaws.migrationhuborchestrator#ValidationException":
815
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
816
+ default:
817
+ const parsedBody = parsedOutput.body;
818
+ (0, smithy_client_1.throwDefaultError)({
819
+ output,
820
+ parsedBody,
821
+ exceptionCtor: MigrationHubOrchestratorServiceException_1.MigrationHubOrchestratorServiceException,
822
+ errorCode,
823
+ });
824
+ }
825
+ };
826
+ const deserializeAws_restJson1DeleteWorkflowCommand = async (output, context) => {
827
+ if (output.statusCode !== 202 && output.statusCode >= 300) {
828
+ return deserializeAws_restJson1DeleteWorkflowCommandError(output, context);
829
+ }
830
+ const contents = map({
831
+ $metadata: deserializeMetadata(output),
832
+ });
833
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
834
+ if (data.arn != null) {
835
+ contents.arn = (0, smithy_client_1.expectString)(data.arn);
836
+ }
837
+ if (data.id != null) {
838
+ contents.id = (0, smithy_client_1.expectString)(data.id);
839
+ }
840
+ if (data.status != null) {
841
+ contents.status = (0, smithy_client_1.expectString)(data.status);
842
+ }
843
+ return contents;
844
+ };
845
+ exports.deserializeAws_restJson1DeleteWorkflowCommand = deserializeAws_restJson1DeleteWorkflowCommand;
846
+ const deserializeAws_restJson1DeleteWorkflowCommandError = async (output, context) => {
847
+ const parsedOutput = {
848
+ ...output,
849
+ body: await parseErrorBody(output.body, context),
850
+ };
851
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
852
+ switch (errorCode) {
853
+ case "AccessDeniedException":
854
+ case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
855
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
856
+ case "InternalServerException":
857
+ case "com.amazonaws.migrationhuborchestrator#InternalServerException":
858
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
859
+ case "ResourceNotFoundException":
860
+ case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
861
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
862
+ case "ThrottlingException":
863
+ case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
864
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
865
+ case "ValidationException":
866
+ case "com.amazonaws.migrationhuborchestrator#ValidationException":
867
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
868
+ default:
869
+ const parsedBody = parsedOutput.body;
870
+ (0, smithy_client_1.throwDefaultError)({
871
+ output,
872
+ parsedBody,
873
+ exceptionCtor: MigrationHubOrchestratorServiceException_1.MigrationHubOrchestratorServiceException,
874
+ errorCode,
875
+ });
876
+ }
877
+ };
878
+ const deserializeAws_restJson1DeleteWorkflowStepCommand = async (output, context) => {
879
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
880
+ return deserializeAws_restJson1DeleteWorkflowStepCommandError(output, context);
881
+ }
882
+ const contents = map({
883
+ $metadata: deserializeMetadata(output),
884
+ });
885
+ await collectBody(output.body, context);
886
+ return contents;
887
+ };
888
+ exports.deserializeAws_restJson1DeleteWorkflowStepCommand = deserializeAws_restJson1DeleteWorkflowStepCommand;
889
+ const deserializeAws_restJson1DeleteWorkflowStepCommandError = async (output, context) => {
890
+ const parsedOutput = {
891
+ ...output,
892
+ body: await parseErrorBody(output.body, context),
893
+ };
894
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
895
+ switch (errorCode) {
896
+ case "AccessDeniedException":
897
+ case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
898
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
899
+ case "InternalServerException":
900
+ case "com.amazonaws.migrationhuborchestrator#InternalServerException":
901
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
902
+ case "ResourceNotFoundException":
903
+ case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
904
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
905
+ case "ThrottlingException":
906
+ case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
907
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
908
+ case "ValidationException":
909
+ case "com.amazonaws.migrationhuborchestrator#ValidationException":
910
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
911
+ default:
912
+ const parsedBody = parsedOutput.body;
913
+ (0, smithy_client_1.throwDefaultError)({
914
+ output,
915
+ parsedBody,
916
+ exceptionCtor: MigrationHubOrchestratorServiceException_1.MigrationHubOrchestratorServiceException,
917
+ errorCode,
918
+ });
919
+ }
920
+ };
921
+ const deserializeAws_restJson1DeleteWorkflowStepGroupCommand = async (output, context) => {
922
+ if (output.statusCode !== 202 && output.statusCode >= 300) {
923
+ return deserializeAws_restJson1DeleteWorkflowStepGroupCommandError(output, context);
924
+ }
925
+ const contents = map({
926
+ $metadata: deserializeMetadata(output),
927
+ });
928
+ await collectBody(output.body, context);
929
+ return contents;
930
+ };
931
+ exports.deserializeAws_restJson1DeleteWorkflowStepGroupCommand = deserializeAws_restJson1DeleteWorkflowStepGroupCommand;
932
+ const deserializeAws_restJson1DeleteWorkflowStepGroupCommandError = async (output, context) => {
933
+ const parsedOutput = {
934
+ ...output,
935
+ body: await parseErrorBody(output.body, context),
936
+ };
937
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
938
+ switch (errorCode) {
939
+ case "AccessDeniedException":
940
+ case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
941
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
942
+ case "InternalServerException":
943
+ case "com.amazonaws.migrationhuborchestrator#InternalServerException":
944
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
945
+ case "ResourceNotFoundException":
946
+ case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
947
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
948
+ case "ThrottlingException":
949
+ case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
950
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
951
+ case "ValidationException":
952
+ case "com.amazonaws.migrationhuborchestrator#ValidationException":
953
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
954
+ default:
955
+ const parsedBody = parsedOutput.body;
956
+ (0, smithy_client_1.throwDefaultError)({
957
+ output,
958
+ parsedBody,
959
+ exceptionCtor: MigrationHubOrchestratorServiceException_1.MigrationHubOrchestratorServiceException,
960
+ errorCode,
961
+ });
962
+ }
963
+ };
964
+ const deserializeAws_restJson1GetTemplateCommand = async (output, context) => {
965
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
966
+ return deserializeAws_restJson1GetTemplateCommandError(output, context);
967
+ }
968
+ const contents = map({
969
+ $metadata: deserializeMetadata(output),
970
+ });
971
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
972
+ if (data.creationTime != null) {
973
+ contents.creationTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.creationTime)));
974
+ }
975
+ if (data.description != null) {
976
+ contents.description = (0, smithy_client_1.expectString)(data.description);
977
+ }
978
+ if (data.id != null) {
979
+ contents.id = (0, smithy_client_1.expectString)(data.id);
980
+ }
981
+ if (data.inputs != null) {
982
+ contents.inputs = deserializeAws_restJson1TemplateInputList(data.inputs, context);
983
+ }
984
+ if (data.name != null) {
985
+ contents.name = (0, smithy_client_1.expectString)(data.name);
986
+ }
987
+ if (data.status != null) {
988
+ contents.status = (0, smithy_client_1.expectString)(data.status);
989
+ }
990
+ if (data.tools != null) {
991
+ contents.tools = deserializeAws_restJson1ToolsList(data.tools, context);
992
+ }
993
+ return contents;
994
+ };
995
+ exports.deserializeAws_restJson1GetTemplateCommand = deserializeAws_restJson1GetTemplateCommand;
996
+ const deserializeAws_restJson1GetTemplateCommandError = async (output, context) => {
997
+ const parsedOutput = {
998
+ ...output,
999
+ body: await parseErrorBody(output.body, context),
1000
+ };
1001
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1002
+ switch (errorCode) {
1003
+ case "AccessDeniedException":
1004
+ case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
1005
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1006
+ case "InternalServerException":
1007
+ case "com.amazonaws.migrationhuborchestrator#InternalServerException":
1008
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1009
+ case "ResourceNotFoundException":
1010
+ case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
1011
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1012
+ case "ThrottlingException":
1013
+ case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
1014
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1015
+ default:
1016
+ const parsedBody = parsedOutput.body;
1017
+ (0, smithy_client_1.throwDefaultError)({
1018
+ output,
1019
+ parsedBody,
1020
+ exceptionCtor: MigrationHubOrchestratorServiceException_1.MigrationHubOrchestratorServiceException,
1021
+ errorCode,
1022
+ });
1023
+ }
1024
+ };
1025
+ const deserializeAws_restJson1GetTemplateStepCommand = async (output, context) => {
1026
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1027
+ return deserializeAws_restJson1GetTemplateStepCommandError(output, context);
1028
+ }
1029
+ const contents = map({
1030
+ $metadata: deserializeMetadata(output),
1031
+ });
1032
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1033
+ if (data.creationTime != null) {
1034
+ contents.creationTime = (0, smithy_client_1.expectString)(data.creationTime);
1035
+ }
1036
+ if (data.description != null) {
1037
+ contents.description = (0, smithy_client_1.expectString)(data.description);
1038
+ }
1039
+ if (data.id != null) {
1040
+ contents.id = (0, smithy_client_1.expectString)(data.id);
1041
+ }
1042
+ if (data.name != null) {
1043
+ contents.name = (0, smithy_client_1.expectString)(data.name);
1044
+ }
1045
+ if (data.next != null) {
1046
+ contents.next = deserializeAws_restJson1StringList(data.next, context);
1047
+ }
1048
+ if (data.outputs != null) {
1049
+ contents.outputs = deserializeAws_restJson1StepOutputList(data.outputs, context);
1050
+ }
1051
+ if (data.previous != null) {
1052
+ contents.previous = deserializeAws_restJson1StringList(data.previous, context);
1053
+ }
1054
+ if (data.stepActionType != null) {
1055
+ contents.stepActionType = (0, smithy_client_1.expectString)(data.stepActionType);
1056
+ }
1057
+ if (data.stepAutomationConfiguration != null) {
1058
+ contents.stepAutomationConfiguration = deserializeAws_restJson1StepAutomationConfiguration(data.stepAutomationConfiguration, context);
1059
+ }
1060
+ if (data.stepGroupId != null) {
1061
+ contents.stepGroupId = (0, smithy_client_1.expectString)(data.stepGroupId);
1062
+ }
1063
+ if (data.templateId != null) {
1064
+ contents.templateId = (0, smithy_client_1.expectString)(data.templateId);
1065
+ }
1066
+ return contents;
1067
+ };
1068
+ exports.deserializeAws_restJson1GetTemplateStepCommand = deserializeAws_restJson1GetTemplateStepCommand;
1069
+ const deserializeAws_restJson1GetTemplateStepCommandError = async (output, context) => {
1070
+ const parsedOutput = {
1071
+ ...output,
1072
+ body: await parseErrorBody(output.body, context),
1073
+ };
1074
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1075
+ switch (errorCode) {
1076
+ case "AccessDeniedException":
1077
+ case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
1078
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1079
+ case "InternalServerException":
1080
+ case "com.amazonaws.migrationhuborchestrator#InternalServerException":
1081
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1082
+ case "ResourceNotFoundException":
1083
+ case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
1084
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1085
+ case "ThrottlingException":
1086
+ case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
1087
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1088
+ case "ValidationException":
1089
+ case "com.amazonaws.migrationhuborchestrator#ValidationException":
1090
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1091
+ default:
1092
+ const parsedBody = parsedOutput.body;
1093
+ (0, smithy_client_1.throwDefaultError)({
1094
+ output,
1095
+ parsedBody,
1096
+ exceptionCtor: MigrationHubOrchestratorServiceException_1.MigrationHubOrchestratorServiceException,
1097
+ errorCode,
1098
+ });
1099
+ }
1100
+ };
1101
+ const deserializeAws_restJson1GetTemplateStepGroupCommand = async (output, context) => {
1102
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1103
+ return deserializeAws_restJson1GetTemplateStepGroupCommandError(output, context);
1104
+ }
1105
+ const contents = map({
1106
+ $metadata: deserializeMetadata(output),
1107
+ });
1108
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1109
+ if (data.creationTime != null) {
1110
+ contents.creationTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.creationTime)));
1111
+ }
1112
+ if (data.description != null) {
1113
+ contents.description = (0, smithy_client_1.expectString)(data.description);
1114
+ }
1115
+ if (data.id != null) {
1116
+ contents.id = (0, smithy_client_1.expectString)(data.id);
1117
+ }
1118
+ if (data.lastModifiedTime != null) {
1119
+ contents.lastModifiedTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.lastModifiedTime)));
1120
+ }
1121
+ if (data.name != null) {
1122
+ contents.name = (0, smithy_client_1.expectString)(data.name);
1123
+ }
1124
+ if (data.next != null) {
1125
+ contents.next = deserializeAws_restJson1StringList(data.next, context);
1126
+ }
1127
+ if (data.previous != null) {
1128
+ contents.previous = deserializeAws_restJson1StringList(data.previous, context);
1129
+ }
1130
+ if (data.status != null) {
1131
+ contents.status = (0, smithy_client_1.expectString)(data.status);
1132
+ }
1133
+ if (data.templateId != null) {
1134
+ contents.templateId = (0, smithy_client_1.expectString)(data.templateId);
1135
+ }
1136
+ if (data.tools != null) {
1137
+ contents.tools = deserializeAws_restJson1ToolsList(data.tools, context);
1138
+ }
1139
+ return contents;
1140
+ };
1141
+ exports.deserializeAws_restJson1GetTemplateStepGroupCommand = deserializeAws_restJson1GetTemplateStepGroupCommand;
1142
+ const deserializeAws_restJson1GetTemplateStepGroupCommandError = async (output, context) => {
1143
+ const parsedOutput = {
1144
+ ...output,
1145
+ body: await parseErrorBody(output.body, context),
1146
+ };
1147
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1148
+ switch (errorCode) {
1149
+ case "AccessDeniedException":
1150
+ case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
1151
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1152
+ case "InternalServerException":
1153
+ case "com.amazonaws.migrationhuborchestrator#InternalServerException":
1154
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1155
+ case "ResourceNotFoundException":
1156
+ case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
1157
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1158
+ case "ThrottlingException":
1159
+ case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
1160
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1161
+ case "ValidationException":
1162
+ case "com.amazonaws.migrationhuborchestrator#ValidationException":
1163
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1164
+ default:
1165
+ const parsedBody = parsedOutput.body;
1166
+ (0, smithy_client_1.throwDefaultError)({
1167
+ output,
1168
+ parsedBody,
1169
+ exceptionCtor: MigrationHubOrchestratorServiceException_1.MigrationHubOrchestratorServiceException,
1170
+ errorCode,
1171
+ });
1172
+ }
1173
+ };
1174
+ const deserializeAws_restJson1GetWorkflowCommand = async (output, context) => {
1175
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1176
+ return deserializeAws_restJson1GetWorkflowCommandError(output, context);
1177
+ }
1178
+ const contents = map({
1179
+ $metadata: deserializeMetadata(output),
1180
+ });
1181
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1182
+ if (data.adsApplicationConfigurationId != null) {
1183
+ contents.adsApplicationConfigurationId = (0, smithy_client_1.expectString)(data.adsApplicationConfigurationId);
1184
+ }
1185
+ if (data.adsApplicationName != null) {
1186
+ contents.adsApplicationName = (0, smithy_client_1.expectString)(data.adsApplicationName);
1187
+ }
1188
+ if (data.arn != null) {
1189
+ contents.arn = (0, smithy_client_1.expectString)(data.arn);
1190
+ }
1191
+ if (data.completedSteps != null) {
1192
+ contents.completedSteps = (0, smithy_client_1.expectInt32)(data.completedSteps);
1193
+ }
1194
+ if (data.creationTime != null) {
1195
+ contents.creationTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.creationTime)));
1196
+ }
1197
+ if (data.description != null) {
1198
+ contents.description = (0, smithy_client_1.expectString)(data.description);
1199
+ }
1200
+ if (data.endTime != null) {
1201
+ contents.endTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.endTime)));
1202
+ }
1203
+ if (data.id != null) {
1204
+ contents.id = (0, smithy_client_1.expectString)(data.id);
1205
+ }
1206
+ if (data.lastModifiedTime != null) {
1207
+ contents.lastModifiedTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.lastModifiedTime)));
1208
+ }
1209
+ if (data.lastStartTime != null) {
1210
+ contents.lastStartTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.lastStartTime)));
1211
+ }
1212
+ if (data.lastStopTime != null) {
1213
+ contents.lastStopTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.lastStopTime)));
1214
+ }
1215
+ if (data.name != null) {
1216
+ contents.name = (0, smithy_client_1.expectString)(data.name);
1217
+ }
1218
+ if (data.status != null) {
1219
+ contents.status = (0, smithy_client_1.expectString)(data.status);
1220
+ }
1221
+ if (data.statusMessage != null) {
1222
+ contents.statusMessage = (0, smithy_client_1.expectString)(data.statusMessage);
1223
+ }
1224
+ if (data.tags != null) {
1225
+ contents.tags = deserializeAws_restJson1StringMap(data.tags, context);
1226
+ }
1227
+ if (data.templateId != null) {
1228
+ contents.templateId = (0, smithy_client_1.expectString)(data.templateId);
1229
+ }
1230
+ if (data.tools != null) {
1231
+ contents.tools = deserializeAws_restJson1ToolsList(data.tools, context);
1232
+ }
1233
+ if (data.totalSteps != null) {
1234
+ contents.totalSteps = (0, smithy_client_1.expectInt32)(data.totalSteps);
1235
+ }
1236
+ if (data.workflowBucket != null) {
1237
+ contents.workflowBucket = (0, smithy_client_1.expectString)(data.workflowBucket);
1238
+ }
1239
+ if (data.workflowInputs != null) {
1240
+ contents.workflowInputs = deserializeAws_restJson1StepInputParameters(data.workflowInputs, context);
1241
+ }
1242
+ return contents;
1243
+ };
1244
+ exports.deserializeAws_restJson1GetWorkflowCommand = deserializeAws_restJson1GetWorkflowCommand;
1245
+ const deserializeAws_restJson1GetWorkflowCommandError = async (output, context) => {
1246
+ const parsedOutput = {
1247
+ ...output,
1248
+ body: await parseErrorBody(output.body, context),
1249
+ };
1250
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1251
+ switch (errorCode) {
1252
+ case "AccessDeniedException":
1253
+ case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
1254
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1255
+ case "InternalServerException":
1256
+ case "com.amazonaws.migrationhuborchestrator#InternalServerException":
1257
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1258
+ case "ResourceNotFoundException":
1259
+ case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
1260
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1261
+ case "ThrottlingException":
1262
+ case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
1263
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1264
+ case "ValidationException":
1265
+ case "com.amazonaws.migrationhuborchestrator#ValidationException":
1266
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1267
+ default:
1268
+ const parsedBody = parsedOutput.body;
1269
+ (0, smithy_client_1.throwDefaultError)({
1270
+ output,
1271
+ parsedBody,
1272
+ exceptionCtor: MigrationHubOrchestratorServiceException_1.MigrationHubOrchestratorServiceException,
1273
+ errorCode,
1274
+ });
1275
+ }
1276
+ };
1277
+ const deserializeAws_restJson1GetWorkflowStepCommand = async (output, context) => {
1278
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1279
+ return deserializeAws_restJson1GetWorkflowStepCommandError(output, context);
1280
+ }
1281
+ const contents = map({
1282
+ $metadata: deserializeMetadata(output),
1283
+ });
1284
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1285
+ if (data.creationTime != null) {
1286
+ contents.creationTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.creationTime)));
1287
+ }
1288
+ if (data.description != null) {
1289
+ contents.description = (0, smithy_client_1.expectString)(data.description);
1290
+ }
1291
+ if (data.endTime != null) {
1292
+ contents.endTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.endTime)));
1293
+ }
1294
+ if (data.lastStartTime != null) {
1295
+ contents.lastStartTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.lastStartTime)));
1296
+ }
1297
+ if (data.name != null) {
1298
+ contents.name = (0, smithy_client_1.expectString)(data.name);
1299
+ }
1300
+ if (data.next != null) {
1301
+ contents.next = deserializeAws_restJson1StringList(data.next, context);
1302
+ }
1303
+ if (data.noOfSrvCompleted != null) {
1304
+ contents.noOfSrvCompleted = (0, smithy_client_1.expectInt32)(data.noOfSrvCompleted);
1305
+ }
1306
+ if (data.noOfSrvFailed != null) {
1307
+ contents.noOfSrvFailed = (0, smithy_client_1.expectInt32)(data.noOfSrvFailed);
1308
+ }
1309
+ if (data.outputs != null) {
1310
+ contents.outputs = deserializeAws_restJson1WorkflowStepOutputList(data.outputs, context);
1311
+ }
1312
+ if (data.owner != null) {
1313
+ contents.owner = (0, smithy_client_1.expectString)(data.owner);
1314
+ }
1315
+ if (data.previous != null) {
1316
+ contents.previous = deserializeAws_restJson1StringList(data.previous, context);
1317
+ }
1318
+ if (data.scriptOutputLocation != null) {
1319
+ contents.scriptOutputLocation = (0, smithy_client_1.expectString)(data.scriptOutputLocation);
1320
+ }
1321
+ if (data.status != null) {
1322
+ contents.status = (0, smithy_client_1.expectString)(data.status);
1323
+ }
1324
+ if (data.statusMessage != null) {
1325
+ contents.statusMessage = (0, smithy_client_1.expectString)(data.statusMessage);
1326
+ }
1327
+ if (data.stepActionType != null) {
1328
+ contents.stepActionType = (0, smithy_client_1.expectString)(data.stepActionType);
1329
+ }
1330
+ if (data.stepGroupId != null) {
1331
+ contents.stepGroupId = (0, smithy_client_1.expectString)(data.stepGroupId);
1332
+ }
1333
+ if (data.stepId != null) {
1334
+ contents.stepId = (0, smithy_client_1.expectString)(data.stepId);
1335
+ }
1336
+ if (data.stepTarget != null) {
1337
+ contents.stepTarget = deserializeAws_restJson1StringList(data.stepTarget, context);
1338
+ }
1339
+ if (data.totalNoOfSrv != null) {
1340
+ contents.totalNoOfSrv = (0, smithy_client_1.expectInt32)(data.totalNoOfSrv);
1341
+ }
1342
+ if (data.workflowId != null) {
1343
+ contents.workflowId = (0, smithy_client_1.expectString)(data.workflowId);
1344
+ }
1345
+ if (data.workflowStepAutomationConfiguration != null) {
1346
+ contents.workflowStepAutomationConfiguration = deserializeAws_restJson1WorkflowStepAutomationConfiguration(data.workflowStepAutomationConfiguration, context);
1347
+ }
1348
+ return contents;
1349
+ };
1350
+ exports.deserializeAws_restJson1GetWorkflowStepCommand = deserializeAws_restJson1GetWorkflowStepCommand;
1351
+ const deserializeAws_restJson1GetWorkflowStepCommandError = async (output, context) => {
1352
+ const parsedOutput = {
1353
+ ...output,
1354
+ body: await parseErrorBody(output.body, context),
1355
+ };
1356
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1357
+ switch (errorCode) {
1358
+ case "AccessDeniedException":
1359
+ case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
1360
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1361
+ case "InternalServerException":
1362
+ case "com.amazonaws.migrationhuborchestrator#InternalServerException":
1363
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1364
+ case "ResourceNotFoundException":
1365
+ case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
1366
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1367
+ case "ThrottlingException":
1368
+ case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
1369
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1370
+ default:
1371
+ const parsedBody = parsedOutput.body;
1372
+ (0, smithy_client_1.throwDefaultError)({
1373
+ output,
1374
+ parsedBody,
1375
+ exceptionCtor: MigrationHubOrchestratorServiceException_1.MigrationHubOrchestratorServiceException,
1376
+ errorCode,
1377
+ });
1378
+ }
1379
+ };
1380
+ const deserializeAws_restJson1GetWorkflowStepGroupCommand = async (output, context) => {
1381
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1382
+ return deserializeAws_restJson1GetWorkflowStepGroupCommandError(output, context);
1383
+ }
1384
+ const contents = map({
1385
+ $metadata: deserializeMetadata(output),
1386
+ });
1387
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1388
+ if (data.creationTime != null) {
1389
+ contents.creationTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.creationTime)));
1390
+ }
1391
+ if (data.description != null) {
1392
+ contents.description = (0, smithy_client_1.expectString)(data.description);
1393
+ }
1394
+ if (data.endTime != null) {
1395
+ contents.endTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.endTime)));
1396
+ }
1397
+ if (data.id != null) {
1398
+ contents.id = (0, smithy_client_1.expectString)(data.id);
1399
+ }
1400
+ if (data.lastModifiedTime != null) {
1401
+ contents.lastModifiedTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.lastModifiedTime)));
1402
+ }
1403
+ if (data.name != null) {
1404
+ contents.name = (0, smithy_client_1.expectString)(data.name);
1405
+ }
1406
+ if (data.next != null) {
1407
+ contents.next = deserializeAws_restJson1StringList(data.next, context);
1408
+ }
1409
+ if (data.owner != null) {
1410
+ contents.owner = (0, smithy_client_1.expectString)(data.owner);
1411
+ }
1412
+ if (data.previous != null) {
1413
+ contents.previous = deserializeAws_restJson1StringList(data.previous, context);
1414
+ }
1415
+ if (data.status != null) {
1416
+ contents.status = (0, smithy_client_1.expectString)(data.status);
1417
+ }
1418
+ if (data.tools != null) {
1419
+ contents.tools = deserializeAws_restJson1ToolsList(data.tools, context);
1420
+ }
1421
+ if (data.workflowId != null) {
1422
+ contents.workflowId = (0, smithy_client_1.expectString)(data.workflowId);
1423
+ }
1424
+ return contents;
1425
+ };
1426
+ exports.deserializeAws_restJson1GetWorkflowStepGroupCommand = deserializeAws_restJson1GetWorkflowStepGroupCommand;
1427
+ const deserializeAws_restJson1GetWorkflowStepGroupCommandError = async (output, context) => {
1428
+ const parsedOutput = {
1429
+ ...output,
1430
+ body: await parseErrorBody(output.body, context),
1431
+ };
1432
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1433
+ switch (errorCode) {
1434
+ case "AccessDeniedException":
1435
+ case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
1436
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1437
+ case "InternalServerException":
1438
+ case "com.amazonaws.migrationhuborchestrator#InternalServerException":
1439
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1440
+ case "ResourceNotFoundException":
1441
+ case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
1442
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1443
+ case "ThrottlingException":
1444
+ case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
1445
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1446
+ case "ValidationException":
1447
+ case "com.amazonaws.migrationhuborchestrator#ValidationException":
1448
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1449
+ default:
1450
+ const parsedBody = parsedOutput.body;
1451
+ (0, smithy_client_1.throwDefaultError)({
1452
+ output,
1453
+ parsedBody,
1454
+ exceptionCtor: MigrationHubOrchestratorServiceException_1.MigrationHubOrchestratorServiceException,
1455
+ errorCode,
1456
+ });
1457
+ }
1458
+ };
1459
+ const deserializeAws_restJson1ListPluginsCommand = async (output, context) => {
1460
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1461
+ return deserializeAws_restJson1ListPluginsCommandError(output, context);
1462
+ }
1463
+ const contents = map({
1464
+ $metadata: deserializeMetadata(output),
1465
+ });
1466
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1467
+ if (data.nextToken != null) {
1468
+ contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1469
+ }
1470
+ if (data.plugins != null) {
1471
+ contents.plugins = deserializeAws_restJson1PluginSummaries(data.plugins, context);
1472
+ }
1473
+ return contents;
1474
+ };
1475
+ exports.deserializeAws_restJson1ListPluginsCommand = deserializeAws_restJson1ListPluginsCommand;
1476
+ const deserializeAws_restJson1ListPluginsCommandError = async (output, context) => {
1477
+ const parsedOutput = {
1478
+ ...output,
1479
+ body: await parseErrorBody(output.body, context),
1480
+ };
1481
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1482
+ switch (errorCode) {
1483
+ case "AccessDeniedException":
1484
+ case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
1485
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1486
+ case "InternalServerException":
1487
+ case "com.amazonaws.migrationhuborchestrator#InternalServerException":
1488
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1489
+ case "ValidationException":
1490
+ case "com.amazonaws.migrationhuborchestrator#ValidationException":
1491
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1492
+ default:
1493
+ const parsedBody = parsedOutput.body;
1494
+ (0, smithy_client_1.throwDefaultError)({
1495
+ output,
1496
+ parsedBody,
1497
+ exceptionCtor: MigrationHubOrchestratorServiceException_1.MigrationHubOrchestratorServiceException,
1498
+ errorCode,
1499
+ });
1500
+ }
1501
+ };
1502
+ const deserializeAws_restJson1ListTagsForResourceCommand = async (output, context) => {
1503
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1504
+ return deserializeAws_restJson1ListTagsForResourceCommandError(output, context);
1505
+ }
1506
+ const contents = map({
1507
+ $metadata: deserializeMetadata(output),
1508
+ });
1509
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1510
+ if (data.tags != null) {
1511
+ contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
1512
+ }
1513
+ return contents;
1514
+ };
1515
+ exports.deserializeAws_restJson1ListTagsForResourceCommand = deserializeAws_restJson1ListTagsForResourceCommand;
1516
+ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
1517
+ const parsedOutput = {
1518
+ ...output,
1519
+ body: await parseErrorBody(output.body, context),
1520
+ };
1521
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1522
+ switch (errorCode) {
1523
+ case "ResourceNotFoundException":
1524
+ case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
1525
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1526
+ case "ValidationException":
1527
+ case "com.amazonaws.migrationhuborchestrator#ValidationException":
1528
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1529
+ default:
1530
+ const parsedBody = parsedOutput.body;
1531
+ (0, smithy_client_1.throwDefaultError)({
1532
+ output,
1533
+ parsedBody,
1534
+ exceptionCtor: MigrationHubOrchestratorServiceException_1.MigrationHubOrchestratorServiceException,
1535
+ errorCode,
1536
+ });
1537
+ }
1538
+ };
1539
+ const deserializeAws_restJson1ListTemplatesCommand = async (output, context) => {
1540
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1541
+ return deserializeAws_restJson1ListTemplatesCommandError(output, context);
1542
+ }
1543
+ const contents = map({
1544
+ $metadata: deserializeMetadata(output),
1545
+ });
1546
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1547
+ if (data.nextToken != null) {
1548
+ contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1549
+ }
1550
+ if (data.templateSummary != null) {
1551
+ contents.templateSummary = deserializeAws_restJson1TemplateSummaryList(data.templateSummary, context);
1552
+ }
1553
+ return contents;
1554
+ };
1555
+ exports.deserializeAws_restJson1ListTemplatesCommand = deserializeAws_restJson1ListTemplatesCommand;
1556
+ const deserializeAws_restJson1ListTemplatesCommandError = async (output, context) => {
1557
+ const parsedOutput = {
1558
+ ...output,
1559
+ body: await parseErrorBody(output.body, context),
1560
+ };
1561
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1562
+ switch (errorCode) {
1563
+ case "AccessDeniedException":
1564
+ case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
1565
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1566
+ case "InternalServerException":
1567
+ case "com.amazonaws.migrationhuborchestrator#InternalServerException":
1568
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1569
+ case "ThrottlingException":
1570
+ case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
1571
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1572
+ default:
1573
+ const parsedBody = parsedOutput.body;
1574
+ (0, smithy_client_1.throwDefaultError)({
1575
+ output,
1576
+ parsedBody,
1577
+ exceptionCtor: MigrationHubOrchestratorServiceException_1.MigrationHubOrchestratorServiceException,
1578
+ errorCode,
1579
+ });
1580
+ }
1581
+ };
1582
+ const deserializeAws_restJson1ListTemplateStepGroupsCommand = async (output, context) => {
1583
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1584
+ return deserializeAws_restJson1ListTemplateStepGroupsCommandError(output, context);
1585
+ }
1586
+ const contents = map({
1587
+ $metadata: deserializeMetadata(output),
1588
+ });
1589
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1590
+ if (data.nextToken != null) {
1591
+ contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1592
+ }
1593
+ if (data.templateStepGroupSummary != null) {
1594
+ contents.templateStepGroupSummary = deserializeAws_restJson1TemplateStepGroupSummaryList(data.templateStepGroupSummary, context);
1595
+ }
1596
+ return contents;
1597
+ };
1598
+ exports.deserializeAws_restJson1ListTemplateStepGroupsCommand = deserializeAws_restJson1ListTemplateStepGroupsCommand;
1599
+ const deserializeAws_restJson1ListTemplateStepGroupsCommandError = async (output, context) => {
1600
+ const parsedOutput = {
1601
+ ...output,
1602
+ body: await parseErrorBody(output.body, context),
1603
+ };
1604
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1605
+ switch (errorCode) {
1606
+ case "AccessDeniedException":
1607
+ case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
1608
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1609
+ case "InternalServerException":
1610
+ case "com.amazonaws.migrationhuborchestrator#InternalServerException":
1611
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1612
+ case "ResourceNotFoundException":
1613
+ case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
1614
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1615
+ case "ThrottlingException":
1616
+ case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
1617
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1618
+ default:
1619
+ const parsedBody = parsedOutput.body;
1620
+ (0, smithy_client_1.throwDefaultError)({
1621
+ output,
1622
+ parsedBody,
1623
+ exceptionCtor: MigrationHubOrchestratorServiceException_1.MigrationHubOrchestratorServiceException,
1624
+ errorCode,
1625
+ });
1626
+ }
1627
+ };
1628
+ const deserializeAws_restJson1ListTemplateStepsCommand = async (output, context) => {
1629
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1630
+ return deserializeAws_restJson1ListTemplateStepsCommandError(output, context);
1631
+ }
1632
+ const contents = map({
1633
+ $metadata: deserializeMetadata(output),
1634
+ });
1635
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1636
+ if (data.nextToken != null) {
1637
+ contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1638
+ }
1639
+ if (data.templateStepSummaryList != null) {
1640
+ contents.templateStepSummaryList = deserializeAws_restJson1TemplateStepSummaryList(data.templateStepSummaryList, context);
1641
+ }
1642
+ return contents;
1643
+ };
1644
+ exports.deserializeAws_restJson1ListTemplateStepsCommand = deserializeAws_restJson1ListTemplateStepsCommand;
1645
+ const deserializeAws_restJson1ListTemplateStepsCommandError = async (output, context) => {
1646
+ const parsedOutput = {
1647
+ ...output,
1648
+ body: await parseErrorBody(output.body, context),
1649
+ };
1650
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1651
+ switch (errorCode) {
1652
+ case "AccessDeniedException":
1653
+ case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
1654
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1655
+ case "InternalServerException":
1656
+ case "com.amazonaws.migrationhuborchestrator#InternalServerException":
1657
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1658
+ case "ResourceNotFoundException":
1659
+ case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
1660
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1661
+ case "ThrottlingException":
1662
+ case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
1663
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1664
+ case "ValidationException":
1665
+ case "com.amazonaws.migrationhuborchestrator#ValidationException":
1666
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1667
+ default:
1668
+ const parsedBody = parsedOutput.body;
1669
+ (0, smithy_client_1.throwDefaultError)({
1670
+ output,
1671
+ parsedBody,
1672
+ exceptionCtor: MigrationHubOrchestratorServiceException_1.MigrationHubOrchestratorServiceException,
1673
+ errorCode,
1674
+ });
1675
+ }
1676
+ };
1677
+ const deserializeAws_restJson1ListWorkflowsCommand = async (output, context) => {
1678
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1679
+ return deserializeAws_restJson1ListWorkflowsCommandError(output, context);
1680
+ }
1681
+ const contents = map({
1682
+ $metadata: deserializeMetadata(output),
1683
+ });
1684
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1685
+ if (data.migrationWorkflowSummary != null) {
1686
+ contents.migrationWorkflowSummary = deserializeAws_restJson1MigrationWorkflowSummaryList(data.migrationWorkflowSummary, context);
1687
+ }
1688
+ if (data.nextToken != null) {
1689
+ contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1690
+ }
1691
+ return contents;
1692
+ };
1693
+ exports.deserializeAws_restJson1ListWorkflowsCommand = deserializeAws_restJson1ListWorkflowsCommand;
1694
+ const deserializeAws_restJson1ListWorkflowsCommandError = async (output, context) => {
1695
+ const parsedOutput = {
1696
+ ...output,
1697
+ body: await parseErrorBody(output.body, context),
1698
+ };
1699
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1700
+ switch (errorCode) {
1701
+ case "AccessDeniedException":
1702
+ case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
1703
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1704
+ case "InternalServerException":
1705
+ case "com.amazonaws.migrationhuborchestrator#InternalServerException":
1706
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1707
+ case "ResourceNotFoundException":
1708
+ case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
1709
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1710
+ case "ThrottlingException":
1711
+ case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
1712
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1713
+ case "ValidationException":
1714
+ case "com.amazonaws.migrationhuborchestrator#ValidationException":
1715
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1716
+ default:
1717
+ const parsedBody = parsedOutput.body;
1718
+ (0, smithy_client_1.throwDefaultError)({
1719
+ output,
1720
+ parsedBody,
1721
+ exceptionCtor: MigrationHubOrchestratorServiceException_1.MigrationHubOrchestratorServiceException,
1722
+ errorCode,
1723
+ });
1724
+ }
1725
+ };
1726
+ const deserializeAws_restJson1ListWorkflowStepGroupsCommand = async (output, context) => {
1727
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1728
+ return deserializeAws_restJson1ListWorkflowStepGroupsCommandError(output, context);
1729
+ }
1730
+ const contents = map({
1731
+ $metadata: deserializeMetadata(output),
1732
+ });
1733
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1734
+ if (data.nextToken != null) {
1735
+ contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1736
+ }
1737
+ if (data.workflowStepGroupsSummary != null) {
1738
+ contents.workflowStepGroupsSummary = deserializeAws_restJson1WorkflowStepGroupsSummaryList(data.workflowStepGroupsSummary, context);
1739
+ }
1740
+ return contents;
1741
+ };
1742
+ exports.deserializeAws_restJson1ListWorkflowStepGroupsCommand = deserializeAws_restJson1ListWorkflowStepGroupsCommand;
1743
+ const deserializeAws_restJson1ListWorkflowStepGroupsCommandError = async (output, context) => {
1744
+ const parsedOutput = {
1745
+ ...output,
1746
+ body: await parseErrorBody(output.body, context),
1747
+ };
1748
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1749
+ switch (errorCode) {
1750
+ case "AccessDeniedException":
1751
+ case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
1752
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1753
+ case "InternalServerException":
1754
+ case "com.amazonaws.migrationhuborchestrator#InternalServerException":
1755
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1756
+ case "ResourceNotFoundException":
1757
+ case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
1758
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1759
+ case "ThrottlingException":
1760
+ case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
1761
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1762
+ case "ValidationException":
1763
+ case "com.amazonaws.migrationhuborchestrator#ValidationException":
1764
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1765
+ default:
1766
+ const parsedBody = parsedOutput.body;
1767
+ (0, smithy_client_1.throwDefaultError)({
1768
+ output,
1769
+ parsedBody,
1770
+ exceptionCtor: MigrationHubOrchestratorServiceException_1.MigrationHubOrchestratorServiceException,
1771
+ errorCode,
1772
+ });
1773
+ }
1774
+ };
1775
+ const deserializeAws_restJson1ListWorkflowStepsCommand = async (output, context) => {
1776
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1777
+ return deserializeAws_restJson1ListWorkflowStepsCommandError(output, context);
1778
+ }
1779
+ const contents = map({
1780
+ $metadata: deserializeMetadata(output),
1781
+ });
1782
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1783
+ if (data.nextToken != null) {
1784
+ contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1785
+ }
1786
+ if (data.workflowStepsSummary != null) {
1787
+ contents.workflowStepsSummary = deserializeAws_restJson1WorkflowStepsSummaryList(data.workflowStepsSummary, context);
1788
+ }
1789
+ return contents;
1790
+ };
1791
+ exports.deserializeAws_restJson1ListWorkflowStepsCommand = deserializeAws_restJson1ListWorkflowStepsCommand;
1792
+ const deserializeAws_restJson1ListWorkflowStepsCommandError = async (output, context) => {
1793
+ const parsedOutput = {
1794
+ ...output,
1795
+ body: await parseErrorBody(output.body, context),
1796
+ };
1797
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1798
+ switch (errorCode) {
1799
+ case "AccessDeniedException":
1800
+ case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
1801
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1802
+ case "InternalServerException":
1803
+ case "com.amazonaws.migrationhuborchestrator#InternalServerException":
1804
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1805
+ case "ThrottlingException":
1806
+ case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
1807
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1808
+ case "ValidationException":
1809
+ case "com.amazonaws.migrationhuborchestrator#ValidationException":
1810
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1811
+ default:
1812
+ const parsedBody = parsedOutput.body;
1813
+ (0, smithy_client_1.throwDefaultError)({
1814
+ output,
1815
+ parsedBody,
1816
+ exceptionCtor: MigrationHubOrchestratorServiceException_1.MigrationHubOrchestratorServiceException,
1817
+ errorCode,
1818
+ });
1819
+ }
1820
+ };
1821
+ const deserializeAws_restJson1RetryWorkflowStepCommand = async (output, context) => {
1822
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1823
+ return deserializeAws_restJson1RetryWorkflowStepCommandError(output, context);
1824
+ }
1825
+ const contents = map({
1826
+ $metadata: deserializeMetadata(output),
1827
+ });
1828
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1829
+ if (data.id != null) {
1830
+ contents.id = (0, smithy_client_1.expectString)(data.id);
1831
+ }
1832
+ if (data.status != null) {
1833
+ contents.status = (0, smithy_client_1.expectString)(data.status);
1834
+ }
1835
+ if (data.stepGroupId != null) {
1836
+ contents.stepGroupId = (0, smithy_client_1.expectString)(data.stepGroupId);
1837
+ }
1838
+ if (data.workflowId != null) {
1839
+ contents.workflowId = (0, smithy_client_1.expectString)(data.workflowId);
1840
+ }
1841
+ return contents;
1842
+ };
1843
+ exports.deserializeAws_restJson1RetryWorkflowStepCommand = deserializeAws_restJson1RetryWorkflowStepCommand;
1844
+ const deserializeAws_restJson1RetryWorkflowStepCommandError = async (output, context) => {
1845
+ const parsedOutput = {
1846
+ ...output,
1847
+ body: await parseErrorBody(output.body, context),
1848
+ };
1849
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1850
+ switch (errorCode) {
1851
+ case "AccessDeniedException":
1852
+ case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
1853
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1854
+ case "InternalServerException":
1855
+ case "com.amazonaws.migrationhuborchestrator#InternalServerException":
1856
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1857
+ case "ResourceNotFoundException":
1858
+ case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
1859
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1860
+ case "ThrottlingException":
1861
+ case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
1862
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1863
+ default:
1864
+ const parsedBody = parsedOutput.body;
1865
+ (0, smithy_client_1.throwDefaultError)({
1866
+ output,
1867
+ parsedBody,
1868
+ exceptionCtor: MigrationHubOrchestratorServiceException_1.MigrationHubOrchestratorServiceException,
1869
+ errorCode,
1870
+ });
1871
+ }
1872
+ };
1873
+ const deserializeAws_restJson1StartWorkflowCommand = async (output, context) => {
1874
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1875
+ return deserializeAws_restJson1StartWorkflowCommandError(output, context);
1876
+ }
1877
+ const contents = map({
1878
+ $metadata: deserializeMetadata(output),
1879
+ });
1880
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1881
+ if (data.arn != null) {
1882
+ contents.arn = (0, smithy_client_1.expectString)(data.arn);
1883
+ }
1884
+ if (data.id != null) {
1885
+ contents.id = (0, smithy_client_1.expectString)(data.id);
1886
+ }
1887
+ if (data.lastStartTime != null) {
1888
+ contents.lastStartTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.lastStartTime)));
1889
+ }
1890
+ if (data.status != null) {
1891
+ contents.status = (0, smithy_client_1.expectString)(data.status);
1892
+ }
1893
+ if (data.statusMessage != null) {
1894
+ contents.statusMessage = (0, smithy_client_1.expectString)(data.statusMessage);
1895
+ }
1896
+ return contents;
1897
+ };
1898
+ exports.deserializeAws_restJson1StartWorkflowCommand = deserializeAws_restJson1StartWorkflowCommand;
1899
+ const deserializeAws_restJson1StartWorkflowCommandError = async (output, context) => {
1900
+ const parsedOutput = {
1901
+ ...output,
1902
+ body: await parseErrorBody(output.body, context),
1903
+ };
1904
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1905
+ switch (errorCode) {
1906
+ case "AccessDeniedException":
1907
+ case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
1908
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1909
+ case "InternalServerException":
1910
+ case "com.amazonaws.migrationhuborchestrator#InternalServerException":
1911
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1912
+ case "ResourceNotFoundException":
1913
+ case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
1914
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1915
+ case "ThrottlingException":
1916
+ case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
1917
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1918
+ case "ValidationException":
1919
+ case "com.amazonaws.migrationhuborchestrator#ValidationException":
1920
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1921
+ default:
1922
+ const parsedBody = parsedOutput.body;
1923
+ (0, smithy_client_1.throwDefaultError)({
1924
+ output,
1925
+ parsedBody,
1926
+ exceptionCtor: MigrationHubOrchestratorServiceException_1.MigrationHubOrchestratorServiceException,
1927
+ errorCode,
1928
+ });
1929
+ }
1930
+ };
1931
+ const deserializeAws_restJson1StopWorkflowCommand = async (output, context) => {
1932
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1933
+ return deserializeAws_restJson1StopWorkflowCommandError(output, context);
1934
+ }
1935
+ const contents = map({
1936
+ $metadata: deserializeMetadata(output),
1937
+ });
1938
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1939
+ if (data.arn != null) {
1940
+ contents.arn = (0, smithy_client_1.expectString)(data.arn);
1941
+ }
1942
+ if (data.id != null) {
1943
+ contents.id = (0, smithy_client_1.expectString)(data.id);
1944
+ }
1945
+ if (data.lastStopTime != null) {
1946
+ contents.lastStopTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.lastStopTime)));
1947
+ }
1948
+ if (data.status != null) {
1949
+ contents.status = (0, smithy_client_1.expectString)(data.status);
1950
+ }
1951
+ if (data.statusMessage != null) {
1952
+ contents.statusMessage = (0, smithy_client_1.expectString)(data.statusMessage);
1953
+ }
1954
+ return contents;
1955
+ };
1956
+ exports.deserializeAws_restJson1StopWorkflowCommand = deserializeAws_restJson1StopWorkflowCommand;
1957
+ const deserializeAws_restJson1StopWorkflowCommandError = async (output, context) => {
1958
+ const parsedOutput = {
1959
+ ...output,
1960
+ body: await parseErrorBody(output.body, context),
1961
+ };
1962
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1963
+ switch (errorCode) {
1964
+ case "AccessDeniedException":
1965
+ case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
1966
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1967
+ case "InternalServerException":
1968
+ case "com.amazonaws.migrationhuborchestrator#InternalServerException":
1969
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1970
+ case "ResourceNotFoundException":
1971
+ case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
1972
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1973
+ case "ThrottlingException":
1974
+ case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
1975
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1976
+ case "ValidationException":
1977
+ case "com.amazonaws.migrationhuborchestrator#ValidationException":
1978
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1979
+ default:
1980
+ const parsedBody = parsedOutput.body;
1981
+ (0, smithy_client_1.throwDefaultError)({
1982
+ output,
1983
+ parsedBody,
1984
+ exceptionCtor: MigrationHubOrchestratorServiceException_1.MigrationHubOrchestratorServiceException,
1985
+ errorCode,
1986
+ });
1987
+ }
1988
+ };
1989
+ const deserializeAws_restJson1TagResourceCommand = async (output, context) => {
1990
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1991
+ return deserializeAws_restJson1TagResourceCommandError(output, context);
1992
+ }
1993
+ const contents = map({
1994
+ $metadata: deserializeMetadata(output),
1995
+ });
1996
+ await collectBody(output.body, context);
1997
+ return contents;
1998
+ };
1999
+ exports.deserializeAws_restJson1TagResourceCommand = deserializeAws_restJson1TagResourceCommand;
2000
+ const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
2001
+ const parsedOutput = {
2002
+ ...output,
2003
+ body: await parseErrorBody(output.body, context),
2004
+ };
2005
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2006
+ switch (errorCode) {
2007
+ case "ResourceNotFoundException":
2008
+ case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
2009
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
2010
+ case "ValidationException":
2011
+ case "com.amazonaws.migrationhuborchestrator#ValidationException":
2012
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2013
+ default:
2014
+ const parsedBody = parsedOutput.body;
2015
+ (0, smithy_client_1.throwDefaultError)({
2016
+ output,
2017
+ parsedBody,
2018
+ exceptionCtor: MigrationHubOrchestratorServiceException_1.MigrationHubOrchestratorServiceException,
2019
+ errorCode,
2020
+ });
2021
+ }
2022
+ };
2023
+ const deserializeAws_restJson1UntagResourceCommand = async (output, context) => {
2024
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2025
+ return deserializeAws_restJson1UntagResourceCommandError(output, context);
2026
+ }
2027
+ const contents = map({
2028
+ $metadata: deserializeMetadata(output),
2029
+ });
2030
+ await collectBody(output.body, context);
2031
+ return contents;
2032
+ };
2033
+ exports.deserializeAws_restJson1UntagResourceCommand = deserializeAws_restJson1UntagResourceCommand;
2034
+ const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
2035
+ const parsedOutput = {
2036
+ ...output,
2037
+ body: await parseErrorBody(output.body, context),
2038
+ };
2039
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2040
+ switch (errorCode) {
2041
+ case "ResourceNotFoundException":
2042
+ case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
2043
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
2044
+ case "ValidationException":
2045
+ case "com.amazonaws.migrationhuborchestrator#ValidationException":
2046
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2047
+ default:
2048
+ const parsedBody = parsedOutput.body;
2049
+ (0, smithy_client_1.throwDefaultError)({
2050
+ output,
2051
+ parsedBody,
2052
+ exceptionCtor: MigrationHubOrchestratorServiceException_1.MigrationHubOrchestratorServiceException,
2053
+ errorCode,
2054
+ });
2055
+ }
2056
+ };
2057
+ const deserializeAws_restJson1UpdateWorkflowCommand = async (output, context) => {
2058
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2059
+ return deserializeAws_restJson1UpdateWorkflowCommandError(output, context);
2060
+ }
2061
+ const contents = map({
2062
+ $metadata: deserializeMetadata(output),
2063
+ });
2064
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2065
+ if (data.adsApplicationConfigurationId != null) {
2066
+ contents.adsApplicationConfigurationId = (0, smithy_client_1.expectString)(data.adsApplicationConfigurationId);
2067
+ }
2068
+ if (data.arn != null) {
2069
+ contents.arn = (0, smithy_client_1.expectString)(data.arn);
2070
+ }
2071
+ if (data.creationTime != null) {
2072
+ contents.creationTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.creationTime)));
2073
+ }
2074
+ if (data.description != null) {
2075
+ contents.description = (0, smithy_client_1.expectString)(data.description);
2076
+ }
2077
+ if (data.id != null) {
2078
+ contents.id = (0, smithy_client_1.expectString)(data.id);
2079
+ }
2080
+ if (data.lastModifiedTime != null) {
2081
+ contents.lastModifiedTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.lastModifiedTime)));
2082
+ }
2083
+ if (data.name != null) {
2084
+ contents.name = (0, smithy_client_1.expectString)(data.name);
2085
+ }
2086
+ if (data.status != null) {
2087
+ contents.status = (0, smithy_client_1.expectString)(data.status);
2088
+ }
2089
+ if (data.stepTargets != null) {
2090
+ contents.stepTargets = deserializeAws_restJson1StringList(data.stepTargets, context);
2091
+ }
2092
+ if (data.tags != null) {
2093
+ contents.tags = deserializeAws_restJson1StringMap(data.tags, context);
2094
+ }
2095
+ if (data.templateId != null) {
2096
+ contents.templateId = (0, smithy_client_1.expectString)(data.templateId);
2097
+ }
2098
+ if (data.workflowInputs != null) {
2099
+ contents.workflowInputs = deserializeAws_restJson1StepInputParameters(data.workflowInputs, context);
2100
+ }
2101
+ return contents;
2102
+ };
2103
+ exports.deserializeAws_restJson1UpdateWorkflowCommand = deserializeAws_restJson1UpdateWorkflowCommand;
2104
+ const deserializeAws_restJson1UpdateWorkflowCommandError = async (output, context) => {
2105
+ const parsedOutput = {
2106
+ ...output,
2107
+ body: await parseErrorBody(output.body, context),
2108
+ };
2109
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2110
+ switch (errorCode) {
2111
+ case "AccessDeniedException":
2112
+ case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
2113
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
2114
+ case "InternalServerException":
2115
+ case "com.amazonaws.migrationhuborchestrator#InternalServerException":
2116
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
2117
+ case "ResourceNotFoundException":
2118
+ case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
2119
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
2120
+ case "ThrottlingException":
2121
+ case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
2122
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2123
+ case "ValidationException":
2124
+ case "com.amazonaws.migrationhuborchestrator#ValidationException":
2125
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2126
+ default:
2127
+ const parsedBody = parsedOutput.body;
2128
+ (0, smithy_client_1.throwDefaultError)({
2129
+ output,
2130
+ parsedBody,
2131
+ exceptionCtor: MigrationHubOrchestratorServiceException_1.MigrationHubOrchestratorServiceException,
2132
+ errorCode,
2133
+ });
2134
+ }
2135
+ };
2136
+ const deserializeAws_restJson1UpdateWorkflowStepCommand = async (output, context) => {
2137
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2138
+ return deserializeAws_restJson1UpdateWorkflowStepCommandError(output, context);
2139
+ }
2140
+ const contents = map({
2141
+ $metadata: deserializeMetadata(output),
2142
+ });
2143
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2144
+ if (data.id != null) {
2145
+ contents.id = (0, smithy_client_1.expectString)(data.id);
2146
+ }
2147
+ if (data.name != null) {
2148
+ contents.name = (0, smithy_client_1.expectString)(data.name);
2149
+ }
2150
+ if (data.stepGroupId != null) {
2151
+ contents.stepGroupId = (0, smithy_client_1.expectString)(data.stepGroupId);
2152
+ }
2153
+ if (data.workflowId != null) {
2154
+ contents.workflowId = (0, smithy_client_1.expectString)(data.workflowId);
2155
+ }
2156
+ return contents;
2157
+ };
2158
+ exports.deserializeAws_restJson1UpdateWorkflowStepCommand = deserializeAws_restJson1UpdateWorkflowStepCommand;
2159
+ const deserializeAws_restJson1UpdateWorkflowStepCommandError = async (output, context) => {
2160
+ const parsedOutput = {
2161
+ ...output,
2162
+ body: await parseErrorBody(output.body, context),
2163
+ };
2164
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2165
+ switch (errorCode) {
2166
+ case "AccessDeniedException":
2167
+ case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
2168
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
2169
+ case "InternalServerException":
2170
+ case "com.amazonaws.migrationhuborchestrator#InternalServerException":
2171
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
2172
+ case "ThrottlingException":
2173
+ case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
2174
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2175
+ case "ValidationException":
2176
+ case "com.amazonaws.migrationhuborchestrator#ValidationException":
2177
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2178
+ default:
2179
+ const parsedBody = parsedOutput.body;
2180
+ (0, smithy_client_1.throwDefaultError)({
2181
+ output,
2182
+ parsedBody,
2183
+ exceptionCtor: MigrationHubOrchestratorServiceException_1.MigrationHubOrchestratorServiceException,
2184
+ errorCode,
2185
+ });
2186
+ }
2187
+ };
2188
+ const deserializeAws_restJson1UpdateWorkflowStepGroupCommand = async (output, context) => {
2189
+ if (output.statusCode !== 202 && output.statusCode >= 300) {
2190
+ return deserializeAws_restJson1UpdateWorkflowStepGroupCommandError(output, context);
2191
+ }
2192
+ const contents = map({
2193
+ $metadata: deserializeMetadata(output),
2194
+ });
2195
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2196
+ if (data.description != null) {
2197
+ contents.description = (0, smithy_client_1.expectString)(data.description);
2198
+ }
2199
+ if (data.id != null) {
2200
+ contents.id = (0, smithy_client_1.expectString)(data.id);
2201
+ }
2202
+ if (data.lastModifiedTime != null) {
2203
+ contents.lastModifiedTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.lastModifiedTime)));
2204
+ }
2205
+ if (data.name != null) {
2206
+ contents.name = (0, smithy_client_1.expectString)(data.name);
2207
+ }
2208
+ if (data.next != null) {
2209
+ contents.next = deserializeAws_restJson1StringList(data.next, context);
2210
+ }
2211
+ if (data.previous != null) {
2212
+ contents.previous = deserializeAws_restJson1StringList(data.previous, context);
2213
+ }
2214
+ if (data.tools != null) {
2215
+ contents.tools = deserializeAws_restJson1ToolsList(data.tools, context);
2216
+ }
2217
+ if (data.workflowId != null) {
2218
+ contents.workflowId = (0, smithy_client_1.expectString)(data.workflowId);
2219
+ }
2220
+ return contents;
2221
+ };
2222
+ exports.deserializeAws_restJson1UpdateWorkflowStepGroupCommand = deserializeAws_restJson1UpdateWorkflowStepGroupCommand;
2223
+ const deserializeAws_restJson1UpdateWorkflowStepGroupCommandError = async (output, context) => {
2224
+ const parsedOutput = {
2225
+ ...output,
2226
+ body: await parseErrorBody(output.body, context),
2227
+ };
2228
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2229
+ switch (errorCode) {
2230
+ case "AccessDeniedException":
2231
+ case "com.amazonaws.migrationhuborchestrator#AccessDeniedException":
2232
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
2233
+ case "InternalServerException":
2234
+ case "com.amazonaws.migrationhuborchestrator#InternalServerException":
2235
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
2236
+ case "ResourceNotFoundException":
2237
+ case "com.amazonaws.migrationhuborchestrator#ResourceNotFoundException":
2238
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
2239
+ case "ThrottlingException":
2240
+ case "com.amazonaws.migrationhuborchestrator#ThrottlingException":
2241
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2242
+ case "ValidationException":
2243
+ case "com.amazonaws.migrationhuborchestrator#ValidationException":
2244
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2245
+ default:
2246
+ const parsedBody = parsedOutput.body;
2247
+ (0, smithy_client_1.throwDefaultError)({
2248
+ output,
2249
+ parsedBody,
2250
+ exceptionCtor: MigrationHubOrchestratorServiceException_1.MigrationHubOrchestratorServiceException,
2251
+ errorCode,
2252
+ });
2253
+ }
2254
+ };
2255
+ const map = smithy_client_1.map;
2256
+ const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
2257
+ const contents = map({});
2258
+ const data = parsedOutput.body;
2259
+ if (data.message != null) {
2260
+ contents.message = (0, smithy_client_1.expectString)(data.message);
2261
+ }
2262
+ const exception = new models_0_1.AccessDeniedException({
2263
+ $metadata: deserializeMetadata(parsedOutput),
2264
+ ...contents,
2265
+ });
2266
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2267
+ };
2268
+ const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOutput, context) => {
2269
+ const contents = map({});
2270
+ const data = parsedOutput.body;
2271
+ if (data.message != null) {
2272
+ contents.message = (0, smithy_client_1.expectString)(data.message);
2273
+ }
2274
+ const exception = new models_0_1.InternalServerException({
2275
+ $metadata: deserializeMetadata(parsedOutput),
2276
+ ...contents,
2277
+ });
2278
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2279
+ };
2280
+ const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
2281
+ const contents = map({});
2282
+ const data = parsedOutput.body;
2283
+ if (data.message != null) {
2284
+ contents.message = (0, smithy_client_1.expectString)(data.message);
2285
+ }
2286
+ const exception = new models_0_1.ResourceNotFoundException({
2287
+ $metadata: deserializeMetadata(parsedOutput),
2288
+ ...contents,
2289
+ });
2290
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2291
+ };
2292
+ const deserializeAws_restJson1ThrottlingExceptionResponse = async (parsedOutput, context) => {
2293
+ const contents = map({});
2294
+ const data = parsedOutput.body;
2295
+ if (data.message != null) {
2296
+ contents.message = (0, smithy_client_1.expectString)(data.message);
2297
+ }
2298
+ const exception = new models_0_1.ThrottlingException({
2299
+ $metadata: deserializeMetadata(parsedOutput),
2300
+ ...contents,
2301
+ });
2302
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2303
+ };
2304
+ const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput, context) => {
2305
+ const contents = map({});
2306
+ const data = parsedOutput.body;
2307
+ if (data.message != null) {
2308
+ contents.message = (0, smithy_client_1.expectString)(data.message);
2309
+ }
2310
+ const exception = new models_0_1.ValidationException({
2311
+ $metadata: deserializeMetadata(parsedOutput),
2312
+ ...contents,
2313
+ });
2314
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2315
+ };
2316
+ const serializeAws_restJson1PlatformCommand = (input, context) => {
2317
+ return {
2318
+ ...(input.linux != null && { linux: input.linux }),
2319
+ ...(input.windows != null && { windows: input.windows }),
2320
+ };
2321
+ };
2322
+ const serializeAws_restJson1PlatformScriptKey = (input, context) => {
2323
+ return {
2324
+ ...(input.linux != null && { linux: input.linux }),
2325
+ ...(input.windows != null && { windows: input.windows }),
2326
+ };
2327
+ };
2328
+ const serializeAws_restJson1StepInput = (input, context) => {
2329
+ return models_0_1.StepInput.visit(input, {
2330
+ integerValue: (value) => ({ integerValue: value }),
2331
+ listOfStringsValue: (value) => ({ listOfStringsValue: serializeAws_restJson1StringList(value, context) }),
2332
+ mapOfStringValue: (value) => ({ mapOfStringValue: serializeAws_restJson1StringMap(value, context) }),
2333
+ stringValue: (value) => ({ stringValue: value }),
2334
+ _: (name, value) => ({ name: value }),
2335
+ });
2336
+ };
2337
+ const serializeAws_restJson1StepInputParameters = (input, context) => {
2338
+ return Object.entries(input).reduce((acc, [key, value]) => {
2339
+ if (value === null) {
2340
+ return acc;
2341
+ }
2342
+ return {
2343
+ ...acc,
2344
+ [key]: serializeAws_restJson1StepInput(value, context),
2345
+ };
2346
+ }, {});
2347
+ };
2348
+ const serializeAws_restJson1StringList = (input, context) => {
2349
+ return input
2350
+ .filter((e) => e != null)
2351
+ .map((entry) => {
2352
+ return entry;
2353
+ });
2354
+ };
2355
+ const serializeAws_restJson1StringMap = (input, context) => {
2356
+ return Object.entries(input).reduce((acc, [key, value]) => {
2357
+ if (value === null) {
2358
+ return acc;
2359
+ }
2360
+ return {
2361
+ ...acc,
2362
+ [key]: value,
2363
+ };
2364
+ }, {});
2365
+ };
2366
+ const serializeAws_restJson1TagMap = (input, context) => {
2367
+ return Object.entries(input).reduce((acc, [key, value]) => {
2368
+ if (value === null) {
2369
+ return acc;
2370
+ }
2371
+ return {
2372
+ ...acc,
2373
+ [key]: value,
2374
+ };
2375
+ }, {});
2376
+ };
2377
+ const serializeAws_restJson1WorkflowStepAutomationConfiguration = (input, context) => {
2378
+ return {
2379
+ ...(input.command != null && { command: serializeAws_restJson1PlatformCommand(input.command, context) }),
2380
+ ...(input.runEnvironment != null && { runEnvironment: input.runEnvironment }),
2381
+ ...(input.scriptLocationS3Bucket != null && { scriptLocationS3Bucket: input.scriptLocationS3Bucket }),
2382
+ ...(input.scriptLocationS3Key != null && {
2383
+ scriptLocationS3Key: serializeAws_restJson1PlatformScriptKey(input.scriptLocationS3Key, context),
2384
+ }),
2385
+ ...(input.targetType != null && { targetType: input.targetType }),
2386
+ };
2387
+ };
2388
+ const serializeAws_restJson1WorkflowStepOutput = (input, context) => {
2389
+ return {
2390
+ ...(input.dataType != null && { dataType: input.dataType }),
2391
+ ...(input.name != null && { name: input.name }),
2392
+ ...(input.required != null && { required: input.required }),
2393
+ ...(input.value != null && { value: serializeAws_restJson1WorkflowStepOutputUnion(input.value, context) }),
2394
+ };
2395
+ };
2396
+ const serializeAws_restJson1WorkflowStepOutputList = (input, context) => {
2397
+ return input
2398
+ .filter((e) => e != null)
2399
+ .map((entry) => {
2400
+ return serializeAws_restJson1WorkflowStepOutput(entry, context);
2401
+ });
2402
+ };
2403
+ const serializeAws_restJson1WorkflowStepOutputUnion = (input, context) => {
2404
+ return models_0_1.WorkflowStepOutputUnion.visit(input, {
2405
+ integerValue: (value) => ({ integerValue: value }),
2406
+ listOfStringValue: (value) => ({ listOfStringValue: serializeAws_restJson1StringList(value, context) }),
2407
+ stringValue: (value) => ({ stringValue: value }),
2408
+ _: (name, value) => ({ name: value }),
2409
+ });
2410
+ };
2411
+ const deserializeAws_restJson1MigrationWorkflowSummary = (output, context) => {
2412
+ return {
2413
+ adsApplicationConfigurationName: (0, smithy_client_1.expectString)(output.adsApplicationConfigurationName),
2414
+ completedSteps: (0, smithy_client_1.expectInt32)(output.completedSteps),
2415
+ creationTime: output.creationTime != null
2416
+ ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.creationTime)))
2417
+ : undefined,
2418
+ endTime: output.endTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.endTime))) : undefined,
2419
+ id: (0, smithy_client_1.expectString)(output.id),
2420
+ name: (0, smithy_client_1.expectString)(output.name),
2421
+ status: (0, smithy_client_1.expectString)(output.status),
2422
+ statusMessage: (0, smithy_client_1.expectString)(output.statusMessage),
2423
+ templateId: (0, smithy_client_1.expectString)(output.templateId),
2424
+ totalSteps: (0, smithy_client_1.expectInt32)(output.totalSteps),
2425
+ };
2426
+ };
2427
+ const deserializeAws_restJson1MigrationWorkflowSummaryList = (output, context) => {
2428
+ const retVal = (output || [])
2429
+ .filter((e) => e != null)
2430
+ .map((entry) => {
2431
+ if (entry === null) {
2432
+ return null;
2433
+ }
2434
+ return deserializeAws_restJson1MigrationWorkflowSummary(entry, context);
2435
+ });
2436
+ return retVal;
2437
+ };
2438
+ const deserializeAws_restJson1PlatformCommand = (output, context) => {
2439
+ return {
2440
+ linux: (0, smithy_client_1.expectString)(output.linux),
2441
+ windows: (0, smithy_client_1.expectString)(output.windows),
2442
+ };
2443
+ };
2444
+ const deserializeAws_restJson1PlatformScriptKey = (output, context) => {
2445
+ return {
2446
+ linux: (0, smithy_client_1.expectString)(output.linux),
2447
+ windows: (0, smithy_client_1.expectString)(output.windows),
2448
+ };
2449
+ };
2450
+ const deserializeAws_restJson1PluginSummaries = (output, context) => {
2451
+ const retVal = (output || [])
2452
+ .filter((e) => e != null)
2453
+ .map((entry) => {
2454
+ if (entry === null) {
2455
+ return null;
2456
+ }
2457
+ return deserializeAws_restJson1PluginSummary(entry, context);
2458
+ });
2459
+ return retVal;
2460
+ };
2461
+ const deserializeAws_restJson1PluginSummary = (output, context) => {
2462
+ return {
2463
+ hostname: (0, smithy_client_1.expectString)(output.hostname),
2464
+ ipAddress: (0, smithy_client_1.expectString)(output.ipAddress),
2465
+ pluginId: (0, smithy_client_1.expectString)(output.pluginId),
2466
+ registeredTime: (0, smithy_client_1.expectString)(output.registeredTime),
2467
+ status: (0, smithy_client_1.expectString)(output.status),
2468
+ version: (0, smithy_client_1.expectString)(output.version),
2469
+ };
2470
+ };
2471
+ const deserializeAws_restJson1StepAutomationConfiguration = (output, context) => {
2472
+ return {
2473
+ command: output.command != null ? deserializeAws_restJson1PlatformCommand(output.command, context) : undefined,
2474
+ runEnvironment: (0, smithy_client_1.expectString)(output.runEnvironment),
2475
+ scriptLocationS3Bucket: (0, smithy_client_1.expectString)(output.scriptLocationS3Bucket),
2476
+ scriptLocationS3Key: output.scriptLocationS3Key != null
2477
+ ? deserializeAws_restJson1PlatformScriptKey(output.scriptLocationS3Key, context)
2478
+ : undefined,
2479
+ targetType: (0, smithy_client_1.expectString)(output.targetType),
2480
+ };
2481
+ };
2482
+ const deserializeAws_restJson1StepInput = (output, context) => {
2483
+ if ((0, smithy_client_1.expectInt32)(output.integerValue) !== undefined) {
2484
+ return { integerValue: (0, smithy_client_1.expectInt32)(output.integerValue) };
2485
+ }
2486
+ if (output.listOfStringsValue != null) {
2487
+ return {
2488
+ listOfStringsValue: deserializeAws_restJson1StringList(output.listOfStringsValue, context),
2489
+ };
2490
+ }
2491
+ if (output.mapOfStringValue != null) {
2492
+ return {
2493
+ mapOfStringValue: deserializeAws_restJson1StringMap(output.mapOfStringValue, context),
2494
+ };
2495
+ }
2496
+ if ((0, smithy_client_1.expectString)(output.stringValue) !== undefined) {
2497
+ return { stringValue: (0, smithy_client_1.expectString)(output.stringValue) };
2498
+ }
2499
+ return { $unknown: Object.entries(output)[0] };
2500
+ };
2501
+ const deserializeAws_restJson1StepInputParameters = (output, context) => {
2502
+ return Object.entries(output).reduce((acc, [key, value]) => {
2503
+ if (value === null) {
2504
+ return acc;
2505
+ }
2506
+ return {
2507
+ ...acc,
2508
+ [key]: deserializeAws_restJson1StepInput((0, smithy_client_1.expectUnion)(value), context),
2509
+ };
2510
+ }, {});
2511
+ };
2512
+ const deserializeAws_restJson1StepOutput = (output, context) => {
2513
+ return {
2514
+ dataType: (0, smithy_client_1.expectString)(output.dataType),
2515
+ name: (0, smithy_client_1.expectString)(output.name),
2516
+ required: (0, smithy_client_1.expectBoolean)(output.required),
2517
+ };
2518
+ };
2519
+ const deserializeAws_restJson1StepOutputList = (output, context) => {
2520
+ const retVal = (output || [])
2521
+ .filter((e) => e != null)
2522
+ .map((entry) => {
2523
+ if (entry === null) {
2524
+ return null;
2525
+ }
2526
+ return deserializeAws_restJson1StepOutput(entry, context);
2527
+ });
2528
+ return retVal;
2529
+ };
2530
+ const deserializeAws_restJson1StringList = (output, context) => {
2531
+ const retVal = (output || [])
2532
+ .filter((e) => e != null)
2533
+ .map((entry) => {
2534
+ if (entry === null) {
2535
+ return null;
2536
+ }
2537
+ return (0, smithy_client_1.expectString)(entry);
2538
+ });
2539
+ return retVal;
2540
+ };
2541
+ const deserializeAws_restJson1StringMap = (output, context) => {
2542
+ return Object.entries(output).reduce((acc, [key, value]) => {
2543
+ if (value === null) {
2544
+ return acc;
2545
+ }
2546
+ return {
2547
+ ...acc,
2548
+ [key]: (0, smithy_client_1.expectString)(value),
2549
+ };
2550
+ }, {});
2551
+ };
2552
+ const deserializeAws_restJson1TagMap = (output, context) => {
2553
+ return Object.entries(output).reduce((acc, [key, value]) => {
2554
+ if (value === null) {
2555
+ return acc;
2556
+ }
2557
+ return {
2558
+ ...acc,
2559
+ [key]: (0, smithy_client_1.expectString)(value),
2560
+ };
2561
+ }, {});
2562
+ };
2563
+ const deserializeAws_restJson1TemplateInput = (output, context) => {
2564
+ return {
2565
+ dataType: (0, smithy_client_1.expectString)(output.dataType),
2566
+ inputName: (0, smithy_client_1.expectString)(output.inputName),
2567
+ required: (0, smithy_client_1.expectBoolean)(output.required),
2568
+ };
2569
+ };
2570
+ const deserializeAws_restJson1TemplateInputList = (output, context) => {
2571
+ const retVal = (output || [])
2572
+ .filter((e) => e != null)
2573
+ .map((entry) => {
2574
+ if (entry === null) {
2575
+ return null;
2576
+ }
2577
+ return deserializeAws_restJson1TemplateInput(entry, context);
2578
+ });
2579
+ return retVal;
2580
+ };
2581
+ const deserializeAws_restJson1TemplateStepGroupSummary = (output, context) => {
2582
+ return {
2583
+ id: (0, smithy_client_1.expectString)(output.id),
2584
+ name: (0, smithy_client_1.expectString)(output.name),
2585
+ next: output.next != null ? deserializeAws_restJson1StringList(output.next, context) : undefined,
2586
+ previous: output.previous != null ? deserializeAws_restJson1StringList(output.previous, context) : undefined,
2587
+ };
2588
+ };
2589
+ const deserializeAws_restJson1TemplateStepGroupSummaryList = (output, context) => {
2590
+ const retVal = (output || [])
2591
+ .filter((e) => e != null)
2592
+ .map((entry) => {
2593
+ if (entry === null) {
2594
+ return null;
2595
+ }
2596
+ return deserializeAws_restJson1TemplateStepGroupSummary(entry, context);
2597
+ });
2598
+ return retVal;
2599
+ };
2600
+ const deserializeAws_restJson1TemplateStepSummary = (output, context) => {
2601
+ return {
2602
+ id: (0, smithy_client_1.expectString)(output.id),
2603
+ name: (0, smithy_client_1.expectString)(output.name),
2604
+ next: output.next != null ? deserializeAws_restJson1StringList(output.next, context) : undefined,
2605
+ owner: (0, smithy_client_1.expectString)(output.owner),
2606
+ previous: output.previous != null ? deserializeAws_restJson1StringList(output.previous, context) : undefined,
2607
+ stepActionType: (0, smithy_client_1.expectString)(output.stepActionType),
2608
+ stepGroupId: (0, smithy_client_1.expectString)(output.stepGroupId),
2609
+ targetType: (0, smithy_client_1.expectString)(output.targetType),
2610
+ templateId: (0, smithy_client_1.expectString)(output.templateId),
2611
+ };
2612
+ };
2613
+ const deserializeAws_restJson1TemplateStepSummaryList = (output, context) => {
2614
+ const retVal = (output || [])
2615
+ .filter((e) => e != null)
2616
+ .map((entry) => {
2617
+ if (entry === null) {
2618
+ return null;
2619
+ }
2620
+ return deserializeAws_restJson1TemplateStepSummary(entry, context);
2621
+ });
2622
+ return retVal;
2623
+ };
2624
+ const deserializeAws_restJson1TemplateSummary = (output, context) => {
2625
+ return {
2626
+ arn: (0, smithy_client_1.expectString)(output.arn),
2627
+ description: (0, smithy_client_1.expectString)(output.description),
2628
+ id: (0, smithy_client_1.expectString)(output.id),
2629
+ name: (0, smithy_client_1.expectString)(output.name),
2630
+ };
2631
+ };
2632
+ const deserializeAws_restJson1TemplateSummaryList = (output, context) => {
2633
+ const retVal = (output || [])
2634
+ .filter((e) => e != null)
2635
+ .map((entry) => {
2636
+ if (entry === null) {
2637
+ return null;
2638
+ }
2639
+ return deserializeAws_restJson1TemplateSummary(entry, context);
2640
+ });
2641
+ return retVal;
2642
+ };
2643
+ const deserializeAws_restJson1Tool = (output, context) => {
2644
+ return {
2645
+ name: (0, smithy_client_1.expectString)(output.name),
2646
+ url: (0, smithy_client_1.expectString)(output.url),
2647
+ };
2648
+ };
2649
+ const deserializeAws_restJson1ToolsList = (output, context) => {
2650
+ const retVal = (output || [])
2651
+ .filter((e) => e != null)
2652
+ .map((entry) => {
2653
+ if (entry === null) {
2654
+ return null;
2655
+ }
2656
+ return deserializeAws_restJson1Tool(entry, context);
2657
+ });
2658
+ return retVal;
2659
+ };
2660
+ const deserializeAws_restJson1WorkflowStepAutomationConfiguration = (output, context) => {
2661
+ return {
2662
+ command: output.command != null ? deserializeAws_restJson1PlatformCommand(output.command, context) : undefined,
2663
+ runEnvironment: (0, smithy_client_1.expectString)(output.runEnvironment),
2664
+ scriptLocationS3Bucket: (0, smithy_client_1.expectString)(output.scriptLocationS3Bucket),
2665
+ scriptLocationS3Key: output.scriptLocationS3Key != null
2666
+ ? deserializeAws_restJson1PlatformScriptKey(output.scriptLocationS3Key, context)
2667
+ : undefined,
2668
+ targetType: (0, smithy_client_1.expectString)(output.targetType),
2669
+ };
2670
+ };
2671
+ const deserializeAws_restJson1WorkflowStepGroupsSummaryList = (output, context) => {
2672
+ const retVal = (output || [])
2673
+ .filter((e) => e != null)
2674
+ .map((entry) => {
2675
+ if (entry === null) {
2676
+ return null;
2677
+ }
2678
+ return deserializeAws_restJson1WorkflowStepGroupSummary(entry, context);
2679
+ });
2680
+ return retVal;
2681
+ };
2682
+ const deserializeAws_restJson1WorkflowStepGroupSummary = (output, context) => {
2683
+ return {
2684
+ id: (0, smithy_client_1.expectString)(output.id),
2685
+ name: (0, smithy_client_1.expectString)(output.name),
2686
+ next: output.next != null ? deserializeAws_restJson1StringList(output.next, context) : undefined,
2687
+ owner: (0, smithy_client_1.expectString)(output.owner),
2688
+ previous: output.previous != null ? deserializeAws_restJson1StringList(output.previous, context) : undefined,
2689
+ status: (0, smithy_client_1.expectString)(output.status),
2690
+ };
2691
+ };
2692
+ const deserializeAws_restJson1WorkflowStepOutput = (output, context) => {
2693
+ return {
2694
+ dataType: (0, smithy_client_1.expectString)(output.dataType),
2695
+ name: (0, smithy_client_1.expectString)(output.name),
2696
+ required: (0, smithy_client_1.expectBoolean)(output.required),
2697
+ value: output.value != null
2698
+ ? deserializeAws_restJson1WorkflowStepOutputUnion((0, smithy_client_1.expectUnion)(output.value), context)
2699
+ : undefined,
2700
+ };
2701
+ };
2702
+ const deserializeAws_restJson1WorkflowStepOutputList = (output, context) => {
2703
+ const retVal = (output || [])
2704
+ .filter((e) => e != null)
2705
+ .map((entry) => {
2706
+ if (entry === null) {
2707
+ return null;
2708
+ }
2709
+ return deserializeAws_restJson1WorkflowStepOutput(entry, context);
2710
+ });
2711
+ return retVal;
2712
+ };
2713
+ const deserializeAws_restJson1WorkflowStepOutputUnion = (output, context) => {
2714
+ if ((0, smithy_client_1.expectInt32)(output.integerValue) !== undefined) {
2715
+ return { integerValue: (0, smithy_client_1.expectInt32)(output.integerValue) };
2716
+ }
2717
+ if (output.listOfStringValue != null) {
2718
+ return {
2719
+ listOfStringValue: deserializeAws_restJson1StringList(output.listOfStringValue, context),
2720
+ };
2721
+ }
2722
+ if ((0, smithy_client_1.expectString)(output.stringValue) !== undefined) {
2723
+ return { stringValue: (0, smithy_client_1.expectString)(output.stringValue) };
2724
+ }
2725
+ return { $unknown: Object.entries(output)[0] };
2726
+ };
2727
+ const deserializeAws_restJson1WorkflowStepsSummaryList = (output, context) => {
2728
+ const retVal = (output || [])
2729
+ .filter((e) => e != null)
2730
+ .map((entry) => {
2731
+ if (entry === null) {
2732
+ return null;
2733
+ }
2734
+ return deserializeAws_restJson1WorkflowStepSummary(entry, context);
2735
+ });
2736
+ return retVal;
2737
+ };
2738
+ const deserializeAws_restJson1WorkflowStepSummary = (output, context) => {
2739
+ return {
2740
+ description: (0, smithy_client_1.expectString)(output.description),
2741
+ name: (0, smithy_client_1.expectString)(output.name),
2742
+ next: output.next != null ? deserializeAws_restJson1StringList(output.next, context) : undefined,
2743
+ noOfSrvCompleted: (0, smithy_client_1.expectInt32)(output.noOfSrvCompleted),
2744
+ noOfSrvFailed: (0, smithy_client_1.expectInt32)(output.noOfSrvFailed),
2745
+ owner: (0, smithy_client_1.expectString)(output.owner),
2746
+ previous: output.previous != null ? deserializeAws_restJson1StringList(output.previous, context) : undefined,
2747
+ scriptLocation: (0, smithy_client_1.expectString)(output.scriptLocation),
2748
+ status: (0, smithy_client_1.expectString)(output.status),
2749
+ statusMessage: (0, smithy_client_1.expectString)(output.statusMessage),
2750
+ stepActionType: (0, smithy_client_1.expectString)(output.stepActionType),
2751
+ stepId: (0, smithy_client_1.expectString)(output.stepId),
2752
+ totalNoOfSrv: (0, smithy_client_1.expectInt32)(output.totalNoOfSrv),
2753
+ };
2754
+ };
2755
+ const deserializeMetadata = (output) => {
2756
+ var _a;
2757
+ return ({
2758
+ httpStatusCode: output.statusCode,
2759
+ requestId: (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"],
2760
+ extendedRequestId: output.headers["x-amz-id-2"],
2761
+ cfId: output.headers["x-amz-cf-id"],
2762
+ });
2763
+ };
2764
+ const collectBody = (streamBody = new Uint8Array(), context) => {
2765
+ if (streamBody instanceof Uint8Array) {
2766
+ return Promise.resolve(streamBody);
2767
+ }
2768
+ return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
2769
+ };
2770
+ const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
2771
+ const isSerializableHeaderValue = (value) => value !== undefined &&
2772
+ value !== null &&
2773
+ value !== "" &&
2774
+ (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
2775
+ (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
2776
+ const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2777
+ if (encoded.length) {
2778
+ return JSON.parse(encoded);
2779
+ }
2780
+ return {};
2781
+ });
2782
+ const parseErrorBody = async (errorBody, context) => {
2783
+ var _a;
2784
+ const value = await parseBody(errorBody, context);
2785
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
2786
+ return value;
2787
+ };
2788
+ const loadRestJsonErrorCode = (output, data) => {
2789
+ const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
2790
+ const sanitizeErrorCode = (rawValue) => {
2791
+ let cleanValue = rawValue;
2792
+ if (typeof cleanValue === "number") {
2793
+ cleanValue = cleanValue.toString();
2794
+ }
2795
+ if (cleanValue.indexOf(",") >= 0) {
2796
+ cleanValue = cleanValue.split(",")[0];
2797
+ }
2798
+ if (cleanValue.indexOf(":") >= 0) {
2799
+ cleanValue = cleanValue.split(":")[0];
2800
+ }
2801
+ if (cleanValue.indexOf("#") >= 0) {
2802
+ cleanValue = cleanValue.split("#")[1];
2803
+ }
2804
+ return cleanValue;
2805
+ };
2806
+ const headerKey = findKey(output.headers, "x-amzn-errortype");
2807
+ if (headerKey !== undefined) {
2808
+ return sanitizeErrorCode(output.headers[headerKey]);
2809
+ }
2810
+ if (data.code !== undefined) {
2811
+ return sanitizeErrorCode(data.code);
2812
+ }
2813
+ if (data["__type"] !== undefined) {
2814
+ return sanitizeErrorCode(data["__type"]);
2815
+ }
2816
+ };