@aws-sdk/client-data-pipeline 3.32.0 → 3.36.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 (263) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/{dist/cjs → dist-cjs}/DataPipeline.js +1 -2
  3. package/{dist/cjs → dist-cjs}/DataPipelineClient.js +8 -9
  4. package/{dist/cjs → dist-cjs}/commands/ActivatePipelineCommand.js +2 -3
  5. package/{dist/cjs → dist-cjs}/commands/AddTagsCommand.js +2 -3
  6. package/{dist/cjs → dist-cjs}/commands/CreatePipelineCommand.js +2 -3
  7. package/{dist/cjs → dist-cjs}/commands/DeactivatePipelineCommand.js +2 -3
  8. package/{dist/cjs → dist-cjs}/commands/DeletePipelineCommand.js +2 -3
  9. package/{dist/cjs → dist-cjs}/commands/DescribeObjectsCommand.js +2 -3
  10. package/{dist/cjs → dist-cjs}/commands/DescribePipelinesCommand.js +2 -3
  11. package/{dist/cjs → dist-cjs}/commands/EvaluateExpressionCommand.js +2 -3
  12. package/{dist/cjs → dist-cjs}/commands/GetPipelineDefinitionCommand.js +2 -3
  13. package/{dist/cjs → dist-cjs}/commands/ListPipelinesCommand.js +2 -3
  14. package/{dist/cjs → dist-cjs}/commands/PollForTaskCommand.js +2 -3
  15. package/{dist/cjs → dist-cjs}/commands/PutPipelineDefinitionCommand.js +2 -3
  16. package/{dist/cjs → dist-cjs}/commands/QueryObjectsCommand.js +2 -3
  17. package/{dist/cjs → dist-cjs}/commands/RemoveTagsCommand.js +2 -3
  18. package/{dist/cjs → dist-cjs}/commands/ReportTaskProgressCommand.js +2 -3
  19. package/{dist/cjs → dist-cjs}/commands/ReportTaskRunnerHeartbeatCommand.js +2 -3
  20. package/{dist/cjs → dist-cjs}/commands/SetStatusCommand.js +2 -3
  21. package/{dist/cjs → dist-cjs}/commands/SetTaskStatusCommand.js +2 -3
  22. package/{dist/cjs → dist-cjs}/commands/ValidatePipelineDefinitionCommand.js +2 -3
  23. package/{dist/cjs → dist-cjs}/endpoints.js +0 -1
  24. package/{dist/cjs → dist-cjs}/index.js +0 -1
  25. package/{dist/cjs → dist-cjs}/models/index.js +0 -1
  26. package/{dist/cjs → dist-cjs}/models/models_0.js +0 -1
  27. package/{dist/cjs → dist-cjs}/pagination/DescribeObjectsPaginator.js +1 -2
  28. package/{dist/cjs → dist-cjs}/pagination/Interfaces.js +0 -1
  29. package/{dist/cjs → dist-cjs}/pagination/ListPipelinesPaginator.js +1 -2
  30. package/{dist/cjs → dist-cjs}/pagination/QueryObjectsPaginator.js +1 -2
  31. package/{dist/cjs → dist-cjs}/protocols/Aws_json1_1.js +0 -1
  32. package/{dist/cjs → dist-cjs}/runtimeConfig.browser.js +2 -2
  33. package/{dist/cjs → dist-cjs}/runtimeConfig.js +2 -2
  34. package/{dist/cjs → dist-cjs}/runtimeConfig.native.js +0 -1
  35. package/{dist/cjs → dist-cjs}/runtimeConfig.shared.js +1 -2
  36. package/{dist/es → dist-es}/DataPipeline.js +2 -22
  37. package/dist-es/DataPipelineClient.js +37 -0
  38. package/dist-es/commands/ActivatePipelineCommand.js +39 -0
  39. package/{dist/es → dist-es}/commands/AddTagsCommand.js +4 -30
  40. package/dist-es/commands/CreatePipelineCommand.js +39 -0
  41. package/{dist/es → dist-es}/commands/DeactivatePipelineCommand.js +4 -33
  42. package/dist-es/commands/DeletePipelineCommand.js +39 -0
  43. package/dist-es/commands/DescribeObjectsCommand.js +39 -0
  44. package/dist-es/commands/DescribePipelinesCommand.js +39 -0
  45. package/dist-es/commands/EvaluateExpressionCommand.js +39 -0
  46. package/dist-es/commands/GetPipelineDefinitionCommand.js +39 -0
  47. package/dist-es/commands/ListPipelinesCommand.js +39 -0
  48. package/dist-es/commands/PollForTaskCommand.js +39 -0
  49. package/dist-es/commands/PutPipelineDefinitionCommand.js +39 -0
  50. package/dist-es/commands/QueryObjectsCommand.js +39 -0
  51. package/{dist/es → dist-es}/commands/RemoveTagsCommand.js +4 -30
  52. package/dist-es/commands/ReportTaskProgressCommand.js +39 -0
  53. package/dist-es/commands/ReportTaskRunnerHeartbeatCommand.js +39 -0
  54. package/dist-es/commands/SetStatusCommand.js +39 -0
  55. package/dist-es/commands/SetTaskStatusCommand.js +39 -0
  56. package/dist-es/commands/ValidatePipelineDefinitionCommand.js +39 -0
  57. package/{dist/es → dist-es}/endpoints.js +1 -2
  58. package/{dist/types/index.d.ts → dist-es/index.js} +0 -0
  59. package/{dist/types/models/index.d.ts → dist-es/models/index.js} +0 -0
  60. package/{dist/es → dist-es}/models/models_0.js +0 -169
  61. package/{dist/es → dist-es}/pagination/DescribeObjectsPaginator.js +17 -30
  62. package/dist-es/pagination/Interfaces.js +1 -0
  63. package/{dist/es → dist-es}/pagination/ListPipelinesPaginator.js +17 -30
  64. package/{dist/es → dist-es}/pagination/QueryObjectsPaginator.js +17 -30
  65. package/{dist/es → dist-es}/protocols/Aws_json1_1.js +424 -430
  66. package/{dist/es → dist-es}/runtimeConfig.browser.js +1 -5
  67. package/{dist/es → dist-es}/runtimeConfig.js +1 -5
  68. package/{dist/es → dist-es}/runtimeConfig.native.js +0 -4
  69. package/{dist/es → dist-es}/runtimeConfig.shared.js +1 -5
  70. package/{dist/types → dist-types}/DataPipeline.d.ts +2 -2
  71. package/{dist/types → dist-types}/DataPipelineClient.d.ts +8 -8
  72. package/{dist/types → dist-types}/commands/ActivatePipelineCommand.d.ts +2 -2
  73. package/{dist/types → dist-types}/commands/AddTagsCommand.d.ts +2 -2
  74. package/{dist/types → dist-types}/commands/CreatePipelineCommand.d.ts +2 -2
  75. package/{dist/types → dist-types}/commands/DeactivatePipelineCommand.d.ts +2 -2
  76. package/{dist/types → dist-types}/commands/DeletePipelineCommand.d.ts +2 -2
  77. package/{dist/types → dist-types}/commands/DescribeObjectsCommand.d.ts +2 -2
  78. package/{dist/types → dist-types}/commands/DescribePipelinesCommand.d.ts +2 -2
  79. package/{dist/types → dist-types}/commands/EvaluateExpressionCommand.d.ts +2 -2
  80. package/{dist/types → dist-types}/commands/GetPipelineDefinitionCommand.d.ts +2 -2
  81. package/{dist/types → dist-types}/commands/ListPipelinesCommand.d.ts +2 -2
  82. package/{dist/types → dist-types}/commands/PollForTaskCommand.d.ts +2 -2
  83. package/{dist/types → dist-types}/commands/PutPipelineDefinitionCommand.d.ts +2 -2
  84. package/{dist/types → dist-types}/commands/QueryObjectsCommand.d.ts +2 -2
  85. package/{dist/types → dist-types}/commands/RemoveTagsCommand.d.ts +2 -2
  86. package/{dist/types → dist-types}/commands/ReportTaskProgressCommand.d.ts +2 -2
  87. package/{dist/types → dist-types}/commands/ReportTaskRunnerHeartbeatCommand.d.ts +2 -2
  88. package/{dist/types → dist-types}/commands/SetStatusCommand.d.ts +2 -2
  89. package/{dist/types → dist-types}/commands/SetTaskStatusCommand.d.ts +2 -2
  90. package/{dist/types → dist-types}/commands/ValidatePipelineDefinitionCommand.d.ts +2 -2
  91. package/{dist/types → dist-types}/endpoints.d.ts +0 -0
  92. package/{index.ts → dist-types/index.d.ts} +0 -0
  93. package/{models/index.ts → dist-types/models/index.d.ts} +0 -0
  94. package/{dist/types → dist-types}/models/models_0.d.ts +0 -0
  95. package/{dist/types → dist-types}/pagination/DescribeObjectsPaginator.d.ts +1 -1
  96. package/{dist/types → dist-types}/pagination/Interfaces.d.ts +1 -1
  97. package/{dist/types → dist-types}/pagination/ListPipelinesPaginator.d.ts +1 -1
  98. package/{dist/types → dist-types}/pagination/QueryObjectsPaginator.d.ts +1 -1
  99. package/{dist/types → dist-types}/protocols/Aws_json1_1.d.ts +2 -2
  100. package/{dist/types → dist-types}/runtimeConfig.browser.d.ts +1 -0
  101. package/{dist/types/ts3.4 → dist-types}/runtimeConfig.d.ts +37 -36
  102. package/{dist/types → dist-types}/runtimeConfig.native.d.ts +1 -0
  103. package/{dist/types → dist-types}/runtimeConfig.shared.d.ts +0 -0
  104. package/{dist/types → dist-types}/ts3.4/DataPipeline.d.ts +2 -2
  105. package/{dist/types → dist-types}/ts3.4/DataPipelineClient.d.ts +8 -8
  106. package/{dist/types → dist-types}/ts3.4/commands/ActivatePipelineCommand.d.ts +2 -2
  107. package/{dist/types → dist-types}/ts3.4/commands/AddTagsCommand.d.ts +2 -2
  108. package/{dist/types → dist-types}/ts3.4/commands/CreatePipelineCommand.d.ts +2 -2
  109. package/{dist/types → dist-types}/ts3.4/commands/DeactivatePipelineCommand.d.ts +2 -2
  110. package/{dist/types → dist-types}/ts3.4/commands/DeletePipelineCommand.d.ts +2 -2
  111. package/{dist/types → dist-types}/ts3.4/commands/DescribeObjectsCommand.d.ts +2 -2
  112. package/{dist/types → dist-types}/ts3.4/commands/DescribePipelinesCommand.d.ts +2 -2
  113. package/{dist/types → dist-types}/ts3.4/commands/EvaluateExpressionCommand.d.ts +2 -2
  114. package/{dist/types → dist-types}/ts3.4/commands/GetPipelineDefinitionCommand.d.ts +2 -2
  115. package/{dist/types → dist-types}/ts3.4/commands/ListPipelinesCommand.d.ts +2 -2
  116. package/{dist/types → dist-types}/ts3.4/commands/PollForTaskCommand.d.ts +2 -2
  117. package/{dist/types → dist-types}/ts3.4/commands/PutPipelineDefinitionCommand.d.ts +2 -2
  118. package/{dist/types → dist-types}/ts3.4/commands/QueryObjectsCommand.d.ts +2 -2
  119. package/{dist/types → dist-types}/ts3.4/commands/RemoveTagsCommand.d.ts +2 -2
  120. package/{dist/types → dist-types}/ts3.4/commands/ReportTaskProgressCommand.d.ts +2 -2
  121. package/{dist/types → dist-types}/ts3.4/commands/ReportTaskRunnerHeartbeatCommand.d.ts +2 -2
  122. package/{dist/types → dist-types}/ts3.4/commands/SetStatusCommand.d.ts +2 -2
  123. package/{dist/types → dist-types}/ts3.4/commands/SetTaskStatusCommand.d.ts +2 -2
  124. package/{dist/types → dist-types}/ts3.4/commands/ValidatePipelineDefinitionCommand.d.ts +2 -2
  125. package/{dist/types → dist-types}/ts3.4/endpoints.d.ts +0 -0
  126. package/{dist/types → dist-types}/ts3.4/index.d.ts +0 -0
  127. package/{dist/types → dist-types}/ts3.4/models/index.d.ts +0 -0
  128. package/{dist/types → dist-types}/ts3.4/models/models_0.d.ts +0 -0
  129. package/{dist/types → dist-types}/ts3.4/pagination/DescribeObjectsPaginator.d.ts +1 -1
  130. package/{dist/types → dist-types}/ts3.4/pagination/Interfaces.d.ts +1 -1
  131. package/{dist/types → dist-types}/ts3.4/pagination/ListPipelinesPaginator.d.ts +1 -1
  132. package/{dist/types → dist-types}/ts3.4/pagination/QueryObjectsPaginator.d.ts +1 -1
  133. package/{dist/types → dist-types}/ts3.4/protocols/Aws_json1_1.d.ts +2 -2
  134. package/{dist/types → dist-types}/ts3.4/runtimeConfig.browser.d.ts +1 -0
  135. package/{dist/types → dist-types/ts3.4}/runtimeConfig.d.ts +37 -36
  136. package/{dist/types → dist-types}/ts3.4/runtimeConfig.native.d.ts +1 -0
  137. package/{dist/types → dist-types}/ts3.4/runtimeConfig.shared.d.ts +0 -0
  138. package/package.json +52 -49
  139. package/DataPipeline.ts +0 -1578
  140. package/DataPipelineClient.ts +0 -320
  141. package/commands/ActivatePipelineCommand.ts +0 -124
  142. package/commands/AddTagsCommand.ts +0 -91
  143. package/commands/CreatePipelineCommand.ts +0 -124
  144. package/commands/DeactivatePipelineCommand.ts +0 -97
  145. package/commands/DeletePipelineCommand.ts +0 -125
  146. package/commands/DescribeObjectsCommand.ts +0 -152
  147. package/commands/DescribePipelinesCommand.ts +0 -155
  148. package/commands/EvaluateExpressionCommand.ts +0 -124
  149. package/commands/GetPipelineDefinitionCommand.ts +0 -158
  150. package/commands/ListPipelinesCommand.ts +0 -125
  151. package/commands/PollForTaskCommand.ts +0 -172
  152. package/commands/PutPipelineDefinitionCommand.ts +0 -253
  153. package/commands/QueryObjectsCommand.ts +0 -132
  154. package/commands/RemoveTagsCommand.ts +0 -94
  155. package/commands/ReportTaskProgressCommand.ts +0 -131
  156. package/commands/ReportTaskRunnerHeartbeatCommand.ts +0 -129
  157. package/commands/SetStatusCommand.ts +0 -123
  158. package/commands/SetTaskStatusCommand.ts +0 -124
  159. package/commands/ValidatePipelineDefinitionCommand.ts +0 -248
  160. package/dist/cjs/DataPipeline.js.map +0 -1
  161. package/dist/cjs/DataPipelineClient.js.map +0 -1
  162. package/dist/cjs/commands/ActivatePipelineCommand.js.map +0 -1
  163. package/dist/cjs/commands/AddTagsCommand.js.map +0 -1
  164. package/dist/cjs/commands/CreatePipelineCommand.js.map +0 -1
  165. package/dist/cjs/commands/DeactivatePipelineCommand.js.map +0 -1
  166. package/dist/cjs/commands/DeletePipelineCommand.js.map +0 -1
  167. package/dist/cjs/commands/DescribeObjectsCommand.js.map +0 -1
  168. package/dist/cjs/commands/DescribePipelinesCommand.js.map +0 -1
  169. package/dist/cjs/commands/EvaluateExpressionCommand.js.map +0 -1
  170. package/dist/cjs/commands/GetPipelineDefinitionCommand.js.map +0 -1
  171. package/dist/cjs/commands/ListPipelinesCommand.js.map +0 -1
  172. package/dist/cjs/commands/PollForTaskCommand.js.map +0 -1
  173. package/dist/cjs/commands/PutPipelineDefinitionCommand.js.map +0 -1
  174. package/dist/cjs/commands/QueryObjectsCommand.js.map +0 -1
  175. package/dist/cjs/commands/RemoveTagsCommand.js.map +0 -1
  176. package/dist/cjs/commands/ReportTaskProgressCommand.js.map +0 -1
  177. package/dist/cjs/commands/ReportTaskRunnerHeartbeatCommand.js.map +0 -1
  178. package/dist/cjs/commands/SetStatusCommand.js.map +0 -1
  179. package/dist/cjs/commands/SetTaskStatusCommand.js.map +0 -1
  180. package/dist/cjs/commands/ValidatePipelineDefinitionCommand.js.map +0 -1
  181. package/dist/cjs/endpoints.js.map +0 -1
  182. package/dist/cjs/index.js.map +0 -1
  183. package/dist/cjs/models/index.js.map +0 -1
  184. package/dist/cjs/models/models_0.js.map +0 -1
  185. package/dist/cjs/package.json +0 -91
  186. package/dist/cjs/pagination/DescribeObjectsPaginator.js.map +0 -1
  187. package/dist/cjs/pagination/Interfaces.js.map +0 -1
  188. package/dist/cjs/pagination/ListPipelinesPaginator.js.map +0 -1
  189. package/dist/cjs/pagination/QueryObjectsPaginator.js.map +0 -1
  190. package/dist/cjs/protocols/Aws_json1_1.js.map +0 -1
  191. package/dist/cjs/runtimeConfig.browser.js.map +0 -1
  192. package/dist/cjs/runtimeConfig.js.map +0 -1
  193. package/dist/cjs/runtimeConfig.native.js.map +0 -1
  194. package/dist/cjs/runtimeConfig.shared.js.map +0 -1
  195. package/dist/es/DataPipeline.js.map +0 -1
  196. package/dist/es/DataPipelineClient.js +0 -62
  197. package/dist/es/DataPipelineClient.js.map +0 -1
  198. package/dist/es/commands/ActivatePipelineCommand.js +0 -95
  199. package/dist/es/commands/ActivatePipelineCommand.js.map +0 -1
  200. package/dist/es/commands/AddTagsCommand.js.map +0 -1
  201. package/dist/es/commands/CreatePipelineCommand.js +0 -95
  202. package/dist/es/commands/CreatePipelineCommand.js.map +0 -1
  203. package/dist/es/commands/DeactivatePipelineCommand.js.map +0 -1
  204. package/dist/es/commands/DeletePipelineCommand.js +0 -96
  205. package/dist/es/commands/DeletePipelineCommand.js.map +0 -1
  206. package/dist/es/commands/DescribeObjectsCommand.js +0 -123
  207. package/dist/es/commands/DescribeObjectsCommand.js.map +0 -1
  208. package/dist/es/commands/DescribePipelinesCommand.js +0 -126
  209. package/dist/es/commands/DescribePipelinesCommand.js.map +0 -1
  210. package/dist/es/commands/EvaluateExpressionCommand.js +0 -95
  211. package/dist/es/commands/EvaluateExpressionCommand.js.map +0 -1
  212. package/dist/es/commands/GetPipelineDefinitionCommand.js +0 -129
  213. package/dist/es/commands/GetPipelineDefinitionCommand.js.map +0 -1
  214. package/dist/es/commands/ListPipelinesCommand.js +0 -96
  215. package/dist/es/commands/ListPipelinesCommand.js.map +0 -1
  216. package/dist/es/commands/PollForTaskCommand.js +0 -143
  217. package/dist/es/commands/PollForTaskCommand.js.map +0 -1
  218. package/dist/es/commands/PutPipelineDefinitionCommand.js +0 -224
  219. package/dist/es/commands/PutPipelineDefinitionCommand.js.map +0 -1
  220. package/dist/es/commands/QueryObjectsCommand.js +0 -103
  221. package/dist/es/commands/QueryObjectsCommand.js.map +0 -1
  222. package/dist/es/commands/RemoveTagsCommand.js.map +0 -1
  223. package/dist/es/commands/ReportTaskProgressCommand.js +0 -102
  224. package/dist/es/commands/ReportTaskProgressCommand.js.map +0 -1
  225. package/dist/es/commands/ReportTaskRunnerHeartbeatCommand.js +0 -97
  226. package/dist/es/commands/ReportTaskRunnerHeartbeatCommand.js.map +0 -1
  227. package/dist/es/commands/SetStatusCommand.js +0 -97
  228. package/dist/es/commands/SetStatusCommand.js.map +0 -1
  229. package/dist/es/commands/SetTaskStatusCommand.js +0 -95
  230. package/dist/es/commands/SetTaskStatusCommand.js.map +0 -1
  231. package/dist/es/commands/ValidatePipelineDefinitionCommand.js +0 -216
  232. package/dist/es/commands/ValidatePipelineDefinitionCommand.js.map +0 -1
  233. package/dist/es/endpoints.js.map +0 -1
  234. package/dist/es/index.js +0 -27
  235. package/dist/es/index.js.map +0 -1
  236. package/dist/es/models/index.js +0 -2
  237. package/dist/es/models/index.js.map +0 -1
  238. package/dist/es/models/models_0.js.map +0 -1
  239. package/dist/es/package.json +0 -91
  240. package/dist/es/pagination/DescribeObjectsPaginator.js.map +0 -1
  241. package/dist/es/pagination/Interfaces.js +0 -2
  242. package/dist/es/pagination/Interfaces.js.map +0 -1
  243. package/dist/es/pagination/ListPipelinesPaginator.js.map +0 -1
  244. package/dist/es/pagination/QueryObjectsPaginator.js.map +0 -1
  245. package/dist/es/protocols/Aws_json1_1.js.map +0 -1
  246. package/dist/es/runtimeConfig.browser.js.map +0 -1
  247. package/dist/es/runtimeConfig.js.map +0 -1
  248. package/dist/es/runtimeConfig.native.js.map +0 -1
  249. package/dist/es/runtimeConfig.shared.js.map +0 -1
  250. package/endpoints.ts +0 -57
  251. package/jest.config.js +0 -4
  252. package/models/models_0.ts +0 -1480
  253. package/pagination/DescribeObjectsPaginator.ts +0 -57
  254. package/pagination/Interfaces.ts +0 -7
  255. package/pagination/ListPipelinesPaginator.ts +0 -57
  256. package/pagination/QueryObjectsPaginator.ts +0 -58
  257. package/protocols/Aws_json1_1.ts +0 -2766
  258. package/runtimeConfig.browser.ts +0 -40
  259. package/runtimeConfig.native.ts +0 -16
  260. package/runtimeConfig.shared.ts +0 -16
  261. package/runtimeConfig.ts +0 -45
  262. package/tsconfig.es.json +0 -12
  263. package/tsconfig.json +0 -32
