@aws-sdk/client-sfn 3.34.0 → 3.37.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 (315) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/{dist/cjs → dist-cjs}/SFN.js +1 -20
  3. package/dist-cjs/SFNClient.js +35 -0
  4. package/dist-cjs/commands/CreateActivityCommand.js +36 -0
  5. package/dist-cjs/commands/CreateStateMachineCommand.js +36 -0
  6. package/{dist/cjs → dist-cjs}/commands/DeleteActivityCommand.js +2 -27
  7. package/{dist/cjs → dist-cjs}/commands/DeleteStateMachineCommand.js +2 -33
  8. package/{dist/cjs → dist-cjs}/commands/DescribeActivityCommand.js +2 -30
  9. package/{dist/cjs → dist-cjs}/commands/DescribeExecutionCommand.js +2 -31
  10. package/{dist/cjs → dist-cjs}/commands/DescribeStateMachineCommand.js +2 -30
  11. package/{dist/cjs → dist-cjs}/commands/DescribeStateMachineForExecutionCommand.js +2 -31
  12. package/dist-cjs/commands/GetActivityTaskCommand.js +36 -0
  13. package/dist-cjs/commands/GetExecutionHistoryCommand.js +36 -0
  14. package/{dist/cjs → dist-cjs}/commands/ListActivitiesCommand.js +2 -32
  15. package/dist-cjs/commands/ListExecutionsCommand.js +36 -0
  16. package/{dist/cjs → dist-cjs}/commands/ListStateMachinesCommand.js +2 -32
  17. package/{dist/cjs → dist-cjs}/commands/ListTagsForResourceCommand.js +2 -28
  18. package/{dist/cjs → dist-cjs}/commands/SendTaskFailureCommand.js +2 -28
  19. package/dist-cjs/commands/SendTaskHeartbeatCommand.js +36 -0
  20. package/{dist/cjs → dist-cjs}/commands/SendTaskSuccessCommand.js +2 -29
  21. package/{dist/cjs → dist-cjs}/commands/StartExecutionCommand.js +2 -35
  22. package/{dist/cjs → dist-cjs}/commands/StartSyncExecutionCommand.js +2 -27
  23. package/{dist/cjs → dist-cjs}/commands/StopExecutionCommand.js +2 -28
  24. package/{dist/cjs → dist-cjs}/commands/TagResourceCommand.js +2 -32
  25. package/{dist/cjs → dist-cjs}/commands/UntagResourceCommand.js +2 -27
  26. package/dist-cjs/commands/UpdateStateMachineCommand.js +36 -0
  27. package/{dist/cjs → dist-cjs}/endpoints.js +1 -2
  28. package/{dist/cjs → dist-cjs}/index.js +0 -1
  29. package/{dist/cjs → dist-cjs}/models/index.js +0 -1
  30. package/{dist/cjs → dist-cjs}/models/models_0.js +0 -334
  31. package/{dist/cjs → dist-cjs}/pagination/GetExecutionHistoryPaginator.js +1 -12
  32. package/{dist/cjs → dist-cjs}/pagination/Interfaces.js +0 -1
  33. package/{dist/cjs → dist-cjs}/pagination/ListActivitiesPaginator.js +1 -12
  34. package/{dist/cjs → dist-cjs}/pagination/ListExecutionsPaginator.js +1 -12
  35. package/{dist/cjs → dist-cjs}/pagination/ListStateMachinesPaginator.js +1 -12
  36. package/{dist/cjs → dist-cjs}/protocols/Aws_json1_0.js +0 -6
  37. package/{dist/cjs → dist-cjs}/runtimeConfig.browser.js +1 -5
  38. package/{dist/cjs → dist-cjs}/runtimeConfig.js +1 -5
  39. package/{dist/cjs → dist-cjs}/runtimeConfig.native.js +0 -4
  40. package/{dist/cjs → dist-cjs}/runtimeConfig.shared.js +1 -5
  41. package/{dist/es → dist-es}/SFN.js +1 -2
  42. package/{dist/es → dist-es}/SFNClient.js +1 -2
  43. package/{dist/es → dist-es}/commands/CreateActivityCommand.js +2 -3
  44. package/{dist/es → dist-es}/commands/CreateStateMachineCommand.js +2 -3
  45. package/{dist/es → dist-es}/commands/DeleteActivityCommand.js +2 -3
  46. package/{dist/es → dist-es}/commands/DeleteStateMachineCommand.js +2 -3
  47. package/{dist/es → dist-es}/commands/DescribeActivityCommand.js +2 -3
  48. package/{dist/es → dist-es}/commands/DescribeExecutionCommand.js +2 -3
  49. package/{dist/es → dist-es}/commands/DescribeStateMachineCommand.js +2 -3
  50. package/{dist/es → dist-es}/commands/DescribeStateMachineForExecutionCommand.js +2 -3
  51. package/{dist/es → dist-es}/commands/GetActivityTaskCommand.js +2 -3
  52. package/{dist/es → dist-es}/commands/GetExecutionHistoryCommand.js +2 -3
  53. package/{dist/es → dist-es}/commands/ListActivitiesCommand.js +2 -3
  54. package/{dist/es → dist-es}/commands/ListExecutionsCommand.js +2 -3
  55. package/{dist/es → dist-es}/commands/ListStateMachinesCommand.js +2 -3
  56. package/{dist/es → dist-es}/commands/ListTagsForResourceCommand.js +2 -3
  57. package/{dist/es → dist-es}/commands/SendTaskFailureCommand.js +2 -3
  58. package/{dist/es → dist-es}/commands/SendTaskHeartbeatCommand.js +2 -3
  59. package/{dist/es → dist-es}/commands/SendTaskSuccessCommand.js +2 -3
  60. package/{dist/es → dist-es}/commands/StartExecutionCommand.js +2 -3
  61. package/{dist/es → dist-es}/commands/StartSyncExecutionCommand.js +2 -3
  62. package/{dist/es → dist-es}/commands/StopExecutionCommand.js +2 -3
  63. package/{dist/es → dist-es}/commands/TagResourceCommand.js +2 -3
  64. package/{dist/es → dist-es}/commands/UntagResourceCommand.js +2 -3
  65. package/{dist/es → dist-es}/commands/UpdateStateMachineCommand.js +2 -3
  66. package/{dist/es → dist-es}/endpoints.js +1 -2
  67. package/{dist/types/index.d.ts → dist-es/index.js} +0 -0
  68. package/{dist/types/models/index.d.ts → dist-es/models/index.js} +0 -0
  69. package/{dist/es → dist-es}/models/models_0.js +0 -1
  70. package/{dist/es → dist-es}/pagination/GetExecutionHistoryPaginator.js +1 -2
  71. package/dist-es/pagination/Interfaces.js +1 -0
  72. package/{dist/es → dist-es}/pagination/ListActivitiesPaginator.js +1 -2
  73. package/{dist/es → dist-es}/pagination/ListExecutionsPaginator.js +1 -2
  74. package/{dist/es → dist-es}/pagination/ListStateMachinesPaginator.js +1 -2
  75. package/{dist/es → dist-es}/protocols/Aws_json1_0.js +0 -1
  76. package/{dist/es → dist-es}/runtimeConfig.browser.js +1 -2
  77. package/{dist/es → dist-es}/runtimeConfig.js +1 -2
  78. package/{dist/es → dist-es}/runtimeConfig.native.js +0 -1
  79. package/{dist/es → dist-es}/runtimeConfig.shared.js +1 -2
  80. package/{dist/types → dist-types}/SFN.d.ts +2 -2
  81. package/{dist/types → dist-types}/SFNClient.d.ts +8 -8
  82. package/{dist/types → dist-types}/commands/CreateActivityCommand.d.ts +3 -3
  83. package/{dist/types → dist-types}/commands/CreateStateMachineCommand.d.ts +3 -3
  84. package/{dist/types → dist-types}/commands/DeleteActivityCommand.d.ts +3 -3
  85. package/{dist/types → dist-types}/commands/DeleteStateMachineCommand.d.ts +3 -3
  86. package/{dist/types → dist-types}/commands/DescribeActivityCommand.d.ts +3 -3
  87. package/{dist/types → dist-types}/commands/DescribeExecutionCommand.d.ts +3 -3
  88. package/{dist/types → dist-types}/commands/DescribeStateMachineCommand.d.ts +3 -3
  89. package/{dist/types → dist-types}/commands/DescribeStateMachineForExecutionCommand.d.ts +3 -3
  90. package/{dist/types → dist-types}/commands/GetActivityTaskCommand.d.ts +3 -3
  91. package/{dist/types → dist-types}/commands/GetExecutionHistoryCommand.d.ts +3 -3
  92. package/{dist/types → dist-types}/commands/ListActivitiesCommand.d.ts +3 -3
  93. package/{dist/types → dist-types}/commands/ListExecutionsCommand.d.ts +3 -3
  94. package/{dist/types → dist-types}/commands/ListStateMachinesCommand.d.ts +3 -3
  95. package/{dist/types → dist-types}/commands/ListTagsForResourceCommand.d.ts +3 -3
  96. package/{dist/types → dist-types}/commands/SendTaskFailureCommand.d.ts +3 -3
  97. package/{dist/types → dist-types}/commands/SendTaskHeartbeatCommand.d.ts +3 -3
  98. package/{dist/types → dist-types}/commands/SendTaskSuccessCommand.d.ts +3 -3
  99. package/{dist/types → dist-types}/commands/StartExecutionCommand.d.ts +3 -3
  100. package/{dist/types → dist-types}/commands/StartSyncExecutionCommand.d.ts +3 -3
  101. package/{dist/types → dist-types}/commands/StopExecutionCommand.d.ts +3 -3
  102. package/{dist/types → dist-types}/commands/TagResourceCommand.d.ts +3 -3
  103. package/{dist/types → dist-types}/commands/UntagResourceCommand.d.ts +3 -3
  104. package/{dist/types → dist-types}/commands/UpdateStateMachineCommand.d.ts +3 -3
  105. package/{dist/types → dist-types}/endpoints.d.ts +0 -0
  106. package/{index.ts → dist-types/index.d.ts} +0 -0
  107. package/{models/index.ts → dist-types/models/index.d.ts} +0 -0
  108. package/{dist/types → dist-types}/models/models_0.d.ts +0 -0
  109. package/{dist/types → dist-types}/pagination/GetExecutionHistoryPaginator.d.ts +1 -1
  110. package/{dist/types → dist-types}/pagination/Interfaces.d.ts +1 -1
  111. package/{dist/types → dist-types}/pagination/ListActivitiesPaginator.d.ts +1 -1
  112. package/{dist/types → dist-types}/pagination/ListExecutionsPaginator.d.ts +1 -1
  113. package/{dist/types → dist-types}/pagination/ListStateMachinesPaginator.d.ts +1 -1
  114. package/{dist/types → dist-types}/protocols/Aws_json1_0.d.ts +2 -2
  115. package/{dist/types → dist-types}/runtimeConfig.browser.d.ts +0 -0
  116. package/{dist/types → dist-types}/runtimeConfig.d.ts +1 -1
  117. package/{dist/types → dist-types}/runtimeConfig.native.d.ts +0 -0
  118. package/{dist/types → dist-types}/runtimeConfig.shared.d.ts +0 -0
  119. package/dist-types/ts3.4/SFN.d.ts +120 -0
  120. package/{dist/types → dist-types}/ts3.4/SFNClient.d.ts +32 -112
  121. package/dist-types/ts3.4/commands/CreateActivityCommand.d.ts +17 -0
  122. package/dist-types/ts3.4/commands/CreateStateMachineCommand.d.ts +17 -0
  123. package/dist-types/ts3.4/commands/DeleteActivityCommand.d.ts +17 -0
  124. package/dist-types/ts3.4/commands/DeleteStateMachineCommand.d.ts +17 -0
  125. package/dist-types/ts3.4/commands/DescribeActivityCommand.d.ts +17 -0
  126. package/dist-types/ts3.4/commands/DescribeExecutionCommand.d.ts +17 -0
  127. package/dist-types/ts3.4/commands/DescribeStateMachineCommand.d.ts +17 -0
  128. package/dist-types/ts3.4/commands/DescribeStateMachineForExecutionCommand.d.ts +17 -0
  129. package/dist-types/ts3.4/commands/GetActivityTaskCommand.d.ts +17 -0
  130. package/dist-types/ts3.4/commands/GetExecutionHistoryCommand.d.ts +17 -0
  131. package/dist-types/ts3.4/commands/ListActivitiesCommand.d.ts +17 -0
  132. package/dist-types/ts3.4/commands/ListExecutionsCommand.d.ts +17 -0
  133. package/dist-types/ts3.4/commands/ListStateMachinesCommand.d.ts +17 -0
  134. package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +17 -0
  135. package/dist-types/ts3.4/commands/SendTaskFailureCommand.d.ts +17 -0
  136. package/dist-types/ts3.4/commands/SendTaskHeartbeatCommand.d.ts +17 -0
  137. package/dist-types/ts3.4/commands/SendTaskSuccessCommand.d.ts +17 -0
  138. package/dist-types/ts3.4/commands/StartExecutionCommand.d.ts +17 -0
  139. package/dist-types/ts3.4/commands/StartSyncExecutionCommand.d.ts +17 -0
  140. package/dist-types/ts3.4/commands/StopExecutionCommand.d.ts +17 -0
  141. package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +17 -0
  142. package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +17 -0
  143. package/dist-types/ts3.4/commands/UpdateStateMachineCommand.d.ts +17 -0
  144. package/{dist/types → dist-types}/ts3.4/endpoints.d.ts +0 -0
  145. package/{dist/types → dist-types}/ts3.4/index.d.ts +0 -0
  146. package/{dist/types → dist-types}/ts3.4/models/index.d.ts +0 -0
  147. package/dist-types/ts3.4/models/models_0.d.ts +1331 -0
  148. package/{dist/types → dist-types}/ts3.4/pagination/GetExecutionHistoryPaginator.d.ts +1 -1
  149. package/{dist/types → dist-types}/ts3.4/pagination/Interfaces.d.ts +1 -1
  150. package/{dist/types → dist-types}/ts3.4/pagination/ListActivitiesPaginator.d.ts +1 -1
  151. package/{dist/types → dist-types}/ts3.4/pagination/ListExecutionsPaginator.d.ts +1 -1
  152. package/{dist/types → dist-types}/ts3.4/pagination/ListStateMachinesPaginator.d.ts +1 -1
  153. package/{dist/types → dist-types}/ts3.4/protocols/Aws_json1_0.d.ts +2 -2
  154. package/{dist/types → dist-types}/ts3.4/runtimeConfig.browser.d.ts +1 -3
  155. package/{dist/types → dist-types}/ts3.4/runtimeConfig.d.ts +2 -4
  156. package/{dist/types → dist-types}/ts3.4/runtimeConfig.native.d.ts +1 -3
  157. package/{dist/types → dist-types}/ts3.4/runtimeConfig.shared.d.ts +1 -3
  158. package/package.json +45 -42
  159. package/SFN.ts +0 -993
  160. package/SFNClient.ts +0 -331
  161. package/commands/CreateActivityCommand.ts +0 -110
  162. package/commands/CreateStateMachineCommand.ts +0 -112
  163. package/commands/DeleteActivityCommand.ts +0 -94
  164. package/commands/DeleteStateMachineCommand.ts +0 -100
  165. package/commands/DescribeActivityCommand.ts +0 -97
  166. package/commands/DescribeExecutionCommand.ts +0 -98
  167. package/commands/DescribeStateMachineCommand.ts +0 -97
  168. package/commands/DescribeStateMachineForExecutionCommand.ts +0 -106
  169. package/commands/GetActivityTaskCommand.ts +0 -106
  170. package/commands/GetExecutionHistoryCommand.ts +0 -99
  171. package/commands/ListActivitiesCommand.ts +0 -99
  172. package/commands/ListExecutionsCommand.ts +0 -101
  173. package/commands/ListStateMachinesCommand.ts +0 -99
  174. package/commands/ListTagsForResourceCommand.ts +0 -95
  175. package/commands/SendTaskFailureCommand.ts +0 -95
  176. package/commands/SendTaskHeartbeatCommand.ts +0 -108
  177. package/commands/SendTaskSuccessCommand.ts +0 -96
  178. package/commands/StartExecutionCommand.ts +0 -102
  179. package/commands/StartSyncExecutionCommand.ts +0 -94
  180. package/commands/StopExecutionCommand.ts +0 -95
  181. package/commands/TagResourceCommand.ts +0 -99
  182. package/commands/UntagResourceCommand.ts +0 -94
  183. package/commands/UpdateStateMachineCommand.ts +0 -104
  184. package/dist/cjs/SFN.js.map +0 -1
  185. package/dist/cjs/SFNClient.js +0 -59
  186. package/dist/cjs/SFNClient.js.map +0 -1
  187. package/dist/cjs/commands/CreateActivityCommand.js +0 -77
  188. package/dist/cjs/commands/CreateActivityCommand.js.map +0 -1
  189. package/dist/cjs/commands/CreateStateMachineCommand.js +0 -79
  190. package/dist/cjs/commands/CreateStateMachineCommand.js.map +0 -1
  191. package/dist/cjs/commands/DeleteActivityCommand.js.map +0 -1
  192. package/dist/cjs/commands/DeleteStateMachineCommand.js.map +0 -1
  193. package/dist/cjs/commands/DescribeActivityCommand.js.map +0 -1
  194. package/dist/cjs/commands/DescribeExecutionCommand.js.map +0 -1
  195. package/dist/cjs/commands/DescribeStateMachineCommand.js.map +0 -1
  196. package/dist/cjs/commands/DescribeStateMachineForExecutionCommand.js.map +0 -1
  197. package/dist/cjs/commands/GetActivityTaskCommand.js +0 -73
  198. package/dist/cjs/commands/GetActivityTaskCommand.js.map +0 -1
  199. package/dist/cjs/commands/GetExecutionHistoryCommand.js +0 -66
  200. package/dist/cjs/commands/GetExecutionHistoryCommand.js.map +0 -1
  201. package/dist/cjs/commands/ListActivitiesCommand.js.map +0 -1
  202. package/dist/cjs/commands/ListExecutionsCommand.js +0 -68
  203. package/dist/cjs/commands/ListExecutionsCommand.js.map +0 -1
  204. package/dist/cjs/commands/ListStateMachinesCommand.js.map +0 -1
  205. package/dist/cjs/commands/ListTagsForResourceCommand.js.map +0 -1
  206. package/dist/cjs/commands/SendTaskFailureCommand.js.map +0 -1
  207. package/dist/cjs/commands/SendTaskHeartbeatCommand.js +0 -75
  208. package/dist/cjs/commands/SendTaskHeartbeatCommand.js.map +0 -1
  209. package/dist/cjs/commands/SendTaskSuccessCommand.js.map +0 -1
  210. package/dist/cjs/commands/StartExecutionCommand.js.map +0 -1
  211. package/dist/cjs/commands/StartSyncExecutionCommand.js.map +0 -1
  212. package/dist/cjs/commands/StopExecutionCommand.js.map +0 -1
  213. package/dist/cjs/commands/TagResourceCommand.js.map +0 -1
  214. package/dist/cjs/commands/UntagResourceCommand.js.map +0 -1
  215. package/dist/cjs/commands/UpdateStateMachineCommand.js +0 -71
  216. package/dist/cjs/commands/UpdateStateMachineCommand.js.map +0 -1
  217. package/dist/cjs/endpoints.js.map +0 -1
  218. package/dist/cjs/index.js.map +0 -1
  219. package/dist/cjs/models/index.js.map +0 -1
  220. package/dist/cjs/models/models_0.js.map +0 -1
  221. package/dist/cjs/package.json +0 -91
  222. package/dist/cjs/pagination/GetExecutionHistoryPaginator.js.map +0 -1
  223. package/dist/cjs/pagination/Interfaces.js.map +0 -1
  224. package/dist/cjs/pagination/ListActivitiesPaginator.js.map +0 -1
  225. package/dist/cjs/pagination/ListExecutionsPaginator.js.map +0 -1
  226. package/dist/cjs/pagination/ListStateMachinesPaginator.js.map +0 -1
  227. package/dist/cjs/protocols/Aws_json1_0.js.map +0 -1
  228. package/dist/cjs/runtimeConfig.browser.js.map +0 -1
  229. package/dist/cjs/runtimeConfig.js.map +0 -1
  230. package/dist/cjs/runtimeConfig.native.js.map +0 -1
  231. package/dist/cjs/runtimeConfig.shared.js.map +0 -1
  232. package/dist/es/SFN.js.map +0 -1
  233. package/dist/es/SFNClient.js.map +0 -1
  234. package/dist/es/commands/CreateActivityCommand.js.map +0 -1
  235. package/dist/es/commands/CreateStateMachineCommand.js.map +0 -1
  236. package/dist/es/commands/DeleteActivityCommand.js.map +0 -1
  237. package/dist/es/commands/DeleteStateMachineCommand.js.map +0 -1
  238. package/dist/es/commands/DescribeActivityCommand.js.map +0 -1
  239. package/dist/es/commands/DescribeExecutionCommand.js.map +0 -1
  240. package/dist/es/commands/DescribeStateMachineCommand.js.map +0 -1
  241. package/dist/es/commands/DescribeStateMachineForExecutionCommand.js.map +0 -1
  242. package/dist/es/commands/GetActivityTaskCommand.js.map +0 -1
  243. package/dist/es/commands/GetExecutionHistoryCommand.js.map +0 -1
  244. package/dist/es/commands/ListActivitiesCommand.js.map +0 -1
  245. package/dist/es/commands/ListExecutionsCommand.js.map +0 -1
  246. package/dist/es/commands/ListStateMachinesCommand.js.map +0 -1
  247. package/dist/es/commands/ListTagsForResourceCommand.js.map +0 -1
  248. package/dist/es/commands/SendTaskFailureCommand.js.map +0 -1
  249. package/dist/es/commands/SendTaskHeartbeatCommand.js.map +0 -1
  250. package/dist/es/commands/SendTaskSuccessCommand.js.map +0 -1
  251. package/dist/es/commands/StartExecutionCommand.js.map +0 -1
  252. package/dist/es/commands/StartSyncExecutionCommand.js.map +0 -1
  253. package/dist/es/commands/StopExecutionCommand.js.map +0 -1
  254. package/dist/es/commands/TagResourceCommand.js.map +0 -1
  255. package/dist/es/commands/UntagResourceCommand.js.map +0 -1
  256. package/dist/es/commands/UpdateStateMachineCommand.js.map +0 -1
  257. package/dist/es/endpoints.js.map +0 -1
  258. package/dist/es/index.js +0 -32
  259. package/dist/es/index.js.map +0 -1
  260. package/dist/es/models/index.js +0 -2
  261. package/dist/es/models/index.js.map +0 -1
  262. package/dist/es/models/models_0.js.map +0 -1
  263. package/dist/es/package.json +0 -91
  264. package/dist/es/pagination/GetExecutionHistoryPaginator.js.map +0 -1
  265. package/dist/es/pagination/Interfaces.js +0 -2
  266. package/dist/es/pagination/Interfaces.js.map +0 -1
  267. package/dist/es/pagination/ListActivitiesPaginator.js.map +0 -1
  268. package/dist/es/pagination/ListExecutionsPaginator.js.map +0 -1
  269. package/dist/es/pagination/ListStateMachinesPaginator.js.map +0 -1
  270. package/dist/es/protocols/Aws_json1_0.js.map +0 -1
  271. package/dist/es/runtimeConfig.browser.js.map +0 -1
  272. package/dist/es/runtimeConfig.js.map +0 -1
  273. package/dist/es/runtimeConfig.native.js.map +0 -1
  274. package/dist/es/runtimeConfig.shared.js.map +0 -1
  275. package/dist/types/ts3.4/SFN.d.ts +0 -313
  276. package/dist/types/ts3.4/commands/CreateActivityCommand.d.ts +0 -51
  277. package/dist/types/ts3.4/commands/CreateStateMachineCommand.d.ts +0 -53
  278. package/dist/types/ts3.4/commands/DeleteActivityCommand.d.ts +0 -35
  279. package/dist/types/ts3.4/commands/DeleteStateMachineCommand.d.ts +0 -41
  280. package/dist/types/ts3.4/commands/DescribeActivityCommand.d.ts +0 -38
  281. package/dist/types/ts3.4/commands/DescribeExecutionCommand.d.ts +0 -39
  282. package/dist/types/ts3.4/commands/DescribeStateMachineCommand.d.ts +0 -38
  283. package/dist/types/ts3.4/commands/DescribeStateMachineForExecutionCommand.d.ts +0 -39
  284. package/dist/types/ts3.4/commands/GetActivityTaskCommand.d.ts +0 -47
  285. package/dist/types/ts3.4/commands/GetExecutionHistoryCommand.d.ts +0 -40
  286. package/dist/types/ts3.4/commands/ListActivitiesCommand.d.ts +0 -40
  287. package/dist/types/ts3.4/commands/ListExecutionsCommand.d.ts +0 -42
  288. package/dist/types/ts3.4/commands/ListStateMachinesCommand.d.ts +0 -40
  289. package/dist/types/ts3.4/commands/ListTagsForResourceCommand.d.ts +0 -36
  290. package/dist/types/ts3.4/commands/SendTaskFailureCommand.d.ts +0 -36
  291. package/dist/types/ts3.4/commands/SendTaskHeartbeatCommand.d.ts +0 -49
  292. package/dist/types/ts3.4/commands/SendTaskSuccessCommand.d.ts +0 -37
  293. package/dist/types/ts3.4/commands/StartExecutionCommand.d.ts +0 -43
  294. package/dist/types/ts3.4/commands/StartSyncExecutionCommand.d.ts +0 -35
  295. package/dist/types/ts3.4/commands/StopExecutionCommand.d.ts +0 -36
  296. package/dist/types/ts3.4/commands/TagResourceCommand.d.ts +0 -40
  297. package/dist/types/ts3.4/commands/UntagResourceCommand.d.ts +0 -35
  298. package/dist/types/ts3.4/commands/UpdateStateMachineCommand.d.ts +0 -45
  299. package/dist/types/ts3.4/models/models_0.d.ts +0 -2540
  300. package/endpoints.ts +0 -86
  301. package/jest.config.js +0 -4
  302. package/models/models_0.ts +0 -3374
  303. package/pagination/GetExecutionHistoryPaginator.ts +0 -58
  304. package/pagination/Interfaces.ts +0 -7
  305. package/pagination/ListActivitiesPaginator.ts +0 -58
  306. package/pagination/ListExecutionsPaginator.ts +0 -58
  307. package/pagination/ListStateMachinesPaginator.ts +0 -58
  308. package/protocols/Aws_json1_0.ts +0 -3957
  309. package/runtimeConfig.browser.ts +0 -40
  310. package/runtimeConfig.native.ts +0 -16
  311. package/runtimeConfig.shared.ts +0 -16
  312. package/runtimeConfig.ts +0 -45
  313. package/tsconfig.es.json +0 -10
  314. package/tsconfig.json +0 -31
  315. package/tsconfig.types.json +0 -8
@@ -1,3957 +0,0 @@
1
- import { CreateActivityCommandInput, CreateActivityCommandOutput } from "../commands/CreateActivityCommand";
2
- import { CreateStateMachineCommandInput, CreateStateMachineCommandOutput } from "../commands/CreateStateMachineCommand";
3
- import { DeleteActivityCommandInput, DeleteActivityCommandOutput } from "../commands/DeleteActivityCommand";
4
- import { DeleteStateMachineCommandInput, DeleteStateMachineCommandOutput } from "../commands/DeleteStateMachineCommand";
5
- import { DescribeActivityCommandInput, DescribeActivityCommandOutput } from "../commands/DescribeActivityCommand";
6
- import { DescribeExecutionCommandInput, DescribeExecutionCommandOutput } from "../commands/DescribeExecutionCommand";
7
- import {
8
- DescribeStateMachineCommandInput,
9
- DescribeStateMachineCommandOutput,
10
- } from "../commands/DescribeStateMachineCommand";
11
- import {
12
- DescribeStateMachineForExecutionCommandInput,
13
- DescribeStateMachineForExecutionCommandOutput,
14
- } from "../commands/DescribeStateMachineForExecutionCommand";
15
- import { GetActivityTaskCommandInput, GetActivityTaskCommandOutput } from "../commands/GetActivityTaskCommand";
16
- import {
17
- GetExecutionHistoryCommandInput,
18
- GetExecutionHistoryCommandOutput,
19
- } from "../commands/GetExecutionHistoryCommand";
20
- import { ListActivitiesCommandInput, ListActivitiesCommandOutput } from "../commands/ListActivitiesCommand";
21
- import { ListExecutionsCommandInput, ListExecutionsCommandOutput } from "../commands/ListExecutionsCommand";
22
- import { ListStateMachinesCommandInput, ListStateMachinesCommandOutput } from "../commands/ListStateMachinesCommand";
23
- import {
24
- ListTagsForResourceCommandInput,
25
- ListTagsForResourceCommandOutput,
26
- } from "../commands/ListTagsForResourceCommand";
27
- import { SendTaskFailureCommandInput, SendTaskFailureCommandOutput } from "../commands/SendTaskFailureCommand";
28
- import { SendTaskHeartbeatCommandInput, SendTaskHeartbeatCommandOutput } from "../commands/SendTaskHeartbeatCommand";
29
- import { SendTaskSuccessCommandInput, SendTaskSuccessCommandOutput } from "../commands/SendTaskSuccessCommand";
30
- import { StartExecutionCommandInput, StartExecutionCommandOutput } from "../commands/StartExecutionCommand";
31
- import { StartSyncExecutionCommandInput, StartSyncExecutionCommandOutput } from "../commands/StartSyncExecutionCommand";
32
- import { StopExecutionCommandInput, StopExecutionCommandOutput } from "../commands/StopExecutionCommand";
33
- import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/TagResourceCommand";
34
- import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand";
35
- import { UpdateStateMachineCommandInput, UpdateStateMachineCommandOutput } from "../commands/UpdateStateMachineCommand";
36
- import {
37
- ActivityDoesNotExist,
38
- ActivityFailedEventDetails,
39
- ActivityLimitExceeded,
40
- ActivityListItem,
41
- ActivityScheduleFailedEventDetails,
42
- ActivityScheduledEventDetails,
43
- ActivityStartedEventDetails,
44
- ActivitySucceededEventDetails,
45
- ActivityTimedOutEventDetails,
46
- ActivityWorkerLimitExceeded,
47
- BillingDetails,
48
- CloudWatchEventsExecutionDataDetails,
49
- CloudWatchLogsLogGroup,
50
- CreateActivityInput,
51
- CreateActivityOutput,
52
- CreateStateMachineInput,
53
- CreateStateMachineOutput,
54
- DeleteActivityInput,
55
- DeleteActivityOutput,
56
- DeleteStateMachineInput,
57
- DeleteStateMachineOutput,
58
- DescribeActivityInput,
59
- DescribeActivityOutput,
60
- DescribeExecutionInput,
61
- DescribeExecutionOutput,
62
- DescribeStateMachineForExecutionInput,
63
- DescribeStateMachineForExecutionOutput,
64
- DescribeStateMachineInput,
65
- DescribeStateMachineOutput,
66
- ExecutionAbortedEventDetails,
67
- ExecutionAlreadyExists,
68
- ExecutionDoesNotExist,
69
- ExecutionFailedEventDetails,
70
- ExecutionLimitExceeded,
71
- ExecutionListItem,
72
- ExecutionStartedEventDetails,
73
- ExecutionSucceededEventDetails,
74
- ExecutionTimedOutEventDetails,
75
- GetActivityTaskInput,
76
- GetActivityTaskOutput,
77
- GetExecutionHistoryInput,
78
- GetExecutionHistoryOutput,
79
- HistoryEvent,
80
- HistoryEventExecutionDataDetails,
81
- InvalidArn,
82
- InvalidDefinition,
83
- InvalidExecutionInput,
84
- InvalidLoggingConfiguration,
85
- InvalidName,
86
- InvalidOutput,
87
- InvalidToken,
88
- InvalidTracingConfiguration,
89
- LambdaFunctionFailedEventDetails,
90
- LambdaFunctionScheduleFailedEventDetails,
91
- LambdaFunctionScheduledEventDetails,
92
- LambdaFunctionStartFailedEventDetails,
93
- LambdaFunctionSucceededEventDetails,
94
- LambdaFunctionTimedOutEventDetails,
95
- ListActivitiesInput,
96
- ListActivitiesOutput,
97
- ListExecutionsInput,
98
- ListExecutionsOutput,
99
- ListStateMachinesInput,
100
- ListStateMachinesOutput,
101
- ListTagsForResourceInput,
102
- ListTagsForResourceOutput,
103
- LogDestination,
104
- LoggingConfiguration,
105
- MapIterationEventDetails,
106
- MapStateStartedEventDetails,
107
- MissingRequiredParameter,
108
- ResourceNotFound,
109
- SendTaskFailureInput,
110
- SendTaskFailureOutput,
111
- SendTaskHeartbeatInput,
112
- SendTaskHeartbeatOutput,
113
- SendTaskSuccessInput,
114
- SendTaskSuccessOutput,
115
- StartExecutionInput,
116
- StartExecutionOutput,
117
- StartSyncExecutionInput,
118
- StartSyncExecutionOutput,
119
- StateEnteredEventDetails,
120
- StateExitedEventDetails,
121
- StateMachineAlreadyExists,
122
- StateMachineDeleting,
123
- StateMachineDoesNotExist,
124
- StateMachineLimitExceeded,
125
- StateMachineListItem,
126
- StateMachineTypeNotSupported,
127
- StopExecutionInput,
128
- StopExecutionOutput,
129
- Tag,
130
- TagResourceInput,
131
- TagResourceOutput,
132
- TaskDoesNotExist,
133
- TaskFailedEventDetails,
134
- TaskScheduledEventDetails,
135
- TaskStartFailedEventDetails,
136
- TaskStartedEventDetails,
137
- TaskSubmitFailedEventDetails,
138
- TaskSubmittedEventDetails,
139
- TaskSucceededEventDetails,
140
- TaskTimedOut,
141
- TaskTimedOutEventDetails,
142
- TooManyTags,
143
- TracingConfiguration,
144
- UntagResourceInput,
145
- UntagResourceOutput,
146
- UpdateStateMachineInput,
147
- UpdateStateMachineOutput,
148
- } from "../models/models_0";
149
- import {
150
- HttpRequest as __HttpRequest,
151
- HttpResponse as __HttpResponse,
152
- isValidHostname as __isValidHostname,
153
- } from "@aws-sdk/protocol-http";
154
- import {
155
- expectBoolean as __expectBoolean,
156
- expectInt32 as __expectInt32,
157
- expectLong as __expectLong,
158
- expectNonNull as __expectNonNull,
159
- expectNumber as __expectNumber,
160
- expectString as __expectString,
161
- parseEpochTimestamp as __parseEpochTimestamp,
162
- } from "@aws-sdk/smithy-client";
163
- import {
164
- Endpoint as __Endpoint,
165
- HeaderBag as __HeaderBag,
166
- MetadataBearer as __MetadataBearer,
167
- ResponseMetadata as __ResponseMetadata,
168
- SerdeContext as __SerdeContext,
169
- SmithyException as __SmithyException,
170
- } from "@aws-sdk/types";
171
-
172
- export const serializeAws_json1_0CreateActivityCommand = async (
173
- input: CreateActivityCommandInput,
174
- context: __SerdeContext
175
- ): Promise<__HttpRequest> => {
176
- const headers: __HeaderBag = {
177
- "content-type": "application/x-amz-json-1.0",
178
- "x-amz-target": "AWSStepFunctions.CreateActivity",
179
- };
180
- let body: any;
181
- body = JSON.stringify(serializeAws_json1_0CreateActivityInput(input, context));
182
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
183
- };
184
-
185
- export const serializeAws_json1_0CreateStateMachineCommand = async (
186
- input: CreateStateMachineCommandInput,
187
- context: __SerdeContext
188
- ): Promise<__HttpRequest> => {
189
- const headers: __HeaderBag = {
190
- "content-type": "application/x-amz-json-1.0",
191
- "x-amz-target": "AWSStepFunctions.CreateStateMachine",
192
- };
193
- let body: any;
194
- body = JSON.stringify(serializeAws_json1_0CreateStateMachineInput(input, context));
195
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
196
- };
197
-
198
- export const serializeAws_json1_0DeleteActivityCommand = async (
199
- input: DeleteActivityCommandInput,
200
- context: __SerdeContext
201
- ): Promise<__HttpRequest> => {
202
- const headers: __HeaderBag = {
203
- "content-type": "application/x-amz-json-1.0",
204
- "x-amz-target": "AWSStepFunctions.DeleteActivity",
205
- };
206
- let body: any;
207
- body = JSON.stringify(serializeAws_json1_0DeleteActivityInput(input, context));
208
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
209
- };
210
-
211
- export const serializeAws_json1_0DeleteStateMachineCommand = async (
212
- input: DeleteStateMachineCommandInput,
213
- context: __SerdeContext
214
- ): Promise<__HttpRequest> => {
215
- const headers: __HeaderBag = {
216
- "content-type": "application/x-amz-json-1.0",
217
- "x-amz-target": "AWSStepFunctions.DeleteStateMachine",
218
- };
219
- let body: any;
220
- body = JSON.stringify(serializeAws_json1_0DeleteStateMachineInput(input, context));
221
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
222
- };
223
-
224
- export const serializeAws_json1_0DescribeActivityCommand = async (
225
- input: DescribeActivityCommandInput,
226
- context: __SerdeContext
227
- ): Promise<__HttpRequest> => {
228
- const headers: __HeaderBag = {
229
- "content-type": "application/x-amz-json-1.0",
230
- "x-amz-target": "AWSStepFunctions.DescribeActivity",
231
- };
232
- let body: any;
233
- body = JSON.stringify(serializeAws_json1_0DescribeActivityInput(input, context));
234
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
235
- };
236
-
237
- export const serializeAws_json1_0DescribeExecutionCommand = async (
238
- input: DescribeExecutionCommandInput,
239
- context: __SerdeContext
240
- ): Promise<__HttpRequest> => {
241
- const headers: __HeaderBag = {
242
- "content-type": "application/x-amz-json-1.0",
243
- "x-amz-target": "AWSStepFunctions.DescribeExecution",
244
- };
245
- let body: any;
246
- body = JSON.stringify(serializeAws_json1_0DescribeExecutionInput(input, context));
247
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
248
- };
249
-
250
- export const serializeAws_json1_0DescribeStateMachineCommand = async (
251
- input: DescribeStateMachineCommandInput,
252
- context: __SerdeContext
253
- ): Promise<__HttpRequest> => {
254
- const headers: __HeaderBag = {
255
- "content-type": "application/x-amz-json-1.0",
256
- "x-amz-target": "AWSStepFunctions.DescribeStateMachine",
257
- };
258
- let body: any;
259
- body = JSON.stringify(serializeAws_json1_0DescribeStateMachineInput(input, context));
260
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
261
- };
262
-
263
- export const serializeAws_json1_0DescribeStateMachineForExecutionCommand = async (
264
- input: DescribeStateMachineForExecutionCommandInput,
265
- context: __SerdeContext
266
- ): Promise<__HttpRequest> => {
267
- const headers: __HeaderBag = {
268
- "content-type": "application/x-amz-json-1.0",
269
- "x-amz-target": "AWSStepFunctions.DescribeStateMachineForExecution",
270
- };
271
- let body: any;
272
- body = JSON.stringify(serializeAws_json1_0DescribeStateMachineForExecutionInput(input, context));
273
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
274
- };
275
-
276
- export const serializeAws_json1_0GetActivityTaskCommand = async (
277
- input: GetActivityTaskCommandInput,
278
- context: __SerdeContext
279
- ): Promise<__HttpRequest> => {
280
- const headers: __HeaderBag = {
281
- "content-type": "application/x-amz-json-1.0",
282
- "x-amz-target": "AWSStepFunctions.GetActivityTask",
283
- };
284
- let body: any;
285
- body = JSON.stringify(serializeAws_json1_0GetActivityTaskInput(input, context));
286
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
287
- };
288
-
289
- export const serializeAws_json1_0GetExecutionHistoryCommand = async (
290
- input: GetExecutionHistoryCommandInput,
291
- context: __SerdeContext
292
- ): Promise<__HttpRequest> => {
293
- const headers: __HeaderBag = {
294
- "content-type": "application/x-amz-json-1.0",
295
- "x-amz-target": "AWSStepFunctions.GetExecutionHistory",
296
- };
297
- let body: any;
298
- body = JSON.stringify(serializeAws_json1_0GetExecutionHistoryInput(input, context));
299
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
300
- };
301
-
302
- export const serializeAws_json1_0ListActivitiesCommand = async (
303
- input: ListActivitiesCommandInput,
304
- context: __SerdeContext
305
- ): Promise<__HttpRequest> => {
306
- const headers: __HeaderBag = {
307
- "content-type": "application/x-amz-json-1.0",
308
- "x-amz-target": "AWSStepFunctions.ListActivities",
309
- };
310
- let body: any;
311
- body = JSON.stringify(serializeAws_json1_0ListActivitiesInput(input, context));
312
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
313
- };
314
-
315
- export const serializeAws_json1_0ListExecutionsCommand = async (
316
- input: ListExecutionsCommandInput,
317
- context: __SerdeContext
318
- ): Promise<__HttpRequest> => {
319
- const headers: __HeaderBag = {
320
- "content-type": "application/x-amz-json-1.0",
321
- "x-amz-target": "AWSStepFunctions.ListExecutions",
322
- };
323
- let body: any;
324
- body = JSON.stringify(serializeAws_json1_0ListExecutionsInput(input, context));
325
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
326
- };
327
-
328
- export const serializeAws_json1_0ListStateMachinesCommand = async (
329
- input: ListStateMachinesCommandInput,
330
- context: __SerdeContext
331
- ): Promise<__HttpRequest> => {
332
- const headers: __HeaderBag = {
333
- "content-type": "application/x-amz-json-1.0",
334
- "x-amz-target": "AWSStepFunctions.ListStateMachines",
335
- };
336
- let body: any;
337
- body = JSON.stringify(serializeAws_json1_0ListStateMachinesInput(input, context));
338
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
339
- };
340
-
341
- export const serializeAws_json1_0ListTagsForResourceCommand = async (
342
- input: ListTagsForResourceCommandInput,
343
- context: __SerdeContext
344
- ): Promise<__HttpRequest> => {
345
- const headers: __HeaderBag = {
346
- "content-type": "application/x-amz-json-1.0",
347
- "x-amz-target": "AWSStepFunctions.ListTagsForResource",
348
- };
349
- let body: any;
350
- body = JSON.stringify(serializeAws_json1_0ListTagsForResourceInput(input, context));
351
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
352
- };
353
-
354
- export const serializeAws_json1_0SendTaskFailureCommand = async (
355
- input: SendTaskFailureCommandInput,
356
- context: __SerdeContext
357
- ): Promise<__HttpRequest> => {
358
- const headers: __HeaderBag = {
359
- "content-type": "application/x-amz-json-1.0",
360
- "x-amz-target": "AWSStepFunctions.SendTaskFailure",
361
- };
362
- let body: any;
363
- body = JSON.stringify(serializeAws_json1_0SendTaskFailureInput(input, context));
364
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
365
- };
366
-
367
- export const serializeAws_json1_0SendTaskHeartbeatCommand = async (
368
- input: SendTaskHeartbeatCommandInput,
369
- context: __SerdeContext
370
- ): Promise<__HttpRequest> => {
371
- const headers: __HeaderBag = {
372
- "content-type": "application/x-amz-json-1.0",
373
- "x-amz-target": "AWSStepFunctions.SendTaskHeartbeat",
374
- };
375
- let body: any;
376
- body = JSON.stringify(serializeAws_json1_0SendTaskHeartbeatInput(input, context));
377
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
378
- };
379
-
380
- export const serializeAws_json1_0SendTaskSuccessCommand = async (
381
- input: SendTaskSuccessCommandInput,
382
- context: __SerdeContext
383
- ): Promise<__HttpRequest> => {
384
- const headers: __HeaderBag = {
385
- "content-type": "application/x-amz-json-1.0",
386
- "x-amz-target": "AWSStepFunctions.SendTaskSuccess",
387
- };
388
- let body: any;
389
- body = JSON.stringify(serializeAws_json1_0SendTaskSuccessInput(input, context));
390
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
391
- };
392
-
393
- export const serializeAws_json1_0StartExecutionCommand = async (
394
- input: StartExecutionCommandInput,
395
- context: __SerdeContext
396
- ): Promise<__HttpRequest> => {
397
- const headers: __HeaderBag = {
398
- "content-type": "application/x-amz-json-1.0",
399
- "x-amz-target": "AWSStepFunctions.StartExecution",
400
- };
401
- let body: any;
402
- body = JSON.stringify(serializeAws_json1_0StartExecutionInput(input, context));
403
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
404
- };
405
-
406
- export const serializeAws_json1_0StartSyncExecutionCommand = async (
407
- input: StartSyncExecutionCommandInput,
408
- context: __SerdeContext
409
- ): Promise<__HttpRequest> => {
410
- const headers: __HeaderBag = {
411
- "content-type": "application/x-amz-json-1.0",
412
- "x-amz-target": "AWSStepFunctions.StartSyncExecution",
413
- };
414
- let body: any;
415
- body = JSON.stringify(serializeAws_json1_0StartSyncExecutionInput(input, context));
416
- let { hostname: resolvedHostname } = await context.endpoint();
417
- if (context.disableHostPrefix !== true) {
418
- resolvedHostname = "sync-" + resolvedHostname;
419
- if (!__isValidHostname(resolvedHostname)) {
420
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
421
- }
422
- }
423
- return buildHttpRpcRequest(context, headers, "/", resolvedHostname, body);
424
- };
425
-
426
- export const serializeAws_json1_0StopExecutionCommand = async (
427
- input: StopExecutionCommandInput,
428
- context: __SerdeContext
429
- ): Promise<__HttpRequest> => {
430
- const headers: __HeaderBag = {
431
- "content-type": "application/x-amz-json-1.0",
432
- "x-amz-target": "AWSStepFunctions.StopExecution",
433
- };
434
- let body: any;
435
- body = JSON.stringify(serializeAws_json1_0StopExecutionInput(input, context));
436
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
437
- };
438
-
439
- export const serializeAws_json1_0TagResourceCommand = async (
440
- input: TagResourceCommandInput,
441
- context: __SerdeContext
442
- ): Promise<__HttpRequest> => {
443
- const headers: __HeaderBag = {
444
- "content-type": "application/x-amz-json-1.0",
445
- "x-amz-target": "AWSStepFunctions.TagResource",
446
- };
447
- let body: any;
448
- body = JSON.stringify(serializeAws_json1_0TagResourceInput(input, context));
449
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
450
- };
451
-
452
- export const serializeAws_json1_0UntagResourceCommand = async (
453
- input: UntagResourceCommandInput,
454
- context: __SerdeContext
455
- ): Promise<__HttpRequest> => {
456
- const headers: __HeaderBag = {
457
- "content-type": "application/x-amz-json-1.0",
458
- "x-amz-target": "AWSStepFunctions.UntagResource",
459
- };
460
- let body: any;
461
- body = JSON.stringify(serializeAws_json1_0UntagResourceInput(input, context));
462
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
463
- };
464
-
465
- export const serializeAws_json1_0UpdateStateMachineCommand = async (
466
- input: UpdateStateMachineCommandInput,
467
- context: __SerdeContext
468
- ): Promise<__HttpRequest> => {
469
- const headers: __HeaderBag = {
470
- "content-type": "application/x-amz-json-1.0",
471
- "x-amz-target": "AWSStepFunctions.UpdateStateMachine",
472
- };
473
- let body: any;
474
- body = JSON.stringify(serializeAws_json1_0UpdateStateMachineInput(input, context));
475
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
476
- };
477
-
478
- export const deserializeAws_json1_0CreateActivityCommand = async (
479
- output: __HttpResponse,
480
- context: __SerdeContext
481
- ): Promise<CreateActivityCommandOutput> => {
482
- if (output.statusCode >= 300) {
483
- return deserializeAws_json1_0CreateActivityCommandError(output, context);
484
- }
485
- const data: any = await parseBody(output.body, context);
486
- let contents: any = {};
487
- contents = deserializeAws_json1_0CreateActivityOutput(data, context);
488
- const response: CreateActivityCommandOutput = {
489
- $metadata: deserializeMetadata(output),
490
- ...contents,
491
- };
492
- return Promise.resolve(response);
493
- };
494
-
495
- const deserializeAws_json1_0CreateActivityCommandError = async (
496
- output: __HttpResponse,
497
- context: __SerdeContext
498
- ): Promise<CreateActivityCommandOutput> => {
499
- const parsedOutput: any = {
500
- ...output,
501
- body: await parseBody(output.body, context),
502
- };
503
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
504
- let errorCode: string = "UnknownError";
505
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
506
- switch (errorCode) {
507
- case "ActivityLimitExceeded":
508
- case "com.amazonaws.sfn#ActivityLimitExceeded":
509
- response = {
510
- ...(await deserializeAws_json1_0ActivityLimitExceededResponse(parsedOutput, context)),
511
- name: errorCode,
512
- $metadata: deserializeMetadata(output),
513
- };
514
- break;
515
- case "InvalidName":
516
- case "com.amazonaws.sfn#InvalidName":
517
- response = {
518
- ...(await deserializeAws_json1_0InvalidNameResponse(parsedOutput, context)),
519
- name: errorCode,
520
- $metadata: deserializeMetadata(output),
521
- };
522
- break;
523
- case "TooManyTags":
524
- case "com.amazonaws.sfn#TooManyTags":
525
- response = {
526
- ...(await deserializeAws_json1_0TooManyTagsResponse(parsedOutput, context)),
527
- name: errorCode,
528
- $metadata: deserializeMetadata(output),
529
- };
530
- break;
531
- default:
532
- const parsedBody = parsedOutput.body;
533
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
534
- response = {
535
- ...parsedBody,
536
- name: `${errorCode}`,
537
- message: parsedBody.message || parsedBody.Message || errorCode,
538
- $fault: "client",
539
- $metadata: deserializeMetadata(output),
540
- } as any;
541
- }
542
- const message = response.message || response.Message || errorCode;
543
- response.message = message;
544
- delete response.Message;
545
- return Promise.reject(Object.assign(new Error(message), response));
546
- };
547
-
548
- export const deserializeAws_json1_0CreateStateMachineCommand = async (
549
- output: __HttpResponse,
550
- context: __SerdeContext
551
- ): Promise<CreateStateMachineCommandOutput> => {
552
- if (output.statusCode >= 300) {
553
- return deserializeAws_json1_0CreateStateMachineCommandError(output, context);
554
- }
555
- const data: any = await parseBody(output.body, context);
556
- let contents: any = {};
557
- contents = deserializeAws_json1_0CreateStateMachineOutput(data, context);
558
- const response: CreateStateMachineCommandOutput = {
559
- $metadata: deserializeMetadata(output),
560
- ...contents,
561
- };
562
- return Promise.resolve(response);
563
- };
564
-
565
- const deserializeAws_json1_0CreateStateMachineCommandError = async (
566
- output: __HttpResponse,
567
- context: __SerdeContext
568
- ): Promise<CreateStateMachineCommandOutput> => {
569
- const parsedOutput: any = {
570
- ...output,
571
- body: await parseBody(output.body, context),
572
- };
573
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
574
- let errorCode: string = "UnknownError";
575
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
576
- switch (errorCode) {
577
- case "InvalidArn":
578
- case "com.amazonaws.sfn#InvalidArn":
579
- response = {
580
- ...(await deserializeAws_json1_0InvalidArnResponse(parsedOutput, context)),
581
- name: errorCode,
582
- $metadata: deserializeMetadata(output),
583
- };
584
- break;
585
- case "InvalidDefinition":
586
- case "com.amazonaws.sfn#InvalidDefinition":
587
- response = {
588
- ...(await deserializeAws_json1_0InvalidDefinitionResponse(parsedOutput, context)),
589
- name: errorCode,
590
- $metadata: deserializeMetadata(output),
591
- };
592
- break;
593
- case "InvalidLoggingConfiguration":
594
- case "com.amazonaws.sfn#InvalidLoggingConfiguration":
595
- response = {
596
- ...(await deserializeAws_json1_0InvalidLoggingConfigurationResponse(parsedOutput, context)),
597
- name: errorCode,
598
- $metadata: deserializeMetadata(output),
599
- };
600
- break;
601
- case "InvalidName":
602
- case "com.amazonaws.sfn#InvalidName":
603
- response = {
604
- ...(await deserializeAws_json1_0InvalidNameResponse(parsedOutput, context)),
605
- name: errorCode,
606
- $metadata: deserializeMetadata(output),
607
- };
608
- break;
609
- case "InvalidTracingConfiguration":
610
- case "com.amazonaws.sfn#InvalidTracingConfiguration":
611
- response = {
612
- ...(await deserializeAws_json1_0InvalidTracingConfigurationResponse(parsedOutput, context)),
613
- name: errorCode,
614
- $metadata: deserializeMetadata(output),
615
- };
616
- break;
617
- case "StateMachineAlreadyExists":
618
- case "com.amazonaws.sfn#StateMachineAlreadyExists":
619
- response = {
620
- ...(await deserializeAws_json1_0StateMachineAlreadyExistsResponse(parsedOutput, context)),
621
- name: errorCode,
622
- $metadata: deserializeMetadata(output),
623
- };
624
- break;
625
- case "StateMachineDeleting":
626
- case "com.amazonaws.sfn#StateMachineDeleting":
627
- response = {
628
- ...(await deserializeAws_json1_0StateMachineDeletingResponse(parsedOutput, context)),
629
- name: errorCode,
630
- $metadata: deserializeMetadata(output),
631
- };
632
- break;
633
- case "StateMachineLimitExceeded":
634
- case "com.amazonaws.sfn#StateMachineLimitExceeded":
635
- response = {
636
- ...(await deserializeAws_json1_0StateMachineLimitExceededResponse(parsedOutput, context)),
637
- name: errorCode,
638
- $metadata: deserializeMetadata(output),
639
- };
640
- break;
641
- case "StateMachineTypeNotSupported":
642
- case "com.amazonaws.sfn#StateMachineTypeNotSupported":
643
- response = {
644
- ...(await deserializeAws_json1_0StateMachineTypeNotSupportedResponse(parsedOutput, context)),
645
- name: errorCode,
646
- $metadata: deserializeMetadata(output),
647
- };
648
- break;
649
- case "TooManyTags":
650
- case "com.amazonaws.sfn#TooManyTags":
651
- response = {
652
- ...(await deserializeAws_json1_0TooManyTagsResponse(parsedOutput, context)),
653
- name: errorCode,
654
- $metadata: deserializeMetadata(output),
655
- };
656
- break;
657
- default:
658
- const parsedBody = parsedOutput.body;
659
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
660
- response = {
661
- ...parsedBody,
662
- name: `${errorCode}`,
663
- message: parsedBody.message || parsedBody.Message || errorCode,
664
- $fault: "client",
665
- $metadata: deserializeMetadata(output),
666
- } as any;
667
- }
668
- const message = response.message || response.Message || errorCode;
669
- response.message = message;
670
- delete response.Message;
671
- return Promise.reject(Object.assign(new Error(message), response));
672
- };
673
-
674
- export const deserializeAws_json1_0DeleteActivityCommand = async (
675
- output: __HttpResponse,
676
- context: __SerdeContext
677
- ): Promise<DeleteActivityCommandOutput> => {
678
- if (output.statusCode >= 300) {
679
- return deserializeAws_json1_0DeleteActivityCommandError(output, context);
680
- }
681
- const data: any = await parseBody(output.body, context);
682
- let contents: any = {};
683
- contents = deserializeAws_json1_0DeleteActivityOutput(data, context);
684
- const response: DeleteActivityCommandOutput = {
685
- $metadata: deserializeMetadata(output),
686
- ...contents,
687
- };
688
- return Promise.resolve(response);
689
- };
690
-
691
- const deserializeAws_json1_0DeleteActivityCommandError = async (
692
- output: __HttpResponse,
693
- context: __SerdeContext
694
- ): Promise<DeleteActivityCommandOutput> => {
695
- const parsedOutput: any = {
696
- ...output,
697
- body: await parseBody(output.body, context),
698
- };
699
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
700
- let errorCode: string = "UnknownError";
701
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
702
- switch (errorCode) {
703
- case "InvalidArn":
704
- case "com.amazonaws.sfn#InvalidArn":
705
- response = {
706
- ...(await deserializeAws_json1_0InvalidArnResponse(parsedOutput, context)),
707
- name: errorCode,
708
- $metadata: deserializeMetadata(output),
709
- };
710
- break;
711
- default:
712
- const parsedBody = parsedOutput.body;
713
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
714
- response = {
715
- ...parsedBody,
716
- name: `${errorCode}`,
717
- message: parsedBody.message || parsedBody.Message || errorCode,
718
- $fault: "client",
719
- $metadata: deserializeMetadata(output),
720
- } as any;
721
- }
722
- const message = response.message || response.Message || errorCode;
723
- response.message = message;
724
- delete response.Message;
725
- return Promise.reject(Object.assign(new Error(message), response));
726
- };
727
-
728
- export const deserializeAws_json1_0DeleteStateMachineCommand = async (
729
- output: __HttpResponse,
730
- context: __SerdeContext
731
- ): Promise<DeleteStateMachineCommandOutput> => {
732
- if (output.statusCode >= 300) {
733
- return deserializeAws_json1_0DeleteStateMachineCommandError(output, context);
734
- }
735
- const data: any = await parseBody(output.body, context);
736
- let contents: any = {};
737
- contents = deserializeAws_json1_0DeleteStateMachineOutput(data, context);
738
- const response: DeleteStateMachineCommandOutput = {
739
- $metadata: deserializeMetadata(output),
740
- ...contents,
741
- };
742
- return Promise.resolve(response);
743
- };
744
-
745
- const deserializeAws_json1_0DeleteStateMachineCommandError = async (
746
- output: __HttpResponse,
747
- context: __SerdeContext
748
- ): Promise<DeleteStateMachineCommandOutput> => {
749
- const parsedOutput: any = {
750
- ...output,
751
- body: await parseBody(output.body, context),
752
- };
753
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
754
- let errorCode: string = "UnknownError";
755
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
756
- switch (errorCode) {
757
- case "InvalidArn":
758
- case "com.amazonaws.sfn#InvalidArn":
759
- response = {
760
- ...(await deserializeAws_json1_0InvalidArnResponse(parsedOutput, context)),
761
- name: errorCode,
762
- $metadata: deserializeMetadata(output),
763
- };
764
- break;
765
- default:
766
- const parsedBody = parsedOutput.body;
767
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
768
- response = {
769
- ...parsedBody,
770
- name: `${errorCode}`,
771
- message: parsedBody.message || parsedBody.Message || errorCode,
772
- $fault: "client",
773
- $metadata: deserializeMetadata(output),
774
- } as any;
775
- }
776
- const message = response.message || response.Message || errorCode;
777
- response.message = message;
778
- delete response.Message;
779
- return Promise.reject(Object.assign(new Error(message), response));
780
- };
781
-
782
- export const deserializeAws_json1_0DescribeActivityCommand = async (
783
- output: __HttpResponse,
784
- context: __SerdeContext
785
- ): Promise<DescribeActivityCommandOutput> => {
786
- if (output.statusCode >= 300) {
787
- return deserializeAws_json1_0DescribeActivityCommandError(output, context);
788
- }
789
- const data: any = await parseBody(output.body, context);
790
- let contents: any = {};
791
- contents = deserializeAws_json1_0DescribeActivityOutput(data, context);
792
- const response: DescribeActivityCommandOutput = {
793
- $metadata: deserializeMetadata(output),
794
- ...contents,
795
- };
796
- return Promise.resolve(response);
797
- };
798
-
799
- const deserializeAws_json1_0DescribeActivityCommandError = async (
800
- output: __HttpResponse,
801
- context: __SerdeContext
802
- ): Promise<DescribeActivityCommandOutput> => {
803
- const parsedOutput: any = {
804
- ...output,
805
- body: await parseBody(output.body, context),
806
- };
807
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
808
- let errorCode: string = "UnknownError";
809
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
810
- switch (errorCode) {
811
- case "ActivityDoesNotExist":
812
- case "com.amazonaws.sfn#ActivityDoesNotExist":
813
- response = {
814
- ...(await deserializeAws_json1_0ActivityDoesNotExistResponse(parsedOutput, context)),
815
- name: errorCode,
816
- $metadata: deserializeMetadata(output),
817
- };
818
- break;
819
- case "InvalidArn":
820
- case "com.amazonaws.sfn#InvalidArn":
821
- response = {
822
- ...(await deserializeAws_json1_0InvalidArnResponse(parsedOutput, context)),
823
- name: errorCode,
824
- $metadata: deserializeMetadata(output),
825
- };
826
- break;
827
- default:
828
- const parsedBody = parsedOutput.body;
829
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
830
- response = {
831
- ...parsedBody,
832
- name: `${errorCode}`,
833
- message: parsedBody.message || parsedBody.Message || errorCode,
834
- $fault: "client",
835
- $metadata: deserializeMetadata(output),
836
- } as any;
837
- }
838
- const message = response.message || response.Message || errorCode;
839
- response.message = message;
840
- delete response.Message;
841
- return Promise.reject(Object.assign(new Error(message), response));
842
- };
843
-
844
- export const deserializeAws_json1_0DescribeExecutionCommand = async (
845
- output: __HttpResponse,
846
- context: __SerdeContext
847
- ): Promise<DescribeExecutionCommandOutput> => {
848
- if (output.statusCode >= 300) {
849
- return deserializeAws_json1_0DescribeExecutionCommandError(output, context);
850
- }
851
- const data: any = await parseBody(output.body, context);
852
- let contents: any = {};
853
- contents = deserializeAws_json1_0DescribeExecutionOutput(data, context);
854
- const response: DescribeExecutionCommandOutput = {
855
- $metadata: deserializeMetadata(output),
856
- ...contents,
857
- };
858
- return Promise.resolve(response);
859
- };
860
-
861
- const deserializeAws_json1_0DescribeExecutionCommandError = async (
862
- output: __HttpResponse,
863
- context: __SerdeContext
864
- ): Promise<DescribeExecutionCommandOutput> => {
865
- const parsedOutput: any = {
866
- ...output,
867
- body: await parseBody(output.body, context),
868
- };
869
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
870
- let errorCode: string = "UnknownError";
871
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
872
- switch (errorCode) {
873
- case "ExecutionDoesNotExist":
874
- case "com.amazonaws.sfn#ExecutionDoesNotExist":
875
- response = {
876
- ...(await deserializeAws_json1_0ExecutionDoesNotExistResponse(parsedOutput, context)),
877
- name: errorCode,
878
- $metadata: deserializeMetadata(output),
879
- };
880
- break;
881
- case "InvalidArn":
882
- case "com.amazonaws.sfn#InvalidArn":
883
- response = {
884
- ...(await deserializeAws_json1_0InvalidArnResponse(parsedOutput, context)),
885
- name: errorCode,
886
- $metadata: deserializeMetadata(output),
887
- };
888
- break;
889
- default:
890
- const parsedBody = parsedOutput.body;
891
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
892
- response = {
893
- ...parsedBody,
894
- name: `${errorCode}`,
895
- message: parsedBody.message || parsedBody.Message || errorCode,
896
- $fault: "client",
897
- $metadata: deserializeMetadata(output),
898
- } as any;
899
- }
900
- const message = response.message || response.Message || errorCode;
901
- response.message = message;
902
- delete response.Message;
903
- return Promise.reject(Object.assign(new Error(message), response));
904
- };
905
-
906
- export const deserializeAws_json1_0DescribeStateMachineCommand = async (
907
- output: __HttpResponse,
908
- context: __SerdeContext
909
- ): Promise<DescribeStateMachineCommandOutput> => {
910
- if (output.statusCode >= 300) {
911
- return deserializeAws_json1_0DescribeStateMachineCommandError(output, context);
912
- }
913
- const data: any = await parseBody(output.body, context);
914
- let contents: any = {};
915
- contents = deserializeAws_json1_0DescribeStateMachineOutput(data, context);
916
- const response: DescribeStateMachineCommandOutput = {
917
- $metadata: deserializeMetadata(output),
918
- ...contents,
919
- };
920
- return Promise.resolve(response);
921
- };
922
-
923
- const deserializeAws_json1_0DescribeStateMachineCommandError = async (
924
- output: __HttpResponse,
925
- context: __SerdeContext
926
- ): Promise<DescribeStateMachineCommandOutput> => {
927
- const parsedOutput: any = {
928
- ...output,
929
- body: await parseBody(output.body, context),
930
- };
931
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
932
- let errorCode: string = "UnknownError";
933
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
934
- switch (errorCode) {
935
- case "InvalidArn":
936
- case "com.amazonaws.sfn#InvalidArn":
937
- response = {
938
- ...(await deserializeAws_json1_0InvalidArnResponse(parsedOutput, context)),
939
- name: errorCode,
940
- $metadata: deserializeMetadata(output),
941
- };
942
- break;
943
- case "StateMachineDoesNotExist":
944
- case "com.amazonaws.sfn#StateMachineDoesNotExist":
945
- response = {
946
- ...(await deserializeAws_json1_0StateMachineDoesNotExistResponse(parsedOutput, context)),
947
- name: errorCode,
948
- $metadata: deserializeMetadata(output),
949
- };
950
- break;
951
- default:
952
- const parsedBody = parsedOutput.body;
953
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
954
- response = {
955
- ...parsedBody,
956
- name: `${errorCode}`,
957
- message: parsedBody.message || parsedBody.Message || errorCode,
958
- $fault: "client",
959
- $metadata: deserializeMetadata(output),
960
- } as any;
961
- }
962
- const message = response.message || response.Message || errorCode;
963
- response.message = message;
964
- delete response.Message;
965
- return Promise.reject(Object.assign(new Error(message), response));
966
- };
967
-
968
- export const deserializeAws_json1_0DescribeStateMachineForExecutionCommand = async (
969
- output: __HttpResponse,
970
- context: __SerdeContext
971
- ): Promise<DescribeStateMachineForExecutionCommandOutput> => {
972
- if (output.statusCode >= 300) {
973
- return deserializeAws_json1_0DescribeStateMachineForExecutionCommandError(output, context);
974
- }
975
- const data: any = await parseBody(output.body, context);
976
- let contents: any = {};
977
- contents = deserializeAws_json1_0DescribeStateMachineForExecutionOutput(data, context);
978
- const response: DescribeStateMachineForExecutionCommandOutput = {
979
- $metadata: deserializeMetadata(output),
980
- ...contents,
981
- };
982
- return Promise.resolve(response);
983
- };
984
-
985
- const deserializeAws_json1_0DescribeStateMachineForExecutionCommandError = async (
986
- output: __HttpResponse,
987
- context: __SerdeContext
988
- ): Promise<DescribeStateMachineForExecutionCommandOutput> => {
989
- const parsedOutput: any = {
990
- ...output,
991
- body: await parseBody(output.body, context),
992
- };
993
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
994
- let errorCode: string = "UnknownError";
995
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
996
- switch (errorCode) {
997
- case "ExecutionDoesNotExist":
998
- case "com.amazonaws.sfn#ExecutionDoesNotExist":
999
- response = {
1000
- ...(await deserializeAws_json1_0ExecutionDoesNotExistResponse(parsedOutput, context)),
1001
- name: errorCode,
1002
- $metadata: deserializeMetadata(output),
1003
- };
1004
- break;
1005
- case "InvalidArn":
1006
- case "com.amazonaws.sfn#InvalidArn":
1007
- response = {
1008
- ...(await deserializeAws_json1_0InvalidArnResponse(parsedOutput, context)),
1009
- name: errorCode,
1010
- $metadata: deserializeMetadata(output),
1011
- };
1012
- break;
1013
- default:
1014
- const parsedBody = parsedOutput.body;
1015
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1016
- response = {
1017
- ...parsedBody,
1018
- name: `${errorCode}`,
1019
- message: parsedBody.message || parsedBody.Message || errorCode,
1020
- $fault: "client",
1021
- $metadata: deserializeMetadata(output),
1022
- } as any;
1023
- }
1024
- const message = response.message || response.Message || errorCode;
1025
- response.message = message;
1026
- delete response.Message;
1027
- return Promise.reject(Object.assign(new Error(message), response));
1028
- };
1029
-
1030
- export const deserializeAws_json1_0GetActivityTaskCommand = async (
1031
- output: __HttpResponse,
1032
- context: __SerdeContext
1033
- ): Promise<GetActivityTaskCommandOutput> => {
1034
- if (output.statusCode >= 300) {
1035
- return deserializeAws_json1_0GetActivityTaskCommandError(output, context);
1036
- }
1037
- const data: any = await parseBody(output.body, context);
1038
- let contents: any = {};
1039
- contents = deserializeAws_json1_0GetActivityTaskOutput(data, context);
1040
- const response: GetActivityTaskCommandOutput = {
1041
- $metadata: deserializeMetadata(output),
1042
- ...contents,
1043
- };
1044
- return Promise.resolve(response);
1045
- };
1046
-
1047
- const deserializeAws_json1_0GetActivityTaskCommandError = async (
1048
- output: __HttpResponse,
1049
- context: __SerdeContext
1050
- ): Promise<GetActivityTaskCommandOutput> => {
1051
- const parsedOutput: any = {
1052
- ...output,
1053
- body: await parseBody(output.body, context),
1054
- };
1055
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1056
- let errorCode: string = "UnknownError";
1057
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1058
- switch (errorCode) {
1059
- case "ActivityDoesNotExist":
1060
- case "com.amazonaws.sfn#ActivityDoesNotExist":
1061
- response = {
1062
- ...(await deserializeAws_json1_0ActivityDoesNotExistResponse(parsedOutput, context)),
1063
- name: errorCode,
1064
- $metadata: deserializeMetadata(output),
1065
- };
1066
- break;
1067
- case "ActivityWorkerLimitExceeded":
1068
- case "com.amazonaws.sfn#ActivityWorkerLimitExceeded":
1069
- response = {
1070
- ...(await deserializeAws_json1_0ActivityWorkerLimitExceededResponse(parsedOutput, context)),
1071
- name: errorCode,
1072
- $metadata: deserializeMetadata(output),
1073
- };
1074
- break;
1075
- case "InvalidArn":
1076
- case "com.amazonaws.sfn#InvalidArn":
1077
- response = {
1078
- ...(await deserializeAws_json1_0InvalidArnResponse(parsedOutput, context)),
1079
- name: errorCode,
1080
- $metadata: deserializeMetadata(output),
1081
- };
1082
- break;
1083
- default:
1084
- const parsedBody = parsedOutput.body;
1085
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1086
- response = {
1087
- ...parsedBody,
1088
- name: `${errorCode}`,
1089
- message: parsedBody.message || parsedBody.Message || errorCode,
1090
- $fault: "client",
1091
- $metadata: deserializeMetadata(output),
1092
- } as any;
1093
- }
1094
- const message = response.message || response.Message || errorCode;
1095
- response.message = message;
1096
- delete response.Message;
1097
- return Promise.reject(Object.assign(new Error(message), response));
1098
- };
1099
-
1100
- export const deserializeAws_json1_0GetExecutionHistoryCommand = async (
1101
- output: __HttpResponse,
1102
- context: __SerdeContext
1103
- ): Promise<GetExecutionHistoryCommandOutput> => {
1104
- if (output.statusCode >= 300) {
1105
- return deserializeAws_json1_0GetExecutionHistoryCommandError(output, context);
1106
- }
1107
- const data: any = await parseBody(output.body, context);
1108
- let contents: any = {};
1109
- contents = deserializeAws_json1_0GetExecutionHistoryOutput(data, context);
1110
- const response: GetExecutionHistoryCommandOutput = {
1111
- $metadata: deserializeMetadata(output),
1112
- ...contents,
1113
- };
1114
- return Promise.resolve(response);
1115
- };
1116
-
1117
- const deserializeAws_json1_0GetExecutionHistoryCommandError = async (
1118
- output: __HttpResponse,
1119
- context: __SerdeContext
1120
- ): Promise<GetExecutionHistoryCommandOutput> => {
1121
- const parsedOutput: any = {
1122
- ...output,
1123
- body: await parseBody(output.body, context),
1124
- };
1125
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1126
- let errorCode: string = "UnknownError";
1127
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1128
- switch (errorCode) {
1129
- case "ExecutionDoesNotExist":
1130
- case "com.amazonaws.sfn#ExecutionDoesNotExist":
1131
- response = {
1132
- ...(await deserializeAws_json1_0ExecutionDoesNotExistResponse(parsedOutput, context)),
1133
- name: errorCode,
1134
- $metadata: deserializeMetadata(output),
1135
- };
1136
- break;
1137
- case "InvalidArn":
1138
- case "com.amazonaws.sfn#InvalidArn":
1139
- response = {
1140
- ...(await deserializeAws_json1_0InvalidArnResponse(parsedOutput, context)),
1141
- name: errorCode,
1142
- $metadata: deserializeMetadata(output),
1143
- };
1144
- break;
1145
- case "InvalidToken":
1146
- case "com.amazonaws.sfn#InvalidToken":
1147
- response = {
1148
- ...(await deserializeAws_json1_0InvalidTokenResponse(parsedOutput, context)),
1149
- name: errorCode,
1150
- $metadata: deserializeMetadata(output),
1151
- };
1152
- break;
1153
- default:
1154
- const parsedBody = parsedOutput.body;
1155
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1156
- response = {
1157
- ...parsedBody,
1158
- name: `${errorCode}`,
1159
- message: parsedBody.message || parsedBody.Message || errorCode,
1160
- $fault: "client",
1161
- $metadata: deserializeMetadata(output),
1162
- } as any;
1163
- }
1164
- const message = response.message || response.Message || errorCode;
1165
- response.message = message;
1166
- delete response.Message;
1167
- return Promise.reject(Object.assign(new Error(message), response));
1168
- };
1169
-
1170
- export const deserializeAws_json1_0ListActivitiesCommand = async (
1171
- output: __HttpResponse,
1172
- context: __SerdeContext
1173
- ): Promise<ListActivitiesCommandOutput> => {
1174
- if (output.statusCode >= 300) {
1175
- return deserializeAws_json1_0ListActivitiesCommandError(output, context);
1176
- }
1177
- const data: any = await parseBody(output.body, context);
1178
- let contents: any = {};
1179
- contents = deserializeAws_json1_0ListActivitiesOutput(data, context);
1180
- const response: ListActivitiesCommandOutput = {
1181
- $metadata: deserializeMetadata(output),
1182
- ...contents,
1183
- };
1184
- return Promise.resolve(response);
1185
- };
1186
-
1187
- const deserializeAws_json1_0ListActivitiesCommandError = async (
1188
- output: __HttpResponse,
1189
- context: __SerdeContext
1190
- ): Promise<ListActivitiesCommandOutput> => {
1191
- const parsedOutput: any = {
1192
- ...output,
1193
- body: await parseBody(output.body, context),
1194
- };
1195
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1196
- let errorCode: string = "UnknownError";
1197
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1198
- switch (errorCode) {
1199
- case "InvalidToken":
1200
- case "com.amazonaws.sfn#InvalidToken":
1201
- response = {
1202
- ...(await deserializeAws_json1_0InvalidTokenResponse(parsedOutput, context)),
1203
- name: errorCode,
1204
- $metadata: deserializeMetadata(output),
1205
- };
1206
- break;
1207
- default:
1208
- const parsedBody = parsedOutput.body;
1209
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1210
- response = {
1211
- ...parsedBody,
1212
- name: `${errorCode}`,
1213
- message: parsedBody.message || parsedBody.Message || errorCode,
1214
- $fault: "client",
1215
- $metadata: deserializeMetadata(output),
1216
- } as any;
1217
- }
1218
- const message = response.message || response.Message || errorCode;
1219
- response.message = message;
1220
- delete response.Message;
1221
- return Promise.reject(Object.assign(new Error(message), response));
1222
- };
1223
-
1224
- export const deserializeAws_json1_0ListExecutionsCommand = async (
1225
- output: __HttpResponse,
1226
- context: __SerdeContext
1227
- ): Promise<ListExecutionsCommandOutput> => {
1228
- if (output.statusCode >= 300) {
1229
- return deserializeAws_json1_0ListExecutionsCommandError(output, context);
1230
- }
1231
- const data: any = await parseBody(output.body, context);
1232
- let contents: any = {};
1233
- contents = deserializeAws_json1_0ListExecutionsOutput(data, context);
1234
- const response: ListExecutionsCommandOutput = {
1235
- $metadata: deserializeMetadata(output),
1236
- ...contents,
1237
- };
1238
- return Promise.resolve(response);
1239
- };
1240
-
1241
- const deserializeAws_json1_0ListExecutionsCommandError = async (
1242
- output: __HttpResponse,
1243
- context: __SerdeContext
1244
- ): Promise<ListExecutionsCommandOutput> => {
1245
- const parsedOutput: any = {
1246
- ...output,
1247
- body: await parseBody(output.body, context),
1248
- };
1249
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1250
- let errorCode: string = "UnknownError";
1251
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1252
- switch (errorCode) {
1253
- case "InvalidArn":
1254
- case "com.amazonaws.sfn#InvalidArn":
1255
- response = {
1256
- ...(await deserializeAws_json1_0InvalidArnResponse(parsedOutput, context)),
1257
- name: errorCode,
1258
- $metadata: deserializeMetadata(output),
1259
- };
1260
- break;
1261
- case "InvalidToken":
1262
- case "com.amazonaws.sfn#InvalidToken":
1263
- response = {
1264
- ...(await deserializeAws_json1_0InvalidTokenResponse(parsedOutput, context)),
1265
- name: errorCode,
1266
- $metadata: deserializeMetadata(output),
1267
- };
1268
- break;
1269
- case "StateMachineDoesNotExist":
1270
- case "com.amazonaws.sfn#StateMachineDoesNotExist":
1271
- response = {
1272
- ...(await deserializeAws_json1_0StateMachineDoesNotExistResponse(parsedOutput, context)),
1273
- name: errorCode,
1274
- $metadata: deserializeMetadata(output),
1275
- };
1276
- break;
1277
- case "StateMachineTypeNotSupported":
1278
- case "com.amazonaws.sfn#StateMachineTypeNotSupported":
1279
- response = {
1280
- ...(await deserializeAws_json1_0StateMachineTypeNotSupportedResponse(parsedOutput, context)),
1281
- name: errorCode,
1282
- $metadata: deserializeMetadata(output),
1283
- };
1284
- break;
1285
- default:
1286
- const parsedBody = parsedOutput.body;
1287
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1288
- response = {
1289
- ...parsedBody,
1290
- name: `${errorCode}`,
1291
- message: parsedBody.message || parsedBody.Message || errorCode,
1292
- $fault: "client",
1293
- $metadata: deserializeMetadata(output),
1294
- } as any;
1295
- }
1296
- const message = response.message || response.Message || errorCode;
1297
- response.message = message;
1298
- delete response.Message;
1299
- return Promise.reject(Object.assign(new Error(message), response));
1300
- };
1301
-
1302
- export const deserializeAws_json1_0ListStateMachinesCommand = async (
1303
- output: __HttpResponse,
1304
- context: __SerdeContext
1305
- ): Promise<ListStateMachinesCommandOutput> => {
1306
- if (output.statusCode >= 300) {
1307
- return deserializeAws_json1_0ListStateMachinesCommandError(output, context);
1308
- }
1309
- const data: any = await parseBody(output.body, context);
1310
- let contents: any = {};
1311
- contents = deserializeAws_json1_0ListStateMachinesOutput(data, context);
1312
- const response: ListStateMachinesCommandOutput = {
1313
- $metadata: deserializeMetadata(output),
1314
- ...contents,
1315
- };
1316
- return Promise.resolve(response);
1317
- };
1318
-
1319
- const deserializeAws_json1_0ListStateMachinesCommandError = async (
1320
- output: __HttpResponse,
1321
- context: __SerdeContext
1322
- ): Promise<ListStateMachinesCommandOutput> => {
1323
- const parsedOutput: any = {
1324
- ...output,
1325
- body: await parseBody(output.body, context),
1326
- };
1327
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1328
- let errorCode: string = "UnknownError";
1329
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1330
- switch (errorCode) {
1331
- case "InvalidToken":
1332
- case "com.amazonaws.sfn#InvalidToken":
1333
- response = {
1334
- ...(await deserializeAws_json1_0InvalidTokenResponse(parsedOutput, context)),
1335
- name: errorCode,
1336
- $metadata: deserializeMetadata(output),
1337
- };
1338
- break;
1339
- default:
1340
- const parsedBody = parsedOutput.body;
1341
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1342
- response = {
1343
- ...parsedBody,
1344
- name: `${errorCode}`,
1345
- message: parsedBody.message || parsedBody.Message || errorCode,
1346
- $fault: "client",
1347
- $metadata: deserializeMetadata(output),
1348
- } as any;
1349
- }
1350
- const message = response.message || response.Message || errorCode;
1351
- response.message = message;
1352
- delete response.Message;
1353
- return Promise.reject(Object.assign(new Error(message), response));
1354
- };
1355
-
1356
- export const deserializeAws_json1_0ListTagsForResourceCommand = async (
1357
- output: __HttpResponse,
1358
- context: __SerdeContext
1359
- ): Promise<ListTagsForResourceCommandOutput> => {
1360
- if (output.statusCode >= 300) {
1361
- return deserializeAws_json1_0ListTagsForResourceCommandError(output, context);
1362
- }
1363
- const data: any = await parseBody(output.body, context);
1364
- let contents: any = {};
1365
- contents = deserializeAws_json1_0ListTagsForResourceOutput(data, context);
1366
- const response: ListTagsForResourceCommandOutput = {
1367
- $metadata: deserializeMetadata(output),
1368
- ...contents,
1369
- };
1370
- return Promise.resolve(response);
1371
- };
1372
-
1373
- const deserializeAws_json1_0ListTagsForResourceCommandError = async (
1374
- output: __HttpResponse,
1375
- context: __SerdeContext
1376
- ): Promise<ListTagsForResourceCommandOutput> => {
1377
- const parsedOutput: any = {
1378
- ...output,
1379
- body: await parseBody(output.body, context),
1380
- };
1381
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1382
- let errorCode: string = "UnknownError";
1383
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1384
- switch (errorCode) {
1385
- case "InvalidArn":
1386
- case "com.amazonaws.sfn#InvalidArn":
1387
- response = {
1388
- ...(await deserializeAws_json1_0InvalidArnResponse(parsedOutput, context)),
1389
- name: errorCode,
1390
- $metadata: deserializeMetadata(output),
1391
- };
1392
- break;
1393
- case "ResourceNotFound":
1394
- case "com.amazonaws.sfn#ResourceNotFound":
1395
- response = {
1396
- ...(await deserializeAws_json1_0ResourceNotFoundResponse(parsedOutput, context)),
1397
- name: errorCode,
1398
- $metadata: deserializeMetadata(output),
1399
- };
1400
- break;
1401
- default:
1402
- const parsedBody = parsedOutput.body;
1403
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1404
- response = {
1405
- ...parsedBody,
1406
- name: `${errorCode}`,
1407
- message: parsedBody.message || parsedBody.Message || errorCode,
1408
- $fault: "client",
1409
- $metadata: deserializeMetadata(output),
1410
- } as any;
1411
- }
1412
- const message = response.message || response.Message || errorCode;
1413
- response.message = message;
1414
- delete response.Message;
1415
- return Promise.reject(Object.assign(new Error(message), response));
1416
- };
1417
-
1418
- export const deserializeAws_json1_0SendTaskFailureCommand = async (
1419
- output: __HttpResponse,
1420
- context: __SerdeContext
1421
- ): Promise<SendTaskFailureCommandOutput> => {
1422
- if (output.statusCode >= 300) {
1423
- return deserializeAws_json1_0SendTaskFailureCommandError(output, context);
1424
- }
1425
- const data: any = await parseBody(output.body, context);
1426
- let contents: any = {};
1427
- contents = deserializeAws_json1_0SendTaskFailureOutput(data, context);
1428
- const response: SendTaskFailureCommandOutput = {
1429
- $metadata: deserializeMetadata(output),
1430
- ...contents,
1431
- };
1432
- return Promise.resolve(response);
1433
- };
1434
-
1435
- const deserializeAws_json1_0SendTaskFailureCommandError = async (
1436
- output: __HttpResponse,
1437
- context: __SerdeContext
1438
- ): Promise<SendTaskFailureCommandOutput> => {
1439
- const parsedOutput: any = {
1440
- ...output,
1441
- body: await parseBody(output.body, context),
1442
- };
1443
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1444
- let errorCode: string = "UnknownError";
1445
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1446
- switch (errorCode) {
1447
- case "InvalidToken":
1448
- case "com.amazonaws.sfn#InvalidToken":
1449
- response = {
1450
- ...(await deserializeAws_json1_0InvalidTokenResponse(parsedOutput, context)),
1451
- name: errorCode,
1452
- $metadata: deserializeMetadata(output),
1453
- };
1454
- break;
1455
- case "TaskDoesNotExist":
1456
- case "com.amazonaws.sfn#TaskDoesNotExist":
1457
- response = {
1458
- ...(await deserializeAws_json1_0TaskDoesNotExistResponse(parsedOutput, context)),
1459
- name: errorCode,
1460
- $metadata: deserializeMetadata(output),
1461
- };
1462
- break;
1463
- case "TaskTimedOut":
1464
- case "com.amazonaws.sfn#TaskTimedOut":
1465
- response = {
1466
- ...(await deserializeAws_json1_0TaskTimedOutResponse(parsedOutput, context)),
1467
- name: errorCode,
1468
- $metadata: deserializeMetadata(output),
1469
- };
1470
- break;
1471
- default:
1472
- const parsedBody = parsedOutput.body;
1473
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1474
- response = {
1475
- ...parsedBody,
1476
- name: `${errorCode}`,
1477
- message: parsedBody.message || parsedBody.Message || errorCode,
1478
- $fault: "client",
1479
- $metadata: deserializeMetadata(output),
1480
- } as any;
1481
- }
1482
- const message = response.message || response.Message || errorCode;
1483
- response.message = message;
1484
- delete response.Message;
1485
- return Promise.reject(Object.assign(new Error(message), response));
1486
- };
1487
-
1488
- export const deserializeAws_json1_0SendTaskHeartbeatCommand = async (
1489
- output: __HttpResponse,
1490
- context: __SerdeContext
1491
- ): Promise<SendTaskHeartbeatCommandOutput> => {
1492
- if (output.statusCode >= 300) {
1493
- return deserializeAws_json1_0SendTaskHeartbeatCommandError(output, context);
1494
- }
1495
- const data: any = await parseBody(output.body, context);
1496
- let contents: any = {};
1497
- contents = deserializeAws_json1_0SendTaskHeartbeatOutput(data, context);
1498
- const response: SendTaskHeartbeatCommandOutput = {
1499
- $metadata: deserializeMetadata(output),
1500
- ...contents,
1501
- };
1502
- return Promise.resolve(response);
1503
- };
1504
-
1505
- const deserializeAws_json1_0SendTaskHeartbeatCommandError = async (
1506
- output: __HttpResponse,
1507
- context: __SerdeContext
1508
- ): Promise<SendTaskHeartbeatCommandOutput> => {
1509
- const parsedOutput: any = {
1510
- ...output,
1511
- body: await parseBody(output.body, context),
1512
- };
1513
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1514
- let errorCode: string = "UnknownError";
1515
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1516
- switch (errorCode) {
1517
- case "InvalidToken":
1518
- case "com.amazonaws.sfn#InvalidToken":
1519
- response = {
1520
- ...(await deserializeAws_json1_0InvalidTokenResponse(parsedOutput, context)),
1521
- name: errorCode,
1522
- $metadata: deserializeMetadata(output),
1523
- };
1524
- break;
1525
- case "TaskDoesNotExist":
1526
- case "com.amazonaws.sfn#TaskDoesNotExist":
1527
- response = {
1528
- ...(await deserializeAws_json1_0TaskDoesNotExistResponse(parsedOutput, context)),
1529
- name: errorCode,
1530
- $metadata: deserializeMetadata(output),
1531
- };
1532
- break;
1533
- case "TaskTimedOut":
1534
- case "com.amazonaws.sfn#TaskTimedOut":
1535
- response = {
1536
- ...(await deserializeAws_json1_0TaskTimedOutResponse(parsedOutput, context)),
1537
- name: errorCode,
1538
- $metadata: deserializeMetadata(output),
1539
- };
1540
- break;
1541
- default:
1542
- const parsedBody = parsedOutput.body;
1543
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1544
- response = {
1545
- ...parsedBody,
1546
- name: `${errorCode}`,
1547
- message: parsedBody.message || parsedBody.Message || errorCode,
1548
- $fault: "client",
1549
- $metadata: deserializeMetadata(output),
1550
- } as any;
1551
- }
1552
- const message = response.message || response.Message || errorCode;
1553
- response.message = message;
1554
- delete response.Message;
1555
- return Promise.reject(Object.assign(new Error(message), response));
1556
- };
1557
-
1558
- export const deserializeAws_json1_0SendTaskSuccessCommand = async (
1559
- output: __HttpResponse,
1560
- context: __SerdeContext
1561
- ): Promise<SendTaskSuccessCommandOutput> => {
1562
- if (output.statusCode >= 300) {
1563
- return deserializeAws_json1_0SendTaskSuccessCommandError(output, context);
1564
- }
1565
- const data: any = await parseBody(output.body, context);
1566
- let contents: any = {};
1567
- contents = deserializeAws_json1_0SendTaskSuccessOutput(data, context);
1568
- const response: SendTaskSuccessCommandOutput = {
1569
- $metadata: deserializeMetadata(output),
1570
- ...contents,
1571
- };
1572
- return Promise.resolve(response);
1573
- };
1574
-
1575
- const deserializeAws_json1_0SendTaskSuccessCommandError = async (
1576
- output: __HttpResponse,
1577
- context: __SerdeContext
1578
- ): Promise<SendTaskSuccessCommandOutput> => {
1579
- const parsedOutput: any = {
1580
- ...output,
1581
- body: await parseBody(output.body, context),
1582
- };
1583
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1584
- let errorCode: string = "UnknownError";
1585
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1586
- switch (errorCode) {
1587
- case "InvalidOutput":
1588
- case "com.amazonaws.sfn#InvalidOutput":
1589
- response = {
1590
- ...(await deserializeAws_json1_0InvalidOutputResponse(parsedOutput, context)),
1591
- name: errorCode,
1592
- $metadata: deserializeMetadata(output),
1593
- };
1594
- break;
1595
- case "InvalidToken":
1596
- case "com.amazonaws.sfn#InvalidToken":
1597
- response = {
1598
- ...(await deserializeAws_json1_0InvalidTokenResponse(parsedOutput, context)),
1599
- name: errorCode,
1600
- $metadata: deserializeMetadata(output),
1601
- };
1602
- break;
1603
- case "TaskDoesNotExist":
1604
- case "com.amazonaws.sfn#TaskDoesNotExist":
1605
- response = {
1606
- ...(await deserializeAws_json1_0TaskDoesNotExistResponse(parsedOutput, context)),
1607
- name: errorCode,
1608
- $metadata: deserializeMetadata(output),
1609
- };
1610
- break;
1611
- case "TaskTimedOut":
1612
- case "com.amazonaws.sfn#TaskTimedOut":
1613
- response = {
1614
- ...(await deserializeAws_json1_0TaskTimedOutResponse(parsedOutput, context)),
1615
- name: errorCode,
1616
- $metadata: deserializeMetadata(output),
1617
- };
1618
- break;
1619
- default:
1620
- const parsedBody = parsedOutput.body;
1621
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1622
- response = {
1623
- ...parsedBody,
1624
- name: `${errorCode}`,
1625
- message: parsedBody.message || parsedBody.Message || errorCode,
1626
- $fault: "client",
1627
- $metadata: deserializeMetadata(output),
1628
- } as any;
1629
- }
1630
- const message = response.message || response.Message || errorCode;
1631
- response.message = message;
1632
- delete response.Message;
1633
- return Promise.reject(Object.assign(new Error(message), response));
1634
- };
1635
-
1636
- export const deserializeAws_json1_0StartExecutionCommand = async (
1637
- output: __HttpResponse,
1638
- context: __SerdeContext
1639
- ): Promise<StartExecutionCommandOutput> => {
1640
- if (output.statusCode >= 300) {
1641
- return deserializeAws_json1_0StartExecutionCommandError(output, context);
1642
- }
1643
- const data: any = await parseBody(output.body, context);
1644
- let contents: any = {};
1645
- contents = deserializeAws_json1_0StartExecutionOutput(data, context);
1646
- const response: StartExecutionCommandOutput = {
1647
- $metadata: deserializeMetadata(output),
1648
- ...contents,
1649
- };
1650
- return Promise.resolve(response);
1651
- };
1652
-
1653
- const deserializeAws_json1_0StartExecutionCommandError = async (
1654
- output: __HttpResponse,
1655
- context: __SerdeContext
1656
- ): Promise<StartExecutionCommandOutput> => {
1657
- const parsedOutput: any = {
1658
- ...output,
1659
- body: await parseBody(output.body, context),
1660
- };
1661
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1662
- let errorCode: string = "UnknownError";
1663
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1664
- switch (errorCode) {
1665
- case "ExecutionAlreadyExists":
1666
- case "com.amazonaws.sfn#ExecutionAlreadyExists":
1667
- response = {
1668
- ...(await deserializeAws_json1_0ExecutionAlreadyExistsResponse(parsedOutput, context)),
1669
- name: errorCode,
1670
- $metadata: deserializeMetadata(output),
1671
- };
1672
- break;
1673
- case "ExecutionLimitExceeded":
1674
- case "com.amazonaws.sfn#ExecutionLimitExceeded":
1675
- response = {
1676
- ...(await deserializeAws_json1_0ExecutionLimitExceededResponse(parsedOutput, context)),
1677
- name: errorCode,
1678
- $metadata: deserializeMetadata(output),
1679
- };
1680
- break;
1681
- case "InvalidArn":
1682
- case "com.amazonaws.sfn#InvalidArn":
1683
- response = {
1684
- ...(await deserializeAws_json1_0InvalidArnResponse(parsedOutput, context)),
1685
- name: errorCode,
1686
- $metadata: deserializeMetadata(output),
1687
- };
1688
- break;
1689
- case "InvalidExecutionInput":
1690
- case "com.amazonaws.sfn#InvalidExecutionInput":
1691
- response = {
1692
- ...(await deserializeAws_json1_0InvalidExecutionInputResponse(parsedOutput, context)),
1693
- name: errorCode,
1694
- $metadata: deserializeMetadata(output),
1695
- };
1696
- break;
1697
- case "InvalidName":
1698
- case "com.amazonaws.sfn#InvalidName":
1699
- response = {
1700
- ...(await deserializeAws_json1_0InvalidNameResponse(parsedOutput, context)),
1701
- name: errorCode,
1702
- $metadata: deserializeMetadata(output),
1703
- };
1704
- break;
1705
- case "StateMachineDeleting":
1706
- case "com.amazonaws.sfn#StateMachineDeleting":
1707
- response = {
1708
- ...(await deserializeAws_json1_0StateMachineDeletingResponse(parsedOutput, context)),
1709
- name: errorCode,
1710
- $metadata: deserializeMetadata(output),
1711
- };
1712
- break;
1713
- case "StateMachineDoesNotExist":
1714
- case "com.amazonaws.sfn#StateMachineDoesNotExist":
1715
- response = {
1716
- ...(await deserializeAws_json1_0StateMachineDoesNotExistResponse(parsedOutput, context)),
1717
- name: errorCode,
1718
- $metadata: deserializeMetadata(output),
1719
- };
1720
- break;
1721
- default:
1722
- const parsedBody = parsedOutput.body;
1723
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1724
- response = {
1725
- ...parsedBody,
1726
- name: `${errorCode}`,
1727
- message: parsedBody.message || parsedBody.Message || errorCode,
1728
- $fault: "client",
1729
- $metadata: deserializeMetadata(output),
1730
- } as any;
1731
- }
1732
- const message = response.message || response.Message || errorCode;
1733
- response.message = message;
1734
- delete response.Message;
1735
- return Promise.reject(Object.assign(new Error(message), response));
1736
- };
1737
-
1738
- export const deserializeAws_json1_0StartSyncExecutionCommand = async (
1739
- output: __HttpResponse,
1740
- context: __SerdeContext
1741
- ): Promise<StartSyncExecutionCommandOutput> => {
1742
- if (output.statusCode >= 300) {
1743
- return deserializeAws_json1_0StartSyncExecutionCommandError(output, context);
1744
- }
1745
- const data: any = await parseBody(output.body, context);
1746
- let contents: any = {};
1747
- contents = deserializeAws_json1_0StartSyncExecutionOutput(data, context);
1748
- const response: StartSyncExecutionCommandOutput = {
1749
- $metadata: deserializeMetadata(output),
1750
- ...contents,
1751
- };
1752
- return Promise.resolve(response);
1753
- };
1754
-
1755
- const deserializeAws_json1_0StartSyncExecutionCommandError = async (
1756
- output: __HttpResponse,
1757
- context: __SerdeContext
1758
- ): Promise<StartSyncExecutionCommandOutput> => {
1759
- const parsedOutput: any = {
1760
- ...output,
1761
- body: await parseBody(output.body, context),
1762
- };
1763
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1764
- let errorCode: string = "UnknownError";
1765
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1766
- switch (errorCode) {
1767
- case "InvalidArn":
1768
- case "com.amazonaws.sfn#InvalidArn":
1769
- response = {
1770
- ...(await deserializeAws_json1_0InvalidArnResponse(parsedOutput, context)),
1771
- name: errorCode,
1772
- $metadata: deserializeMetadata(output),
1773
- };
1774
- break;
1775
- case "InvalidExecutionInput":
1776
- case "com.amazonaws.sfn#InvalidExecutionInput":
1777
- response = {
1778
- ...(await deserializeAws_json1_0InvalidExecutionInputResponse(parsedOutput, context)),
1779
- name: errorCode,
1780
- $metadata: deserializeMetadata(output),
1781
- };
1782
- break;
1783
- case "InvalidName":
1784
- case "com.amazonaws.sfn#InvalidName":
1785
- response = {
1786
- ...(await deserializeAws_json1_0InvalidNameResponse(parsedOutput, context)),
1787
- name: errorCode,
1788
- $metadata: deserializeMetadata(output),
1789
- };
1790
- break;
1791
- case "StateMachineDeleting":
1792
- case "com.amazonaws.sfn#StateMachineDeleting":
1793
- response = {
1794
- ...(await deserializeAws_json1_0StateMachineDeletingResponse(parsedOutput, context)),
1795
- name: errorCode,
1796
- $metadata: deserializeMetadata(output),
1797
- };
1798
- break;
1799
- case "StateMachineDoesNotExist":
1800
- case "com.amazonaws.sfn#StateMachineDoesNotExist":
1801
- response = {
1802
- ...(await deserializeAws_json1_0StateMachineDoesNotExistResponse(parsedOutput, context)),
1803
- name: errorCode,
1804
- $metadata: deserializeMetadata(output),
1805
- };
1806
- break;
1807
- case "StateMachineTypeNotSupported":
1808
- case "com.amazonaws.sfn#StateMachineTypeNotSupported":
1809
- response = {
1810
- ...(await deserializeAws_json1_0StateMachineTypeNotSupportedResponse(parsedOutput, context)),
1811
- name: errorCode,
1812
- $metadata: deserializeMetadata(output),
1813
- };
1814
- break;
1815
- default:
1816
- const parsedBody = parsedOutput.body;
1817
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1818
- response = {
1819
- ...parsedBody,
1820
- name: `${errorCode}`,
1821
- message: parsedBody.message || parsedBody.Message || errorCode,
1822
- $fault: "client",
1823
- $metadata: deserializeMetadata(output),
1824
- } as any;
1825
- }
1826
- const message = response.message || response.Message || errorCode;
1827
- response.message = message;
1828
- delete response.Message;
1829
- return Promise.reject(Object.assign(new Error(message), response));
1830
- };
1831
-
1832
- export const deserializeAws_json1_0StopExecutionCommand = async (
1833
- output: __HttpResponse,
1834
- context: __SerdeContext
1835
- ): Promise<StopExecutionCommandOutput> => {
1836
- if (output.statusCode >= 300) {
1837
- return deserializeAws_json1_0StopExecutionCommandError(output, context);
1838
- }
1839
- const data: any = await parseBody(output.body, context);
1840
- let contents: any = {};
1841
- contents = deserializeAws_json1_0StopExecutionOutput(data, context);
1842
- const response: StopExecutionCommandOutput = {
1843
- $metadata: deserializeMetadata(output),
1844
- ...contents,
1845
- };
1846
- return Promise.resolve(response);
1847
- };
1848
-
1849
- const deserializeAws_json1_0StopExecutionCommandError = async (
1850
- output: __HttpResponse,
1851
- context: __SerdeContext
1852
- ): Promise<StopExecutionCommandOutput> => {
1853
- const parsedOutput: any = {
1854
- ...output,
1855
- body: await parseBody(output.body, context),
1856
- };
1857
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1858
- let errorCode: string = "UnknownError";
1859
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1860
- switch (errorCode) {
1861
- case "ExecutionDoesNotExist":
1862
- case "com.amazonaws.sfn#ExecutionDoesNotExist":
1863
- response = {
1864
- ...(await deserializeAws_json1_0ExecutionDoesNotExistResponse(parsedOutput, context)),
1865
- name: errorCode,
1866
- $metadata: deserializeMetadata(output),
1867
- };
1868
- break;
1869
- case "InvalidArn":
1870
- case "com.amazonaws.sfn#InvalidArn":
1871
- response = {
1872
- ...(await deserializeAws_json1_0InvalidArnResponse(parsedOutput, context)),
1873
- name: errorCode,
1874
- $metadata: deserializeMetadata(output),
1875
- };
1876
- break;
1877
- default:
1878
- const parsedBody = parsedOutput.body;
1879
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1880
- response = {
1881
- ...parsedBody,
1882
- name: `${errorCode}`,
1883
- message: parsedBody.message || parsedBody.Message || errorCode,
1884
- $fault: "client",
1885
- $metadata: deserializeMetadata(output),
1886
- } as any;
1887
- }
1888
- const message = response.message || response.Message || errorCode;
1889
- response.message = message;
1890
- delete response.Message;
1891
- return Promise.reject(Object.assign(new Error(message), response));
1892
- };
1893
-
1894
- export const deserializeAws_json1_0TagResourceCommand = async (
1895
- output: __HttpResponse,
1896
- context: __SerdeContext
1897
- ): Promise<TagResourceCommandOutput> => {
1898
- if (output.statusCode >= 300) {
1899
- return deserializeAws_json1_0TagResourceCommandError(output, context);
1900
- }
1901
- const data: any = await parseBody(output.body, context);
1902
- let contents: any = {};
1903
- contents = deserializeAws_json1_0TagResourceOutput(data, context);
1904
- const response: TagResourceCommandOutput = {
1905
- $metadata: deserializeMetadata(output),
1906
- ...contents,
1907
- };
1908
- return Promise.resolve(response);
1909
- };
1910
-
1911
- const deserializeAws_json1_0TagResourceCommandError = async (
1912
- output: __HttpResponse,
1913
- context: __SerdeContext
1914
- ): Promise<TagResourceCommandOutput> => {
1915
- const parsedOutput: any = {
1916
- ...output,
1917
- body: await parseBody(output.body, context),
1918
- };
1919
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1920
- let errorCode: string = "UnknownError";
1921
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1922
- switch (errorCode) {
1923
- case "InvalidArn":
1924
- case "com.amazonaws.sfn#InvalidArn":
1925
- response = {
1926
- ...(await deserializeAws_json1_0InvalidArnResponse(parsedOutput, context)),
1927
- name: errorCode,
1928
- $metadata: deserializeMetadata(output),
1929
- };
1930
- break;
1931
- case "ResourceNotFound":
1932
- case "com.amazonaws.sfn#ResourceNotFound":
1933
- response = {
1934
- ...(await deserializeAws_json1_0ResourceNotFoundResponse(parsedOutput, context)),
1935
- name: errorCode,
1936
- $metadata: deserializeMetadata(output),
1937
- };
1938
- break;
1939
- case "TooManyTags":
1940
- case "com.amazonaws.sfn#TooManyTags":
1941
- response = {
1942
- ...(await deserializeAws_json1_0TooManyTagsResponse(parsedOutput, context)),
1943
- name: errorCode,
1944
- $metadata: deserializeMetadata(output),
1945
- };
1946
- break;
1947
- default:
1948
- const parsedBody = parsedOutput.body;
1949
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1950
- response = {
1951
- ...parsedBody,
1952
- name: `${errorCode}`,
1953
- message: parsedBody.message || parsedBody.Message || errorCode,
1954
- $fault: "client",
1955
- $metadata: deserializeMetadata(output),
1956
- } as any;
1957
- }
1958
- const message = response.message || response.Message || errorCode;
1959
- response.message = message;
1960
- delete response.Message;
1961
- return Promise.reject(Object.assign(new Error(message), response));
1962
- };
1963
-
1964
- export const deserializeAws_json1_0UntagResourceCommand = async (
1965
- output: __HttpResponse,
1966
- context: __SerdeContext
1967
- ): Promise<UntagResourceCommandOutput> => {
1968
- if (output.statusCode >= 300) {
1969
- return deserializeAws_json1_0UntagResourceCommandError(output, context);
1970
- }
1971
- const data: any = await parseBody(output.body, context);
1972
- let contents: any = {};
1973
- contents = deserializeAws_json1_0UntagResourceOutput(data, context);
1974
- const response: UntagResourceCommandOutput = {
1975
- $metadata: deserializeMetadata(output),
1976
- ...contents,
1977
- };
1978
- return Promise.resolve(response);
1979
- };
1980
-
1981
- const deserializeAws_json1_0UntagResourceCommandError = async (
1982
- output: __HttpResponse,
1983
- context: __SerdeContext
1984
- ): Promise<UntagResourceCommandOutput> => {
1985
- const parsedOutput: any = {
1986
- ...output,
1987
- body: await parseBody(output.body, context),
1988
- };
1989
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1990
- let errorCode: string = "UnknownError";
1991
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1992
- switch (errorCode) {
1993
- case "InvalidArn":
1994
- case "com.amazonaws.sfn#InvalidArn":
1995
- response = {
1996
- ...(await deserializeAws_json1_0InvalidArnResponse(parsedOutput, context)),
1997
- name: errorCode,
1998
- $metadata: deserializeMetadata(output),
1999
- };
2000
- break;
2001
- case "ResourceNotFound":
2002
- case "com.amazonaws.sfn#ResourceNotFound":
2003
- response = {
2004
- ...(await deserializeAws_json1_0ResourceNotFoundResponse(parsedOutput, context)),
2005
- name: errorCode,
2006
- $metadata: deserializeMetadata(output),
2007
- };
2008
- break;
2009
- default:
2010
- const parsedBody = parsedOutput.body;
2011
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2012
- response = {
2013
- ...parsedBody,
2014
- name: `${errorCode}`,
2015
- message: parsedBody.message || parsedBody.Message || errorCode,
2016
- $fault: "client",
2017
- $metadata: deserializeMetadata(output),
2018
- } as any;
2019
- }
2020
- const message = response.message || response.Message || errorCode;
2021
- response.message = message;
2022
- delete response.Message;
2023
- return Promise.reject(Object.assign(new Error(message), response));
2024
- };
2025
-
2026
- export const deserializeAws_json1_0UpdateStateMachineCommand = async (
2027
- output: __HttpResponse,
2028
- context: __SerdeContext
2029
- ): Promise<UpdateStateMachineCommandOutput> => {
2030
- if (output.statusCode >= 300) {
2031
- return deserializeAws_json1_0UpdateStateMachineCommandError(output, context);
2032
- }
2033
- const data: any = await parseBody(output.body, context);
2034
- let contents: any = {};
2035
- contents = deserializeAws_json1_0UpdateStateMachineOutput(data, context);
2036
- const response: UpdateStateMachineCommandOutput = {
2037
- $metadata: deserializeMetadata(output),
2038
- ...contents,
2039
- };
2040
- return Promise.resolve(response);
2041
- };
2042
-
2043
- const deserializeAws_json1_0UpdateStateMachineCommandError = async (
2044
- output: __HttpResponse,
2045
- context: __SerdeContext
2046
- ): Promise<UpdateStateMachineCommandOutput> => {
2047
- const parsedOutput: any = {
2048
- ...output,
2049
- body: await parseBody(output.body, context),
2050
- };
2051
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
2052
- let errorCode: string = "UnknownError";
2053
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2054
- switch (errorCode) {
2055
- case "InvalidArn":
2056
- case "com.amazonaws.sfn#InvalidArn":
2057
- response = {
2058
- ...(await deserializeAws_json1_0InvalidArnResponse(parsedOutput, context)),
2059
- name: errorCode,
2060
- $metadata: deserializeMetadata(output),
2061
- };
2062
- break;
2063
- case "InvalidDefinition":
2064
- case "com.amazonaws.sfn#InvalidDefinition":
2065
- response = {
2066
- ...(await deserializeAws_json1_0InvalidDefinitionResponse(parsedOutput, context)),
2067
- name: errorCode,
2068
- $metadata: deserializeMetadata(output),
2069
- };
2070
- break;
2071
- case "InvalidLoggingConfiguration":
2072
- case "com.amazonaws.sfn#InvalidLoggingConfiguration":
2073
- response = {
2074
- ...(await deserializeAws_json1_0InvalidLoggingConfigurationResponse(parsedOutput, context)),
2075
- name: errorCode,
2076
- $metadata: deserializeMetadata(output),
2077
- };
2078
- break;
2079
- case "InvalidTracingConfiguration":
2080
- case "com.amazonaws.sfn#InvalidTracingConfiguration":
2081
- response = {
2082
- ...(await deserializeAws_json1_0InvalidTracingConfigurationResponse(parsedOutput, context)),
2083
- name: errorCode,
2084
- $metadata: deserializeMetadata(output),
2085
- };
2086
- break;
2087
- case "MissingRequiredParameter":
2088
- case "com.amazonaws.sfn#MissingRequiredParameter":
2089
- response = {
2090
- ...(await deserializeAws_json1_0MissingRequiredParameterResponse(parsedOutput, context)),
2091
- name: errorCode,
2092
- $metadata: deserializeMetadata(output),
2093
- };
2094
- break;
2095
- case "StateMachineDeleting":
2096
- case "com.amazonaws.sfn#StateMachineDeleting":
2097
- response = {
2098
- ...(await deserializeAws_json1_0StateMachineDeletingResponse(parsedOutput, context)),
2099
- name: errorCode,
2100
- $metadata: deserializeMetadata(output),
2101
- };
2102
- break;
2103
- case "StateMachineDoesNotExist":
2104
- case "com.amazonaws.sfn#StateMachineDoesNotExist":
2105
- response = {
2106
- ...(await deserializeAws_json1_0StateMachineDoesNotExistResponse(parsedOutput, context)),
2107
- name: errorCode,
2108
- $metadata: deserializeMetadata(output),
2109
- };
2110
- break;
2111
- default:
2112
- const parsedBody = parsedOutput.body;
2113
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2114
- response = {
2115
- ...parsedBody,
2116
- name: `${errorCode}`,
2117
- message: parsedBody.message || parsedBody.Message || errorCode,
2118
- $fault: "client",
2119
- $metadata: deserializeMetadata(output),
2120
- } as any;
2121
- }
2122
- const message = response.message || response.Message || errorCode;
2123
- response.message = message;
2124
- delete response.Message;
2125
- return Promise.reject(Object.assign(new Error(message), response));
2126
- };
2127
-
2128
- const deserializeAws_json1_0ActivityDoesNotExistResponse = async (
2129
- parsedOutput: any,
2130
- context: __SerdeContext
2131
- ): Promise<ActivityDoesNotExist> => {
2132
- const body = parsedOutput.body;
2133
- const deserialized: any = deserializeAws_json1_0ActivityDoesNotExist(body, context);
2134
- const contents: ActivityDoesNotExist = {
2135
- name: "ActivityDoesNotExist",
2136
- $fault: "client",
2137
- $metadata: deserializeMetadata(parsedOutput),
2138
- ...deserialized,
2139
- };
2140
- return contents;
2141
- };
2142
-
2143
- const deserializeAws_json1_0ActivityLimitExceededResponse = async (
2144
- parsedOutput: any,
2145
- context: __SerdeContext
2146
- ): Promise<ActivityLimitExceeded> => {
2147
- const body = parsedOutput.body;
2148
- const deserialized: any = deserializeAws_json1_0ActivityLimitExceeded(body, context);
2149
- const contents: ActivityLimitExceeded = {
2150
- name: "ActivityLimitExceeded",
2151
- $fault: "client",
2152
- $metadata: deserializeMetadata(parsedOutput),
2153
- ...deserialized,
2154
- };
2155
- return contents;
2156
- };
2157
-
2158
- const deserializeAws_json1_0ActivityWorkerLimitExceededResponse = async (
2159
- parsedOutput: any,
2160
- context: __SerdeContext
2161
- ): Promise<ActivityWorkerLimitExceeded> => {
2162
- const body = parsedOutput.body;
2163
- const deserialized: any = deserializeAws_json1_0ActivityWorkerLimitExceeded(body, context);
2164
- const contents: ActivityWorkerLimitExceeded = {
2165
- name: "ActivityWorkerLimitExceeded",
2166
- $fault: "client",
2167
- $metadata: deserializeMetadata(parsedOutput),
2168
- ...deserialized,
2169
- };
2170
- return contents;
2171
- };
2172
-
2173
- const deserializeAws_json1_0ExecutionAlreadyExistsResponse = async (
2174
- parsedOutput: any,
2175
- context: __SerdeContext
2176
- ): Promise<ExecutionAlreadyExists> => {
2177
- const body = parsedOutput.body;
2178
- const deserialized: any = deserializeAws_json1_0ExecutionAlreadyExists(body, context);
2179
- const contents: ExecutionAlreadyExists = {
2180
- name: "ExecutionAlreadyExists",
2181
- $fault: "client",
2182
- $metadata: deserializeMetadata(parsedOutput),
2183
- ...deserialized,
2184
- };
2185
- return contents;
2186
- };
2187
-
2188
- const deserializeAws_json1_0ExecutionDoesNotExistResponse = async (
2189
- parsedOutput: any,
2190
- context: __SerdeContext
2191
- ): Promise<ExecutionDoesNotExist> => {
2192
- const body = parsedOutput.body;
2193
- const deserialized: any = deserializeAws_json1_0ExecutionDoesNotExist(body, context);
2194
- const contents: ExecutionDoesNotExist = {
2195
- name: "ExecutionDoesNotExist",
2196
- $fault: "client",
2197
- $metadata: deserializeMetadata(parsedOutput),
2198
- ...deserialized,
2199
- };
2200
- return contents;
2201
- };
2202
-
2203
- const deserializeAws_json1_0ExecutionLimitExceededResponse = async (
2204
- parsedOutput: any,
2205
- context: __SerdeContext
2206
- ): Promise<ExecutionLimitExceeded> => {
2207
- const body = parsedOutput.body;
2208
- const deserialized: any = deserializeAws_json1_0ExecutionLimitExceeded(body, context);
2209
- const contents: ExecutionLimitExceeded = {
2210
- name: "ExecutionLimitExceeded",
2211
- $fault: "client",
2212
- $metadata: deserializeMetadata(parsedOutput),
2213
- ...deserialized,
2214
- };
2215
- return contents;
2216
- };
2217
-
2218
- const deserializeAws_json1_0InvalidArnResponse = async (
2219
- parsedOutput: any,
2220
- context: __SerdeContext
2221
- ): Promise<InvalidArn> => {
2222
- const body = parsedOutput.body;
2223
- const deserialized: any = deserializeAws_json1_0InvalidArn(body, context);
2224
- const contents: InvalidArn = {
2225
- name: "InvalidArn",
2226
- $fault: "client",
2227
- $metadata: deserializeMetadata(parsedOutput),
2228
- ...deserialized,
2229
- };
2230
- return contents;
2231
- };
2232
-
2233
- const deserializeAws_json1_0InvalidDefinitionResponse = async (
2234
- parsedOutput: any,
2235
- context: __SerdeContext
2236
- ): Promise<InvalidDefinition> => {
2237
- const body = parsedOutput.body;
2238
- const deserialized: any = deserializeAws_json1_0InvalidDefinition(body, context);
2239
- const contents: InvalidDefinition = {
2240
- name: "InvalidDefinition",
2241
- $fault: "client",
2242
- $metadata: deserializeMetadata(parsedOutput),
2243
- ...deserialized,
2244
- };
2245
- return contents;
2246
- };
2247
-
2248
- const deserializeAws_json1_0InvalidExecutionInputResponse = async (
2249
- parsedOutput: any,
2250
- context: __SerdeContext
2251
- ): Promise<InvalidExecutionInput> => {
2252
- const body = parsedOutput.body;
2253
- const deserialized: any = deserializeAws_json1_0InvalidExecutionInput(body, context);
2254
- const contents: InvalidExecutionInput = {
2255
- name: "InvalidExecutionInput",
2256
- $fault: "client",
2257
- $metadata: deserializeMetadata(parsedOutput),
2258
- ...deserialized,
2259
- };
2260
- return contents;
2261
- };
2262
-
2263
- const deserializeAws_json1_0InvalidLoggingConfigurationResponse = async (
2264
- parsedOutput: any,
2265
- context: __SerdeContext
2266
- ): Promise<InvalidLoggingConfiguration> => {
2267
- const body = parsedOutput.body;
2268
- const deserialized: any = deserializeAws_json1_0InvalidLoggingConfiguration(body, context);
2269
- const contents: InvalidLoggingConfiguration = {
2270
- name: "InvalidLoggingConfiguration",
2271
- $fault: "client",
2272
- $metadata: deserializeMetadata(parsedOutput),
2273
- ...deserialized,
2274
- };
2275
- return contents;
2276
- };
2277
-
2278
- const deserializeAws_json1_0InvalidNameResponse = async (
2279
- parsedOutput: any,
2280
- context: __SerdeContext
2281
- ): Promise<InvalidName> => {
2282
- const body = parsedOutput.body;
2283
- const deserialized: any = deserializeAws_json1_0InvalidName(body, context);
2284
- const contents: InvalidName = {
2285
- name: "InvalidName",
2286
- $fault: "client",
2287
- $metadata: deserializeMetadata(parsedOutput),
2288
- ...deserialized,
2289
- };
2290
- return contents;
2291
- };
2292
-
2293
- const deserializeAws_json1_0InvalidOutputResponse = async (
2294
- parsedOutput: any,
2295
- context: __SerdeContext
2296
- ): Promise<InvalidOutput> => {
2297
- const body = parsedOutput.body;
2298
- const deserialized: any = deserializeAws_json1_0InvalidOutput(body, context);
2299
- const contents: InvalidOutput = {
2300
- name: "InvalidOutput",
2301
- $fault: "client",
2302
- $metadata: deserializeMetadata(parsedOutput),
2303
- ...deserialized,
2304
- };
2305
- return contents;
2306
- };
2307
-
2308
- const deserializeAws_json1_0InvalidTokenResponse = async (
2309
- parsedOutput: any,
2310
- context: __SerdeContext
2311
- ): Promise<InvalidToken> => {
2312
- const body = parsedOutput.body;
2313
- const deserialized: any = deserializeAws_json1_0InvalidToken(body, context);
2314
- const contents: InvalidToken = {
2315
- name: "InvalidToken",
2316
- $fault: "client",
2317
- $metadata: deserializeMetadata(parsedOutput),
2318
- ...deserialized,
2319
- };
2320
- return contents;
2321
- };
2322
-
2323
- const deserializeAws_json1_0InvalidTracingConfigurationResponse = async (
2324
- parsedOutput: any,
2325
- context: __SerdeContext
2326
- ): Promise<InvalidTracingConfiguration> => {
2327
- const body = parsedOutput.body;
2328
- const deserialized: any = deserializeAws_json1_0InvalidTracingConfiguration(body, context);
2329
- const contents: InvalidTracingConfiguration = {
2330
- name: "InvalidTracingConfiguration",
2331
- $fault: "client",
2332
- $metadata: deserializeMetadata(parsedOutput),
2333
- ...deserialized,
2334
- };
2335
- return contents;
2336
- };
2337
-
2338
- const deserializeAws_json1_0MissingRequiredParameterResponse = async (
2339
- parsedOutput: any,
2340
- context: __SerdeContext
2341
- ): Promise<MissingRequiredParameter> => {
2342
- const body = parsedOutput.body;
2343
- const deserialized: any = deserializeAws_json1_0MissingRequiredParameter(body, context);
2344
- const contents: MissingRequiredParameter = {
2345
- name: "MissingRequiredParameter",
2346
- $fault: "client",
2347
- $metadata: deserializeMetadata(parsedOutput),
2348
- ...deserialized,
2349
- };
2350
- return contents;
2351
- };
2352
-
2353
- const deserializeAws_json1_0ResourceNotFoundResponse = async (
2354
- parsedOutput: any,
2355
- context: __SerdeContext
2356
- ): Promise<ResourceNotFound> => {
2357
- const body = parsedOutput.body;
2358
- const deserialized: any = deserializeAws_json1_0ResourceNotFound(body, context);
2359
- const contents: ResourceNotFound = {
2360
- name: "ResourceNotFound",
2361
- $fault: "client",
2362
- $metadata: deserializeMetadata(parsedOutput),
2363
- ...deserialized,
2364
- };
2365
- return contents;
2366
- };
2367
-
2368
- const deserializeAws_json1_0StateMachineAlreadyExistsResponse = async (
2369
- parsedOutput: any,
2370
- context: __SerdeContext
2371
- ): Promise<StateMachineAlreadyExists> => {
2372
- const body = parsedOutput.body;
2373
- const deserialized: any = deserializeAws_json1_0StateMachineAlreadyExists(body, context);
2374
- const contents: StateMachineAlreadyExists = {
2375
- name: "StateMachineAlreadyExists",
2376
- $fault: "client",
2377
- $metadata: deserializeMetadata(parsedOutput),
2378
- ...deserialized,
2379
- };
2380
- return contents;
2381
- };
2382
-
2383
- const deserializeAws_json1_0StateMachineDeletingResponse = async (
2384
- parsedOutput: any,
2385
- context: __SerdeContext
2386
- ): Promise<StateMachineDeleting> => {
2387
- const body = parsedOutput.body;
2388
- const deserialized: any = deserializeAws_json1_0StateMachineDeleting(body, context);
2389
- const contents: StateMachineDeleting = {
2390
- name: "StateMachineDeleting",
2391
- $fault: "client",
2392
- $metadata: deserializeMetadata(parsedOutput),
2393
- ...deserialized,
2394
- };
2395
- return contents;
2396
- };
2397
-
2398
- const deserializeAws_json1_0StateMachineDoesNotExistResponse = async (
2399
- parsedOutput: any,
2400
- context: __SerdeContext
2401
- ): Promise<StateMachineDoesNotExist> => {
2402
- const body = parsedOutput.body;
2403
- const deserialized: any = deserializeAws_json1_0StateMachineDoesNotExist(body, context);
2404
- const contents: StateMachineDoesNotExist = {
2405
- name: "StateMachineDoesNotExist",
2406
- $fault: "client",
2407
- $metadata: deserializeMetadata(parsedOutput),
2408
- ...deserialized,
2409
- };
2410
- return contents;
2411
- };
2412
-
2413
- const deserializeAws_json1_0StateMachineLimitExceededResponse = async (
2414
- parsedOutput: any,
2415
- context: __SerdeContext
2416
- ): Promise<StateMachineLimitExceeded> => {
2417
- const body = parsedOutput.body;
2418
- const deserialized: any = deserializeAws_json1_0StateMachineLimitExceeded(body, context);
2419
- const contents: StateMachineLimitExceeded = {
2420
- name: "StateMachineLimitExceeded",
2421
- $fault: "client",
2422
- $metadata: deserializeMetadata(parsedOutput),
2423
- ...deserialized,
2424
- };
2425
- return contents;
2426
- };
2427
-
2428
- const deserializeAws_json1_0StateMachineTypeNotSupportedResponse = async (
2429
- parsedOutput: any,
2430
- context: __SerdeContext
2431
- ): Promise<StateMachineTypeNotSupported> => {
2432
- const body = parsedOutput.body;
2433
- const deserialized: any = deserializeAws_json1_0StateMachineTypeNotSupported(body, context);
2434
- const contents: StateMachineTypeNotSupported = {
2435
- name: "StateMachineTypeNotSupported",
2436
- $fault: "client",
2437
- $metadata: deserializeMetadata(parsedOutput),
2438
- ...deserialized,
2439
- };
2440
- return contents;
2441
- };
2442
-
2443
- const deserializeAws_json1_0TaskDoesNotExistResponse = async (
2444
- parsedOutput: any,
2445
- context: __SerdeContext
2446
- ): Promise<TaskDoesNotExist> => {
2447
- const body = parsedOutput.body;
2448
- const deserialized: any = deserializeAws_json1_0TaskDoesNotExist(body, context);
2449
- const contents: TaskDoesNotExist = {
2450
- name: "TaskDoesNotExist",
2451
- $fault: "client",
2452
- $metadata: deserializeMetadata(parsedOutput),
2453
- ...deserialized,
2454
- };
2455
- return contents;
2456
- };
2457
-
2458
- const deserializeAws_json1_0TaskTimedOutResponse = async (
2459
- parsedOutput: any,
2460
- context: __SerdeContext
2461
- ): Promise<TaskTimedOut> => {
2462
- const body = parsedOutput.body;
2463
- const deserialized: any = deserializeAws_json1_0TaskTimedOut(body, context);
2464
- const contents: TaskTimedOut = {
2465
- name: "TaskTimedOut",
2466
- $fault: "client",
2467
- $metadata: deserializeMetadata(parsedOutput),
2468
- ...deserialized,
2469
- };
2470
- return contents;
2471
- };
2472
-
2473
- const deserializeAws_json1_0TooManyTagsResponse = async (
2474
- parsedOutput: any,
2475
- context: __SerdeContext
2476
- ): Promise<TooManyTags> => {
2477
- const body = parsedOutput.body;
2478
- const deserialized: any = deserializeAws_json1_0TooManyTags(body, context);
2479
- const contents: TooManyTags = {
2480
- name: "TooManyTags",
2481
- $fault: "client",
2482
- $metadata: deserializeMetadata(parsedOutput),
2483
- ...deserialized,
2484
- };
2485
- return contents;
2486
- };
2487
-
2488
- const serializeAws_json1_0CloudWatchLogsLogGroup = (input: CloudWatchLogsLogGroup, context: __SerdeContext): any => {
2489
- return {
2490
- ...(input.logGroupArn !== undefined && input.logGroupArn !== null && { logGroupArn: input.logGroupArn }),
2491
- };
2492
- };
2493
-
2494
- const serializeAws_json1_0CreateActivityInput = (input: CreateActivityInput, context: __SerdeContext): any => {
2495
- return {
2496
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
2497
- ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_json1_0TagList(input.tags, context) }),
2498
- };
2499
- };
2500
-
2501
- const serializeAws_json1_0CreateStateMachineInput = (input: CreateStateMachineInput, context: __SerdeContext): any => {
2502
- return {
2503
- ...(input.definition !== undefined && input.definition !== null && { definition: input.definition }),
2504
- ...(input.loggingConfiguration !== undefined &&
2505
- input.loggingConfiguration !== null && {
2506
- loggingConfiguration: serializeAws_json1_0LoggingConfiguration(input.loggingConfiguration, context),
2507
- }),
2508
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
2509
- ...(input.roleArn !== undefined && input.roleArn !== null && { roleArn: input.roleArn }),
2510
- ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_json1_0TagList(input.tags, context) }),
2511
- ...(input.tracingConfiguration !== undefined &&
2512
- input.tracingConfiguration !== null && {
2513
- tracingConfiguration: serializeAws_json1_0TracingConfiguration(input.tracingConfiguration, context),
2514
- }),
2515
- ...(input.type !== undefined && input.type !== null && { type: input.type }),
2516
- };
2517
- };
2518
-
2519
- const serializeAws_json1_0DeleteActivityInput = (input: DeleteActivityInput, context: __SerdeContext): any => {
2520
- return {
2521
- ...(input.activityArn !== undefined && input.activityArn !== null && { activityArn: input.activityArn }),
2522
- };
2523
- };
2524
-
2525
- const serializeAws_json1_0DeleteStateMachineInput = (input: DeleteStateMachineInput, context: __SerdeContext): any => {
2526
- return {
2527
- ...(input.stateMachineArn !== undefined &&
2528
- input.stateMachineArn !== null && { stateMachineArn: input.stateMachineArn }),
2529
- };
2530
- };
2531
-
2532
- const serializeAws_json1_0DescribeActivityInput = (input: DescribeActivityInput, context: __SerdeContext): any => {
2533
- return {
2534
- ...(input.activityArn !== undefined && input.activityArn !== null && { activityArn: input.activityArn }),
2535
- };
2536
- };
2537
-
2538
- const serializeAws_json1_0DescribeExecutionInput = (input: DescribeExecutionInput, context: __SerdeContext): any => {
2539
- return {
2540
- ...(input.executionArn !== undefined && input.executionArn !== null && { executionArn: input.executionArn }),
2541
- };
2542
- };
2543
-
2544
- const serializeAws_json1_0DescribeStateMachineForExecutionInput = (
2545
- input: DescribeStateMachineForExecutionInput,
2546
- context: __SerdeContext
2547
- ): any => {
2548
- return {
2549
- ...(input.executionArn !== undefined && input.executionArn !== null && { executionArn: input.executionArn }),
2550
- };
2551
- };
2552
-
2553
- const serializeAws_json1_0DescribeStateMachineInput = (
2554
- input: DescribeStateMachineInput,
2555
- context: __SerdeContext
2556
- ): any => {
2557
- return {
2558
- ...(input.stateMachineArn !== undefined &&
2559
- input.stateMachineArn !== null && { stateMachineArn: input.stateMachineArn }),
2560
- };
2561
- };
2562
-
2563
- const serializeAws_json1_0GetActivityTaskInput = (input: GetActivityTaskInput, context: __SerdeContext): any => {
2564
- return {
2565
- ...(input.activityArn !== undefined && input.activityArn !== null && { activityArn: input.activityArn }),
2566
- ...(input.workerName !== undefined && input.workerName !== null && { workerName: input.workerName }),
2567
- };
2568
- };
2569
-
2570
- const serializeAws_json1_0GetExecutionHistoryInput = (
2571
- input: GetExecutionHistoryInput,
2572
- context: __SerdeContext
2573
- ): any => {
2574
- return {
2575
- ...(input.executionArn !== undefined && input.executionArn !== null && { executionArn: input.executionArn }),
2576
- ...(input.includeExecutionData !== undefined &&
2577
- input.includeExecutionData !== null && { includeExecutionData: input.includeExecutionData }),
2578
- ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
2579
- ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
2580
- ...(input.reverseOrder !== undefined && input.reverseOrder !== null && { reverseOrder: input.reverseOrder }),
2581
- };
2582
- };
2583
-
2584
- const serializeAws_json1_0ListActivitiesInput = (input: ListActivitiesInput, context: __SerdeContext): any => {
2585
- return {
2586
- ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
2587
- ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
2588
- };
2589
- };
2590
-
2591
- const serializeAws_json1_0ListExecutionsInput = (input: ListExecutionsInput, context: __SerdeContext): any => {
2592
- return {
2593
- ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
2594
- ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
2595
- ...(input.stateMachineArn !== undefined &&
2596
- input.stateMachineArn !== null && { stateMachineArn: input.stateMachineArn }),
2597
- ...(input.statusFilter !== undefined && input.statusFilter !== null && { statusFilter: input.statusFilter }),
2598
- };
2599
- };
2600
-
2601
- const serializeAws_json1_0ListStateMachinesInput = (input: ListStateMachinesInput, context: __SerdeContext): any => {
2602
- return {
2603
- ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
2604
- ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
2605
- };
2606
- };
2607
-
2608
- const serializeAws_json1_0ListTagsForResourceInput = (
2609
- input: ListTagsForResourceInput,
2610
- context: __SerdeContext
2611
- ): any => {
2612
- return {
2613
- ...(input.resourceArn !== undefined && input.resourceArn !== null && { resourceArn: input.resourceArn }),
2614
- };
2615
- };
2616
-
2617
- const serializeAws_json1_0LogDestination = (input: LogDestination, context: __SerdeContext): any => {
2618
- return {
2619
- ...(input.cloudWatchLogsLogGroup !== undefined &&
2620
- input.cloudWatchLogsLogGroup !== null && {
2621
- cloudWatchLogsLogGroup: serializeAws_json1_0CloudWatchLogsLogGroup(input.cloudWatchLogsLogGroup, context),
2622
- }),
2623
- };
2624
- };
2625
-
2626
- const serializeAws_json1_0LogDestinationList = (input: LogDestination[], context: __SerdeContext): any => {
2627
- return input
2628
- .filter((e: any) => e != null)
2629
- .map((entry) => {
2630
- if (entry === null) {
2631
- return null as any;
2632
- }
2633
- return serializeAws_json1_0LogDestination(entry, context);
2634
- });
2635
- };
2636
-
2637
- const serializeAws_json1_0LoggingConfiguration = (input: LoggingConfiguration, context: __SerdeContext): any => {
2638
- return {
2639
- ...(input.destinations !== undefined &&
2640
- input.destinations !== null && {
2641
- destinations: serializeAws_json1_0LogDestinationList(input.destinations, context),
2642
- }),
2643
- ...(input.includeExecutionData !== undefined &&
2644
- input.includeExecutionData !== null && { includeExecutionData: input.includeExecutionData }),
2645
- ...(input.level !== undefined && input.level !== null && { level: input.level }),
2646
- };
2647
- };
2648
-
2649
- const serializeAws_json1_0SendTaskFailureInput = (input: SendTaskFailureInput, context: __SerdeContext): any => {
2650
- return {
2651
- ...(input.cause !== undefined && input.cause !== null && { cause: input.cause }),
2652
- ...(input.error !== undefined && input.error !== null && { error: input.error }),
2653
- ...(input.taskToken !== undefined && input.taskToken !== null && { taskToken: input.taskToken }),
2654
- };
2655
- };
2656
-
2657
- const serializeAws_json1_0SendTaskHeartbeatInput = (input: SendTaskHeartbeatInput, context: __SerdeContext): any => {
2658
- return {
2659
- ...(input.taskToken !== undefined && input.taskToken !== null && { taskToken: input.taskToken }),
2660
- };
2661
- };
2662
-
2663
- const serializeAws_json1_0SendTaskSuccessInput = (input: SendTaskSuccessInput, context: __SerdeContext): any => {
2664
- return {
2665
- ...(input.output !== undefined && input.output !== null && { output: input.output }),
2666
- ...(input.taskToken !== undefined && input.taskToken !== null && { taskToken: input.taskToken }),
2667
- };
2668
- };
2669
-
2670
- const serializeAws_json1_0StartExecutionInput = (input: StartExecutionInput, context: __SerdeContext): any => {
2671
- return {
2672
- ...(input.input !== undefined && input.input !== null && { input: input.input }),
2673
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
2674
- ...(input.stateMachineArn !== undefined &&
2675
- input.stateMachineArn !== null && { stateMachineArn: input.stateMachineArn }),
2676
- ...(input.traceHeader !== undefined && input.traceHeader !== null && { traceHeader: input.traceHeader }),
2677
- };
2678
- };
2679
-
2680
- const serializeAws_json1_0StartSyncExecutionInput = (input: StartSyncExecutionInput, context: __SerdeContext): any => {
2681
- return {
2682
- ...(input.input !== undefined && input.input !== null && { input: input.input }),
2683
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
2684
- ...(input.stateMachineArn !== undefined &&
2685
- input.stateMachineArn !== null && { stateMachineArn: input.stateMachineArn }),
2686
- ...(input.traceHeader !== undefined && input.traceHeader !== null && { traceHeader: input.traceHeader }),
2687
- };
2688
- };
2689
-
2690
- const serializeAws_json1_0StopExecutionInput = (input: StopExecutionInput, context: __SerdeContext): any => {
2691
- return {
2692
- ...(input.cause !== undefined && input.cause !== null && { cause: input.cause }),
2693
- ...(input.error !== undefined && input.error !== null && { error: input.error }),
2694
- ...(input.executionArn !== undefined && input.executionArn !== null && { executionArn: input.executionArn }),
2695
- };
2696
- };
2697
-
2698
- const serializeAws_json1_0Tag = (input: Tag, context: __SerdeContext): any => {
2699
- return {
2700
- ...(input.key !== undefined && input.key !== null && { key: input.key }),
2701
- ...(input.value !== undefined && input.value !== null && { value: input.value }),
2702
- };
2703
- };
2704
-
2705
- const serializeAws_json1_0TagKeyList = (input: string[], context: __SerdeContext): any => {
2706
- return input
2707
- .filter((e: any) => e != null)
2708
- .map((entry) => {
2709
- if (entry === null) {
2710
- return null as any;
2711
- }
2712
- return entry;
2713
- });
2714
- };
2715
-
2716
- const serializeAws_json1_0TagList = (input: Tag[], context: __SerdeContext): any => {
2717
- return input
2718
- .filter((e: any) => e != null)
2719
- .map((entry) => {
2720
- if (entry === null) {
2721
- return null as any;
2722
- }
2723
- return serializeAws_json1_0Tag(entry, context);
2724
- });
2725
- };
2726
-
2727
- const serializeAws_json1_0TagResourceInput = (input: TagResourceInput, context: __SerdeContext): any => {
2728
- return {
2729
- ...(input.resourceArn !== undefined && input.resourceArn !== null && { resourceArn: input.resourceArn }),
2730
- ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_json1_0TagList(input.tags, context) }),
2731
- };
2732
- };
2733
-
2734
- const serializeAws_json1_0TracingConfiguration = (input: TracingConfiguration, context: __SerdeContext): any => {
2735
- return {
2736
- ...(input.enabled !== undefined && input.enabled !== null && { enabled: input.enabled }),
2737
- };
2738
- };
2739
-
2740
- const serializeAws_json1_0UntagResourceInput = (input: UntagResourceInput, context: __SerdeContext): any => {
2741
- return {
2742
- ...(input.resourceArn !== undefined && input.resourceArn !== null && { resourceArn: input.resourceArn }),
2743
- ...(input.tagKeys !== undefined &&
2744
- input.tagKeys !== null && { tagKeys: serializeAws_json1_0TagKeyList(input.tagKeys, context) }),
2745
- };
2746
- };
2747
-
2748
- const serializeAws_json1_0UpdateStateMachineInput = (input: UpdateStateMachineInput, context: __SerdeContext): any => {
2749
- return {
2750
- ...(input.definition !== undefined && input.definition !== null && { definition: input.definition }),
2751
- ...(input.loggingConfiguration !== undefined &&
2752
- input.loggingConfiguration !== null && {
2753
- loggingConfiguration: serializeAws_json1_0LoggingConfiguration(input.loggingConfiguration, context),
2754
- }),
2755
- ...(input.roleArn !== undefined && input.roleArn !== null && { roleArn: input.roleArn }),
2756
- ...(input.stateMachineArn !== undefined &&
2757
- input.stateMachineArn !== null && { stateMachineArn: input.stateMachineArn }),
2758
- ...(input.tracingConfiguration !== undefined &&
2759
- input.tracingConfiguration !== null && {
2760
- tracingConfiguration: serializeAws_json1_0TracingConfiguration(input.tracingConfiguration, context),
2761
- }),
2762
- };
2763
- };
2764
-
2765
- const deserializeAws_json1_0ActivityDoesNotExist = (output: any, context: __SerdeContext): ActivityDoesNotExist => {
2766
- return {
2767
- message: __expectString(output.message),
2768
- } as any;
2769
- };
2770
-
2771
- const deserializeAws_json1_0ActivityFailedEventDetails = (
2772
- output: any,
2773
- context: __SerdeContext
2774
- ): ActivityFailedEventDetails => {
2775
- return {
2776
- cause: __expectString(output.cause),
2777
- error: __expectString(output.error),
2778
- } as any;
2779
- };
2780
-
2781
- const deserializeAws_json1_0ActivityLimitExceeded = (output: any, context: __SerdeContext): ActivityLimitExceeded => {
2782
- return {
2783
- message: __expectString(output.message),
2784
- } as any;
2785
- };
2786
-
2787
- const deserializeAws_json1_0ActivityList = (output: any, context: __SerdeContext): ActivityListItem[] => {
2788
- return (output || [])
2789
- .filter((e: any) => e != null)
2790
- .map((entry: any) => {
2791
- if (entry === null) {
2792
- return null as any;
2793
- }
2794
- return deserializeAws_json1_0ActivityListItem(entry, context);
2795
- });
2796
- };
2797
-
2798
- const deserializeAws_json1_0ActivityListItem = (output: any, context: __SerdeContext): ActivityListItem => {
2799
- return {
2800
- activityArn: __expectString(output.activityArn),
2801
- creationDate:
2802
- output.creationDate !== undefined && output.creationDate !== null
2803
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDate)))
2804
- : undefined,
2805
- name: __expectString(output.name),
2806
- } as any;
2807
- };
2808
-
2809
- const deserializeAws_json1_0ActivityScheduledEventDetails = (
2810
- output: any,
2811
- context: __SerdeContext
2812
- ): ActivityScheduledEventDetails => {
2813
- return {
2814
- heartbeatInSeconds: __expectLong(output.heartbeatInSeconds),
2815
- input: __expectString(output.input),
2816
- inputDetails:
2817
- output.inputDetails !== undefined && output.inputDetails !== null
2818
- ? deserializeAws_json1_0HistoryEventExecutionDataDetails(output.inputDetails, context)
2819
- : undefined,
2820
- resource: __expectString(output.resource),
2821
- timeoutInSeconds: __expectLong(output.timeoutInSeconds),
2822
- } as any;
2823
- };
2824
-
2825
- const deserializeAws_json1_0ActivityScheduleFailedEventDetails = (
2826
- output: any,
2827
- context: __SerdeContext
2828
- ): ActivityScheduleFailedEventDetails => {
2829
- return {
2830
- cause: __expectString(output.cause),
2831
- error: __expectString(output.error),
2832
- } as any;
2833
- };
2834
-
2835
- const deserializeAws_json1_0ActivityStartedEventDetails = (
2836
- output: any,
2837
- context: __SerdeContext
2838
- ): ActivityStartedEventDetails => {
2839
- return {
2840
- workerName: __expectString(output.workerName),
2841
- } as any;
2842
- };
2843
-
2844
- const deserializeAws_json1_0ActivitySucceededEventDetails = (
2845
- output: any,
2846
- context: __SerdeContext
2847
- ): ActivitySucceededEventDetails => {
2848
- return {
2849
- output: __expectString(output.output),
2850
- outputDetails:
2851
- output.outputDetails !== undefined && output.outputDetails !== null
2852
- ? deserializeAws_json1_0HistoryEventExecutionDataDetails(output.outputDetails, context)
2853
- : undefined,
2854
- } as any;
2855
- };
2856
-
2857
- const deserializeAws_json1_0ActivityTimedOutEventDetails = (
2858
- output: any,
2859
- context: __SerdeContext
2860
- ): ActivityTimedOutEventDetails => {
2861
- return {
2862
- cause: __expectString(output.cause),
2863
- error: __expectString(output.error),
2864
- } as any;
2865
- };
2866
-
2867
- const deserializeAws_json1_0ActivityWorkerLimitExceeded = (
2868
- output: any,
2869
- context: __SerdeContext
2870
- ): ActivityWorkerLimitExceeded => {
2871
- return {
2872
- message: __expectString(output.message),
2873
- } as any;
2874
- };
2875
-
2876
- const deserializeAws_json1_0BillingDetails = (output: any, context: __SerdeContext): BillingDetails => {
2877
- return {
2878
- billedDurationInMilliseconds: __expectLong(output.billedDurationInMilliseconds),
2879
- billedMemoryUsedInMB: __expectLong(output.billedMemoryUsedInMB),
2880
- } as any;
2881
- };
2882
-
2883
- const deserializeAws_json1_0CloudWatchEventsExecutionDataDetails = (
2884
- output: any,
2885
- context: __SerdeContext
2886
- ): CloudWatchEventsExecutionDataDetails => {
2887
- return {
2888
- included: __expectBoolean(output.included),
2889
- } as any;
2890
- };
2891
-
2892
- const deserializeAws_json1_0CloudWatchLogsLogGroup = (output: any, context: __SerdeContext): CloudWatchLogsLogGroup => {
2893
- return {
2894
- logGroupArn: __expectString(output.logGroupArn),
2895
- } as any;
2896
- };
2897
-
2898
- const deserializeAws_json1_0CreateActivityOutput = (output: any, context: __SerdeContext): CreateActivityOutput => {
2899
- return {
2900
- activityArn: __expectString(output.activityArn),
2901
- creationDate:
2902
- output.creationDate !== undefined && output.creationDate !== null
2903
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDate)))
2904
- : undefined,
2905
- } as any;
2906
- };
2907
-
2908
- const deserializeAws_json1_0CreateStateMachineOutput = (
2909
- output: any,
2910
- context: __SerdeContext
2911
- ): CreateStateMachineOutput => {
2912
- return {
2913
- creationDate:
2914
- output.creationDate !== undefined && output.creationDate !== null
2915
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDate)))
2916
- : undefined,
2917
- stateMachineArn: __expectString(output.stateMachineArn),
2918
- } as any;
2919
- };
2920
-
2921
- const deserializeAws_json1_0DeleteActivityOutput = (output: any, context: __SerdeContext): DeleteActivityOutput => {
2922
- return {} as any;
2923
- };
2924
-
2925
- const deserializeAws_json1_0DeleteStateMachineOutput = (
2926
- output: any,
2927
- context: __SerdeContext
2928
- ): DeleteStateMachineOutput => {
2929
- return {} as any;
2930
- };
2931
-
2932
- const deserializeAws_json1_0DescribeActivityOutput = (output: any, context: __SerdeContext): DescribeActivityOutput => {
2933
- return {
2934
- activityArn: __expectString(output.activityArn),
2935
- creationDate:
2936
- output.creationDate !== undefined && output.creationDate !== null
2937
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDate)))
2938
- : undefined,
2939
- name: __expectString(output.name),
2940
- } as any;
2941
- };
2942
-
2943
- const deserializeAws_json1_0DescribeExecutionOutput = (
2944
- output: any,
2945
- context: __SerdeContext
2946
- ): DescribeExecutionOutput => {
2947
- return {
2948
- executionArn: __expectString(output.executionArn),
2949
- input: __expectString(output.input),
2950
- inputDetails:
2951
- output.inputDetails !== undefined && output.inputDetails !== null
2952
- ? deserializeAws_json1_0CloudWatchEventsExecutionDataDetails(output.inputDetails, context)
2953
- : undefined,
2954
- name: __expectString(output.name),
2955
- output: __expectString(output.output),
2956
- outputDetails:
2957
- output.outputDetails !== undefined && output.outputDetails !== null
2958
- ? deserializeAws_json1_0CloudWatchEventsExecutionDataDetails(output.outputDetails, context)
2959
- : undefined,
2960
- startDate:
2961
- output.startDate !== undefined && output.startDate !== null
2962
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startDate)))
2963
- : undefined,
2964
- stateMachineArn: __expectString(output.stateMachineArn),
2965
- status: __expectString(output.status),
2966
- stopDate:
2967
- output.stopDate !== undefined && output.stopDate !== null
2968
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.stopDate)))
2969
- : undefined,
2970
- traceHeader: __expectString(output.traceHeader),
2971
- } as any;
2972
- };
2973
-
2974
- const deserializeAws_json1_0DescribeStateMachineForExecutionOutput = (
2975
- output: any,
2976
- context: __SerdeContext
2977
- ): DescribeStateMachineForExecutionOutput => {
2978
- return {
2979
- definition: __expectString(output.definition),
2980
- loggingConfiguration:
2981
- output.loggingConfiguration !== undefined && output.loggingConfiguration !== null
2982
- ? deserializeAws_json1_0LoggingConfiguration(output.loggingConfiguration, context)
2983
- : undefined,
2984
- name: __expectString(output.name),
2985
- roleArn: __expectString(output.roleArn),
2986
- stateMachineArn: __expectString(output.stateMachineArn),
2987
- tracingConfiguration:
2988
- output.tracingConfiguration !== undefined && output.tracingConfiguration !== null
2989
- ? deserializeAws_json1_0TracingConfiguration(output.tracingConfiguration, context)
2990
- : undefined,
2991
- updateDate:
2992
- output.updateDate !== undefined && output.updateDate !== null
2993
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updateDate)))
2994
- : undefined,
2995
- } as any;
2996
- };
2997
-
2998
- const deserializeAws_json1_0DescribeStateMachineOutput = (
2999
- output: any,
3000
- context: __SerdeContext
3001
- ): DescribeStateMachineOutput => {
3002
- return {
3003
- creationDate:
3004
- output.creationDate !== undefined && output.creationDate !== null
3005
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDate)))
3006
- : undefined,
3007
- definition: __expectString(output.definition),
3008
- loggingConfiguration:
3009
- output.loggingConfiguration !== undefined && output.loggingConfiguration !== null
3010
- ? deserializeAws_json1_0LoggingConfiguration(output.loggingConfiguration, context)
3011
- : undefined,
3012
- name: __expectString(output.name),
3013
- roleArn: __expectString(output.roleArn),
3014
- stateMachineArn: __expectString(output.stateMachineArn),
3015
- status: __expectString(output.status),
3016
- tracingConfiguration:
3017
- output.tracingConfiguration !== undefined && output.tracingConfiguration !== null
3018
- ? deserializeAws_json1_0TracingConfiguration(output.tracingConfiguration, context)
3019
- : undefined,
3020
- type: __expectString(output.type),
3021
- } as any;
3022
- };
3023
-
3024
- const deserializeAws_json1_0ExecutionAbortedEventDetails = (
3025
- output: any,
3026
- context: __SerdeContext
3027
- ): ExecutionAbortedEventDetails => {
3028
- return {
3029
- cause: __expectString(output.cause),
3030
- error: __expectString(output.error),
3031
- } as any;
3032
- };
3033
-
3034
- const deserializeAws_json1_0ExecutionAlreadyExists = (output: any, context: __SerdeContext): ExecutionAlreadyExists => {
3035
- return {
3036
- message: __expectString(output.message),
3037
- } as any;
3038
- };
3039
-
3040
- const deserializeAws_json1_0ExecutionDoesNotExist = (output: any, context: __SerdeContext): ExecutionDoesNotExist => {
3041
- return {
3042
- message: __expectString(output.message),
3043
- } as any;
3044
- };
3045
-
3046
- const deserializeAws_json1_0ExecutionFailedEventDetails = (
3047
- output: any,
3048
- context: __SerdeContext
3049
- ): ExecutionFailedEventDetails => {
3050
- return {
3051
- cause: __expectString(output.cause),
3052
- error: __expectString(output.error),
3053
- } as any;
3054
- };
3055
-
3056
- const deserializeAws_json1_0ExecutionLimitExceeded = (output: any, context: __SerdeContext): ExecutionLimitExceeded => {
3057
- return {
3058
- message: __expectString(output.message),
3059
- } as any;
3060
- };
3061
-
3062
- const deserializeAws_json1_0ExecutionList = (output: any, context: __SerdeContext): ExecutionListItem[] => {
3063
- return (output || [])
3064
- .filter((e: any) => e != null)
3065
- .map((entry: any) => {
3066
- if (entry === null) {
3067
- return null as any;
3068
- }
3069
- return deserializeAws_json1_0ExecutionListItem(entry, context);
3070
- });
3071
- };
3072
-
3073
- const deserializeAws_json1_0ExecutionListItem = (output: any, context: __SerdeContext): ExecutionListItem => {
3074
- return {
3075
- executionArn: __expectString(output.executionArn),
3076
- name: __expectString(output.name),
3077
- startDate:
3078
- output.startDate !== undefined && output.startDate !== null
3079
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startDate)))
3080
- : undefined,
3081
- stateMachineArn: __expectString(output.stateMachineArn),
3082
- status: __expectString(output.status),
3083
- stopDate:
3084
- output.stopDate !== undefined && output.stopDate !== null
3085
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.stopDate)))
3086
- : undefined,
3087
- } as any;
3088
- };
3089
-
3090
- const deserializeAws_json1_0ExecutionStartedEventDetails = (
3091
- output: any,
3092
- context: __SerdeContext
3093
- ): ExecutionStartedEventDetails => {
3094
- return {
3095
- input: __expectString(output.input),
3096
- inputDetails:
3097
- output.inputDetails !== undefined && output.inputDetails !== null
3098
- ? deserializeAws_json1_0HistoryEventExecutionDataDetails(output.inputDetails, context)
3099
- : undefined,
3100
- roleArn: __expectString(output.roleArn),
3101
- } as any;
3102
- };
3103
-
3104
- const deserializeAws_json1_0ExecutionSucceededEventDetails = (
3105
- output: any,
3106
- context: __SerdeContext
3107
- ): ExecutionSucceededEventDetails => {
3108
- return {
3109
- output: __expectString(output.output),
3110
- outputDetails:
3111
- output.outputDetails !== undefined && output.outputDetails !== null
3112
- ? deserializeAws_json1_0HistoryEventExecutionDataDetails(output.outputDetails, context)
3113
- : undefined,
3114
- } as any;
3115
- };
3116
-
3117
- const deserializeAws_json1_0ExecutionTimedOutEventDetails = (
3118
- output: any,
3119
- context: __SerdeContext
3120
- ): ExecutionTimedOutEventDetails => {
3121
- return {
3122
- cause: __expectString(output.cause),
3123
- error: __expectString(output.error),
3124
- } as any;
3125
- };
3126
-
3127
- const deserializeAws_json1_0GetActivityTaskOutput = (output: any, context: __SerdeContext): GetActivityTaskOutput => {
3128
- return {
3129
- input: __expectString(output.input),
3130
- taskToken: __expectString(output.taskToken),
3131
- } as any;
3132
- };
3133
-
3134
- const deserializeAws_json1_0GetExecutionHistoryOutput = (
3135
- output: any,
3136
- context: __SerdeContext
3137
- ): GetExecutionHistoryOutput => {
3138
- return {
3139
- events:
3140
- output.events !== undefined && output.events !== null
3141
- ? deserializeAws_json1_0HistoryEventList(output.events, context)
3142
- : undefined,
3143
- nextToken: __expectString(output.nextToken),
3144
- } as any;
3145
- };
3146
-
3147
- const deserializeAws_json1_0HistoryEvent = (output: any, context: __SerdeContext): HistoryEvent => {
3148
- return {
3149
- activityFailedEventDetails:
3150
- output.activityFailedEventDetails !== undefined && output.activityFailedEventDetails !== null
3151
- ? deserializeAws_json1_0ActivityFailedEventDetails(output.activityFailedEventDetails, context)
3152
- : undefined,
3153
- activityScheduleFailedEventDetails:
3154
- output.activityScheduleFailedEventDetails !== undefined && output.activityScheduleFailedEventDetails !== null
3155
- ? deserializeAws_json1_0ActivityScheduleFailedEventDetails(output.activityScheduleFailedEventDetails, context)
3156
- : undefined,
3157
- activityScheduledEventDetails:
3158
- output.activityScheduledEventDetails !== undefined && output.activityScheduledEventDetails !== null
3159
- ? deserializeAws_json1_0ActivityScheduledEventDetails(output.activityScheduledEventDetails, context)
3160
- : undefined,
3161
- activityStartedEventDetails:
3162
- output.activityStartedEventDetails !== undefined && output.activityStartedEventDetails !== null
3163
- ? deserializeAws_json1_0ActivityStartedEventDetails(output.activityStartedEventDetails, context)
3164
- : undefined,
3165
- activitySucceededEventDetails:
3166
- output.activitySucceededEventDetails !== undefined && output.activitySucceededEventDetails !== null
3167
- ? deserializeAws_json1_0ActivitySucceededEventDetails(output.activitySucceededEventDetails, context)
3168
- : undefined,
3169
- activityTimedOutEventDetails:
3170
- output.activityTimedOutEventDetails !== undefined && output.activityTimedOutEventDetails !== null
3171
- ? deserializeAws_json1_0ActivityTimedOutEventDetails(output.activityTimedOutEventDetails, context)
3172
- : undefined,
3173
- executionAbortedEventDetails:
3174
- output.executionAbortedEventDetails !== undefined && output.executionAbortedEventDetails !== null
3175
- ? deserializeAws_json1_0ExecutionAbortedEventDetails(output.executionAbortedEventDetails, context)
3176
- : undefined,
3177
- executionFailedEventDetails:
3178
- output.executionFailedEventDetails !== undefined && output.executionFailedEventDetails !== null
3179
- ? deserializeAws_json1_0ExecutionFailedEventDetails(output.executionFailedEventDetails, context)
3180
- : undefined,
3181
- executionStartedEventDetails:
3182
- output.executionStartedEventDetails !== undefined && output.executionStartedEventDetails !== null
3183
- ? deserializeAws_json1_0ExecutionStartedEventDetails(output.executionStartedEventDetails, context)
3184
- : undefined,
3185
- executionSucceededEventDetails:
3186
- output.executionSucceededEventDetails !== undefined && output.executionSucceededEventDetails !== null
3187
- ? deserializeAws_json1_0ExecutionSucceededEventDetails(output.executionSucceededEventDetails, context)
3188
- : undefined,
3189
- executionTimedOutEventDetails:
3190
- output.executionTimedOutEventDetails !== undefined && output.executionTimedOutEventDetails !== null
3191
- ? deserializeAws_json1_0ExecutionTimedOutEventDetails(output.executionTimedOutEventDetails, context)
3192
- : undefined,
3193
- id: __expectLong(output.id),
3194
- lambdaFunctionFailedEventDetails:
3195
- output.lambdaFunctionFailedEventDetails !== undefined && output.lambdaFunctionFailedEventDetails !== null
3196
- ? deserializeAws_json1_0LambdaFunctionFailedEventDetails(output.lambdaFunctionFailedEventDetails, context)
3197
- : undefined,
3198
- lambdaFunctionScheduleFailedEventDetails:
3199
- output.lambdaFunctionScheduleFailedEventDetails !== undefined &&
3200
- output.lambdaFunctionScheduleFailedEventDetails !== null
3201
- ? deserializeAws_json1_0LambdaFunctionScheduleFailedEventDetails(
3202
- output.lambdaFunctionScheduleFailedEventDetails,
3203
- context
3204
- )
3205
- : undefined,
3206
- lambdaFunctionScheduledEventDetails:
3207
- output.lambdaFunctionScheduledEventDetails !== undefined && output.lambdaFunctionScheduledEventDetails !== null
3208
- ? deserializeAws_json1_0LambdaFunctionScheduledEventDetails(output.lambdaFunctionScheduledEventDetails, context)
3209
- : undefined,
3210
- lambdaFunctionStartFailedEventDetails:
3211
- output.lambdaFunctionStartFailedEventDetails !== undefined &&
3212
- output.lambdaFunctionStartFailedEventDetails !== null
3213
- ? deserializeAws_json1_0LambdaFunctionStartFailedEventDetails(
3214
- output.lambdaFunctionStartFailedEventDetails,
3215
- context
3216
- )
3217
- : undefined,
3218
- lambdaFunctionSucceededEventDetails:
3219
- output.lambdaFunctionSucceededEventDetails !== undefined && output.lambdaFunctionSucceededEventDetails !== null
3220
- ? deserializeAws_json1_0LambdaFunctionSucceededEventDetails(output.lambdaFunctionSucceededEventDetails, context)
3221
- : undefined,
3222
- lambdaFunctionTimedOutEventDetails:
3223
- output.lambdaFunctionTimedOutEventDetails !== undefined && output.lambdaFunctionTimedOutEventDetails !== null
3224
- ? deserializeAws_json1_0LambdaFunctionTimedOutEventDetails(output.lambdaFunctionTimedOutEventDetails, context)
3225
- : undefined,
3226
- mapIterationAbortedEventDetails:
3227
- output.mapIterationAbortedEventDetails !== undefined && output.mapIterationAbortedEventDetails !== null
3228
- ? deserializeAws_json1_0MapIterationEventDetails(output.mapIterationAbortedEventDetails, context)
3229
- : undefined,
3230
- mapIterationFailedEventDetails:
3231
- output.mapIterationFailedEventDetails !== undefined && output.mapIterationFailedEventDetails !== null
3232
- ? deserializeAws_json1_0MapIterationEventDetails(output.mapIterationFailedEventDetails, context)
3233
- : undefined,
3234
- mapIterationStartedEventDetails:
3235
- output.mapIterationStartedEventDetails !== undefined && output.mapIterationStartedEventDetails !== null
3236
- ? deserializeAws_json1_0MapIterationEventDetails(output.mapIterationStartedEventDetails, context)
3237
- : undefined,
3238
- mapIterationSucceededEventDetails:
3239
- output.mapIterationSucceededEventDetails !== undefined && output.mapIterationSucceededEventDetails !== null
3240
- ? deserializeAws_json1_0MapIterationEventDetails(output.mapIterationSucceededEventDetails, context)
3241
- : undefined,
3242
- mapStateStartedEventDetails:
3243
- output.mapStateStartedEventDetails !== undefined && output.mapStateStartedEventDetails !== null
3244
- ? deserializeAws_json1_0MapStateStartedEventDetails(output.mapStateStartedEventDetails, context)
3245
- : undefined,
3246
- previousEventId: __expectLong(output.previousEventId),
3247
- stateEnteredEventDetails:
3248
- output.stateEnteredEventDetails !== undefined && output.stateEnteredEventDetails !== null
3249
- ? deserializeAws_json1_0StateEnteredEventDetails(output.stateEnteredEventDetails, context)
3250
- : undefined,
3251
- stateExitedEventDetails:
3252
- output.stateExitedEventDetails !== undefined && output.stateExitedEventDetails !== null
3253
- ? deserializeAws_json1_0StateExitedEventDetails(output.stateExitedEventDetails, context)
3254
- : undefined,
3255
- taskFailedEventDetails:
3256
- output.taskFailedEventDetails !== undefined && output.taskFailedEventDetails !== null
3257
- ? deserializeAws_json1_0TaskFailedEventDetails(output.taskFailedEventDetails, context)
3258
- : undefined,
3259
- taskScheduledEventDetails:
3260
- output.taskScheduledEventDetails !== undefined && output.taskScheduledEventDetails !== null
3261
- ? deserializeAws_json1_0TaskScheduledEventDetails(output.taskScheduledEventDetails, context)
3262
- : undefined,
3263
- taskStartFailedEventDetails:
3264
- output.taskStartFailedEventDetails !== undefined && output.taskStartFailedEventDetails !== null
3265
- ? deserializeAws_json1_0TaskStartFailedEventDetails(output.taskStartFailedEventDetails, context)
3266
- : undefined,
3267
- taskStartedEventDetails:
3268
- output.taskStartedEventDetails !== undefined && output.taskStartedEventDetails !== null
3269
- ? deserializeAws_json1_0TaskStartedEventDetails(output.taskStartedEventDetails, context)
3270
- : undefined,
3271
- taskSubmitFailedEventDetails:
3272
- output.taskSubmitFailedEventDetails !== undefined && output.taskSubmitFailedEventDetails !== null
3273
- ? deserializeAws_json1_0TaskSubmitFailedEventDetails(output.taskSubmitFailedEventDetails, context)
3274
- : undefined,
3275
- taskSubmittedEventDetails:
3276
- output.taskSubmittedEventDetails !== undefined && output.taskSubmittedEventDetails !== null
3277
- ? deserializeAws_json1_0TaskSubmittedEventDetails(output.taskSubmittedEventDetails, context)
3278
- : undefined,
3279
- taskSucceededEventDetails:
3280
- output.taskSucceededEventDetails !== undefined && output.taskSucceededEventDetails !== null
3281
- ? deserializeAws_json1_0TaskSucceededEventDetails(output.taskSucceededEventDetails, context)
3282
- : undefined,
3283
- taskTimedOutEventDetails:
3284
- output.taskTimedOutEventDetails !== undefined && output.taskTimedOutEventDetails !== null
3285
- ? deserializeAws_json1_0TaskTimedOutEventDetails(output.taskTimedOutEventDetails, context)
3286
- : undefined,
3287
- timestamp:
3288
- output.timestamp !== undefined && output.timestamp !== null
3289
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.timestamp)))
3290
- : undefined,
3291
- type: __expectString(output.type),
3292
- } as any;
3293
- };
3294
-
3295
- const deserializeAws_json1_0HistoryEventExecutionDataDetails = (
3296
- output: any,
3297
- context: __SerdeContext
3298
- ): HistoryEventExecutionDataDetails => {
3299
- return {
3300
- truncated: __expectBoolean(output.truncated),
3301
- } as any;
3302
- };
3303
-
3304
- const deserializeAws_json1_0HistoryEventList = (output: any, context: __SerdeContext): HistoryEvent[] => {
3305
- return (output || [])
3306
- .filter((e: any) => e != null)
3307
- .map((entry: any) => {
3308
- if (entry === null) {
3309
- return null as any;
3310
- }
3311
- return deserializeAws_json1_0HistoryEvent(entry, context);
3312
- });
3313
- };
3314
-
3315
- const deserializeAws_json1_0InvalidArn = (output: any, context: __SerdeContext): InvalidArn => {
3316
- return {
3317
- message: __expectString(output.message),
3318
- } as any;
3319
- };
3320
-
3321
- const deserializeAws_json1_0InvalidDefinition = (output: any, context: __SerdeContext): InvalidDefinition => {
3322
- return {
3323
- message: __expectString(output.message),
3324
- } as any;
3325
- };
3326
-
3327
- const deserializeAws_json1_0InvalidExecutionInput = (output: any, context: __SerdeContext): InvalidExecutionInput => {
3328
- return {
3329
- message: __expectString(output.message),
3330
- } as any;
3331
- };
3332
-
3333
- const deserializeAws_json1_0InvalidLoggingConfiguration = (
3334
- output: any,
3335
- context: __SerdeContext
3336
- ): InvalidLoggingConfiguration => {
3337
- return {
3338
- message: __expectString(output.message),
3339
- } as any;
3340
- };
3341
-
3342
- const deserializeAws_json1_0InvalidName = (output: any, context: __SerdeContext): InvalidName => {
3343
- return {
3344
- message: __expectString(output.message),
3345
- } as any;
3346
- };
3347
-
3348
- const deserializeAws_json1_0InvalidOutput = (output: any, context: __SerdeContext): InvalidOutput => {
3349
- return {
3350
- message: __expectString(output.message),
3351
- } as any;
3352
- };
3353
-
3354
- const deserializeAws_json1_0InvalidToken = (output: any, context: __SerdeContext): InvalidToken => {
3355
- return {
3356
- message: __expectString(output.message),
3357
- } as any;
3358
- };
3359
-
3360
- const deserializeAws_json1_0InvalidTracingConfiguration = (
3361
- output: any,
3362
- context: __SerdeContext
3363
- ): InvalidTracingConfiguration => {
3364
- return {
3365
- message: __expectString(output.message),
3366
- } as any;
3367
- };
3368
-
3369
- const deserializeAws_json1_0LambdaFunctionFailedEventDetails = (
3370
- output: any,
3371
- context: __SerdeContext
3372
- ): LambdaFunctionFailedEventDetails => {
3373
- return {
3374
- cause: __expectString(output.cause),
3375
- error: __expectString(output.error),
3376
- } as any;
3377
- };
3378
-
3379
- const deserializeAws_json1_0LambdaFunctionScheduledEventDetails = (
3380
- output: any,
3381
- context: __SerdeContext
3382
- ): LambdaFunctionScheduledEventDetails => {
3383
- return {
3384
- input: __expectString(output.input),
3385
- inputDetails:
3386
- output.inputDetails !== undefined && output.inputDetails !== null
3387
- ? deserializeAws_json1_0HistoryEventExecutionDataDetails(output.inputDetails, context)
3388
- : undefined,
3389
- resource: __expectString(output.resource),
3390
- timeoutInSeconds: __expectLong(output.timeoutInSeconds),
3391
- } as any;
3392
- };
3393
-
3394
- const deserializeAws_json1_0LambdaFunctionScheduleFailedEventDetails = (
3395
- output: any,
3396
- context: __SerdeContext
3397
- ): LambdaFunctionScheduleFailedEventDetails => {
3398
- return {
3399
- cause: __expectString(output.cause),
3400
- error: __expectString(output.error),
3401
- } as any;
3402
- };
3403
-
3404
- const deserializeAws_json1_0LambdaFunctionStartFailedEventDetails = (
3405
- output: any,
3406
- context: __SerdeContext
3407
- ): LambdaFunctionStartFailedEventDetails => {
3408
- return {
3409
- cause: __expectString(output.cause),
3410
- error: __expectString(output.error),
3411
- } as any;
3412
- };
3413
-
3414
- const deserializeAws_json1_0LambdaFunctionSucceededEventDetails = (
3415
- output: any,
3416
- context: __SerdeContext
3417
- ): LambdaFunctionSucceededEventDetails => {
3418
- return {
3419
- output: __expectString(output.output),
3420
- outputDetails:
3421
- output.outputDetails !== undefined && output.outputDetails !== null
3422
- ? deserializeAws_json1_0HistoryEventExecutionDataDetails(output.outputDetails, context)
3423
- : undefined,
3424
- } as any;
3425
- };
3426
-
3427
- const deserializeAws_json1_0LambdaFunctionTimedOutEventDetails = (
3428
- output: any,
3429
- context: __SerdeContext
3430
- ): LambdaFunctionTimedOutEventDetails => {
3431
- return {
3432
- cause: __expectString(output.cause),
3433
- error: __expectString(output.error),
3434
- } as any;
3435
- };
3436
-
3437
- const deserializeAws_json1_0ListActivitiesOutput = (output: any, context: __SerdeContext): ListActivitiesOutput => {
3438
- return {
3439
- activities:
3440
- output.activities !== undefined && output.activities !== null
3441
- ? deserializeAws_json1_0ActivityList(output.activities, context)
3442
- : undefined,
3443
- nextToken: __expectString(output.nextToken),
3444
- } as any;
3445
- };
3446
-
3447
- const deserializeAws_json1_0ListExecutionsOutput = (output: any, context: __SerdeContext): ListExecutionsOutput => {
3448
- return {
3449
- executions:
3450
- output.executions !== undefined && output.executions !== null
3451
- ? deserializeAws_json1_0ExecutionList(output.executions, context)
3452
- : undefined,
3453
- nextToken: __expectString(output.nextToken),
3454
- } as any;
3455
- };
3456
-
3457
- const deserializeAws_json1_0ListStateMachinesOutput = (
3458
- output: any,
3459
- context: __SerdeContext
3460
- ): ListStateMachinesOutput => {
3461
- return {
3462
- nextToken: __expectString(output.nextToken),
3463
- stateMachines:
3464
- output.stateMachines !== undefined && output.stateMachines !== null
3465
- ? deserializeAws_json1_0StateMachineList(output.stateMachines, context)
3466
- : undefined,
3467
- } as any;
3468
- };
3469
-
3470
- const deserializeAws_json1_0ListTagsForResourceOutput = (
3471
- output: any,
3472
- context: __SerdeContext
3473
- ): ListTagsForResourceOutput => {
3474
- return {
3475
- tags:
3476
- output.tags !== undefined && output.tags !== null
3477
- ? deserializeAws_json1_0TagList(output.tags, context)
3478
- : undefined,
3479
- } as any;
3480
- };
3481
-
3482
- const deserializeAws_json1_0LogDestination = (output: any, context: __SerdeContext): LogDestination => {
3483
- return {
3484
- cloudWatchLogsLogGroup:
3485
- output.cloudWatchLogsLogGroup !== undefined && output.cloudWatchLogsLogGroup !== null
3486
- ? deserializeAws_json1_0CloudWatchLogsLogGroup(output.cloudWatchLogsLogGroup, context)
3487
- : undefined,
3488
- } as any;
3489
- };
3490
-
3491
- const deserializeAws_json1_0LogDestinationList = (output: any, context: __SerdeContext): LogDestination[] => {
3492
- return (output || [])
3493
- .filter((e: any) => e != null)
3494
- .map((entry: any) => {
3495
- if (entry === null) {
3496
- return null as any;
3497
- }
3498
- return deserializeAws_json1_0LogDestination(entry, context);
3499
- });
3500
- };
3501
-
3502
- const deserializeAws_json1_0LoggingConfiguration = (output: any, context: __SerdeContext): LoggingConfiguration => {
3503
- return {
3504
- destinations:
3505
- output.destinations !== undefined && output.destinations !== null
3506
- ? deserializeAws_json1_0LogDestinationList(output.destinations, context)
3507
- : undefined,
3508
- includeExecutionData: __expectBoolean(output.includeExecutionData),
3509
- level: __expectString(output.level),
3510
- } as any;
3511
- };
3512
-
3513
- const deserializeAws_json1_0MapIterationEventDetails = (
3514
- output: any,
3515
- context: __SerdeContext
3516
- ): MapIterationEventDetails => {
3517
- return {
3518
- index: __expectInt32(output.index),
3519
- name: __expectString(output.name),
3520
- } as any;
3521
- };
3522
-
3523
- const deserializeAws_json1_0MapStateStartedEventDetails = (
3524
- output: any,
3525
- context: __SerdeContext
3526
- ): MapStateStartedEventDetails => {
3527
- return {
3528
- length: __expectInt32(output.length),
3529
- } as any;
3530
- };
3531
-
3532
- const deserializeAws_json1_0MissingRequiredParameter = (
3533
- output: any,
3534
- context: __SerdeContext
3535
- ): MissingRequiredParameter => {
3536
- return {
3537
- message: __expectString(output.message),
3538
- } as any;
3539
- };
3540
-
3541
- const deserializeAws_json1_0ResourceNotFound = (output: any, context: __SerdeContext): ResourceNotFound => {
3542
- return {
3543
- message: __expectString(output.message),
3544
- resourceName: __expectString(output.resourceName),
3545
- } as any;
3546
- };
3547
-
3548
- const deserializeAws_json1_0SendTaskFailureOutput = (output: any, context: __SerdeContext): SendTaskFailureOutput => {
3549
- return {} as any;
3550
- };
3551
-
3552
- const deserializeAws_json1_0SendTaskHeartbeatOutput = (
3553
- output: any,
3554
- context: __SerdeContext
3555
- ): SendTaskHeartbeatOutput => {
3556
- return {} as any;
3557
- };
3558
-
3559
- const deserializeAws_json1_0SendTaskSuccessOutput = (output: any, context: __SerdeContext): SendTaskSuccessOutput => {
3560
- return {} as any;
3561
- };
3562
-
3563
- const deserializeAws_json1_0StartExecutionOutput = (output: any, context: __SerdeContext): StartExecutionOutput => {
3564
- return {
3565
- executionArn: __expectString(output.executionArn),
3566
- startDate:
3567
- output.startDate !== undefined && output.startDate !== null
3568
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startDate)))
3569
- : undefined,
3570
- } as any;
3571
- };
3572
-
3573
- const deserializeAws_json1_0StartSyncExecutionOutput = (
3574
- output: any,
3575
- context: __SerdeContext
3576
- ): StartSyncExecutionOutput => {
3577
- return {
3578
- billingDetails:
3579
- output.billingDetails !== undefined && output.billingDetails !== null
3580
- ? deserializeAws_json1_0BillingDetails(output.billingDetails, context)
3581
- : undefined,
3582
- cause: __expectString(output.cause),
3583
- error: __expectString(output.error),
3584
- executionArn: __expectString(output.executionArn),
3585
- input: __expectString(output.input),
3586
- inputDetails:
3587
- output.inputDetails !== undefined && output.inputDetails !== null
3588
- ? deserializeAws_json1_0CloudWatchEventsExecutionDataDetails(output.inputDetails, context)
3589
- : undefined,
3590
- name: __expectString(output.name),
3591
- output: __expectString(output.output),
3592
- outputDetails:
3593
- output.outputDetails !== undefined && output.outputDetails !== null
3594
- ? deserializeAws_json1_0CloudWatchEventsExecutionDataDetails(output.outputDetails, context)
3595
- : undefined,
3596
- startDate:
3597
- output.startDate !== undefined && output.startDate !== null
3598
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startDate)))
3599
- : undefined,
3600
- stateMachineArn: __expectString(output.stateMachineArn),
3601
- status: __expectString(output.status),
3602
- stopDate:
3603
- output.stopDate !== undefined && output.stopDate !== null
3604
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.stopDate)))
3605
- : undefined,
3606
- traceHeader: __expectString(output.traceHeader),
3607
- } as any;
3608
- };
3609
-
3610
- const deserializeAws_json1_0StateEnteredEventDetails = (
3611
- output: any,
3612
- context: __SerdeContext
3613
- ): StateEnteredEventDetails => {
3614
- return {
3615
- input: __expectString(output.input),
3616
- inputDetails:
3617
- output.inputDetails !== undefined && output.inputDetails !== null
3618
- ? deserializeAws_json1_0HistoryEventExecutionDataDetails(output.inputDetails, context)
3619
- : undefined,
3620
- name: __expectString(output.name),
3621
- } as any;
3622
- };
3623
-
3624
- const deserializeAws_json1_0StateExitedEventDetails = (
3625
- output: any,
3626
- context: __SerdeContext
3627
- ): StateExitedEventDetails => {
3628
- return {
3629
- name: __expectString(output.name),
3630
- output: __expectString(output.output),
3631
- outputDetails:
3632
- output.outputDetails !== undefined && output.outputDetails !== null
3633
- ? deserializeAws_json1_0HistoryEventExecutionDataDetails(output.outputDetails, context)
3634
- : undefined,
3635
- } as any;
3636
- };
3637
-
3638
- const deserializeAws_json1_0StateMachineAlreadyExists = (
3639
- output: any,
3640
- context: __SerdeContext
3641
- ): StateMachineAlreadyExists => {
3642
- return {
3643
- message: __expectString(output.message),
3644
- } as any;
3645
- };
3646
-
3647
- const deserializeAws_json1_0StateMachineDeleting = (output: any, context: __SerdeContext): StateMachineDeleting => {
3648
- return {
3649
- message: __expectString(output.message),
3650
- } as any;
3651
- };
3652
-
3653
- const deserializeAws_json1_0StateMachineDoesNotExist = (
3654
- output: any,
3655
- context: __SerdeContext
3656
- ): StateMachineDoesNotExist => {
3657
- return {
3658
- message: __expectString(output.message),
3659
- } as any;
3660
- };
3661
-
3662
- const deserializeAws_json1_0StateMachineLimitExceeded = (
3663
- output: any,
3664
- context: __SerdeContext
3665
- ): StateMachineLimitExceeded => {
3666
- return {
3667
- message: __expectString(output.message),
3668
- } as any;
3669
- };
3670
-
3671
- const deserializeAws_json1_0StateMachineList = (output: any, context: __SerdeContext): StateMachineListItem[] => {
3672
- return (output || [])
3673
- .filter((e: any) => e != null)
3674
- .map((entry: any) => {
3675
- if (entry === null) {
3676
- return null as any;
3677
- }
3678
- return deserializeAws_json1_0StateMachineListItem(entry, context);
3679
- });
3680
- };
3681
-
3682
- const deserializeAws_json1_0StateMachineListItem = (output: any, context: __SerdeContext): StateMachineListItem => {
3683
- return {
3684
- creationDate:
3685
- output.creationDate !== undefined && output.creationDate !== null
3686
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDate)))
3687
- : undefined,
3688
- name: __expectString(output.name),
3689
- stateMachineArn: __expectString(output.stateMachineArn),
3690
- type: __expectString(output.type),
3691
- } as any;
3692
- };
3693
-
3694
- const deserializeAws_json1_0StateMachineTypeNotSupported = (
3695
- output: any,
3696
- context: __SerdeContext
3697
- ): StateMachineTypeNotSupported => {
3698
- return {
3699
- message: __expectString(output.message),
3700
- } as any;
3701
- };
3702
-
3703
- const deserializeAws_json1_0StopExecutionOutput = (output: any, context: __SerdeContext): StopExecutionOutput => {
3704
- return {
3705
- stopDate:
3706
- output.stopDate !== undefined && output.stopDate !== null
3707
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.stopDate)))
3708
- : undefined,
3709
- } as any;
3710
- };
3711
-
3712
- const deserializeAws_json1_0Tag = (output: any, context: __SerdeContext): Tag => {
3713
- return {
3714
- key: __expectString(output.key),
3715
- value: __expectString(output.value),
3716
- } as any;
3717
- };
3718
-
3719
- const deserializeAws_json1_0TagList = (output: any, context: __SerdeContext): Tag[] => {
3720
- return (output || [])
3721
- .filter((e: any) => e != null)
3722
- .map((entry: any) => {
3723
- if (entry === null) {
3724
- return null as any;
3725
- }
3726
- return deserializeAws_json1_0Tag(entry, context);
3727
- });
3728
- };
3729
-
3730
- const deserializeAws_json1_0TagResourceOutput = (output: any, context: __SerdeContext): TagResourceOutput => {
3731
- return {} as any;
3732
- };
3733
-
3734
- const deserializeAws_json1_0TaskDoesNotExist = (output: any, context: __SerdeContext): TaskDoesNotExist => {
3735
- return {
3736
- message: __expectString(output.message),
3737
- } as any;
3738
- };
3739
-
3740
- const deserializeAws_json1_0TaskFailedEventDetails = (output: any, context: __SerdeContext): TaskFailedEventDetails => {
3741
- return {
3742
- cause: __expectString(output.cause),
3743
- error: __expectString(output.error),
3744
- resource: __expectString(output.resource),
3745
- resourceType: __expectString(output.resourceType),
3746
- } as any;
3747
- };
3748
-
3749
- const deserializeAws_json1_0TaskScheduledEventDetails = (
3750
- output: any,
3751
- context: __SerdeContext
3752
- ): TaskScheduledEventDetails => {
3753
- return {
3754
- heartbeatInSeconds: __expectLong(output.heartbeatInSeconds),
3755
- parameters: __expectString(output.parameters),
3756
- region: __expectString(output.region),
3757
- resource: __expectString(output.resource),
3758
- resourceType: __expectString(output.resourceType),
3759
- timeoutInSeconds: __expectLong(output.timeoutInSeconds),
3760
- } as any;
3761
- };
3762
-
3763
- const deserializeAws_json1_0TaskStartedEventDetails = (
3764
- output: any,
3765
- context: __SerdeContext
3766
- ): TaskStartedEventDetails => {
3767
- return {
3768
- resource: __expectString(output.resource),
3769
- resourceType: __expectString(output.resourceType),
3770
- } as any;
3771
- };
3772
-
3773
- const deserializeAws_json1_0TaskStartFailedEventDetails = (
3774
- output: any,
3775
- context: __SerdeContext
3776
- ): TaskStartFailedEventDetails => {
3777
- return {
3778
- cause: __expectString(output.cause),
3779
- error: __expectString(output.error),
3780
- resource: __expectString(output.resource),
3781
- resourceType: __expectString(output.resourceType),
3782
- } as any;
3783
- };
3784
-
3785
- const deserializeAws_json1_0TaskSubmitFailedEventDetails = (
3786
- output: any,
3787
- context: __SerdeContext
3788
- ): TaskSubmitFailedEventDetails => {
3789
- return {
3790
- cause: __expectString(output.cause),
3791
- error: __expectString(output.error),
3792
- resource: __expectString(output.resource),
3793
- resourceType: __expectString(output.resourceType),
3794
- } as any;
3795
- };
3796
-
3797
- const deserializeAws_json1_0TaskSubmittedEventDetails = (
3798
- output: any,
3799
- context: __SerdeContext
3800
- ): TaskSubmittedEventDetails => {
3801
- return {
3802
- output: __expectString(output.output),
3803
- outputDetails:
3804
- output.outputDetails !== undefined && output.outputDetails !== null
3805
- ? deserializeAws_json1_0HistoryEventExecutionDataDetails(output.outputDetails, context)
3806
- : undefined,
3807
- resource: __expectString(output.resource),
3808
- resourceType: __expectString(output.resourceType),
3809
- } as any;
3810
- };
3811
-
3812
- const deserializeAws_json1_0TaskSucceededEventDetails = (
3813
- output: any,
3814
- context: __SerdeContext
3815
- ): TaskSucceededEventDetails => {
3816
- return {
3817
- output: __expectString(output.output),
3818
- outputDetails:
3819
- output.outputDetails !== undefined && output.outputDetails !== null
3820
- ? deserializeAws_json1_0HistoryEventExecutionDataDetails(output.outputDetails, context)
3821
- : undefined,
3822
- resource: __expectString(output.resource),
3823
- resourceType: __expectString(output.resourceType),
3824
- } as any;
3825
- };
3826
-
3827
- const deserializeAws_json1_0TaskTimedOut = (output: any, context: __SerdeContext): TaskTimedOut => {
3828
- return {
3829
- message: __expectString(output.message),
3830
- } as any;
3831
- };
3832
-
3833
- const deserializeAws_json1_0TaskTimedOutEventDetails = (
3834
- output: any,
3835
- context: __SerdeContext
3836
- ): TaskTimedOutEventDetails => {
3837
- return {
3838
- cause: __expectString(output.cause),
3839
- error: __expectString(output.error),
3840
- resource: __expectString(output.resource),
3841
- resourceType: __expectString(output.resourceType),
3842
- } as any;
3843
- };
3844
-
3845
- const deserializeAws_json1_0TooManyTags = (output: any, context: __SerdeContext): TooManyTags => {
3846
- return {
3847
- message: __expectString(output.message),
3848
- resourceName: __expectString(output.resourceName),
3849
- } as any;
3850
- };
3851
-
3852
- const deserializeAws_json1_0TracingConfiguration = (output: any, context: __SerdeContext): TracingConfiguration => {
3853
- return {
3854
- enabled: __expectBoolean(output.enabled),
3855
- } as any;
3856
- };
3857
-
3858
- const deserializeAws_json1_0UntagResourceOutput = (output: any, context: __SerdeContext): UntagResourceOutput => {
3859
- return {} as any;
3860
- };
3861
-
3862
- const deserializeAws_json1_0UpdateStateMachineOutput = (
3863
- output: any,
3864
- context: __SerdeContext
3865
- ): UpdateStateMachineOutput => {
3866
- return {
3867
- updateDate:
3868
- output.updateDate !== undefined && output.updateDate !== null
3869
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updateDate)))
3870
- : undefined,
3871
- } as any;
3872
- };
3873
-
3874
- const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({
3875
- httpStatusCode: output.statusCode,
3876
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
3877
- extendedRequestId: output.headers["x-amz-id-2"],
3878
- cfId: output.headers["x-amz-cf-id"],
3879
- });
3880
-
3881
- // Collect low-level response body stream to Uint8Array.
3882
- const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext): Promise<Uint8Array> => {
3883
- if (streamBody instanceof Uint8Array) {
3884
- return Promise.resolve(streamBody);
3885
- }
3886
- return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
3887
- };
3888
-
3889
- // Encode Uint8Array data into string with utf-8.
3890
- const collectBodyString = (streamBody: any, context: __SerdeContext): Promise<string> =>
3891
- collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
3892
-
3893
- const buildHttpRpcRequest = async (
3894
- context: __SerdeContext,
3895
- headers: __HeaderBag,
3896
- path: string,
3897
- resolvedHostname: string | undefined,
3898
- body: any
3899
- ): Promise<__HttpRequest> => {
3900
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
3901
- const contents: any = {
3902
- protocol,
3903
- hostname,
3904
- port,
3905
- method: "POST",
3906
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
3907
- headers,
3908
- };
3909
- if (resolvedHostname !== undefined) {
3910
- contents.hostname = resolvedHostname;
3911
- }
3912
- if (body !== undefined) {
3913
- contents.body = body;
3914
- }
3915
- return new __HttpRequest(contents);
3916
- };
3917
-
3918
- const parseBody = (streamBody: any, context: __SerdeContext): any =>
3919
- collectBodyString(streamBody, context).then((encoded) => {
3920
- if (encoded.length) {
3921
- return JSON.parse(encoded);
3922
- }
3923
- return {};
3924
- });
3925
-
3926
- /**
3927
- * Load an error code for the aws.rest-json-1.1 protocol.
3928
- */
3929
- const loadRestJsonErrorCode = (output: __HttpResponse, data: any): string => {
3930
- const findKey = (object: any, key: string) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
3931
-
3932
- const sanitizeErrorCode = (rawValue: string): string => {
3933
- let cleanValue = rawValue;
3934
- if (cleanValue.indexOf(":") >= 0) {
3935
- cleanValue = cleanValue.split(":")[0];
3936
- }
3937
- if (cleanValue.indexOf("#") >= 0) {
3938
- cleanValue = cleanValue.split("#")[1];
3939
- }
3940
- return cleanValue;
3941
- };
3942
-
3943
- const headerKey = findKey(output.headers, "x-amzn-errortype");
3944
- if (headerKey !== undefined) {
3945
- return sanitizeErrorCode(output.headers[headerKey]);
3946
- }
3947
-
3948
- if (data.code !== undefined) {
3949
- return sanitizeErrorCode(data.code);
3950
- }
3951
-
3952
- if (data["__type"] !== undefined) {
3953
- return sanitizeErrorCode(data["__type"]);
3954
- }
3955
-
3956
- return "";
3957
- };