@@ -1,2766 +0,0 @@
1
- import { ActivatePipelineCommandInput, ActivatePipelineCommandOutput } from "../commands/ActivatePipelineCommand";
2
- import { AddTagsCommandInput, AddTagsCommandOutput } from "../commands/AddTagsCommand";
3
- import { CreatePipelineCommandInput, CreatePipelineCommandOutput } from "../commands/CreatePipelineCommand";
4
- import { DeactivatePipelineCommandInput, DeactivatePipelineCommandOutput } from "../commands/DeactivatePipelineCommand";
5
- import { DeletePipelineCommandInput, DeletePipelineCommandOutput } from "../commands/DeletePipelineCommand";
6
- import { DescribeObjectsCommandInput, DescribeObjectsCommandOutput } from "../commands/DescribeObjectsCommand";
7
- import { DescribePipelinesCommandInput, DescribePipelinesCommandOutput } from "../commands/DescribePipelinesCommand";
8
- import { EvaluateExpressionCommandInput, EvaluateExpressionCommandOutput } from "../commands/EvaluateExpressionCommand";
9
- import {
10
- GetPipelineDefinitionCommandInput,
11
- GetPipelineDefinitionCommandOutput,
12
- } from "../commands/GetPipelineDefinitionCommand";
13
- import { ListPipelinesCommandInput, ListPipelinesCommandOutput } from "../commands/ListPipelinesCommand";
14
- import { PollForTaskCommandInput, PollForTaskCommandOutput } from "../commands/PollForTaskCommand";
15
- import {
16
- PutPipelineDefinitionCommandInput,
17
- PutPipelineDefinitionCommandOutput,
18
- } from "../commands/PutPipelineDefinitionCommand";
19
- import { QueryObjectsCommandInput, QueryObjectsCommandOutput } from "../commands/QueryObjectsCommand";
20
- import { RemoveTagsCommandInput, RemoveTagsCommandOutput } from "../commands/RemoveTagsCommand";
21
- import { ReportTaskProgressCommandInput, ReportTaskProgressCommandOutput } from "../commands/ReportTaskProgressCommand";
22
- import {
23
- ReportTaskRunnerHeartbeatCommandInput,
24
- ReportTaskRunnerHeartbeatCommandOutput,
25
- } from "../commands/ReportTaskRunnerHeartbeatCommand";
26
- import { SetStatusCommandInput, SetStatusCommandOutput } from "../commands/SetStatusCommand";
27
- import { SetTaskStatusCommandInput, SetTaskStatusCommandOutput } from "../commands/SetTaskStatusCommand";
28
- import {
29
- ValidatePipelineDefinitionCommandInput,
30
- ValidatePipelineDefinitionCommandOutput,
31
- } from "../commands/ValidatePipelineDefinitionCommand";
32
- import {
33
- ActivatePipelineInput,
34
- ActivatePipelineOutput,
35
- AddTagsInput,
36
- AddTagsOutput,
37
- CreatePipelineInput,
38
- CreatePipelineOutput,
39
- DeactivatePipelineInput,
40
- DeactivatePipelineOutput,
41
- DeletePipelineInput,
42
- DescribeObjectsInput,
43
- DescribeObjectsOutput,
44
- DescribePipelinesInput,
45
- DescribePipelinesOutput,
46
- EvaluateExpressionInput,
47
- EvaluateExpressionOutput,
48
- Field,
49
- GetPipelineDefinitionInput,
50
- GetPipelineDefinitionOutput,
51
- InstanceIdentity,
52
- InternalServiceError,
53
- InvalidRequestException,
54
- ListPipelinesInput,
55
- ListPipelinesOutput,
56
- Operator,
57
- ParameterAttribute,
58
- ParameterObject,
59
- ParameterValue,
60
- PipelineDeletedException,
61
- PipelineDescription,
62
- PipelineIdName,
63
- PipelineNotFoundException,
64
- PipelineObject,
65
- PollForTaskInput,
66
- PollForTaskOutput,
67
- PutPipelineDefinitionInput,
68
- PutPipelineDefinitionOutput,
69
- Query,
70
- QueryObjectsInput,
71
- QueryObjectsOutput,
72
- RemoveTagsInput,
73
- RemoveTagsOutput,
74
- ReportTaskProgressInput,
75
- ReportTaskProgressOutput,
76
- ReportTaskRunnerHeartbeatInput,
77
- ReportTaskRunnerHeartbeatOutput,
78
- Selector,
79
- SetStatusInput,
80
- SetTaskStatusInput,
81
- SetTaskStatusOutput,
82
- Tag,
83
- TaskNotFoundException,
84
- TaskObject,
85
- ValidatePipelineDefinitionInput,
86
- ValidatePipelineDefinitionOutput,
87
- ValidationError,
88
- ValidationWarning,
89
- } from "../models/models_0";
90
- import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
91
- import { expectBoolean as __expectBoolean, expectString as __expectString } from "@aws-sdk/smithy-client";
92
- import {
93
- Endpoint as __Endpoint,
94
- HeaderBag as __HeaderBag,
95
- MetadataBearer as __MetadataBearer,
96
- ResponseMetadata as __ResponseMetadata,
97
- SerdeContext as __SerdeContext,
98
- SmithyException as __SmithyException,
99
- } from "@aws-sdk/types";
100
-
101
- export const serializeAws_json1_1ActivatePipelineCommand = async (
102
- input: ActivatePipelineCommandInput,
103
- context: __SerdeContext
104
- ): Promise<__HttpRequest> => {
105
- const headers: __HeaderBag = {
106
- "content-type": "application/x-amz-json-1.1",
107
- "x-amz-target": "DataPipeline.ActivatePipeline",
108
- };
109
- let body: any;
110
- body = JSON.stringify(serializeAws_json1_1ActivatePipelineInput(input, context));
111
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
112
- };
113
-
114
- export const serializeAws_json1_1AddTagsCommand = async (
115
- input: AddTagsCommandInput,
116
- context: __SerdeContext
117
- ): Promise<__HttpRequest> => {
118
- const headers: __HeaderBag = {
119
- "content-type": "application/x-amz-json-1.1",
120
- "x-amz-target": "DataPipeline.AddTags",
121
- };
122
- let body: any;
123
- body = JSON.stringify(serializeAws_json1_1AddTagsInput(input, context));
124
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
125
- };
126
-
127
- export const serializeAws_json1_1CreatePipelineCommand = async (
128
- input: CreatePipelineCommandInput,
129
- context: __SerdeContext
130
- ): Promise<__HttpRequest> => {
131
- const headers: __HeaderBag = {
132
- "content-type": "application/x-amz-json-1.1",
133
- "x-amz-target": "DataPipeline.CreatePipeline",
134
- };
135
- let body: any;
136
- body = JSON.stringify(serializeAws_json1_1CreatePipelineInput(input, context));
137
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
138
- };
139
-
140
- export const serializeAws_json1_1DeactivatePipelineCommand = async (
141
- input: DeactivatePipelineCommandInput,
142
- context: __SerdeContext
143
- ): Promise<__HttpRequest> => {
144
- const headers: __HeaderBag = {
145
- "content-type": "application/x-amz-json-1.1",
146
- "x-amz-target": "DataPipeline.DeactivatePipeline",
147
- };
148
- let body: any;
149
- body = JSON.stringify(serializeAws_json1_1DeactivatePipelineInput(input, context));
150
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
151
- };
152
-
153
- export const serializeAws_json1_1DeletePipelineCommand = async (
154
- input: DeletePipelineCommandInput,
155
- context: __SerdeContext
156
- ): Promise<__HttpRequest> => {
157
- const headers: __HeaderBag = {
158
- "content-type": "application/x-amz-json-1.1",
159
- "x-amz-target": "DataPipeline.DeletePipeline",
160
- };
161
- let body: any;
162
- body = JSON.stringify(serializeAws_json1_1DeletePipelineInput(input, context));
163
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
164
- };
165
-
166
- export const serializeAws_json1_1DescribeObjectsCommand = async (
167
- input: DescribeObjectsCommandInput,
168
- context: __SerdeContext
169
- ): Promise<__HttpRequest> => {
170
- const headers: __HeaderBag = {
171
- "content-type": "application/x-amz-json-1.1",
172
- "x-amz-target": "DataPipeline.DescribeObjects",
173
- };
174
- let body: any;
175
- body = JSON.stringify(serializeAws_json1_1DescribeObjectsInput(input, context));
176
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
177
- };
178
-
179
- export const serializeAws_json1_1DescribePipelinesCommand = async (
180
- input: DescribePipelinesCommandInput,
181
- context: __SerdeContext
182
- ): Promise<__HttpRequest> => {
183
- const headers: __HeaderBag = {
184
- "content-type": "application/x-amz-json-1.1",
185
- "x-amz-target": "DataPipeline.DescribePipelines",
186
- };
187
- let body: any;
188
- body = JSON.stringify(serializeAws_json1_1DescribePipelinesInput(input, context));
189
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
190
- };
191
-
192
- export const serializeAws_json1_1EvaluateExpressionCommand = async (
193
- input: EvaluateExpressionCommandInput,
194
- context: __SerdeContext
195
- ): Promise<__HttpRequest> => {
196
- const headers: __HeaderBag = {
197
- "content-type": "application/x-amz-json-1.1",
198
- "x-amz-target": "DataPipeline.EvaluateExpression",
199
- };
200
- let body: any;
201
- body = JSON.stringify(serializeAws_json1_1EvaluateExpressionInput(input, context));
202
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
203
- };
204
-
205
- export const serializeAws_json1_1GetPipelineDefinitionCommand = async (
206
- input: GetPipelineDefinitionCommandInput,
207
- context: __SerdeContext
208
- ): Promise<__HttpRequest> => {
209
- const headers: __HeaderBag = {
210
- "content-type": "application/x-amz-json-1.1",
211
- "x-amz-target": "DataPipeline.GetPipelineDefinition",
212
- };
213
- let body: any;
214
- body = JSON.stringify(serializeAws_json1_1GetPipelineDefinitionInput(input, context));
215
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
216
- };
217
-
218
- export const serializeAws_json1_1ListPipelinesCommand = async (
219
- input: ListPipelinesCommandInput,
220
- context: __SerdeContext
221
- ): Promise<__HttpRequest> => {
222
- const headers: __HeaderBag = {
223
- "content-type": "application/x-amz-json-1.1",
224
- "x-amz-target": "DataPipeline.ListPipelines",
225
- };
226
- let body: any;
227
- body = JSON.stringify(serializeAws_json1_1ListPipelinesInput(input, context));
228
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
229
- };
230
-
231
- export const serializeAws_json1_1PollForTaskCommand = async (
232
- input: PollForTaskCommandInput,
233
- context: __SerdeContext
234
- ): Promise<__HttpRequest> => {
235
- const headers: __HeaderBag = {
236
- "content-type": "application/x-amz-json-1.1",
237
- "x-amz-target": "DataPipeline.PollForTask",
238
- };
239
- let body: any;
240
- body = JSON.stringify(serializeAws_json1_1PollForTaskInput(input, context));
241
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
242
- };
243
-
244
- export const serializeAws_json1_1PutPipelineDefinitionCommand = async (
245
- input: PutPipelineDefinitionCommandInput,
246
- context: __SerdeContext
247
- ): Promise<__HttpRequest> => {
248
- const headers: __HeaderBag = {
249
- "content-type": "application/x-amz-json-1.1",
250
- "x-amz-target": "DataPipeline.PutPipelineDefinition",
251
- };
252
- let body: any;
253
- body = JSON.stringify(serializeAws_json1_1PutPipelineDefinitionInput(input, context));
254
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
255
- };
256
-
257
- export const serializeAws_json1_1QueryObjectsCommand = async (
258
- input: QueryObjectsCommandInput,
259
- context: __SerdeContext
260
- ): Promise<__HttpRequest> => {
261
- const headers: __HeaderBag = {
262
- "content-type": "application/x-amz-json-1.1",
263
- "x-amz-target": "DataPipeline.QueryObjects",
264
- };
265
- let body: any;
266
- body = JSON.stringify(serializeAws_json1_1QueryObjectsInput(input, context));
267
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
268
- };
269
-
270
- export const serializeAws_json1_1RemoveTagsCommand = async (
271
- input: RemoveTagsCommandInput,
272
- context: __SerdeContext
273
- ): Promise<__HttpRequest> => {
274
- const headers: __HeaderBag = {
275
- "content-type": "application/x-amz-json-1.1",
276
- "x-amz-target": "DataPipeline.RemoveTags",
277
- };
278
- let body: any;
279
- body = JSON.stringify(serializeAws_json1_1RemoveTagsInput(input, context));
280
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
281
- };
282
-
283
- export const serializeAws_json1_1ReportTaskProgressCommand = async (
284
- input: ReportTaskProgressCommandInput,
285
- context: __SerdeContext
286
- ): Promise<__HttpRequest> => {
287
- const headers: __HeaderBag = {
288
- "content-type": "application/x-amz-json-1.1",
289
- "x-amz-target": "DataPipeline.ReportTaskProgress",
290
- };
291
- let body: any;
292
- body = JSON.stringify(serializeAws_json1_1ReportTaskProgressInput(input, context));
293
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
294
- };
295
-
296
- export const serializeAws_json1_1ReportTaskRunnerHeartbeatCommand = async (
297
- input: ReportTaskRunnerHeartbeatCommandInput,
298
- context: __SerdeContext
299
- ): Promise<__HttpRequest> => {
300
- const headers: __HeaderBag = {
301
- "content-type": "application/x-amz-json-1.1",
302
- "x-amz-target": "DataPipeline.ReportTaskRunnerHeartbeat",
303
- };
304
- let body: any;
305
- body = JSON.stringify(serializeAws_json1_1ReportTaskRunnerHeartbeatInput(input, context));
306
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
307
- };
308
-
309
- export const serializeAws_json1_1SetStatusCommand = async (
310
- input: SetStatusCommandInput,
311
- context: __SerdeContext
312
- ): Promise<__HttpRequest> => {
313
- const headers: __HeaderBag = {
314
- "content-type": "application/x-amz-json-1.1",
315
- "x-amz-target": "DataPipeline.SetStatus",
316
- };
317
- let body: any;
318
- body = JSON.stringify(serializeAws_json1_1SetStatusInput(input, context));
319
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
320
- };
321
-
322
- export const serializeAws_json1_1SetTaskStatusCommand = async (
323
- input: SetTaskStatusCommandInput,
324
- context: __SerdeContext
325
- ): Promise<__HttpRequest> => {
326
- const headers: __HeaderBag = {
327
- "content-type": "application/x-amz-json-1.1",
328
- "x-amz-target": "DataPipeline.SetTaskStatus",
329
- };
330
- let body: any;
331
- body = JSON.stringify(serializeAws_json1_1SetTaskStatusInput(input, context));
332
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
333
- };
334
-
335
- export const serializeAws_json1_1ValidatePipelineDefinitionCommand = async (
336
- input: ValidatePipelineDefinitionCommandInput,
337
- context: __SerdeContext
338
- ): Promise<__HttpRequest> => {
339
- const headers: __HeaderBag = {
340
- "content-type": "application/x-amz-json-1.1",
341
- "x-amz-target": "DataPipeline.ValidatePipelineDefinition",
342
- };
343
- let body: any;
344
- body = JSON.stringify(serializeAws_json1_1ValidatePipelineDefinitionInput(input, context));
345
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
346
- };
347
-
348
- export const deserializeAws_json1_1ActivatePipelineCommand = async (
349
- output: __HttpResponse,
350
- context: __SerdeContext
351
- ): Promise<ActivatePipelineCommandOutput> => {
352
- if (output.statusCode >= 300) {
353
- return deserializeAws_json1_1ActivatePipelineCommandError(output, context);
354
- }
355
- const data: any = await parseBody(output.body, context);
356
- let contents: any = {};
357
- contents = deserializeAws_json1_1ActivatePipelineOutput(data, context);
358
- const response: ActivatePipelineCommandOutput = {
359
- $metadata: deserializeMetadata(output),
360
- ...contents,
361
- };
362
- return Promise.resolve(response);
363
- };
364
-
365
- const deserializeAws_json1_1ActivatePipelineCommandError = async (
366
- output: __HttpResponse,
367
- context: __SerdeContext
368
- ): Promise<ActivatePipelineCommandOutput> => {
369
- const parsedOutput: any = {
370
- ...output,
371
- body: await parseBody(output.body, context),
372
- };
373
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
374
- let errorCode: string = "UnknownError";
375
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
376
- switch (errorCode) {
377
- case "InternalServiceError":
378
- case "com.amazonaws.datapipeline#InternalServiceError":
379
- response = {
380
- ...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
381
- name: errorCode,
382
- $metadata: deserializeMetadata(output),
383
- };
384
- break;
385
- case "InvalidRequestException":
386
- case "com.amazonaws.datapipeline#InvalidRequestException":
387
- response = {
388
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
389
- name: errorCode,
390
- $metadata: deserializeMetadata(output),
391
- };
392
- break;
393
- case "PipelineDeletedException":
394
- case "com.amazonaws.datapipeline#PipelineDeletedException":
395
- response = {
396
- ...(await deserializeAws_json1_1PipelineDeletedExceptionResponse(parsedOutput, context)),
397
- name: errorCode,
398
- $metadata: deserializeMetadata(output),
399
- };
400
- break;
401
- case "PipelineNotFoundException":
402
- case "com.amazonaws.datapipeline#PipelineNotFoundException":
403
- response = {
404
- ...(await deserializeAws_json1_1PipelineNotFoundExceptionResponse(parsedOutput, context)),
405
- name: errorCode,
406
- $metadata: deserializeMetadata(output),
407
- };
408
- break;
409
- default:
410
- const parsedBody = parsedOutput.body;
411
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
412
- response = {
413
- ...parsedBody,
414
- name: `${errorCode}`,
415
- message: parsedBody.message || parsedBody.Message || errorCode,
416
- $fault: "client",
417
- $metadata: deserializeMetadata(output),
418
- } as any;
419
- }
420
- const message = response.message || response.Message || errorCode;
421
- response.message = message;
422
- delete response.Message;
423
- return Promise.reject(Object.assign(new Error(message), response));
424
- };
425
-
426
- export const deserializeAws_json1_1AddTagsCommand = async (
427
- output: __HttpResponse,
428
- context: __SerdeContext
429
- ): Promise<AddTagsCommandOutput> => {
430
- if (output.statusCode >= 300) {
431
- return deserializeAws_json1_1AddTagsCommandError(output, context);
432
- }
433
- const data: any = await parseBody(output.body, context);
434
- let contents: any = {};
435
- contents = deserializeAws_json1_1AddTagsOutput(data, context);
436
- const response: AddTagsCommandOutput = {
437
- $metadata: deserializeMetadata(output),
438
- ...contents,
439
- };
440
- return Promise.resolve(response);
441
- };
442
-
443
- const deserializeAws_json1_1AddTagsCommandError = async (
444
- output: __HttpResponse,
445
- context: __SerdeContext
446
- ): Promise<AddTagsCommandOutput> => {
447
- const parsedOutput: any = {
448
- ...output,
449
- body: await parseBody(output.body, context),
450
- };
451
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
452
- let errorCode: string = "UnknownError";
453
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
454
- switch (errorCode) {
455
- case "InternalServiceError":
456
- case "com.amazonaws.datapipeline#InternalServiceError":
457
- response = {
458
- ...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
459
- name: errorCode,
460
- $metadata: deserializeMetadata(output),
461
- };
462
- break;
463
- case "InvalidRequestException":
464
- case "com.amazonaws.datapipeline#InvalidRequestException":
465
- response = {
466
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
467
- name: errorCode,
468
- $metadata: deserializeMetadata(output),
469
- };
470
- break;
471
- case "PipelineDeletedException":
472
- case "com.amazonaws.datapipeline#PipelineDeletedException":
473
- response = {
474
- ...(await deserializeAws_json1_1PipelineDeletedExceptionResponse(parsedOutput, context)),
475
- name: errorCode,
476
- $metadata: deserializeMetadata(output),
477
- };
478
- break;
479
- case "PipelineNotFoundException":
480
- case "com.amazonaws.datapipeline#PipelineNotFoundException":
481
- response = {
482
- ...(await deserializeAws_json1_1PipelineNotFoundExceptionResponse(parsedOutput, context)),
483
- name: errorCode,
484
- $metadata: deserializeMetadata(output),
485
- };
486
- break;
487
- default:
488
- const parsedBody = parsedOutput.body;
489
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
490
- response = {
491
- ...parsedBody,
492
- name: `${errorCode}`,
493
- message: parsedBody.message || parsedBody.Message || errorCode,
494
- $fault: "client",
495
- $metadata: deserializeMetadata(output),
496
- } as any;
497
- }
498
- const message = response.message || response.Message || errorCode;
499
- response.message = message;
500
- delete response.Message;
501
- return Promise.reject(Object.assign(new Error(message), response));
502
- };
503
-
504
- export const deserializeAws_json1_1CreatePipelineCommand = async (
505
- output: __HttpResponse,
506
- context: __SerdeContext
507
- ): Promise<CreatePipelineCommandOutput> => {
508
- if (output.statusCode >= 300) {
509
- return deserializeAws_json1_1CreatePipelineCommandError(output, context);
510
- }
511
- const data: any = await parseBody(output.body, context);
512
- let contents: any = {};
513
- contents = deserializeAws_json1_1CreatePipelineOutput(data, context);
514
- const response: CreatePipelineCommandOutput = {
515
- $metadata: deserializeMetadata(output),
516
- ...contents,
517
- };
518
- return Promise.resolve(response);
519
- };
520
-
521
- const deserializeAws_json1_1CreatePipelineCommandError = async (
522
- output: __HttpResponse,
523
- context: __SerdeContext
524
- ): Promise<CreatePipelineCommandOutput> => {
525
- const parsedOutput: any = {
526
- ...output,
527
- body: await parseBody(output.body, context),
528
- };
529
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
530
- let errorCode: string = "UnknownError";
531
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
532
- switch (errorCode) {
533
- case "InternalServiceError":
534
- case "com.amazonaws.datapipeline#InternalServiceError":
535
- response = {
536
- ...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
537
- name: errorCode,
538
- $metadata: deserializeMetadata(output),
539
- };
540
- break;
541
- case "InvalidRequestException":
542
- case "com.amazonaws.datapipeline#InvalidRequestException":
543
- response = {
544
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
545
- name: errorCode,
546
- $metadata: deserializeMetadata(output),
547
- };
548
- break;
549
- default:
550
- const parsedBody = parsedOutput.body;
551
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
552
- response = {
553
- ...parsedBody,
554
- name: `${errorCode}`,
555
- message: parsedBody.message || parsedBody.Message || errorCode,
556
- $fault: "client",
557
- $metadata: deserializeMetadata(output),
558
- } as any;
559
- }
560
- const message = response.message || response.Message || errorCode;
561
- response.message = message;
562
- delete response.Message;
563
- return Promise.reject(Object.assign(new Error(message), response));
564
- };
565
-
566
- export const deserializeAws_json1_1DeactivatePipelineCommand = async (
567
- output: __HttpResponse,
568
- context: __SerdeContext
569
- ): Promise<DeactivatePipelineCommandOutput> => {
570
- if (output.statusCode >= 300) {
571
- return deserializeAws_json1_1DeactivatePipelineCommandError(output, context);
572
- }
573
- const data: any = await parseBody(output.body, context);
574
- let contents: any = {};
575
- contents = deserializeAws_json1_1DeactivatePipelineOutput(data, context);
576
- const response: DeactivatePipelineCommandOutput = {
577
- $metadata: deserializeMetadata(output),
578
- ...contents,
579
- };
580
- return Promise.resolve(response);
581
- };
582
-
583
- const deserializeAws_json1_1DeactivatePipelineCommandError = async (
584
- output: __HttpResponse,
585
- context: __SerdeContext
586
- ): Promise<DeactivatePipelineCommandOutput> => {
587
- const parsedOutput: any = {
588
- ...output,
589
- body: await parseBody(output.body, context),
590
- };
591
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
592
- let errorCode: string = "UnknownError";
593
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
594
- switch (errorCode) {
595
- case "InternalServiceError":
596
- case "com.amazonaws.datapipeline#InternalServiceError":
597
- response = {
598
- ...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
599
- name: errorCode,
600
- $metadata: deserializeMetadata(output),
601
- };
602
- break;
603
- case "InvalidRequestException":
604
- case "com.amazonaws.datapipeline#InvalidRequestException":
605
- response = {
606
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
607
- name: errorCode,
608
- $metadata: deserializeMetadata(output),
609
- };
610
- break;
611
- case "PipelineDeletedException":
612
- case "com.amazonaws.datapipeline#PipelineDeletedException":
613
- response = {
614
- ...(await deserializeAws_json1_1PipelineDeletedExceptionResponse(parsedOutput, context)),
615
- name: errorCode,
616
- $metadata: deserializeMetadata(output),
617
- };
618
- break;
619
- case "PipelineNotFoundException":
620
- case "com.amazonaws.datapipeline#PipelineNotFoundException":
621
- response = {
622
- ...(await deserializeAws_json1_1PipelineNotFoundExceptionResponse(parsedOutput, context)),
623
- name: errorCode,
624
- $metadata: deserializeMetadata(output),
625
- };
626
- break;
627
- default:
628
- const parsedBody = parsedOutput.body;
629
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
630
- response = {
631
- ...parsedBody,
632
- name: `${errorCode}`,
633
- message: parsedBody.message || parsedBody.Message || errorCode,
634
- $fault: "client",
635
- $metadata: deserializeMetadata(output),
636
- } as any;
637
- }
638
- const message = response.message || response.Message || errorCode;
639
- response.message = message;
640
- delete response.Message;
641
- return Promise.reject(Object.assign(new Error(message), response));
642
- };
643
-
644
- export const deserializeAws_json1_1DeletePipelineCommand = async (
645
- output: __HttpResponse,
646
- context: __SerdeContext
647
- ): Promise<DeletePipelineCommandOutput> => {
648
- if (output.statusCode >= 300) {
649
- return deserializeAws_json1_1DeletePipelineCommandError(output, context);
650
- }
651
- await collectBody(output.body, context);
652
- const response: DeletePipelineCommandOutput = {
653
- $metadata: deserializeMetadata(output),
654
- };
655
- return Promise.resolve(response);
656
- };
657
-
658
- const deserializeAws_json1_1DeletePipelineCommandError = async (
659
- output: __HttpResponse,
660
- context: __SerdeContext
661
- ): Promise<DeletePipelineCommandOutput> => {
662
- const parsedOutput: any = {
663
- ...output,
664
- body: await parseBody(output.body, context),
665
- };
666
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
667
- let errorCode: string = "UnknownError";
668
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
669
- switch (errorCode) {
670
- case "InternalServiceError":
671
- case "com.amazonaws.datapipeline#InternalServiceError":
672
- response = {
673
- ...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
674
- name: errorCode,
675
- $metadata: deserializeMetadata(output),
676
- };
677
- break;
678
- case "InvalidRequestException":
679
- case "com.amazonaws.datapipeline#InvalidRequestException":
680
- response = {
681
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
682
- name: errorCode,
683
- $metadata: deserializeMetadata(output),
684
- };
685
- break;
686
- case "PipelineNotFoundException":
687
- case "com.amazonaws.datapipeline#PipelineNotFoundException":
688
- response = {
689
- ...(await deserializeAws_json1_1PipelineNotFoundExceptionResponse(parsedOutput, context)),
690
- name: errorCode,
691
- $metadata: deserializeMetadata(output),
692
- };
693
- break;
694
- default:
695
- const parsedBody = parsedOutput.body;
696
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
697
- response = {
698
- ...parsedBody,
699
- name: `${errorCode}`,
700
- message: parsedBody.message || parsedBody.Message || errorCode,
701
- $fault: "client",
702
- $metadata: deserializeMetadata(output),
703
- } as any;
704
- }
705
- const message = response.message || response.Message || errorCode;
706
- response.message = message;
707
- delete response.Message;
708
- return Promise.reject(Object.assign(new Error(message), response));
709
- };
710
-
711
- export const deserializeAws_json1_1DescribeObjectsCommand = async (
712
- output: __HttpResponse,
713
- context: __SerdeContext
714
- ): Promise<DescribeObjectsCommandOutput> => {
715
- if (output.statusCode >= 300) {
716
- return deserializeAws_json1_1DescribeObjectsCommandError(output, context);
717
- }
718
- const data: any = await parseBody(output.body, context);
719
- let contents: any = {};
720
- contents = deserializeAws_json1_1DescribeObjectsOutput(data, context);
721
- const response: DescribeObjectsCommandOutput = {
722
- $metadata: deserializeMetadata(output),
723
- ...contents,
724
- };
725
- return Promise.resolve(response);
726
- };
727
-
728
- const deserializeAws_json1_1DescribeObjectsCommandError = async (
729
- output: __HttpResponse,
730
- context: __SerdeContext
731
- ): Promise<DescribeObjectsCommandOutput> => {
732
- const parsedOutput: any = {
733
- ...output,
734
- body: await parseBody(output.body, context),
735
- };
736
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
737
- let errorCode: string = "UnknownError";
738
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
739
- switch (errorCode) {
740
- case "InternalServiceError":
741
- case "com.amazonaws.datapipeline#InternalServiceError":
742
- response = {
743
- ...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
744
- name: errorCode,
745
- $metadata: deserializeMetadata(output),
746
- };
747
- break;
748
- case "InvalidRequestException":
749
- case "com.amazonaws.datapipeline#InvalidRequestException":
750
- response = {
751
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
752
- name: errorCode,
753
- $metadata: deserializeMetadata(output),
754
- };
755
- break;
756
- case "PipelineDeletedException":
757
- case "com.amazonaws.datapipeline#PipelineDeletedException":
758
- response = {
759
- ...(await deserializeAws_json1_1PipelineDeletedExceptionResponse(parsedOutput, context)),
760
- name: errorCode,
761
- $metadata: deserializeMetadata(output),
762
- };
763
- break;
764
- case "PipelineNotFoundException":
765
- case "com.amazonaws.datapipeline#PipelineNotFoundException":
766
- response = {
767
- ...(await deserializeAws_json1_1PipelineNotFoundExceptionResponse(parsedOutput, context)),
768
- name: errorCode,
769
- $metadata: deserializeMetadata(output),
770
- };
771
- break;
772
- default:
773
- const parsedBody = parsedOutput.body;
774
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
775
- response = {
776
- ...parsedBody,
777
- name: `${errorCode}`,
778
- message: parsedBody.message || parsedBody.Message || errorCode,
779
- $fault: "client",
780
- $metadata: deserializeMetadata(output),
781
- } as any;
782
- }
783
- const message = response.message || response.Message || errorCode;
784
- response.message = message;
785
- delete response.Message;
786
- return Promise.reject(Object.assign(new Error(message), response));
787
- };
788
-
789
- export const deserializeAws_json1_1DescribePipelinesCommand = async (
790
- output: __HttpResponse,
791
- context: __SerdeContext
792
- ): Promise<DescribePipelinesCommandOutput> => {
793
- if (output.statusCode >= 300) {
794
- return deserializeAws_json1_1DescribePipelinesCommandError(output, context);
795
- }
796
- const data: any = await parseBody(output.body, context);
797
- let contents: any = {};
798
- contents = deserializeAws_json1_1DescribePipelinesOutput(data, context);
799
- const response: DescribePipelinesCommandOutput = {
800
- $metadata: deserializeMetadata(output),
801
- ...contents,
802
- };
803
- return Promise.resolve(response);
804
- };
805
-
806
- const deserializeAws_json1_1DescribePipelinesCommandError = async (
807
- output: __HttpResponse,
808
- context: __SerdeContext
809
- ): Promise<DescribePipelinesCommandOutput> => {
810
- const parsedOutput: any = {
811
- ...output,
812
- body: await parseBody(output.body, context),
813
- };
814
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
815
- let errorCode: string = "UnknownError";
816
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
817
- switch (errorCode) {
818
- case "InternalServiceError":
819
- case "com.amazonaws.datapipeline#InternalServiceError":
820
- response = {
821
- ...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
822
- name: errorCode,
823
- $metadata: deserializeMetadata(output),
824
- };
825
- break;
826
- case "InvalidRequestException":
827
- case "com.amazonaws.datapipeline#InvalidRequestException":
828
- response = {
829
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
830
- name: errorCode,
831
- $metadata: deserializeMetadata(output),
832
- };
833
- break;
834
- case "PipelineDeletedException":
835
- case "com.amazonaws.datapipeline#PipelineDeletedException":
836
- response = {
837
- ...(await deserializeAws_json1_1PipelineDeletedExceptionResponse(parsedOutput, context)),
838
- name: errorCode,
839
- $metadata: deserializeMetadata(output),
840
- };
841
- break;
842
- case "PipelineNotFoundException":
843
- case "com.amazonaws.datapipeline#PipelineNotFoundException":
844
- response = {
845
- ...(await deserializeAws_json1_1PipelineNotFoundExceptionResponse(parsedOutput, context)),
846
- name: errorCode,
847
- $metadata: deserializeMetadata(output),
848
- };
849
- break;
850
- default:
851
- const parsedBody = parsedOutput.body;
852
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
853
- response = {
854
- ...parsedBody,
855
- name: `${errorCode}`,
856
- message: parsedBody.message || parsedBody.Message || errorCode,
857
- $fault: "client",
858
- $metadata: deserializeMetadata(output),
859
- } as any;
860
- }
861
- const message = response.message || response.Message || errorCode;
862
- response.message = message;
863
- delete response.Message;
864
- return Promise.reject(Object.assign(new Error(message), response));
865
- };
866
-
867
- export const deserializeAws_json1_1EvaluateExpressionCommand = async (
868
- output: __HttpResponse,
869
- context: __SerdeContext
870
- ): Promise<EvaluateExpressionCommandOutput> => {
871
- if (output.statusCode >= 300) {
872
- return deserializeAws_json1_1EvaluateExpressionCommandError(output, context);
873
- }
874
- const data: any = await parseBody(output.body, context);
875
- let contents: any = {};
876
- contents = deserializeAws_json1_1EvaluateExpressionOutput(data, context);
877
- const response: EvaluateExpressionCommandOutput = {
878
- $metadata: deserializeMetadata(output),
879
- ...contents,
880
- };
881
- return Promise.resolve(response);
882
- };
883
-
884
- const deserializeAws_json1_1EvaluateExpressionCommandError = async (
885
- output: __HttpResponse,
886
- context: __SerdeContext
887
- ): Promise<EvaluateExpressionCommandOutput> => {
888
- const parsedOutput: any = {
889
- ...output,
890
- body: await parseBody(output.body, context),
891
- };
892
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
893
- let errorCode: string = "UnknownError";
894
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
895
- switch (errorCode) {
896
- case "InternalServiceError":
897
- case "com.amazonaws.datapipeline#InternalServiceError":
898
- response = {
899
- ...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
900
- name: errorCode,
901
- $metadata: deserializeMetadata(output),
902
- };
903
- break;
904
- case "InvalidRequestException":
905
- case "com.amazonaws.datapipeline#InvalidRequestException":
906
- response = {
907
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
908
- name: errorCode,
909
- $metadata: deserializeMetadata(output),
910
- };
911
- break;
912
- case "PipelineDeletedException":
913
- case "com.amazonaws.datapipeline#PipelineDeletedException":
914
- response = {
915
- ...(await deserializeAws_json1_1PipelineDeletedExceptionResponse(parsedOutput, context)),
916
- name: errorCode,
917
- $metadata: deserializeMetadata(output),
918
- };
919
- break;
920
- case "PipelineNotFoundException":
921
- case "com.amazonaws.datapipeline#PipelineNotFoundException":
922
- response = {
923
- ...(await deserializeAws_json1_1PipelineNotFoundExceptionResponse(parsedOutput, context)),
924
- name: errorCode,
925
- $metadata: deserializeMetadata(output),
926
- };
927
- break;
928
- case "TaskNotFoundException":
929
- case "com.amazonaws.datapipeline#TaskNotFoundException":
930
- response = {
931
- ...(await deserializeAws_json1_1TaskNotFoundExceptionResponse(parsedOutput, context)),
932
- name: errorCode,
933
- $metadata: deserializeMetadata(output),
934
- };
935
- break;
936
- default:
937
- const parsedBody = parsedOutput.body;
938
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
939
- response = {
940
- ...parsedBody,
941
- name: `${errorCode}`,
942
- message: parsedBody.message || parsedBody.Message || errorCode,
943
- $fault: "client",
944
- $metadata: deserializeMetadata(output),
945
- } as any;
946
- }
947
- const message = response.message || response.Message || errorCode;
948
- response.message = message;
949
- delete response.Message;
950
- return Promise.reject(Object.assign(new Error(message), response));
951
- };
952
-
953
- export const deserializeAws_json1_1GetPipelineDefinitionCommand = async (
954
- output: __HttpResponse,
955
- context: __SerdeContext
956
- ): Promise<GetPipelineDefinitionCommandOutput> => {
957
- if (output.statusCode >= 300) {
958
- return deserializeAws_json1_1GetPipelineDefinitionCommandError(output, context);
959
- }
960
- const data: any = await parseBody(output.body, context);
961
- let contents: any = {};
962
- contents = deserializeAws_json1_1GetPipelineDefinitionOutput(data, context);
963
- const response: GetPipelineDefinitionCommandOutput = {
964
- $metadata: deserializeMetadata(output),
965
- ...contents,
966
- };
967
- return Promise.resolve(response);
968
- };
969
-
970
- const deserializeAws_json1_1GetPipelineDefinitionCommandError = async (
971
- output: __HttpResponse,
972
- context: __SerdeContext
973
- ): Promise<GetPipelineDefinitionCommandOutput> => {
974
- const parsedOutput: any = {
975
- ...output,
976
- body: await parseBody(output.body, context),
977
- };
978
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
979
- let errorCode: string = "UnknownError";
980
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
981
- switch (errorCode) {
982
- case "InternalServiceError":
983
- case "com.amazonaws.datapipeline#InternalServiceError":
984
- response = {
985
- ...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
986
- name: errorCode,
987
- $metadata: deserializeMetadata(output),
988
- };
989
- break;
990
- case "InvalidRequestException":
991
- case "com.amazonaws.datapipeline#InvalidRequestException":
992
- response = {
993
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
994
- name: errorCode,
995
- $metadata: deserializeMetadata(output),
996
- };
997
- break;
998
- case "PipelineDeletedException":
999
- case "com.amazonaws.datapipeline#PipelineDeletedException":
1000
- response = {
1001
- ...(await deserializeAws_json1_1PipelineDeletedExceptionResponse(parsedOutput, context)),
1002
- name: errorCode,
1003
- $metadata: deserializeMetadata(output),
1004
- };
1005
- break;
1006
- case "PipelineNotFoundException":
1007
- case "com.amazonaws.datapipeline#PipelineNotFoundException":
1008
- response = {
1009
- ...(await deserializeAws_json1_1PipelineNotFoundExceptionResponse(parsedOutput, context)),
1010
- name: errorCode,
1011
- $metadata: deserializeMetadata(output),
1012
- };
1013
- break;
1014
- default:
1015
- const parsedBody = parsedOutput.body;
1016
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1017
- response = {
1018
- ...parsedBody,
1019
- name: `${errorCode}`,
1020
- message: parsedBody.message || parsedBody.Message || errorCode,
1021
- $fault: "client",
1022
- $metadata: deserializeMetadata(output),
1023
- } as any;
1024
- }
1025
- const message = response.message || response.Message || errorCode;
1026
- response.message = message;
1027
- delete response.Message;
1028
- return Promise.reject(Object.assign(new Error(message), response));
1029
- };
1030
-
1031
- export const deserializeAws_json1_1ListPipelinesCommand = async (
1032
- output: __HttpResponse,
1033
- context: __SerdeContext
1034
- ): Promise<ListPipelinesCommandOutput> => {
1035
- if (output.statusCode >= 300) {
1036
- return deserializeAws_json1_1ListPipelinesCommandError(output, context);
1037
- }
1038
- const data: any = await parseBody(output.body, context);
1039
- let contents: any = {};
1040
- contents = deserializeAws_json1_1ListPipelinesOutput(data, context);
1041
- const response: ListPipelinesCommandOutput = {
1042
- $metadata: deserializeMetadata(output),
1043
- ...contents,
1044
- };
1045
- return Promise.resolve(response);
1046
- };
1047
-
1048
- const deserializeAws_json1_1ListPipelinesCommandError = async (
1049
- output: __HttpResponse,
1050
- context: __SerdeContext
1051
- ): Promise<ListPipelinesCommandOutput> => {
1052
- const parsedOutput: any = {
1053
- ...output,
1054
- body: await parseBody(output.body, context),
1055
- };
1056
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1057
- let errorCode: string = "UnknownError";
1058
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1059
- switch (errorCode) {
1060
- case "InternalServiceError":
1061
- case "com.amazonaws.datapipeline#InternalServiceError":
1062
- response = {
1063
- ...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
1064
- name: errorCode,
1065
- $metadata: deserializeMetadata(output),
1066
- };
1067
- break;
1068
- case "InvalidRequestException":
1069
- case "com.amazonaws.datapipeline#InvalidRequestException":
1070
- response = {
1071
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
1072
- name: errorCode,
1073
- $metadata: deserializeMetadata(output),
1074
- };
1075
- break;
1076
- default:
1077
- const parsedBody = parsedOutput.body;
1078
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1079
- response = {
1080
- ...parsedBody,
1081
- name: `${errorCode}`,
1082
- message: parsedBody.message || parsedBody.Message || errorCode,
1083
- $fault: "client",
1084
- $metadata: deserializeMetadata(output),
1085
- } as any;
1086
- }
1087
- const message = response.message || response.Message || errorCode;
1088
- response.message = message;
1089
- delete response.Message;
1090
- return Promise.reject(Object.assign(new Error(message), response));
1091
- };
1092
-
1093
- export const deserializeAws_json1_1PollForTaskCommand = async (
1094
- output: __HttpResponse,
1095
- context: __SerdeContext
1096
- ): Promise<PollForTaskCommandOutput> => {
1097
- if (output.statusCode >= 300) {
1098
- return deserializeAws_json1_1PollForTaskCommandError(output, context);
1099
- }
1100
- const data: any = await parseBody(output.body, context);
1101
- let contents: any = {};
1102
- contents = deserializeAws_json1_1PollForTaskOutput(data, context);
1103
- const response: PollForTaskCommandOutput = {
1104
- $metadata: deserializeMetadata(output),
1105
- ...contents,
1106
- };
1107
- return Promise.resolve(response);
1108
- };
1109
-
1110
- const deserializeAws_json1_1PollForTaskCommandError = async (
1111
- output: __HttpResponse,
1112
- context: __SerdeContext
1113
- ): Promise<PollForTaskCommandOutput> => {
1114
- const parsedOutput: any = {
1115
- ...output,
1116
- body: await parseBody(output.body, context),
1117
- };
1118
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1119
- let errorCode: string = "UnknownError";
1120
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1121
- switch (errorCode) {
1122
- case "InternalServiceError":
1123
- case "com.amazonaws.datapipeline#InternalServiceError":
1124
- response = {
1125
- ...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
1126
- name: errorCode,
1127
- $metadata: deserializeMetadata(output),
1128
- };
1129
- break;
1130
- case "InvalidRequestException":
1131
- case "com.amazonaws.datapipeline#InvalidRequestException":
1132
- response = {
1133
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
1134
- name: errorCode,
1135
- $metadata: deserializeMetadata(output),
1136
- };
1137
- break;
1138
- case "TaskNotFoundException":
1139
- case "com.amazonaws.datapipeline#TaskNotFoundException":
1140
- response = {
1141
- ...(await deserializeAws_json1_1TaskNotFoundExceptionResponse(parsedOutput, context)),
1142
- name: errorCode,
1143
- $metadata: deserializeMetadata(output),
1144
- };
1145
- break;
1146
- default:
1147
- const parsedBody = parsedOutput.body;
1148
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1149
- response = {
1150
- ...parsedBody,
1151
- name: `${errorCode}`,
1152
- message: parsedBody.message || parsedBody.Message || errorCode,
1153
- $fault: "client",
1154
- $metadata: deserializeMetadata(output),
1155
- } as any;
1156
- }
1157
- const message = response.message || response.Message || errorCode;
1158
- response.message = message;
1159
- delete response.Message;
1160
- return Promise.reject(Object.assign(new Error(message), response));
1161
- };
1162
-
1163
- export const deserializeAws_json1_1PutPipelineDefinitionCommand = async (
1164
- output: __HttpResponse,
1165
- context: __SerdeContext
1166
- ): Promise<PutPipelineDefinitionCommandOutput> => {
1167
- if (output.statusCode >= 300) {
1168
- return deserializeAws_json1_1PutPipelineDefinitionCommandError(output, context);
1169
- }
1170
- const data: any = await parseBody(output.body, context);
1171
- let contents: any = {};
1172
- contents = deserializeAws_json1_1PutPipelineDefinitionOutput(data, context);
1173
- const response: PutPipelineDefinitionCommandOutput = {
1174
- $metadata: deserializeMetadata(output),
1175
- ...contents,
1176
- };
1177
- return Promise.resolve(response);
1178
- };
1179
-
1180
- const deserializeAws_json1_1PutPipelineDefinitionCommandError = async (
1181
- output: __HttpResponse,
1182
- context: __SerdeContext
1183
- ): Promise<PutPipelineDefinitionCommandOutput> => {
1184
- const parsedOutput: any = {
1185
- ...output,
1186
- body: await parseBody(output.body, context),
1187
- };
1188
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1189
- let errorCode: string = "UnknownError";
1190
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1191
- switch (errorCode) {
1192
- case "InternalServiceError":
1193
- case "com.amazonaws.datapipeline#InternalServiceError":
1194
- response = {
1195
- ...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
1196
- name: errorCode,
1197
- $metadata: deserializeMetadata(output),
1198
- };
1199
- break;
1200
- case "InvalidRequestException":
1201
- case "com.amazonaws.datapipeline#InvalidRequestException":
1202
- response = {
1203
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
1204
- name: errorCode,
1205
- $metadata: deserializeMetadata(output),
1206
- };
1207
- break;
1208
- case "PipelineDeletedException":
1209
- case "com.amazonaws.datapipeline#PipelineDeletedException":
1210
- response = {
1211
- ...(await deserializeAws_json1_1PipelineDeletedExceptionResponse(parsedOutput, context)),
1212
- name: errorCode,
1213
- $metadata: deserializeMetadata(output),
1214
- };
1215
- break;
1216
- case "PipelineNotFoundException":
1217
- case "com.amazonaws.datapipeline#PipelineNotFoundException":
1218
- response = {
1219
- ...(await deserializeAws_json1_1PipelineNotFoundExceptionResponse(parsedOutput, context)),
1220
- name: errorCode,
1221
- $metadata: deserializeMetadata(output),
1222
- };
1223
- break;
1224
- default:
1225
- const parsedBody = parsedOutput.body;
1226
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1227
- response = {
1228
- ...parsedBody,
1229
- name: `${errorCode}`,
1230
- message: parsedBody.message || parsedBody.Message || errorCode,
1231
- $fault: "client",
1232
- $metadata: deserializeMetadata(output),
1233
- } as any;
1234
- }
1235
- const message = response.message || response.Message || errorCode;
1236
- response.message = message;
1237
- delete response.Message;
1238
- return Promise.reject(Object.assign(new Error(message), response));
1239
- };
1240
-
1241
- export const deserializeAws_json1_1QueryObjectsCommand = async (
1242
- output: __HttpResponse,
1243
- context: __SerdeContext
1244
- ): Promise<QueryObjectsCommandOutput> => {
1245
- if (output.statusCode >= 300) {
1246
- return deserializeAws_json1_1QueryObjectsCommandError(output, context);
1247
- }
1248
- const data: any = await parseBody(output.body, context);
1249
- let contents: any = {};
1250
- contents = deserializeAws_json1_1QueryObjectsOutput(data, context);
1251
- const response: QueryObjectsCommandOutput = {
1252
- $metadata: deserializeMetadata(output),
1253
- ...contents,
1254
- };
1255
- return Promise.resolve(response);
1256
- };
1257
-
1258
- const deserializeAws_json1_1QueryObjectsCommandError = async (
1259
- output: __HttpResponse,
1260
- context: __SerdeContext
1261
- ): Promise<QueryObjectsCommandOutput> => {
1262
- const parsedOutput: any = {
1263
- ...output,
1264
- body: await parseBody(output.body, context),
1265
- };
1266
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1267
- let errorCode: string = "UnknownError";
1268
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1269
- switch (errorCode) {
1270
- case "InternalServiceError":
1271
- case "com.amazonaws.datapipeline#InternalServiceError":
1272
- response = {
1273
- ...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
1274
- name: errorCode,
1275
- $metadata: deserializeMetadata(output),
1276
- };
1277
- break;
1278
- case "InvalidRequestException":
1279
- case "com.amazonaws.datapipeline#InvalidRequestException":
1280
- response = {
1281
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
1282
- name: errorCode,
1283
- $metadata: deserializeMetadata(output),
1284
- };
1285
- break;
1286
- case "PipelineDeletedException":
1287
- case "com.amazonaws.datapipeline#PipelineDeletedException":
1288
- response = {
1289
- ...(await deserializeAws_json1_1PipelineDeletedExceptionResponse(parsedOutput, context)),
1290
- name: errorCode,
1291
- $metadata: deserializeMetadata(output),
1292
- };
1293
- break;
1294
- case "PipelineNotFoundException":
1295
- case "com.amazonaws.datapipeline#PipelineNotFoundException":
1296
- response = {
1297
- ...(await deserializeAws_json1_1PipelineNotFoundExceptionResponse(parsedOutput, context)),
1298
- name: errorCode,
1299
- $metadata: deserializeMetadata(output),
1300
- };
1301
- break;
1302
- default:
1303
- const parsedBody = parsedOutput.body;
1304
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1305
- response = {
1306
- ...parsedBody,
1307
- name: `${errorCode}`,
1308
- message: parsedBody.message || parsedBody.Message || errorCode,
1309
- $fault: "client",
1310
- $metadata: deserializeMetadata(output),
1311
- } as any;
1312
- }
1313
- const message = response.message || response.Message || errorCode;
1314
- response.message = message;
1315
- delete response.Message;
1316
- return Promise.reject(Object.assign(new Error(message), response));
1317
- };
1318
-
1319
- export const deserializeAws_json1_1RemoveTagsCommand = async (
1320
- output: __HttpResponse,
1321
- context: __SerdeContext
1322
- ): Promise<RemoveTagsCommandOutput> => {
1323
- if (output.statusCode >= 300) {
1324
- return deserializeAws_json1_1RemoveTagsCommandError(output, context);
1325
- }
1326
- const data: any = await parseBody(output.body, context);
1327
- let contents: any = {};
1328
- contents = deserializeAws_json1_1RemoveTagsOutput(data, context);
1329
- const response: RemoveTagsCommandOutput = {
1330
- $metadata: deserializeMetadata(output),
1331
- ...contents,
1332
- };
1333
- return Promise.resolve(response);
1334
- };
1335
-
1336
- const deserializeAws_json1_1RemoveTagsCommandError = async (
1337
- output: __HttpResponse,
1338
- context: __SerdeContext
1339
- ): Promise<RemoveTagsCommandOutput> => {
1340
- const parsedOutput: any = {
1341
- ...output,
1342
- body: await parseBody(output.body, context),
1343
- };
1344
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1345
- let errorCode: string = "UnknownError";
1346
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1347
- switch (errorCode) {
1348
- case "InternalServiceError":
1349
- case "com.amazonaws.datapipeline#InternalServiceError":
1350
- response = {
1351
- ...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
1352
- name: errorCode,
1353
- $metadata: deserializeMetadata(output),
1354
- };
1355
- break;
1356
- case "InvalidRequestException":
1357
- case "com.amazonaws.datapipeline#InvalidRequestException":
1358
- response = {
1359
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
1360
- name: errorCode,
1361
- $metadata: deserializeMetadata(output),
1362
- };
1363
- break;
1364
- case "PipelineDeletedException":
1365
- case "com.amazonaws.datapipeline#PipelineDeletedException":
1366
- response = {
1367
- ...(await deserializeAws_json1_1PipelineDeletedExceptionResponse(parsedOutput, context)),
1368
- name: errorCode,
1369
- $metadata: deserializeMetadata(output),
1370
- };
1371
- break;
1372
- case "PipelineNotFoundException":
1373
- case "com.amazonaws.datapipeline#PipelineNotFoundException":
1374
- response = {
1375
- ...(await deserializeAws_json1_1PipelineNotFoundExceptionResponse(parsedOutput, context)),
1376
- name: errorCode,
1377
- $metadata: deserializeMetadata(output),
1378
- };
1379
- break;
1380
- default:
1381
- const parsedBody = parsedOutput.body;
1382
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1383
- response = {
1384
- ...parsedBody,
1385
- name: `${errorCode}`,
1386
- message: parsedBody.message || parsedBody.Message || errorCode,
1387
- $fault: "client",
1388
- $metadata: deserializeMetadata(output),
1389
- } as any;
1390
- }
1391
- const message = response.message || response.Message || errorCode;
1392
- response.message = message;
1393
- delete response.Message;
1394
- return Promise.reject(Object.assign(new Error(message), response));
1395
- };
1396
-
1397
- export const deserializeAws_json1_1ReportTaskProgressCommand = async (
1398
- output: __HttpResponse,
1399
- context: __SerdeContext
1400
- ): Promise<ReportTaskProgressCommandOutput> => {
1401
- if (output.statusCode >= 300) {
1402
- return deserializeAws_json1_1ReportTaskProgressCommandError(output, context);
1403
- }
1404
- const data: any = await parseBody(output.body, context);
1405
- let contents: any = {};
1406
- contents = deserializeAws_json1_1ReportTaskProgressOutput(data, context);
1407
- const response: ReportTaskProgressCommandOutput = {
1408
- $metadata: deserializeMetadata(output),
1409
- ...contents,
1410
- };
1411
- return Promise.resolve(response);
1412
- };
1413
-
1414
- const deserializeAws_json1_1ReportTaskProgressCommandError = async (
1415
- output: __HttpResponse,
1416
- context: __SerdeContext
1417
- ): Promise<ReportTaskProgressCommandOutput> => {
1418
- const parsedOutput: any = {
1419
- ...output,
1420
- body: await parseBody(output.body, context),
1421
- };
1422
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1423
- let errorCode: string = "UnknownError";
1424
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1425
- switch (errorCode) {
1426
- case "InternalServiceError":
1427
- case "com.amazonaws.datapipeline#InternalServiceError":
1428
- response = {
1429
- ...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
1430
- name: errorCode,
1431
- $metadata: deserializeMetadata(output),
1432
- };
1433
- break;
1434
- case "InvalidRequestException":
1435
- case "com.amazonaws.datapipeline#InvalidRequestException":
1436
- response = {
1437
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
1438
- name: errorCode,
1439
- $metadata: deserializeMetadata(output),
1440
- };
1441
- break;
1442
- case "PipelineDeletedException":
1443
- case "com.amazonaws.datapipeline#PipelineDeletedException":
1444
- response = {
1445
- ...(await deserializeAws_json1_1PipelineDeletedExceptionResponse(parsedOutput, context)),
1446
- name: errorCode,
1447
- $metadata: deserializeMetadata(output),
1448
- };
1449
- break;
1450
- case "PipelineNotFoundException":
1451
- case "com.amazonaws.datapipeline#PipelineNotFoundException":
1452
- response = {
1453
- ...(await deserializeAws_json1_1PipelineNotFoundExceptionResponse(parsedOutput, context)),
1454
- name: errorCode,
1455
- $metadata: deserializeMetadata(output),
1456
- };
1457
- break;
1458
- case "TaskNotFoundException":
1459
- case "com.amazonaws.datapipeline#TaskNotFoundException":
1460
- response = {
1461
- ...(await deserializeAws_json1_1TaskNotFoundExceptionResponse(parsedOutput, context)),
1462
- name: errorCode,
1463
- $metadata: deserializeMetadata(output),
1464
- };
1465
- break;
1466
- default:
1467
- const parsedBody = parsedOutput.body;
1468
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1469
- response = {
1470
- ...parsedBody,
1471
- name: `${errorCode}`,
1472
- message: parsedBody.message || parsedBody.Message || errorCode,
1473
- $fault: "client",
1474
- $metadata: deserializeMetadata(output),
1475
- } as any;
1476
- }
1477
- const message = response.message || response.Message || errorCode;
1478
- response.message = message;
1479
- delete response.Message;
1480
- return Promise.reject(Object.assign(new Error(message), response));
1481
- };
1482
-
1483
- export const deserializeAws_json1_1ReportTaskRunnerHeartbeatCommand = async (
1484
- output: __HttpResponse,
1485
- context: __SerdeContext
1486
- ): Promise<ReportTaskRunnerHeartbeatCommandOutput> => {
1487
- if (output.statusCode >= 300) {
1488
- return deserializeAws_json1_1ReportTaskRunnerHeartbeatCommandError(output, context);
1489
- }
1490
- const data: any = await parseBody(output.body, context);
1491
- let contents: any = {};
1492
- contents = deserializeAws_json1_1ReportTaskRunnerHeartbeatOutput(data, context);
1493
- const response: ReportTaskRunnerHeartbeatCommandOutput = {
1494
- $metadata: deserializeMetadata(output),
1495
- ...contents,
1496
- };
1497
- return Promise.resolve(response);
1498
- };
1499
-
1500
- const deserializeAws_json1_1ReportTaskRunnerHeartbeatCommandError = async (
1501
- output: __HttpResponse,
1502
- context: __SerdeContext
1503
- ): Promise<ReportTaskRunnerHeartbeatCommandOutput> => {
1504
- const parsedOutput: any = {
1505
- ...output,
1506
- body: await parseBody(output.body, context),
1507
- };
1508
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1509
- let errorCode: string = "UnknownError";
1510
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1511
- switch (errorCode) {
1512
- case "InternalServiceError":
1513
- case "com.amazonaws.datapipeline#InternalServiceError":
1514
- response = {
1515
- ...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
1516
- name: errorCode,
1517
- $metadata: deserializeMetadata(output),
1518
- };
1519
- break;
1520
- case "InvalidRequestException":
1521
- case "com.amazonaws.datapipeline#InvalidRequestException":
1522
- response = {
1523
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
1524
- name: errorCode,
1525
- $metadata: deserializeMetadata(output),
1526
- };
1527
- break;
1528
- default:
1529
- const parsedBody = parsedOutput.body;
1530
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1531
- response = {
1532
- ...parsedBody,
1533
- name: `${errorCode}`,
1534
- message: parsedBody.message || parsedBody.Message || errorCode,
1535
- $fault: "client",
1536
- $metadata: deserializeMetadata(output),
1537
- } as any;
1538
- }
1539
- const message = response.message || response.Message || errorCode;
1540
- response.message = message;
1541
- delete response.Message;
1542
- return Promise.reject(Object.assign(new Error(message), response));
1543
- };
1544
-
1545
- export const deserializeAws_json1_1SetStatusCommand = async (
1546
- output: __HttpResponse,
1547
- context: __SerdeContext
1548
- ): Promise<SetStatusCommandOutput> => {
1549
- if (output.statusCode >= 300) {
1550
- return deserializeAws_json1_1SetStatusCommandError(output, context);
1551
- }
1552
- await collectBody(output.body, context);
1553
- const response: SetStatusCommandOutput = {
1554
- $metadata: deserializeMetadata(output),
1555
- };
1556
- return Promise.resolve(response);
1557
- };
1558
-
1559
- const deserializeAws_json1_1SetStatusCommandError = async (
1560
- output: __HttpResponse,
1561
- context: __SerdeContext
1562
- ): Promise<SetStatusCommandOutput> => {
1563
- const parsedOutput: any = {
1564
- ...output,
1565
- body: await parseBody(output.body, context),
1566
- };
1567
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1568
- let errorCode: string = "UnknownError";
1569
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1570
- switch (errorCode) {
1571
- case "InternalServiceError":
1572
- case "com.amazonaws.datapipeline#InternalServiceError":
1573
- response = {
1574
- ...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
1575
- name: errorCode,
1576
- $metadata: deserializeMetadata(output),
1577
- };
1578
- break;
1579
- case "InvalidRequestException":
1580
- case "com.amazonaws.datapipeline#InvalidRequestException":
1581
- response = {
1582
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
1583
- name: errorCode,
1584
- $metadata: deserializeMetadata(output),
1585
- };
1586
- break;
1587
- case "PipelineDeletedException":
1588
- case "com.amazonaws.datapipeline#PipelineDeletedException":
1589
- response = {
1590
- ...(await deserializeAws_json1_1PipelineDeletedExceptionResponse(parsedOutput, context)),
1591
- name: errorCode,
1592
- $metadata: deserializeMetadata(output),
1593
- };
1594
- break;
1595
- case "PipelineNotFoundException":
1596
- case "com.amazonaws.datapipeline#PipelineNotFoundException":
1597
- response = {
1598
- ...(await deserializeAws_json1_1PipelineNotFoundExceptionResponse(parsedOutput, context)),
1599
- name: errorCode,
1600
- $metadata: deserializeMetadata(output),
1601
- };
1602
- break;
1603
- default:
1604
- const parsedBody = parsedOutput.body;
1605
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1606
- response = {
1607
- ...parsedBody,
1608
- name: `${errorCode}`,
1609
- message: parsedBody.message || parsedBody.Message || errorCode,
1610
- $fault: "client",
1611
- $metadata: deserializeMetadata(output),
1612
- } as any;
1613
- }
1614
- const message = response.message || response.Message || errorCode;
1615
- response.message = message;
1616
- delete response.Message;
1617
- return Promise.reject(Object.assign(new Error(message), response));
1618
- };
1619
-
1620
- export const deserializeAws_json1_1SetTaskStatusCommand = async (
1621
- output: __HttpResponse,
1622
- context: __SerdeContext
1623
- ): Promise<SetTaskStatusCommandOutput> => {
1624
- if (output.statusCode >= 300) {
1625
- return deserializeAws_json1_1SetTaskStatusCommandError(output, context);
1626
- }
1627
- const data: any = await parseBody(output.body, context);
1628
- let contents: any = {};
1629
- contents = deserializeAws_json1_1SetTaskStatusOutput(data, context);
1630
- const response: SetTaskStatusCommandOutput = {
1631
- $metadata: deserializeMetadata(output),
1632
- ...contents,
1633
- };
1634
- return Promise.resolve(response);
1635
- };
1636
-
1637
- const deserializeAws_json1_1SetTaskStatusCommandError = async (
1638
- output: __HttpResponse,
1639
- context: __SerdeContext
1640
- ): Promise<SetTaskStatusCommandOutput> => {
1641
- const parsedOutput: any = {
1642
- ...output,
1643
- body: await parseBody(output.body, context),
1644
- };
1645
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1646
- let errorCode: string = "UnknownError";
1647
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1648
- switch (errorCode) {
1649
- case "InternalServiceError":
1650
- case "com.amazonaws.datapipeline#InternalServiceError":
1651
- response = {
1652
- ...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
1653
- name: errorCode,
1654
- $metadata: deserializeMetadata(output),
1655
- };
1656
- break;
1657
- case "InvalidRequestException":
1658
- case "com.amazonaws.datapipeline#InvalidRequestException":
1659
- response = {
1660
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
1661
- name: errorCode,
1662
- $metadata: deserializeMetadata(output),
1663
- };
1664
- break;
1665
- case "PipelineDeletedException":
1666
- case "com.amazonaws.datapipeline#PipelineDeletedException":
1667
- response = {
1668
- ...(await deserializeAws_json1_1PipelineDeletedExceptionResponse(parsedOutput, context)),
1669
- name: errorCode,
1670
- $metadata: deserializeMetadata(output),
1671
- };
1672
- break;
1673
- case "PipelineNotFoundException":
1674
- case "com.amazonaws.datapipeline#PipelineNotFoundException":
1675
- response = {
1676
- ...(await deserializeAws_json1_1PipelineNotFoundExceptionResponse(parsedOutput, context)),
1677
- name: errorCode,
1678
- $metadata: deserializeMetadata(output),
1679
- };
1680
- break;
1681
- case "TaskNotFoundException":
1682
- case "com.amazonaws.datapipeline#TaskNotFoundException":
1683
- response = {
1684
- ...(await deserializeAws_json1_1TaskNotFoundExceptionResponse(parsedOutput, context)),
1685
- name: errorCode,
1686
- $metadata: deserializeMetadata(output),
1687
- };
1688
- break;
1689
- default:
1690
- const parsedBody = parsedOutput.body;
1691
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1692
- response = {
1693
- ...parsedBody,
1694
- name: `${errorCode}`,
1695
- message: parsedBody.message || parsedBody.Message || errorCode,
1696
- $fault: "client",
1697
- $metadata: deserializeMetadata(output),
1698
- } as any;
1699
- }
1700
- const message = response.message || response.Message || errorCode;
1701
- response.message = message;
1702
- delete response.Message;
1703
- return Promise.reject(Object.assign(new Error(message), response));
1704
- };
1705
-
1706
- export const deserializeAws_json1_1ValidatePipelineDefinitionCommand = async (
1707
- output: __HttpResponse,
1708
- context: __SerdeContext
1709
- ): Promise<ValidatePipelineDefinitionCommandOutput> => {
1710
- if (output.statusCode >= 300) {
1711
- return deserializeAws_json1_1ValidatePipelineDefinitionCommandError(output, context);
1712
- }
1713
- const data: any = await parseBody(output.body, context);
1714
- let contents: any = {};
1715
- contents = deserializeAws_json1_1ValidatePipelineDefinitionOutput(data, context);
1716
- const response: ValidatePipelineDefinitionCommandOutput = {
1717
- $metadata: deserializeMetadata(output),
1718
- ...contents,
1719
- };
1720
- return Promise.resolve(response);
1721
- };
1722
-
1723
- const deserializeAws_json1_1ValidatePipelineDefinitionCommandError = async (
1724
- output: __HttpResponse,
1725
- context: __SerdeContext
1726
- ): Promise<ValidatePipelineDefinitionCommandOutput> => {
1727
- const parsedOutput: any = {
1728
- ...output,
1729
- body: await parseBody(output.body, context),
1730
- };
1731
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1732
- let errorCode: string = "UnknownError";
1733
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1734
- switch (errorCode) {
1735
- case "InternalServiceError":
1736
- case "com.amazonaws.datapipeline#InternalServiceError":
1737
- response = {
1738
- ...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
1739
- name: errorCode,
1740
- $metadata: deserializeMetadata(output),
1741
- };
1742
- break;
1743
- case "InvalidRequestException":
1744
- case "com.amazonaws.datapipeline#InvalidRequestException":
1745
- response = {
1746
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
1747
- name: errorCode,
1748
- $metadata: deserializeMetadata(output),
1749
- };
1750
- break;
1751
- case "PipelineDeletedException":
1752
- case "com.amazonaws.datapipeline#PipelineDeletedException":
1753
- response = {
1754
- ...(await deserializeAws_json1_1PipelineDeletedExceptionResponse(parsedOutput, context)),
1755
- name: errorCode,
1756
- $metadata: deserializeMetadata(output),
1757
- };
1758
- break;
1759
- case "PipelineNotFoundException":
1760
- case "com.amazonaws.datapipeline#PipelineNotFoundException":
1761
- response = {
1762
- ...(await deserializeAws_json1_1PipelineNotFoundExceptionResponse(parsedOutput, context)),
1763
- name: errorCode,
1764
- $metadata: deserializeMetadata(output),
1765
- };
1766
- break;
1767
- default:
1768
- const parsedBody = parsedOutput.body;
1769
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1770
- response = {
1771
- ...parsedBody,
1772
- name: `${errorCode}`,
1773
- message: parsedBody.message || parsedBody.Message || errorCode,
1774
- $fault: "client",
1775
- $metadata: deserializeMetadata(output),
1776
- } as any;
1777
- }
1778
- const message = response.message || response.Message || errorCode;
1779
- response.message = message;
1780
- delete response.Message;
1781
- return Promise.reject(Object.assign(new Error(message), response));
1782
- };
1783
-
1784
- const deserializeAws_json1_1InternalServiceErrorResponse = async (
1785
- parsedOutput: any,
1786
- context: __SerdeContext
1787
- ): Promise<InternalServiceError> => {
1788
- const body = parsedOutput.body;
1789
- const deserialized: any = deserializeAws_json1_1InternalServiceError(body, context);
1790
- const contents: InternalServiceError = {
1791
- name: "InternalServiceError",
1792
- $fault: "server",
1793
- $metadata: deserializeMetadata(parsedOutput),
1794
- ...deserialized,
1795
- };
1796
- return contents;
1797
- };
1798
-
1799
- const deserializeAws_json1_1InvalidRequestExceptionResponse = async (
1800
- parsedOutput: any,
1801
- context: __SerdeContext
1802
- ): Promise<InvalidRequestException> => {
1803
- const body = parsedOutput.body;
1804
- const deserialized: any = deserializeAws_json1_1InvalidRequestException(body, context);
1805
- const contents: InvalidRequestException = {
1806
- name: "InvalidRequestException",
1807
- $fault: "client",
1808
- $metadata: deserializeMetadata(parsedOutput),
1809
- ...deserialized,
1810
- };
1811
- return contents;
1812
- };
1813
-
1814
- const deserializeAws_json1_1PipelineDeletedExceptionResponse = async (
1815
- parsedOutput: any,
1816
- context: __SerdeContext
1817
- ): Promise<PipelineDeletedException> => {
1818
- const body = parsedOutput.body;
1819
- const deserialized: any = deserializeAws_json1_1PipelineDeletedException(body, context);
1820
- const contents: PipelineDeletedException = {
1821
- name: "PipelineDeletedException",
1822
- $fault: "client",
1823
- $metadata: deserializeMetadata(parsedOutput),
1824
- ...deserialized,
1825
- };
1826
- return contents;
1827
- };
1828
-
1829
- const deserializeAws_json1_1PipelineNotFoundExceptionResponse = async (
1830
- parsedOutput: any,
1831
- context: __SerdeContext
1832
- ): Promise<PipelineNotFoundException> => {
1833
- const body = parsedOutput.body;
1834
- const deserialized: any = deserializeAws_json1_1PipelineNotFoundException(body, context);
1835
- const contents: PipelineNotFoundException = {
1836
- name: "PipelineNotFoundException",
1837
- $fault: "client",
1838
- $metadata: deserializeMetadata(parsedOutput),
1839
- ...deserialized,
1840
- };
1841
- return contents;
1842
- };
1843
-
1844
- const deserializeAws_json1_1TaskNotFoundExceptionResponse = async (
1845
- parsedOutput: any,
1846
- context: __SerdeContext
1847
- ): Promise<TaskNotFoundException> => {
1848
- const body = parsedOutput.body;
1849
- const deserialized: any = deserializeAws_json1_1TaskNotFoundException(body, context);
1850
- const contents: TaskNotFoundException = {
1851
- name: "TaskNotFoundException",
1852
- $fault: "client",
1853
- $metadata: deserializeMetadata(parsedOutput),
1854
- ...deserialized,
1855
- };
1856
- return contents;
1857
- };
1858
-
1859
- const serializeAws_json1_1ActivatePipelineInput = (input: ActivatePipelineInput, context: __SerdeContext): any => {
1860
- return {
1861
- ...(input.parameterValues !== undefined &&
1862
- input.parameterValues !== null && {
1863
- parameterValues: serializeAws_json1_1ParameterValueList(input.parameterValues, context),
1864
- }),
1865
- ...(input.pipelineId !== undefined && input.pipelineId !== null && { pipelineId: input.pipelineId }),
1866
- ...(input.startTimestamp !== undefined &&
1867
- input.startTimestamp !== null && { startTimestamp: Math.round(input.startTimestamp.getTime() / 1000) }),
1868
- };
1869
- };
1870
-
1871
- const serializeAws_json1_1AddTagsInput = (input: AddTagsInput, context: __SerdeContext): any => {
1872
- return {
1873
- ...(input.pipelineId !== undefined && input.pipelineId !== null && { pipelineId: input.pipelineId }),
1874
- ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_json1_1tagList(input.tags, context) }),
1875
- };
1876
- };
1877
-
1878
- const serializeAws_json1_1CreatePipelineInput = (input: CreatePipelineInput, context: __SerdeContext): any => {
1879
- return {
1880
- ...(input.description !== undefined && input.description !== null && { description: input.description }),
1881
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
1882
- ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_json1_1tagList(input.tags, context) }),
1883
- ...(input.uniqueId !== undefined && input.uniqueId !== null && { uniqueId: input.uniqueId }),
1884
- };
1885
- };
1886
-
1887
- const serializeAws_json1_1DeactivatePipelineInput = (input: DeactivatePipelineInput, context: __SerdeContext): any => {
1888
- return {
1889
- ...(input.cancelActive !== undefined && input.cancelActive !== null && { cancelActive: input.cancelActive }),
1890
- ...(input.pipelineId !== undefined && input.pipelineId !== null && { pipelineId: input.pipelineId }),
1891
- };
1892
- };
1893
-
1894
- const serializeAws_json1_1DeletePipelineInput = (input: DeletePipelineInput, context: __SerdeContext): any => {
1895
- return {
1896
- ...(input.pipelineId !== undefined && input.pipelineId !== null && { pipelineId: input.pipelineId }),
1897
- };
1898
- };
1899
-
1900
- const serializeAws_json1_1DescribeObjectsInput = (input: DescribeObjectsInput, context: __SerdeContext): any => {
1901
- return {
1902
- ...(input.evaluateExpressions !== undefined &&
1903
- input.evaluateExpressions !== null && { evaluateExpressions: input.evaluateExpressions }),
1904
- ...(input.marker !== undefined && input.marker !== null && { marker: input.marker }),
1905
- ...(input.objectIds !== undefined &&
1906
- input.objectIds !== null && { objectIds: serializeAws_json1_1idList(input.objectIds, context) }),
1907
- ...(input.pipelineId !== undefined && input.pipelineId !== null && { pipelineId: input.pipelineId }),
1908
- };
1909
- };
1910
-
1911
- const serializeAws_json1_1DescribePipelinesInput = (input: DescribePipelinesInput, context: __SerdeContext): any => {
1912
- return {
1913
- ...(input.pipelineIds !== undefined &&
1914
- input.pipelineIds !== null && { pipelineIds: serializeAws_json1_1idList(input.pipelineIds, context) }),
1915
- };
1916
- };
1917
-
1918
- const serializeAws_json1_1EvaluateExpressionInput = (input: EvaluateExpressionInput, context: __SerdeContext): any => {
1919
- return {
1920
- ...(input.expression !== undefined && input.expression !== null && { expression: input.expression }),
1921
- ...(input.objectId !== undefined && input.objectId !== null && { objectId: input.objectId }),
1922
- ...(input.pipelineId !== undefined && input.pipelineId !== null && { pipelineId: input.pipelineId }),
1923
- };
1924
- };
1925
-
1926
- const serializeAws_json1_1Field = (input: Field, context: __SerdeContext): any => {
1927
- return {
1928
- ...(input.key !== undefined && input.key !== null && { key: input.key }),
1929
- ...(input.refValue !== undefined && input.refValue !== null && { refValue: input.refValue }),
1930
- ...(input.stringValue !== undefined && input.stringValue !== null && { stringValue: input.stringValue }),
1931
- };
1932
- };
1933
-
1934
- const serializeAws_json1_1fieldList = (input: Field[], context: __SerdeContext): any => {
1935
- return input
1936
- .filter((e: any) => e != null)
1937
- .map((entry) => {
1938
- if (entry === null) {
1939
- return null as any;
1940
- }
1941
- return serializeAws_json1_1Field(entry, context);
1942
- });
1943
- };
1944
-
1945
- const serializeAws_json1_1GetPipelineDefinitionInput = (
1946
- input: GetPipelineDefinitionInput,
1947
- context: __SerdeContext
1948
- ): any => {
1949
- return {
1950
- ...(input.pipelineId !== undefined && input.pipelineId !== null && { pipelineId: input.pipelineId }),
1951
- ...(input.version !== undefined && input.version !== null && { version: input.version }),
1952
- };
1953
- };
1954
-
1955
- const serializeAws_json1_1idList = (input: string[], context: __SerdeContext): any => {
1956
- return input
1957
- .filter((e: any) => e != null)
1958
- .map((entry) => {
1959
- if (entry === null) {
1960
- return null as any;
1961
- }
1962
- return entry;
1963
- });
1964
- };
1965
-
1966
- const serializeAws_json1_1InstanceIdentity = (input: InstanceIdentity, context: __SerdeContext): any => {
1967
- return {
1968
- ...(input.document !== undefined && input.document !== null && { document: input.document }),
1969
- ...(input.signature !== undefined && input.signature !== null && { signature: input.signature }),
1970
- };
1971
- };
1972
-
1973
- const serializeAws_json1_1ListPipelinesInput = (input: ListPipelinesInput, context: __SerdeContext): any => {
1974
- return {
1975
- ...(input.marker !== undefined && input.marker !== null && { marker: input.marker }),
1976
- };
1977
- };
1978
-
1979
- const serializeAws_json1_1Operator = (input: Operator, context: __SerdeContext): any => {
1980
- return {
1981
- ...(input.type !== undefined && input.type !== null && { type: input.type }),
1982
- ...(input.values !== undefined &&
1983
- input.values !== null && { values: serializeAws_json1_1stringList(input.values, context) }),
1984
- };
1985
- };
1986
-
1987
- const serializeAws_json1_1ParameterAttribute = (input: ParameterAttribute, context: __SerdeContext): any => {
1988
- return {
1989
- ...(input.key !== undefined && input.key !== null && { key: input.key }),
1990
- ...(input.stringValue !== undefined && input.stringValue !== null && { stringValue: input.stringValue }),
1991
- };
1992
- };
1993
-
1994
- const serializeAws_json1_1ParameterAttributeList = (input: ParameterAttribute[], context: __SerdeContext): any => {
1995
- return input
1996
- .filter((e: any) => e != null)
1997
- .map((entry) => {
1998
- if (entry === null) {
1999
- return null as any;
2000
- }
2001
- return serializeAws_json1_1ParameterAttribute(entry, context);
2002
- });
2003
- };
2004
-
2005
- const serializeAws_json1_1ParameterObject = (input: ParameterObject, context: __SerdeContext): any => {
2006
- return {
2007
- ...(input.attributes !== undefined &&
2008
- input.attributes !== null && {
2009
- attributes: serializeAws_json1_1ParameterAttributeList(input.attributes, context),
2010
- }),
2011
- ...(input.id !== undefined && input.id !== null && { id: input.id }),
2012
- };
2013
- };
2014
-
2015
- const serializeAws_json1_1ParameterObjectList = (input: ParameterObject[], context: __SerdeContext): any => {
2016
- return input
2017
- .filter((e: any) => e != null)
2018
- .map((entry) => {
2019
- if (entry === null) {
2020
- return null as any;
2021
- }
2022
- return serializeAws_json1_1ParameterObject(entry, context);
2023
- });
2024
- };
2025
-
2026
- const serializeAws_json1_1ParameterValue = (input: ParameterValue, context: __SerdeContext): any => {
2027
- return {
2028
- ...(input.id !== undefined && input.id !== null && { id: input.id }),
2029
- ...(input.stringValue !== undefined && input.stringValue !== null && { stringValue: input.stringValue }),
2030
- };
2031
- };
2032
-
2033
- const serializeAws_json1_1ParameterValueList = (input: ParameterValue[], context: __SerdeContext): any => {
2034
- return input
2035
- .filter((e: any) => e != null)
2036
- .map((entry) => {
2037
- if (entry === null) {
2038
- return null as any;
2039
- }
2040
- return serializeAws_json1_1ParameterValue(entry, context);
2041
- });
2042
- };
2043
-
2044
- const serializeAws_json1_1PipelineObject = (input: PipelineObject, context: __SerdeContext): any => {
2045
- return {
2046
- ...(input.fields !== undefined &&
2047
- input.fields !== null && { fields: serializeAws_json1_1fieldList(input.fields, context) }),
2048
- ...(input.id !== undefined && input.id !== null && { id: input.id }),
2049
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
2050
- };
2051
- };
2052
-
2053
- const serializeAws_json1_1PipelineObjectList = (input: PipelineObject[], context: __SerdeContext): any => {
2054
- return input
2055
- .filter((e: any) => e != null)
2056
- .map((entry) => {
2057
- if (entry === null) {
2058
- return null as any;
2059
- }
2060
- return serializeAws_json1_1PipelineObject(entry, context);
2061
- });
2062
- };
2063
-
2064
- const serializeAws_json1_1PollForTaskInput = (input: PollForTaskInput, context: __SerdeContext): any => {
2065
- return {
2066
- ...(input.hostname !== undefined && input.hostname !== null && { hostname: input.hostname }),
2067
- ...(input.instanceIdentity !== undefined &&
2068
- input.instanceIdentity !== null && {
2069
- instanceIdentity: serializeAws_json1_1InstanceIdentity(input.instanceIdentity, context),
2070
- }),
2071
- ...(input.workerGroup !== undefined && input.workerGroup !== null && { workerGroup: input.workerGroup }),
2072
- };
2073
- };
2074
-
2075
- const serializeAws_json1_1PutPipelineDefinitionInput = (
2076
- input: PutPipelineDefinitionInput,
2077
- context: __SerdeContext
2078
- ): any => {
2079
- return {
2080
- ...(input.parameterObjects !== undefined &&
2081
- input.parameterObjects !== null && {
2082
- parameterObjects: serializeAws_json1_1ParameterObjectList(input.parameterObjects, context),
2083
- }),
2084
- ...(input.parameterValues !== undefined &&
2085
- input.parameterValues !== null && {
2086
- parameterValues: serializeAws_json1_1ParameterValueList(input.parameterValues, context),
2087
- }),
2088
- ...(input.pipelineId !== undefined && input.pipelineId !== null && { pipelineId: input.pipelineId }),
2089
- ...(input.pipelineObjects !== undefined &&
2090
- input.pipelineObjects !== null && {
2091
- pipelineObjects: serializeAws_json1_1PipelineObjectList(input.pipelineObjects, context),
2092
- }),
2093
- };
2094
- };
2095
-
2096
- const serializeAws_json1_1Query = (input: Query, context: __SerdeContext): any => {
2097
- return {
2098
- ...(input.selectors !== undefined &&
2099
- input.selectors !== null && { selectors: serializeAws_json1_1SelectorList(input.selectors, context) }),
2100
- };
2101
- };
2102
-
2103
- const serializeAws_json1_1QueryObjectsInput = (input: QueryObjectsInput, context: __SerdeContext): any => {
2104
- return {
2105
- ...(input.limit !== undefined && input.limit !== null && { limit: input.limit }),
2106
- ...(input.marker !== undefined && input.marker !== null && { marker: input.marker }),
2107
- ...(input.pipelineId !== undefined && input.pipelineId !== null && { pipelineId: input.pipelineId }),
2108
- ...(input.query !== undefined &&
2109
- input.query !== null && { query: serializeAws_json1_1Query(input.query, context) }),
2110
- ...(input.sphere !== undefined && input.sphere !== null && { sphere: input.sphere }),
2111
- };
2112
- };
2113
-
2114
- const serializeAws_json1_1RemoveTagsInput = (input: RemoveTagsInput, context: __SerdeContext): any => {
2115
- return {
2116
- ...(input.pipelineId !== undefined && input.pipelineId !== null && { pipelineId: input.pipelineId }),
2117
- ...(input.tagKeys !== undefined &&
2118
- input.tagKeys !== null && { tagKeys: serializeAws_json1_1stringList(input.tagKeys, context) }),
2119
- };
2120
- };
2121
-
2122
- const serializeAws_json1_1ReportTaskProgressInput = (input: ReportTaskProgressInput, context: __SerdeContext): any => {
2123
- return {
2124
- ...(input.fields !== undefined &&
2125
- input.fields !== null && { fields: serializeAws_json1_1fieldList(input.fields, context) }),
2126
- ...(input.taskId !== undefined && input.taskId !== null && { taskId: input.taskId }),
2127
- };
2128
- };
2129
-
2130
- const serializeAws_json1_1ReportTaskRunnerHeartbeatInput = (
2131
- input: ReportTaskRunnerHeartbeatInput,
2132
- context: __SerdeContext
2133
- ): any => {
2134
- return {
2135
- ...(input.hostname !== undefined && input.hostname !== null && { hostname: input.hostname }),
2136
- ...(input.taskrunnerId !== undefined && input.taskrunnerId !== null && { taskrunnerId: input.taskrunnerId }),
2137
- ...(input.workerGroup !== undefined && input.workerGroup !== null && { workerGroup: input.workerGroup }),
2138
- };
2139
- };
2140
-
2141
- const serializeAws_json1_1Selector = (input: Selector, context: __SerdeContext): any => {
2142
- return {
2143
- ...(input.fieldName !== undefined && input.fieldName !== null && { fieldName: input.fieldName }),
2144
- ...(input.operator !== undefined &&
2145
- input.operator !== null && { operator: serializeAws_json1_1Operator(input.operator, context) }),
2146
- };
2147
- };
2148
-
2149
- const serializeAws_json1_1SelectorList = (input: Selector[], context: __SerdeContext): any => {
2150
- return input
2151
- .filter((e: any) => e != null)
2152
- .map((entry) => {
2153
- if (entry === null) {
2154
- return null as any;
2155
- }
2156
- return serializeAws_json1_1Selector(entry, context);
2157
- });
2158
- };
2159
-
2160
- const serializeAws_json1_1SetStatusInput = (input: SetStatusInput, context: __SerdeContext): any => {
2161
- return {
2162
- ...(input.objectIds !== undefined &&
2163
- input.objectIds !== null && { objectIds: serializeAws_json1_1idList(input.objectIds, context) }),
2164
- ...(input.pipelineId !== undefined && input.pipelineId !== null && { pipelineId: input.pipelineId }),
2165
- ...(input.status !== undefined && input.status !== null && { status: input.status }),
2166
- };
2167
- };
2168
-
2169
- const serializeAws_json1_1SetTaskStatusInput = (input: SetTaskStatusInput, context: __SerdeContext): any => {
2170
- return {
2171
- ...(input.errorId !== undefined && input.errorId !== null && { errorId: input.errorId }),
2172
- ...(input.errorMessage !== undefined && input.errorMessage !== null && { errorMessage: input.errorMessage }),
2173
- ...(input.errorStackTrace !== undefined &&
2174
- input.errorStackTrace !== null && { errorStackTrace: input.errorStackTrace }),
2175
- ...(input.taskId !== undefined && input.taskId !== null && { taskId: input.taskId }),
2176
- ...(input.taskStatus !== undefined && input.taskStatus !== null && { taskStatus: input.taskStatus }),
2177
- };
2178
- };
2179
-
2180
- const serializeAws_json1_1stringList = (input: string[], context: __SerdeContext): any => {
2181
- return input
2182
- .filter((e: any) => e != null)
2183
- .map((entry) => {
2184
- if (entry === null) {
2185
- return null as any;
2186
- }
2187
- return entry;
2188
- });
2189
- };
2190
-
2191
- const serializeAws_json1_1Tag = (input: Tag, context: __SerdeContext): any => {
2192
- return {
2193
- ...(input.key !== undefined && input.key !== null && { key: input.key }),
2194
- ...(input.value !== undefined && input.value !== null && { value: input.value }),
2195
- };
2196
- };
2197
-
2198
- const serializeAws_json1_1tagList = (input: Tag[], context: __SerdeContext): any => {
2199
- return input
2200
- .filter((e: any) => e != null)
2201
- .map((entry) => {
2202
- if (entry === null) {
2203
- return null as any;
2204
- }
2205
- return serializeAws_json1_1Tag(entry, context);
2206
- });
2207
- };
2208
-
2209
- const serializeAws_json1_1ValidatePipelineDefinitionInput = (
2210
- input: ValidatePipelineDefinitionInput,
2211
- context: __SerdeContext
2212
- ): any => {
2213
- return {
2214
- ...(input.parameterObjects !== undefined &&
2215
- input.parameterObjects !== null && {
2216
- parameterObjects: serializeAws_json1_1ParameterObjectList(input.parameterObjects, context),
2217
- }),
2218
- ...(input.parameterValues !== undefined &&
2219
- input.parameterValues !== null && {
2220
- parameterValues: serializeAws_json1_1ParameterValueList(input.parameterValues, context),
2221
- }),
2222
- ...(input.pipelineId !== undefined && input.pipelineId !== null && { pipelineId: input.pipelineId }),
2223
- ...(input.pipelineObjects !== undefined &&
2224
- input.pipelineObjects !== null && {
2225
- pipelineObjects: serializeAws_json1_1PipelineObjectList(input.pipelineObjects, context),
2226
- }),
2227
- };
2228
- };
2229
-
2230
- const deserializeAws_json1_1ActivatePipelineOutput = (output: any, context: __SerdeContext): ActivatePipelineOutput => {
2231
- return {} as any;
2232
- };
2233
-
2234
- const deserializeAws_json1_1AddTagsOutput = (output: any, context: __SerdeContext): AddTagsOutput => {
2235
- return {} as any;
2236
- };
2237
-
2238
- const deserializeAws_json1_1CreatePipelineOutput = (output: any, context: __SerdeContext): CreatePipelineOutput => {
2239
- return {
2240
- pipelineId: __expectString(output.pipelineId),
2241
- } as any;
2242
- };
2243
-
2244
- const deserializeAws_json1_1DeactivatePipelineOutput = (
2245
- output: any,
2246
- context: __SerdeContext
2247
- ): DeactivatePipelineOutput => {
2248
- return {} as any;
2249
- };
2250
-
2251
- const deserializeAws_json1_1DescribeObjectsOutput = (output: any, context: __SerdeContext): DescribeObjectsOutput => {
2252
- return {
2253
- hasMoreResults: __expectBoolean(output.hasMoreResults),
2254
- marker: __expectString(output.marker),
2255
- pipelineObjects:
2256
- output.pipelineObjects !== undefined && output.pipelineObjects !== null
2257
- ? deserializeAws_json1_1PipelineObjectList(output.pipelineObjects, context)
2258
- : undefined,
2259
- } as any;
2260
- };
2261
-
2262
- const deserializeAws_json1_1DescribePipelinesOutput = (
2263
- output: any,
2264
- context: __SerdeContext
2265
- ): DescribePipelinesOutput => {
2266
- return {
2267
- pipelineDescriptionList:
2268
- output.pipelineDescriptionList !== undefined && output.pipelineDescriptionList !== null
2269
- ? deserializeAws_json1_1PipelineDescriptionList(output.pipelineDescriptionList, context)
2270
- : undefined,
2271
- } as any;
2272
- };
2273
-
2274
- const deserializeAws_json1_1EvaluateExpressionOutput = (
2275
- output: any,
2276
- context: __SerdeContext
2277
- ): EvaluateExpressionOutput => {
2278
- return {
2279
- evaluatedExpression: __expectString(output.evaluatedExpression),
2280
- } as any;
2281
- };
2282
-
2283
- const deserializeAws_json1_1Field = (output: any, context: __SerdeContext): Field => {
2284
- return {
2285
- key: __expectString(output.key),
2286
- refValue: __expectString(output.refValue),
2287
- stringValue: __expectString(output.stringValue),
2288
- } as any;
2289
- };
2290
-
2291
- const deserializeAws_json1_1fieldList = (output: any, context: __SerdeContext): Field[] => {
2292
- return (output || [])
2293
- .filter((e: any) => e != null)
2294
- .map((entry: any) => {
2295
- if (entry === null) {
2296
- return null as any;
2297
- }
2298
- return deserializeAws_json1_1Field(entry, context);
2299
- });
2300
- };
2301
-
2302
- const deserializeAws_json1_1GetPipelineDefinitionOutput = (
2303
- output: any,
2304
- context: __SerdeContext
2305
- ): GetPipelineDefinitionOutput => {
2306
- return {
2307
- parameterObjects:
2308
- output.parameterObjects !== undefined && output.parameterObjects !== null
2309
- ? deserializeAws_json1_1ParameterObjectList(output.parameterObjects, context)
2310
- : undefined,
2311
- parameterValues:
2312
- output.parameterValues !== undefined && output.parameterValues !== null
2313
- ? deserializeAws_json1_1ParameterValueList(output.parameterValues, context)
2314
- : undefined,
2315
- pipelineObjects:
2316
- output.pipelineObjects !== undefined && output.pipelineObjects !== null
2317
- ? deserializeAws_json1_1PipelineObjectList(output.pipelineObjects, context)
2318
- : undefined,
2319
- } as any;
2320
- };
2321
-
2322
- const deserializeAws_json1_1idList = (output: any, context: __SerdeContext): string[] => {
2323
- return (output || [])
2324
- .filter((e: any) => e != null)
2325
- .map((entry: any) => {
2326
- if (entry === null) {
2327
- return null as any;
2328
- }
2329
- return __expectString(entry) as any;
2330
- });
2331
- };
2332
-
2333
- const deserializeAws_json1_1InternalServiceError = (output: any, context: __SerdeContext): InternalServiceError => {
2334
- return {
2335
- message: __expectString(output.message),
2336
- } as any;
2337
- };
2338
-
2339
- const deserializeAws_json1_1InvalidRequestException = (
2340
- output: any,
2341
- context: __SerdeContext
2342
- ): InvalidRequestException => {
2343
- return {
2344
- message: __expectString(output.message),
2345
- } as any;
2346
- };
2347
-
2348
- const deserializeAws_json1_1ListPipelinesOutput = (output: any, context: __SerdeContext): ListPipelinesOutput => {
2349
- return {
2350
- hasMoreResults: __expectBoolean(output.hasMoreResults),
2351
- marker: __expectString(output.marker),
2352
- pipelineIdList:
2353
- output.pipelineIdList !== undefined && output.pipelineIdList !== null
2354
- ? deserializeAws_json1_1pipelineList(output.pipelineIdList, context)
2355
- : undefined,
2356
- } as any;
2357
- };
2358
-
2359
- const deserializeAws_json1_1ParameterAttribute = (output: any, context: __SerdeContext): ParameterAttribute => {
2360
- return {
2361
- key: __expectString(output.key),
2362
- stringValue: __expectString(output.stringValue),
2363
- } as any;
2364
- };
2365
-
2366
- const deserializeAws_json1_1ParameterAttributeList = (output: any, context: __SerdeContext): ParameterAttribute[] => {
2367
- return (output || [])
2368
- .filter((e: any) => e != null)
2369
- .map((entry: any) => {
2370
- if (entry === null) {
2371
- return null as any;
2372
- }
2373
- return deserializeAws_json1_1ParameterAttribute(entry, context);
2374
- });
2375
- };
2376
-
2377
- const deserializeAws_json1_1ParameterObject = (output: any, context: __SerdeContext): ParameterObject => {
2378
- return {
2379
- attributes:
2380
- output.attributes !== undefined && output.attributes !== null
2381
- ? deserializeAws_json1_1ParameterAttributeList(output.attributes, context)
2382
- : undefined,
2383
- id: __expectString(output.id),
2384
- } as any;
2385
- };
2386
-
2387
- const deserializeAws_json1_1ParameterObjectList = (output: any, context: __SerdeContext): ParameterObject[] => {
2388
- return (output || [])
2389
- .filter((e: any) => e != null)
2390
- .map((entry: any) => {
2391
- if (entry === null) {
2392
- return null as any;
2393
- }
2394
- return deserializeAws_json1_1ParameterObject(entry, context);
2395
- });
2396
- };
2397
-
2398
- const deserializeAws_json1_1ParameterValue = (output: any, context: __SerdeContext): ParameterValue => {
2399
- return {
2400
- id: __expectString(output.id),
2401
- stringValue: __expectString(output.stringValue),
2402
- } as any;
2403
- };
2404
-
2405
- const deserializeAws_json1_1ParameterValueList = (output: any, context: __SerdeContext): ParameterValue[] => {
2406
- return (output || [])
2407
- .filter((e: any) => e != null)
2408
- .map((entry: any) => {
2409
- if (entry === null) {
2410
- return null as any;
2411
- }
2412
- return deserializeAws_json1_1ParameterValue(entry, context);
2413
- });
2414
- };
2415
-
2416
- const deserializeAws_json1_1PipelineDeletedException = (
2417
- output: any,
2418
- context: __SerdeContext
2419
- ): PipelineDeletedException => {
2420
- return {
2421
- message: __expectString(output.message),
2422
- } as any;
2423
- };
2424
-
2425
- const deserializeAws_json1_1PipelineDescription = (output: any, context: __SerdeContext): PipelineDescription => {
2426
- return {
2427
- description: __expectString(output.description),
2428
- fields:
2429
- output.fields !== undefined && output.fields !== null
2430
- ? deserializeAws_json1_1fieldList(output.fields, context)
2431
- : undefined,
2432
- name: __expectString(output.name),
2433
- pipelineId: __expectString(output.pipelineId),
2434
- tags:
2435
- output.tags !== undefined && output.tags !== null
2436
- ? deserializeAws_json1_1tagList(output.tags, context)
2437
- : undefined,
2438
- } as any;
2439
- };
2440
-
2441
- const deserializeAws_json1_1PipelineDescriptionList = (output: any, context: __SerdeContext): PipelineDescription[] => {
2442
- return (output || [])
2443
- .filter((e: any) => e != null)
2444
- .map((entry: any) => {
2445
- if (entry === null) {
2446
- return null as any;
2447
- }
2448
- return deserializeAws_json1_1PipelineDescription(entry, context);
2449
- });
2450
- };
2451
-
2452
- const deserializeAws_json1_1PipelineIdName = (output: any, context: __SerdeContext): PipelineIdName => {
2453
- return {
2454
- id: __expectString(output.id),
2455
- name: __expectString(output.name),
2456
- } as any;
2457
- };
2458
-
2459
- const deserializeAws_json1_1pipelineList = (output: any, context: __SerdeContext): PipelineIdName[] => {
2460
- return (output || [])
2461
- .filter((e: any) => e != null)
2462
- .map((entry: any) => {
2463
- if (entry === null) {
2464
- return null as any;
2465
- }
2466
- return deserializeAws_json1_1PipelineIdName(entry, context);
2467
- });
2468
- };
2469
-
2470
- const deserializeAws_json1_1PipelineNotFoundException = (
2471
- output: any,
2472
- context: __SerdeContext
2473
- ): PipelineNotFoundException => {
2474
- return {
2475
- message: __expectString(output.message),
2476
- } as any;
2477
- };
2478
-
2479
- const deserializeAws_json1_1PipelineObject = (output: any, context: __SerdeContext): PipelineObject => {
2480
- return {
2481
- fields:
2482
- output.fields !== undefined && output.fields !== null
2483
- ? deserializeAws_json1_1fieldList(output.fields, context)
2484
- : undefined,
2485
- id: __expectString(output.id),
2486
- name: __expectString(output.name),
2487
- } as any;
2488
- };
2489
-
2490
- const deserializeAws_json1_1PipelineObjectList = (output: any, context: __SerdeContext): PipelineObject[] => {
2491
- return (output || [])
2492
- .filter((e: any) => e != null)
2493
- .map((entry: any) => {
2494
- if (entry === null) {
2495
- return null as any;
2496
- }
2497
- return deserializeAws_json1_1PipelineObject(entry, context);
2498
- });
2499
- };
2500
-
2501
- const deserializeAws_json1_1PipelineObjectMap = (
2502
- output: any,
2503
- context: __SerdeContext
2504
- ): { [key: string]: PipelineObject } => {
2505
- return Object.entries(output).reduce((acc: { [key: string]: PipelineObject }, [key, value]: [string, any]) => {
2506
- if (value === null) {
2507
- return acc;
2508
- }
2509
- return {
2510
- ...acc,
2511
- [key]: deserializeAws_json1_1PipelineObject(value, context),
2512
- };
2513
- }, {});
2514
- };
2515
-
2516
- const deserializeAws_json1_1PollForTaskOutput = (output: any, context: __SerdeContext): PollForTaskOutput => {
2517
- return {
2518
- taskObject:
2519
- output.taskObject !== undefined && output.taskObject !== null
2520
- ? deserializeAws_json1_1TaskObject(output.taskObject, context)
2521
- : undefined,
2522
- } as any;
2523
- };
2524
-
2525
- const deserializeAws_json1_1PutPipelineDefinitionOutput = (
2526
- output: any,
2527
- context: __SerdeContext
2528
- ): PutPipelineDefinitionOutput => {
2529
- return {
2530
- errored: __expectBoolean(output.errored),
2531
- validationErrors:
2532
- output.validationErrors !== undefined && output.validationErrors !== null
2533
- ? deserializeAws_json1_1ValidationErrors(output.validationErrors, context)
2534
- : undefined,
2535
- validationWarnings:
2536
- output.validationWarnings !== undefined && output.validationWarnings !== null
2537
- ? deserializeAws_json1_1ValidationWarnings(output.validationWarnings, context)
2538
- : undefined,
2539
- } as any;
2540
- };
2541
-
2542
- const deserializeAws_json1_1QueryObjectsOutput = (output: any, context: __SerdeContext): QueryObjectsOutput => {
2543
- return {
2544
- hasMoreResults: __expectBoolean(output.hasMoreResults),
2545
- ids:
2546
- output.ids !== undefined && output.ids !== null ? deserializeAws_json1_1idList(output.ids, context) : undefined,
2547
- marker: __expectString(output.marker),
2548
- } as any;
2549
- };
2550
-
2551
- const deserializeAws_json1_1RemoveTagsOutput = (output: any, context: __SerdeContext): RemoveTagsOutput => {
2552
- return {} as any;
2553
- };
2554
-
2555
- const deserializeAws_json1_1ReportTaskProgressOutput = (
2556
- output: any,
2557
- context: __SerdeContext
2558
- ): ReportTaskProgressOutput => {
2559
- return {
2560
- canceled: __expectBoolean(output.canceled),
2561
- } as any;
2562
- };
2563
-
2564
- const deserializeAws_json1_1ReportTaskRunnerHeartbeatOutput = (
2565
- output: any,
2566
- context: __SerdeContext
2567
- ): ReportTaskRunnerHeartbeatOutput => {
2568
- return {
2569
- terminate: __expectBoolean(output.terminate),
2570
- } as any;
2571
- };
2572
-
2573
- const deserializeAws_json1_1SetTaskStatusOutput = (output: any, context: __SerdeContext): SetTaskStatusOutput => {
2574
- return {} as any;
2575
- };
2576
-
2577
- const deserializeAws_json1_1Tag = (output: any, context: __SerdeContext): Tag => {
2578
- return {
2579
- key: __expectString(output.key),
2580
- value: __expectString(output.value),
2581
- } as any;
2582
- };
2583
-
2584
- const deserializeAws_json1_1tagList = (output: any, context: __SerdeContext): Tag[] => {
2585
- return (output || [])
2586
- .filter((e: any) => e != null)
2587
- .map((entry: any) => {
2588
- if (entry === null) {
2589
- return null as any;
2590
- }
2591
- return deserializeAws_json1_1Tag(entry, context);
2592
- });
2593
- };
2594
-
2595
- const deserializeAws_json1_1TaskNotFoundException = (output: any, context: __SerdeContext): TaskNotFoundException => {
2596
- return {
2597
- message: __expectString(output.message),
2598
- } as any;
2599
- };
2600
-
2601
- const deserializeAws_json1_1TaskObject = (output: any, context: __SerdeContext): TaskObject => {
2602
- return {
2603
- attemptId: __expectString(output.attemptId),
2604
- objects:
2605
- output.objects !== undefined && output.objects !== null
2606
- ? deserializeAws_json1_1PipelineObjectMap(output.objects, context)
2607
- : undefined,
2608
- pipelineId: __expectString(output.pipelineId),
2609
- taskId: __expectString(output.taskId),
2610
- } as any;
2611
- };
2612
-
2613
- const deserializeAws_json1_1ValidatePipelineDefinitionOutput = (
2614
- output: any,
2615
- context: __SerdeContext
2616
- ): ValidatePipelineDefinitionOutput => {
2617
- return {
2618
- errored: __expectBoolean(output.errored),
2619
- validationErrors:
2620
- output.validationErrors !== undefined && output.validationErrors !== null
2621
- ? deserializeAws_json1_1ValidationErrors(output.validationErrors, context)
2622
- : undefined,
2623
- validationWarnings:
2624
- output.validationWarnings !== undefined && output.validationWarnings !== null
2625
- ? deserializeAws_json1_1ValidationWarnings(output.validationWarnings, context)
2626
- : undefined,
2627
- } as any;
2628
- };
2629
-
2630
- const deserializeAws_json1_1ValidationError = (output: any, context: __SerdeContext): ValidationError => {
2631
- return {
2632
- errors:
2633
- output.errors !== undefined && output.errors !== null
2634
- ? deserializeAws_json1_1validationMessages(output.errors, context)
2635
- : undefined,
2636
- id: __expectString(output.id),
2637
- } as any;
2638
- };
2639
-
2640
- const deserializeAws_json1_1ValidationErrors = (output: any, context: __SerdeContext): ValidationError[] => {
2641
- return (output || [])
2642
- .filter((e: any) => e != null)
2643
- .map((entry: any) => {
2644
- if (entry === null) {
2645
- return null as any;
2646
- }
2647
- return deserializeAws_json1_1ValidationError(entry, context);
2648
- });
2649
- };
2650
-
2651
- const deserializeAws_json1_1validationMessages = (output: any, context: __SerdeContext): string[] => {
2652
- return (output || [])
2653
- .filter((e: any) => e != null)
2654
- .map((entry: any) => {
2655
- if (entry === null) {
2656
- return null as any;
2657
- }
2658
- return __expectString(entry) as any;
2659
- });
2660
- };
2661
-
2662
- const deserializeAws_json1_1ValidationWarning = (output: any, context: __SerdeContext): ValidationWarning => {
2663
- return {
2664
- id: __expectString(output.id),
2665
- warnings:
2666
- output.warnings !== undefined && output.warnings !== null
2667
- ? deserializeAws_json1_1validationMessages(output.warnings, context)
2668
- : undefined,
2669
- } as any;
2670
- };
2671
-
2672
- const deserializeAws_json1_1ValidationWarnings = (output: any, context: __SerdeContext): ValidationWarning[] => {
2673
- return (output || [])
2674
- .filter((e: any) => e != null)
2675
- .map((entry: any) => {
2676
- if (entry === null) {
2677
- return null as any;
2678
- }
2679
- return deserializeAws_json1_1ValidationWarning(entry, context);
2680
- });
2681
- };
2682
-
2683
- const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({
2684
- httpStatusCode: output.statusCode,
2685
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
2686
- extendedRequestId: output.headers["x-amz-id-2"],
2687
- cfId: output.headers["x-amz-cf-id"],
2688
- });
2689
-
2690
- // Collect low-level response body stream to Uint8Array.
2691
- const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext): Promise<Uint8Array> => {
2692
- if (streamBody instanceof Uint8Array) {
2693
- return Promise.resolve(streamBody);
2694
- }
2695
- return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
2696
- };
2697
-
2698
- // Encode Uint8Array data into string with utf-8.
2699
- const collectBodyString = (streamBody: any, context: __SerdeContext): Promise<string> =>
2700
- collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
2701
-
2702
- const buildHttpRpcRequest = async (
2703
- context: __SerdeContext,
2704
- headers: __HeaderBag,
2705
- path: string,
2706
- resolvedHostname: string | undefined,
2707
- body: any
2708
- ): Promise<__HttpRequest> => {
2709
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2710
- const contents: any = {
2711
- protocol,
2712
- hostname,
2713
- port,
2714
- method: "POST",
2715
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
2716
- headers,
2717
- };
2718
- if (resolvedHostname !== undefined) {
2719
- contents.hostname = resolvedHostname;
2720
- }
2721
- if (body !== undefined) {
2722
- contents.body = body;
2723
- }
2724
- return new __HttpRequest(contents);
2725
- };
2726
-
2727
- const parseBody = (streamBody: any, context: __SerdeContext): any =>
2728
- collectBodyString(streamBody, context).then((encoded) => {
2729
- if (encoded.length) {
2730
- return JSON.parse(encoded);
2731
- }
2732
- return {};
2733
- });
2734
-
2735
- /**
2736
- * Load an error code for the aws.rest-json-1.1 protocol.
2737
- */
2738
- const loadRestJsonErrorCode = (output: __HttpResponse, data: any): string => {
2739
- const findKey = (object: any, key: string) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
2740
-
2741
- const sanitizeErrorCode = (rawValue: string): string => {
2742
- let cleanValue = rawValue;
2743
- if (cleanValue.indexOf(":") >= 0) {
2744
- cleanValue = cleanValue.split(":")[0];
2745
- }
2746
- if (cleanValue.indexOf("#") >= 0) {
2747
- cleanValue = cleanValue.split("#")[1];
2748
- }
2749
- return cleanValue;
2750
- };
2751
-
2752
- const headerKey = findKey(output.headers, "x-amzn-errortype");
2753
- if (headerKey !== undefined) {
2754
- return sanitizeErrorCode(output.headers[headerKey]);
2755
- }
2756
-
2757
- if (data.code !== undefined) {
2758
- return sanitizeErrorCode(data.code);
2759
- }
2760
-
2761
- if (data["__type"] !== undefined) {
2762
- return sanitizeErrorCode(data["__type"]);
2763
- }
2764
-
2765
- return "";
2766
- };