@aws-sdk/client-iotthingsgraph 3.32.0 → 3.36.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (411) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/{dist/cjs → dist-cjs}/IoTThingsGraph.js +1 -2
  3. package/{dist/cjs → dist-cjs}/IoTThingsGraphClient.js +8 -9
  4. package/{dist/cjs → dist-cjs}/commands/AssociateEntityToThingCommand.js +2 -3
  5. package/{dist/cjs → dist-cjs}/commands/CreateFlowTemplateCommand.js +2 -3
  6. package/{dist/cjs → dist-cjs}/commands/CreateSystemInstanceCommand.js +2 -3
  7. package/{dist/cjs → dist-cjs}/commands/CreateSystemTemplateCommand.js +2 -3
  8. package/{dist/cjs → dist-cjs}/commands/DeleteFlowTemplateCommand.js +2 -3
  9. package/{dist/cjs → dist-cjs}/commands/DeleteNamespaceCommand.js +2 -3
  10. package/{dist/cjs → dist-cjs}/commands/DeleteSystemInstanceCommand.js +2 -3
  11. package/{dist/cjs → dist-cjs}/commands/DeleteSystemTemplateCommand.js +2 -3
  12. package/{dist/cjs → dist-cjs}/commands/DeploySystemInstanceCommand.js +2 -3
  13. package/{dist/cjs → dist-cjs}/commands/DeprecateFlowTemplateCommand.js +2 -3
  14. package/{dist/cjs → dist-cjs}/commands/DeprecateSystemTemplateCommand.js +2 -3
  15. package/{dist/cjs → dist-cjs}/commands/DescribeNamespaceCommand.js +2 -3
  16. package/{dist/cjs → dist-cjs}/commands/DissociateEntityFromThingCommand.js +2 -3
  17. package/{dist/cjs → dist-cjs}/commands/GetEntitiesCommand.js +2 -3
  18. package/{dist/cjs → dist-cjs}/commands/GetFlowTemplateCommand.js +2 -3
  19. package/{dist/cjs → dist-cjs}/commands/GetFlowTemplateRevisionsCommand.js +2 -3
  20. package/{dist/cjs → dist-cjs}/commands/GetNamespaceDeletionStatusCommand.js +2 -3
  21. package/{dist/cjs → dist-cjs}/commands/GetSystemInstanceCommand.js +2 -3
  22. package/{dist/cjs → dist-cjs}/commands/GetSystemTemplateCommand.js +2 -3
  23. package/{dist/cjs → dist-cjs}/commands/GetSystemTemplateRevisionsCommand.js +2 -3
  24. package/{dist/cjs → dist-cjs}/commands/GetUploadStatusCommand.js +2 -3
  25. package/{dist/cjs → dist-cjs}/commands/ListFlowExecutionMessagesCommand.js +2 -3
  26. package/{dist/cjs → dist-cjs}/commands/ListTagsForResourceCommand.js +2 -3
  27. package/{dist/cjs → dist-cjs}/commands/SearchEntitiesCommand.js +2 -3
  28. package/{dist/cjs → dist-cjs}/commands/SearchFlowExecutionsCommand.js +2 -3
  29. package/{dist/cjs → dist-cjs}/commands/SearchFlowTemplatesCommand.js +2 -3
  30. package/{dist/cjs → dist-cjs}/commands/SearchSystemInstancesCommand.js +2 -3
  31. package/{dist/cjs → dist-cjs}/commands/SearchSystemTemplatesCommand.js +2 -3
  32. package/{dist/cjs → dist-cjs}/commands/SearchThingsCommand.js +2 -3
  33. package/{dist/cjs → dist-cjs}/commands/TagResourceCommand.js +2 -3
  34. package/{dist/cjs → dist-cjs}/commands/UndeploySystemInstanceCommand.js +2 -3
  35. package/{dist/cjs → dist-cjs}/commands/UntagResourceCommand.js +2 -3
  36. package/{dist/cjs → dist-cjs}/commands/UpdateFlowTemplateCommand.js +2 -3
  37. package/{dist/cjs → dist-cjs}/commands/UpdateSystemTemplateCommand.js +2 -3
  38. package/{dist/cjs → dist-cjs}/commands/UploadEntityDefinitionsCommand.js +2 -3
  39. package/{dist/cjs → dist-cjs}/endpoints.js +0 -1
  40. package/{dist/cjs → dist-cjs}/index.js +0 -1
  41. package/{dist/cjs → dist-cjs}/models/index.js +0 -1
  42. package/{dist/cjs → dist-cjs}/models/models_0.js +0 -1
  43. package/{dist/cjs → dist-cjs}/pagination/GetFlowTemplateRevisionsPaginator.js +1 -2
  44. package/{dist/cjs → dist-cjs}/pagination/GetSystemTemplateRevisionsPaginator.js +1 -2
  45. package/{dist/cjs → dist-cjs}/pagination/Interfaces.js +0 -1
  46. package/{dist/cjs → dist-cjs}/pagination/ListFlowExecutionMessagesPaginator.js +1 -2
  47. package/{dist/cjs → dist-cjs}/pagination/ListTagsForResourcePaginator.js +1 -2
  48. package/{dist/cjs → dist-cjs}/pagination/SearchEntitiesPaginator.js +1 -2
  49. package/{dist/cjs → dist-cjs}/pagination/SearchFlowExecutionsPaginator.js +1 -2
  50. package/{dist/cjs → dist-cjs}/pagination/SearchFlowTemplatesPaginator.js +1 -2
  51. package/{dist/cjs → dist-cjs}/pagination/SearchSystemInstancesPaginator.js +1 -2
  52. package/{dist/cjs → dist-cjs}/pagination/SearchSystemTemplatesPaginator.js +1 -2
  53. package/{dist/cjs → dist-cjs}/pagination/SearchThingsPaginator.js +1 -2
  54. package/{dist/cjs → dist-cjs}/protocols/Aws_json1_1.js +0 -1
  55. package/{dist/cjs → dist-cjs}/runtimeConfig.browser.js +2 -2
  56. package/{dist/cjs → dist-cjs}/runtimeConfig.js +2 -2
  57. package/{dist/cjs → dist-cjs}/runtimeConfig.native.js +0 -1
  58. package/{dist/cjs → dist-cjs}/runtimeConfig.shared.js +1 -2
  59. package/{dist/es → dist-es}/IoTThingsGraph.js +2 -10
  60. package/{dist/es → dist-es}/IoTThingsGraphClient.js +2 -15
  61. package/{dist/es → dist-es}/commands/AssociateEntityToThingCommand.js +4 -31
  62. package/{dist/es → dist-es}/commands/CreateFlowTemplateCommand.js +4 -32
  63. package/dist-es/commands/CreateSystemInstanceCommand.js +39 -0
  64. package/{dist/es → dist-es}/commands/CreateSystemTemplateCommand.js +4 -31
  65. package/{dist/es → dist-es}/commands/DeleteFlowTemplateCommand.js +4 -31
  66. package/{dist/es → dist-es}/commands/DeleteNamespaceCommand.js +4 -30
  67. package/{dist/es → dist-es}/commands/DeleteSystemInstanceCommand.js +4 -32
  68. package/{dist/es → dist-es}/commands/DeleteSystemTemplateCommand.js +4 -31
  69. package/dist-es/commands/DeploySystemInstanceCommand.js +39 -0
  70. package/{dist/es → dist-es}/commands/DeprecateFlowTemplateCommand.js +4 -30
  71. package/{dist/es → dist-es}/commands/DeprecateSystemTemplateCommand.js +4 -30
  72. package/{dist/es → dist-es}/commands/DescribeNamespaceCommand.js +4 -30
  73. package/{dist/es → dist-es}/commands/DissociateEntityFromThingCommand.js +4 -31
  74. package/dist-es/commands/GetEntitiesCommand.js +39 -0
  75. package/{dist/es → dist-es}/commands/GetFlowTemplateCommand.js +4 -30
  76. package/{dist/es → dist-es}/commands/GetFlowTemplateRevisionsCommand.js +4 -31
  77. package/{dist/es → dist-es}/commands/GetNamespaceDeletionStatusCommand.js +4 -30
  78. package/{dist/es → dist-es}/commands/GetSystemInstanceCommand.js +4 -30
  79. package/{dist/es → dist-es}/commands/GetSystemTemplateCommand.js +4 -30
  80. package/{dist/es → dist-es}/commands/GetSystemTemplateRevisionsCommand.js +4 -31
  81. package/{dist/es → dist-es}/commands/GetUploadStatusCommand.js +4 -30
  82. package/{dist/es → dist-es}/commands/ListFlowExecutionMessagesCommand.js +4 -30
  83. package/{dist/es → dist-es}/commands/ListTagsForResourceCommand.js +4 -30
  84. package/{dist/es → dist-es}/commands/SearchEntitiesCommand.js +4 -30
  85. package/{dist/es → dist-es}/commands/SearchFlowExecutionsCommand.js +4 -30
  86. package/{dist/es → dist-es}/commands/SearchFlowTemplatesCommand.js +4 -30
  87. package/{dist/es → dist-es}/commands/SearchSystemInstancesCommand.js +4 -30
  88. package/{dist/es → dist-es}/commands/SearchSystemTemplatesCommand.js +4 -30
  89. package/{dist/es → dist-es}/commands/SearchThingsCommand.js +4 -33
  90. package/{dist/es → dist-es}/commands/TagResourceCommand.js +4 -30
  91. package/{dist/es → dist-es}/commands/UndeploySystemInstanceCommand.js +4 -30
  92. package/{dist/es → dist-es}/commands/UntagResourceCommand.js +4 -30
  93. package/{dist/es → dist-es}/commands/UpdateFlowTemplateCommand.js +4 -31
  94. package/{dist/es → dist-es}/commands/UpdateSystemTemplateCommand.js +4 -30
  95. package/dist-es/commands/UploadEntityDefinitionsCommand.js +39 -0
  96. package/{dist/es → dist-es}/endpoints.js +1 -2
  97. package/{dist/types/index.d.ts → dist-es/index.js} +0 -0
  98. package/{dist/types/models/index.d.ts → dist-es/models/index.js} +0 -0
  99. package/{dist/es → dist-es}/models/models_0.js +0 -286
  100. package/{dist/es → dist-es}/pagination/GetFlowTemplateRevisionsPaginator.js +17 -30
  101. package/{dist/es → dist-es}/pagination/GetSystemTemplateRevisionsPaginator.js +17 -30
  102. package/dist-es/pagination/Interfaces.js +1 -0
  103. package/{dist/es → dist-es}/pagination/ListFlowExecutionMessagesPaginator.js +17 -30
  104. package/{dist/es → dist-es}/pagination/ListTagsForResourcePaginator.js +17 -30
  105. package/{dist/es → dist-es}/pagination/SearchEntitiesPaginator.js +17 -30
  106. package/{dist/es → dist-es}/pagination/SearchFlowExecutionsPaginator.js +17 -30
  107. package/{dist/es → dist-es}/pagination/SearchFlowTemplatesPaginator.js +17 -30
  108. package/{dist/es → dist-es}/pagination/SearchSystemInstancesPaginator.js +17 -30
  109. package/{dist/es → dist-es}/pagination/SearchSystemTemplatesPaginator.js +17 -30
  110. package/{dist/es → dist-es}/pagination/SearchThingsPaginator.js +17 -30
  111. package/{dist/es → dist-es}/protocols/Aws_json1_1.js +832 -838
  112. package/{dist/es → dist-es}/runtimeConfig.browser.js +1 -5
  113. package/{dist/es → dist-es}/runtimeConfig.js +1 -5
  114. package/{dist/es → dist-es}/runtimeConfig.native.js +0 -4
  115. package/{dist/es → dist-es}/runtimeConfig.shared.js +1 -5
  116. package/{dist/types → dist-types}/IoTThingsGraph.d.ts +2 -2
  117. package/{dist/types → dist-types}/IoTThingsGraphClient.d.ts +8 -8
  118. package/{dist/types → dist-types}/commands/AssociateEntityToThingCommand.d.ts +2 -2
  119. package/{dist/types → dist-types}/commands/CreateFlowTemplateCommand.d.ts +2 -2
  120. package/{dist/types → dist-types}/commands/CreateSystemInstanceCommand.d.ts +2 -2
  121. package/{dist/types → dist-types}/commands/CreateSystemTemplateCommand.d.ts +2 -2
  122. package/{dist/types → dist-types}/commands/DeleteFlowTemplateCommand.d.ts +2 -2
  123. package/{dist/types → dist-types}/commands/DeleteNamespaceCommand.d.ts +2 -2
  124. package/{dist/types → dist-types}/commands/DeleteSystemInstanceCommand.d.ts +2 -2
  125. package/{dist/types → dist-types}/commands/DeleteSystemTemplateCommand.d.ts +2 -2
  126. package/{dist/types → dist-types}/commands/DeploySystemInstanceCommand.d.ts +2 -2
  127. package/{dist/types → dist-types}/commands/DeprecateFlowTemplateCommand.d.ts +2 -2
  128. package/{dist/types → dist-types}/commands/DeprecateSystemTemplateCommand.d.ts +2 -2
  129. package/{dist/types → dist-types}/commands/DescribeNamespaceCommand.d.ts +2 -2
  130. package/{dist/types → dist-types}/commands/DissociateEntityFromThingCommand.d.ts +2 -2
  131. package/{dist/types → dist-types}/commands/GetEntitiesCommand.d.ts +2 -2
  132. package/{dist/types → dist-types}/commands/GetFlowTemplateCommand.d.ts +2 -2
  133. package/{dist/types → dist-types}/commands/GetFlowTemplateRevisionsCommand.d.ts +2 -2
  134. package/{dist/types → dist-types}/commands/GetNamespaceDeletionStatusCommand.d.ts +2 -2
  135. package/{dist/types → dist-types}/commands/GetSystemInstanceCommand.d.ts +2 -2
  136. package/{dist/types → dist-types}/commands/GetSystemTemplateCommand.d.ts +2 -2
  137. package/{dist/types → dist-types}/commands/GetSystemTemplateRevisionsCommand.d.ts +2 -2
  138. package/{dist/types → dist-types}/commands/GetUploadStatusCommand.d.ts +2 -2
  139. package/{dist/types → dist-types}/commands/ListFlowExecutionMessagesCommand.d.ts +2 -2
  140. package/{dist/types → dist-types}/commands/ListTagsForResourceCommand.d.ts +2 -2
  141. package/{dist/types → dist-types}/commands/SearchEntitiesCommand.d.ts +2 -2
  142. package/{dist/types → dist-types}/commands/SearchFlowExecutionsCommand.d.ts +2 -2
  143. package/{dist/types → dist-types}/commands/SearchFlowTemplatesCommand.d.ts +2 -2
  144. package/{dist/types → dist-types}/commands/SearchSystemInstancesCommand.d.ts +2 -2
  145. package/{dist/types → dist-types}/commands/SearchSystemTemplatesCommand.d.ts +2 -2
  146. package/{dist/types → dist-types}/commands/SearchThingsCommand.d.ts +2 -2
  147. package/{dist/types → dist-types}/commands/TagResourceCommand.d.ts +2 -2
  148. package/{dist/types → dist-types}/commands/UndeploySystemInstanceCommand.d.ts +2 -2
  149. package/{dist/types → dist-types}/commands/UntagResourceCommand.d.ts +2 -2
  150. package/{dist/types → dist-types}/commands/UpdateFlowTemplateCommand.d.ts +2 -2
  151. package/{dist/types → dist-types}/commands/UpdateSystemTemplateCommand.d.ts +2 -2
  152. package/{dist/types → dist-types}/commands/UploadEntityDefinitionsCommand.d.ts +2 -2
  153. package/{dist/types → dist-types}/endpoints.d.ts +0 -0
  154. package/{index.ts → dist-types/index.d.ts} +0 -0
  155. package/{models/index.ts → dist-types/models/index.d.ts} +0 -0
  156. package/{dist/types → dist-types}/models/models_0.d.ts +0 -0
  157. package/{dist/types → dist-types}/pagination/GetFlowTemplateRevisionsPaginator.d.ts +1 -1
  158. package/{dist/types → dist-types}/pagination/GetSystemTemplateRevisionsPaginator.d.ts +1 -1
  159. package/{dist/types → dist-types}/pagination/Interfaces.d.ts +1 -1
  160. package/{dist/types → dist-types}/pagination/ListFlowExecutionMessagesPaginator.d.ts +1 -1
  161. package/{dist/types → dist-types}/pagination/ListTagsForResourcePaginator.d.ts +1 -1
  162. package/{dist/types → dist-types}/pagination/SearchEntitiesPaginator.d.ts +1 -1
  163. package/{dist/types → dist-types}/pagination/SearchFlowExecutionsPaginator.d.ts +1 -1
  164. package/{dist/types → dist-types}/pagination/SearchFlowTemplatesPaginator.d.ts +1 -1
  165. package/{dist/types → dist-types}/pagination/SearchSystemInstancesPaginator.d.ts +1 -1
  166. package/{dist/types → dist-types}/pagination/SearchSystemTemplatesPaginator.d.ts +1 -1
  167. package/{dist/types → dist-types}/pagination/SearchThingsPaginator.d.ts +1 -1
  168. package/{dist/types → dist-types}/protocols/Aws_json1_1.d.ts +2 -2
  169. package/{dist/types/ts3.4 → dist-types}/runtimeConfig.browser.d.ts +37 -36
  170. package/{dist/types/ts3.4 → dist-types}/runtimeConfig.d.ts +37 -36
  171. package/{dist/types → dist-types}/runtimeConfig.native.d.ts +1 -0
  172. package/{dist/types → dist-types}/runtimeConfig.shared.d.ts +0 -0
  173. package/{dist/types → dist-types}/ts3.4/IoTThingsGraph.d.ts +2 -2
  174. package/{dist/types → dist-types}/ts3.4/IoTThingsGraphClient.d.ts +8 -8
  175. package/{dist/types → dist-types}/ts3.4/commands/AssociateEntityToThingCommand.d.ts +2 -2
  176. package/{dist/types → dist-types}/ts3.4/commands/CreateFlowTemplateCommand.d.ts +2 -2
  177. package/{dist/types → dist-types}/ts3.4/commands/CreateSystemInstanceCommand.d.ts +2 -2
  178. package/{dist/types → dist-types}/ts3.4/commands/CreateSystemTemplateCommand.d.ts +2 -2
  179. package/{dist/types → dist-types}/ts3.4/commands/DeleteFlowTemplateCommand.d.ts +2 -2
  180. package/{dist/types → dist-types}/ts3.4/commands/DeleteNamespaceCommand.d.ts +2 -2
  181. package/{dist/types → dist-types}/ts3.4/commands/DeleteSystemInstanceCommand.d.ts +2 -2
  182. package/{dist/types → dist-types}/ts3.4/commands/DeleteSystemTemplateCommand.d.ts +2 -2
  183. package/{dist/types → dist-types}/ts3.4/commands/DeploySystemInstanceCommand.d.ts +2 -2
  184. package/{dist/types → dist-types}/ts3.4/commands/DeprecateFlowTemplateCommand.d.ts +2 -2
  185. package/{dist/types → dist-types}/ts3.4/commands/DeprecateSystemTemplateCommand.d.ts +2 -2
  186. package/{dist/types → dist-types}/ts3.4/commands/DescribeNamespaceCommand.d.ts +2 -2
  187. package/{dist/types → dist-types}/ts3.4/commands/DissociateEntityFromThingCommand.d.ts +2 -2
  188. package/{dist/types → dist-types}/ts3.4/commands/GetEntitiesCommand.d.ts +2 -2
  189. package/{dist/types → dist-types}/ts3.4/commands/GetFlowTemplateCommand.d.ts +2 -2
  190. package/{dist/types → dist-types}/ts3.4/commands/GetFlowTemplateRevisionsCommand.d.ts +2 -2
  191. package/{dist/types → dist-types}/ts3.4/commands/GetNamespaceDeletionStatusCommand.d.ts +2 -2
  192. package/{dist/types → dist-types}/ts3.4/commands/GetSystemInstanceCommand.d.ts +2 -2
  193. package/{dist/types → dist-types}/ts3.4/commands/GetSystemTemplateCommand.d.ts +2 -2
  194. package/{dist/types → dist-types}/ts3.4/commands/GetSystemTemplateRevisionsCommand.d.ts +2 -2
  195. package/{dist/types → dist-types}/ts3.4/commands/GetUploadStatusCommand.d.ts +2 -2
  196. package/{dist/types → dist-types}/ts3.4/commands/ListFlowExecutionMessagesCommand.d.ts +2 -2
  197. package/{dist/types → dist-types}/ts3.4/commands/ListTagsForResourceCommand.d.ts +2 -2
  198. package/{dist/types → dist-types}/ts3.4/commands/SearchEntitiesCommand.d.ts +2 -2
  199. package/{dist/types → dist-types}/ts3.4/commands/SearchFlowExecutionsCommand.d.ts +2 -2
  200. package/{dist/types → dist-types}/ts3.4/commands/SearchFlowTemplatesCommand.d.ts +2 -2
  201. package/{dist/types → dist-types}/ts3.4/commands/SearchSystemInstancesCommand.d.ts +2 -2
  202. package/{dist/types → dist-types}/ts3.4/commands/SearchSystemTemplatesCommand.d.ts +2 -2
  203. package/{dist/types → dist-types}/ts3.4/commands/SearchThingsCommand.d.ts +2 -2
  204. package/{dist/types → dist-types}/ts3.4/commands/TagResourceCommand.d.ts +2 -2
  205. package/{dist/types → dist-types}/ts3.4/commands/UndeploySystemInstanceCommand.d.ts +2 -2
  206. package/{dist/types → dist-types}/ts3.4/commands/UntagResourceCommand.d.ts +2 -2
  207. package/{dist/types → dist-types}/ts3.4/commands/UpdateFlowTemplateCommand.d.ts +2 -2
  208. package/{dist/types → dist-types}/ts3.4/commands/UpdateSystemTemplateCommand.d.ts +2 -2
  209. package/{dist/types → dist-types}/ts3.4/commands/UploadEntityDefinitionsCommand.d.ts +2 -2
  210. package/{dist/types → dist-types}/ts3.4/endpoints.d.ts +0 -0
  211. package/{dist/types → dist-types}/ts3.4/index.d.ts +0 -0
  212. package/{dist/types → dist-types}/ts3.4/models/index.d.ts +0 -0
  213. package/{dist/types → dist-types}/ts3.4/models/models_0.d.ts +0 -0
  214. package/{dist/types → dist-types}/ts3.4/pagination/GetFlowTemplateRevisionsPaginator.d.ts +1 -1
  215. package/{dist/types → dist-types}/ts3.4/pagination/GetSystemTemplateRevisionsPaginator.d.ts +1 -1
  216. package/{dist/types → dist-types}/ts3.4/pagination/Interfaces.d.ts +1 -1
  217. package/{dist/types → dist-types}/ts3.4/pagination/ListFlowExecutionMessagesPaginator.d.ts +1 -1
  218. package/{dist/types → dist-types}/ts3.4/pagination/ListTagsForResourcePaginator.d.ts +1 -1
  219. package/{dist/types → dist-types}/ts3.4/pagination/SearchEntitiesPaginator.d.ts +1 -1
  220. package/{dist/types → dist-types}/ts3.4/pagination/SearchFlowExecutionsPaginator.d.ts +1 -1
  221. package/{dist/types → dist-types}/ts3.4/pagination/SearchFlowTemplatesPaginator.d.ts +1 -1
  222. package/{dist/types → dist-types}/ts3.4/pagination/SearchSystemInstancesPaginator.d.ts +1 -1
  223. package/{dist/types → dist-types}/ts3.4/pagination/SearchSystemTemplatesPaginator.d.ts +1 -1
  224. package/{dist/types → dist-types}/ts3.4/pagination/SearchThingsPaginator.d.ts +1 -1
  225. package/{dist/types → dist-types}/ts3.4/protocols/Aws_json1_1.d.ts +2 -2
  226. package/{dist/types → dist-types/ts3.4}/runtimeConfig.browser.d.ts +37 -36
  227. package/{dist/types → dist-types/ts3.4}/runtimeConfig.d.ts +37 -36
  228. package/{dist/types → dist-types}/ts3.4/runtimeConfig.native.d.ts +1 -0
  229. package/{dist/types → dist-types}/ts3.4/runtimeConfig.shared.d.ts +0 -0
  230. package/package.json +52 -49
  231. package/IoTThingsGraph.ts +0 -1358
  232. package/IoTThingsGraphClient.ts +0 -407
  233. package/commands/AssociateEntityToThingCommand.ts +0 -95
  234. package/commands/CreateFlowTemplateCommand.ts +0 -96
  235. package/commands/CreateSystemInstanceCommand.ts +0 -102
  236. package/commands/CreateSystemTemplateCommand.ts +0 -95
  237. package/commands/DeleteFlowTemplateCommand.ts +0 -95
  238. package/commands/DeleteNamespaceCommand.ts +0 -94
  239. package/commands/DeleteSystemInstanceCommand.ts +0 -96
  240. package/commands/DeleteSystemTemplateCommand.ts +0 -95
  241. package/commands/DeploySystemInstanceCommand.ts +0 -105
  242. package/commands/DeprecateFlowTemplateCommand.ts +0 -94
  243. package/commands/DeprecateSystemTemplateCommand.ts +0 -94
  244. package/commands/DescribeNamespaceCommand.ts +0 -94
  245. package/commands/DissociateEntityFromThingCommand.ts +0 -98
  246. package/commands/GetEntitiesCommand.ts +0 -125
  247. package/commands/GetFlowTemplateCommand.ts +0 -94
  248. package/commands/GetFlowTemplateRevisionsCommand.ts +0 -95
  249. package/commands/GetNamespaceDeletionStatusCommand.ts +0 -97
  250. package/commands/GetSystemInstanceCommand.ts +0 -94
  251. package/commands/GetSystemTemplateCommand.ts +0 -94
  252. package/commands/GetSystemTemplateRevisionsCommand.ts +0 -98
  253. package/commands/GetUploadStatusCommand.ts +0 -94
  254. package/commands/ListFlowExecutionMessagesCommand.ts +0 -97
  255. package/commands/ListTagsForResourceCommand.ts +0 -94
  256. package/commands/SearchEntitiesCommand.ts +0 -94
  257. package/commands/SearchFlowExecutionsCommand.ts +0 -94
  258. package/commands/SearchFlowTemplatesCommand.ts +0 -94
  259. package/commands/SearchSystemInstancesCommand.ts +0 -94
  260. package/commands/SearchSystemTemplatesCommand.ts +0 -94
  261. package/commands/SearchThingsCommand.ts +0 -97
  262. package/commands/TagResourceCommand.ts +0 -94
  263. package/commands/UndeploySystemInstanceCommand.ts +0 -94
  264. package/commands/UntagResourceCommand.ts +0 -94
  265. package/commands/UpdateFlowTemplateCommand.ts +0 -95
  266. package/commands/UpdateSystemTemplateCommand.ts +0 -94
  267. package/commands/UploadEntityDefinitionsCommand.ts +0 -104
  268. package/dist/cjs/IoTThingsGraph.js.map +0 -1
  269. package/dist/cjs/IoTThingsGraphClient.js.map +0 -1
  270. package/dist/cjs/commands/AssociateEntityToThingCommand.js.map +0 -1
  271. package/dist/cjs/commands/CreateFlowTemplateCommand.js.map +0 -1
  272. package/dist/cjs/commands/CreateSystemInstanceCommand.js.map +0 -1
  273. package/dist/cjs/commands/CreateSystemTemplateCommand.js.map +0 -1
  274. package/dist/cjs/commands/DeleteFlowTemplateCommand.js.map +0 -1
  275. package/dist/cjs/commands/DeleteNamespaceCommand.js.map +0 -1
  276. package/dist/cjs/commands/DeleteSystemInstanceCommand.js.map +0 -1
  277. package/dist/cjs/commands/DeleteSystemTemplateCommand.js.map +0 -1
  278. package/dist/cjs/commands/DeploySystemInstanceCommand.js.map +0 -1
  279. package/dist/cjs/commands/DeprecateFlowTemplateCommand.js.map +0 -1
  280. package/dist/cjs/commands/DeprecateSystemTemplateCommand.js.map +0 -1
  281. package/dist/cjs/commands/DescribeNamespaceCommand.js.map +0 -1
  282. package/dist/cjs/commands/DissociateEntityFromThingCommand.js.map +0 -1
  283. package/dist/cjs/commands/GetEntitiesCommand.js.map +0 -1
  284. package/dist/cjs/commands/GetFlowTemplateCommand.js.map +0 -1
  285. package/dist/cjs/commands/GetFlowTemplateRevisionsCommand.js.map +0 -1
  286. package/dist/cjs/commands/GetNamespaceDeletionStatusCommand.js.map +0 -1
  287. package/dist/cjs/commands/GetSystemInstanceCommand.js.map +0 -1
  288. package/dist/cjs/commands/GetSystemTemplateCommand.js.map +0 -1
  289. package/dist/cjs/commands/GetSystemTemplateRevisionsCommand.js.map +0 -1
  290. package/dist/cjs/commands/GetUploadStatusCommand.js.map +0 -1
  291. package/dist/cjs/commands/ListFlowExecutionMessagesCommand.js.map +0 -1
  292. package/dist/cjs/commands/ListTagsForResourceCommand.js.map +0 -1
  293. package/dist/cjs/commands/SearchEntitiesCommand.js.map +0 -1
  294. package/dist/cjs/commands/SearchFlowExecutionsCommand.js.map +0 -1
  295. package/dist/cjs/commands/SearchFlowTemplatesCommand.js.map +0 -1
  296. package/dist/cjs/commands/SearchSystemInstancesCommand.js.map +0 -1
  297. package/dist/cjs/commands/SearchSystemTemplatesCommand.js.map +0 -1
  298. package/dist/cjs/commands/SearchThingsCommand.js.map +0 -1
  299. package/dist/cjs/commands/TagResourceCommand.js.map +0 -1
  300. package/dist/cjs/commands/UndeploySystemInstanceCommand.js.map +0 -1
  301. package/dist/cjs/commands/UntagResourceCommand.js.map +0 -1
  302. package/dist/cjs/commands/UpdateFlowTemplateCommand.js.map +0 -1
  303. package/dist/cjs/commands/UpdateSystemTemplateCommand.js.map +0 -1
  304. package/dist/cjs/commands/UploadEntityDefinitionsCommand.js.map +0 -1
  305. package/dist/cjs/endpoints.js.map +0 -1
  306. package/dist/cjs/index.js.map +0 -1
  307. package/dist/cjs/models/index.js.map +0 -1
  308. package/dist/cjs/models/models_0.js.map +0 -1
  309. package/dist/cjs/package.json +0 -91
  310. package/dist/cjs/pagination/GetFlowTemplateRevisionsPaginator.js.map +0 -1
  311. package/dist/cjs/pagination/GetSystemTemplateRevisionsPaginator.js.map +0 -1
  312. package/dist/cjs/pagination/Interfaces.js.map +0 -1
  313. package/dist/cjs/pagination/ListFlowExecutionMessagesPaginator.js.map +0 -1
  314. package/dist/cjs/pagination/ListTagsForResourcePaginator.js.map +0 -1
  315. package/dist/cjs/pagination/SearchEntitiesPaginator.js.map +0 -1
  316. package/dist/cjs/pagination/SearchFlowExecutionsPaginator.js.map +0 -1
  317. package/dist/cjs/pagination/SearchFlowTemplatesPaginator.js.map +0 -1
  318. package/dist/cjs/pagination/SearchSystemInstancesPaginator.js.map +0 -1
  319. package/dist/cjs/pagination/SearchSystemTemplatesPaginator.js.map +0 -1
  320. package/dist/cjs/pagination/SearchThingsPaginator.js.map +0 -1
  321. package/dist/cjs/protocols/Aws_json1_1.js.map +0 -1
  322. package/dist/cjs/runtimeConfig.browser.js.map +0 -1
  323. package/dist/cjs/runtimeConfig.js.map +0 -1
  324. package/dist/cjs/runtimeConfig.native.js.map +0 -1
  325. package/dist/cjs/runtimeConfig.shared.js.map +0 -1
  326. package/dist/es/IoTThingsGraph.js.map +0 -1
  327. package/dist/es/IoTThingsGraphClient.js.map +0 -1
  328. package/dist/es/commands/AssociateEntityToThingCommand.js.map +0 -1
  329. package/dist/es/commands/CreateFlowTemplateCommand.js.map +0 -1
  330. package/dist/es/commands/CreateSystemInstanceCommand.js +0 -73
  331. package/dist/es/commands/CreateSystemInstanceCommand.js.map +0 -1
  332. package/dist/es/commands/CreateSystemTemplateCommand.js.map +0 -1
  333. package/dist/es/commands/DeleteFlowTemplateCommand.js.map +0 -1
  334. package/dist/es/commands/DeleteNamespaceCommand.js.map +0 -1
  335. package/dist/es/commands/DeleteSystemInstanceCommand.js.map +0 -1
  336. package/dist/es/commands/DeleteSystemTemplateCommand.js.map +0 -1
  337. package/dist/es/commands/DeploySystemInstanceCommand.js +0 -76
  338. package/dist/es/commands/DeploySystemInstanceCommand.js.map +0 -1
  339. package/dist/es/commands/DeprecateFlowTemplateCommand.js.map +0 -1
  340. package/dist/es/commands/DeprecateSystemTemplateCommand.js.map +0 -1
  341. package/dist/es/commands/DescribeNamespaceCommand.js.map +0 -1
  342. package/dist/es/commands/DissociateEntityFromThingCommand.js.map +0 -1
  343. package/dist/es/commands/GetEntitiesCommand.js +0 -96
  344. package/dist/es/commands/GetEntitiesCommand.js.map +0 -1
  345. package/dist/es/commands/GetFlowTemplateCommand.js.map +0 -1
  346. package/dist/es/commands/GetFlowTemplateRevisionsCommand.js.map +0 -1
  347. package/dist/es/commands/GetNamespaceDeletionStatusCommand.js.map +0 -1
  348. package/dist/es/commands/GetSystemInstanceCommand.js.map +0 -1
  349. package/dist/es/commands/GetSystemTemplateCommand.js.map +0 -1
  350. package/dist/es/commands/GetSystemTemplateRevisionsCommand.js.map +0 -1
  351. package/dist/es/commands/GetUploadStatusCommand.js.map +0 -1
  352. package/dist/es/commands/ListFlowExecutionMessagesCommand.js.map +0 -1
  353. package/dist/es/commands/ListTagsForResourceCommand.js.map +0 -1
  354. package/dist/es/commands/SearchEntitiesCommand.js.map +0 -1
  355. package/dist/es/commands/SearchFlowExecutionsCommand.js.map +0 -1
  356. package/dist/es/commands/SearchFlowTemplatesCommand.js.map +0 -1
  357. package/dist/es/commands/SearchSystemInstancesCommand.js.map +0 -1
  358. package/dist/es/commands/SearchSystemTemplatesCommand.js.map +0 -1
  359. package/dist/es/commands/SearchThingsCommand.js.map +0 -1
  360. package/dist/es/commands/TagResourceCommand.js.map +0 -1
  361. package/dist/es/commands/UndeploySystemInstanceCommand.js.map +0 -1
  362. package/dist/es/commands/UntagResourceCommand.js.map +0 -1
  363. package/dist/es/commands/UpdateFlowTemplateCommand.js.map +0 -1
  364. package/dist/es/commands/UpdateSystemTemplateCommand.js.map +0 -1
  365. package/dist/es/commands/UploadEntityDefinitionsCommand.js +0 -75
  366. package/dist/es/commands/UploadEntityDefinitionsCommand.js.map +0 -1
  367. package/dist/es/endpoints.js.map +0 -1
  368. package/dist/es/index.js +0 -50
  369. package/dist/es/index.js.map +0 -1
  370. package/dist/es/models/index.js +0 -2
  371. package/dist/es/models/index.js.map +0 -1
  372. package/dist/es/models/models_0.js.map +0 -1
  373. package/dist/es/package.json +0 -91
  374. package/dist/es/pagination/GetFlowTemplateRevisionsPaginator.js.map +0 -1
  375. package/dist/es/pagination/GetSystemTemplateRevisionsPaginator.js.map +0 -1
  376. package/dist/es/pagination/Interfaces.js +0 -2
  377. package/dist/es/pagination/Interfaces.js.map +0 -1
  378. package/dist/es/pagination/ListFlowExecutionMessagesPaginator.js.map +0 -1
  379. package/dist/es/pagination/ListTagsForResourcePaginator.js.map +0 -1
  380. package/dist/es/pagination/SearchEntitiesPaginator.js.map +0 -1
  381. package/dist/es/pagination/SearchFlowExecutionsPaginator.js.map +0 -1
  382. package/dist/es/pagination/SearchFlowTemplatesPaginator.js.map +0 -1
  383. package/dist/es/pagination/SearchSystemInstancesPaginator.js.map +0 -1
  384. package/dist/es/pagination/SearchSystemTemplatesPaginator.js.map +0 -1
  385. package/dist/es/pagination/SearchThingsPaginator.js.map +0 -1
  386. package/dist/es/protocols/Aws_json1_1.js.map +0 -1
  387. package/dist/es/runtimeConfig.browser.js.map +0 -1
  388. package/dist/es/runtimeConfig.js.map +0 -1
  389. package/dist/es/runtimeConfig.native.js.map +0 -1
  390. package/dist/es/runtimeConfig.shared.js.map +0 -1
  391. package/endpoints.ts +0 -57
  392. package/jest.config.js +0 -4
  393. package/models/models_0.ts +0 -2312
  394. package/pagination/GetFlowTemplateRevisionsPaginator.ts +0 -58
  395. package/pagination/GetSystemTemplateRevisionsPaginator.ts +0 -58
  396. package/pagination/Interfaces.ts +0 -7
  397. package/pagination/ListFlowExecutionMessagesPaginator.ts +0 -58
  398. package/pagination/ListTagsForResourcePaginator.ts +0 -58
  399. package/pagination/SearchEntitiesPaginator.ts +0 -58
  400. package/pagination/SearchFlowExecutionsPaginator.ts +0 -58
  401. package/pagination/SearchFlowTemplatesPaginator.ts +0 -58
  402. package/pagination/SearchSystemInstancesPaginator.ts +0 -58
  403. package/pagination/SearchSystemTemplatesPaginator.ts +0 -58
  404. package/pagination/SearchThingsPaginator.ts +0 -58
  405. package/protocols/Aws_json1_1.ts +0 -4844
  406. package/runtimeConfig.browser.ts +0 -40
  407. package/runtimeConfig.native.ts +0 -16
  408. package/runtimeConfig.shared.ts +0 -16
  409. package/runtimeConfig.ts +0 -45
  410. package/tsconfig.es.json +0 -12
  411. package/tsconfig.json +0 -32
@@ -1,4844 +0,0 @@
1
- import {
2
- AssociateEntityToThingCommandInput,
3
- AssociateEntityToThingCommandOutput,
4
- } from "../commands/AssociateEntityToThingCommand";
5
- import { CreateFlowTemplateCommandInput, CreateFlowTemplateCommandOutput } from "../commands/CreateFlowTemplateCommand";
6
- import {
7
- CreateSystemInstanceCommandInput,
8
- CreateSystemInstanceCommandOutput,
9
- } from "../commands/CreateSystemInstanceCommand";
10
- import {
11
- CreateSystemTemplateCommandInput,
12
- CreateSystemTemplateCommandOutput,
13
- } from "../commands/CreateSystemTemplateCommand";
14
- import { DeleteFlowTemplateCommandInput, DeleteFlowTemplateCommandOutput } from "../commands/DeleteFlowTemplateCommand";
15
- import { DeleteNamespaceCommandInput, DeleteNamespaceCommandOutput } from "../commands/DeleteNamespaceCommand";
16
- import {
17
- DeleteSystemInstanceCommandInput,
18
- DeleteSystemInstanceCommandOutput,
19
- } from "../commands/DeleteSystemInstanceCommand";
20
- import {
21
- DeleteSystemTemplateCommandInput,
22
- DeleteSystemTemplateCommandOutput,
23
- } from "../commands/DeleteSystemTemplateCommand";
24
- import {
25
- DeploySystemInstanceCommandInput,
26
- DeploySystemInstanceCommandOutput,
27
- } from "../commands/DeploySystemInstanceCommand";
28
- import {
29
- DeprecateFlowTemplateCommandInput,
30
- DeprecateFlowTemplateCommandOutput,
31
- } from "../commands/DeprecateFlowTemplateCommand";
32
- import {
33
- DeprecateSystemTemplateCommandInput,
34
- DeprecateSystemTemplateCommandOutput,
35
- } from "../commands/DeprecateSystemTemplateCommand";
36
- import { DescribeNamespaceCommandInput, DescribeNamespaceCommandOutput } from "../commands/DescribeNamespaceCommand";
37
- import {
38
- DissociateEntityFromThingCommandInput,
39
- DissociateEntityFromThingCommandOutput,
40
- } from "../commands/DissociateEntityFromThingCommand";
41
- import { GetEntitiesCommandInput, GetEntitiesCommandOutput } from "../commands/GetEntitiesCommand";
42
- import { GetFlowTemplateCommandInput, GetFlowTemplateCommandOutput } from "../commands/GetFlowTemplateCommand";
43
- import {
44
- GetFlowTemplateRevisionsCommandInput,
45
- GetFlowTemplateRevisionsCommandOutput,
46
- } from "../commands/GetFlowTemplateRevisionsCommand";
47
- import {
48
- GetNamespaceDeletionStatusCommandInput,
49
- GetNamespaceDeletionStatusCommandOutput,
50
- } from "../commands/GetNamespaceDeletionStatusCommand";
51
- import { GetSystemInstanceCommandInput, GetSystemInstanceCommandOutput } from "../commands/GetSystemInstanceCommand";
52
- import { GetSystemTemplateCommandInput, GetSystemTemplateCommandOutput } from "../commands/GetSystemTemplateCommand";
53
- import {
54
- GetSystemTemplateRevisionsCommandInput,
55
- GetSystemTemplateRevisionsCommandOutput,
56
- } from "../commands/GetSystemTemplateRevisionsCommand";
57
- import { GetUploadStatusCommandInput, GetUploadStatusCommandOutput } from "../commands/GetUploadStatusCommand";
58
- import {
59
- ListFlowExecutionMessagesCommandInput,
60
- ListFlowExecutionMessagesCommandOutput,
61
- } from "../commands/ListFlowExecutionMessagesCommand";
62
- import {
63
- ListTagsForResourceCommandInput,
64
- ListTagsForResourceCommandOutput,
65
- } from "../commands/ListTagsForResourceCommand";
66
- import { SearchEntitiesCommandInput, SearchEntitiesCommandOutput } from "../commands/SearchEntitiesCommand";
67
- import {
68
- SearchFlowExecutionsCommandInput,
69
- SearchFlowExecutionsCommandOutput,
70
- } from "../commands/SearchFlowExecutionsCommand";
71
- import {
72
- SearchFlowTemplatesCommandInput,
73
- SearchFlowTemplatesCommandOutput,
74
- } from "../commands/SearchFlowTemplatesCommand";
75
- import {
76
- SearchSystemInstancesCommandInput,
77
- SearchSystemInstancesCommandOutput,
78
- } from "../commands/SearchSystemInstancesCommand";
79
- import {
80
- SearchSystemTemplatesCommandInput,
81
- SearchSystemTemplatesCommandOutput,
82
- } from "../commands/SearchSystemTemplatesCommand";
83
- import { SearchThingsCommandInput, SearchThingsCommandOutput } from "../commands/SearchThingsCommand";
84
- import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/TagResourceCommand";
85
- import {
86
- UndeploySystemInstanceCommandInput,
87
- UndeploySystemInstanceCommandOutput,
88
- } from "../commands/UndeploySystemInstanceCommand";
89
- import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand";
90
- import { UpdateFlowTemplateCommandInput, UpdateFlowTemplateCommandOutput } from "../commands/UpdateFlowTemplateCommand";
91
- import {
92
- UpdateSystemTemplateCommandInput,
93
- UpdateSystemTemplateCommandOutput,
94
- } from "../commands/UpdateSystemTemplateCommand";
95
- import {
96
- UploadEntityDefinitionsCommandInput,
97
- UploadEntityDefinitionsCommandOutput,
98
- } from "../commands/UploadEntityDefinitionsCommand";
99
- import {
100
- AssociateEntityToThingRequest,
101
- AssociateEntityToThingResponse,
102
- CreateFlowTemplateRequest,
103
- CreateFlowTemplateResponse,
104
- CreateSystemInstanceRequest,
105
- CreateSystemInstanceResponse,
106
- CreateSystemTemplateRequest,
107
- CreateSystemTemplateResponse,
108
- DefinitionDocument,
109
- DeleteFlowTemplateRequest,
110
- DeleteFlowTemplateResponse,
111
- DeleteNamespaceRequest,
112
- DeleteNamespaceResponse,
113
- DeleteSystemInstanceRequest,
114
- DeleteSystemInstanceResponse,
115
- DeleteSystemTemplateRequest,
116
- DeleteSystemTemplateResponse,
117
- DependencyRevision,
118
- DeploySystemInstanceRequest,
119
- DeploySystemInstanceResponse,
120
- DeprecateFlowTemplateRequest,
121
- DeprecateFlowTemplateResponse,
122
- DeprecateSystemTemplateRequest,
123
- DeprecateSystemTemplateResponse,
124
- DescribeNamespaceRequest,
125
- DescribeNamespaceResponse,
126
- DissociateEntityFromThingRequest,
127
- DissociateEntityFromThingResponse,
128
- EntityDescription,
129
- EntityFilter,
130
- EntityType,
131
- FlowExecutionMessage,
132
- FlowExecutionSummary,
133
- FlowTemplateDescription,
134
- FlowTemplateFilter,
135
- FlowTemplateSummary,
136
- GetEntitiesRequest,
137
- GetEntitiesResponse,
138
- GetFlowTemplateRequest,
139
- GetFlowTemplateResponse,
140
- GetFlowTemplateRevisionsRequest,
141
- GetFlowTemplateRevisionsResponse,
142
- GetNamespaceDeletionStatusRequest,
143
- GetNamespaceDeletionStatusResponse,
144
- GetSystemInstanceRequest,
145
- GetSystemInstanceResponse,
146
- GetSystemTemplateRequest,
147
- GetSystemTemplateResponse,
148
- GetSystemTemplateRevisionsRequest,
149
- GetSystemTemplateRevisionsResponse,
150
- GetUploadStatusRequest,
151
- GetUploadStatusResponse,
152
- InternalFailureException,
153
- InvalidRequestException,
154
- LimitExceededException,
155
- ListFlowExecutionMessagesRequest,
156
- ListFlowExecutionMessagesResponse,
157
- ListTagsForResourceRequest,
158
- ListTagsForResourceResponse,
159
- MetricsConfiguration,
160
- ResourceAlreadyExistsException,
161
- ResourceInUseException,
162
- ResourceNotFoundException,
163
- SearchEntitiesRequest,
164
- SearchEntitiesResponse,
165
- SearchFlowExecutionsRequest,
166
- SearchFlowExecutionsResponse,
167
- SearchFlowTemplatesRequest,
168
- SearchFlowTemplatesResponse,
169
- SearchSystemInstancesRequest,
170
- SearchSystemInstancesResponse,
171
- SearchSystemTemplatesRequest,
172
- SearchSystemTemplatesResponse,
173
- SearchThingsRequest,
174
- SearchThingsResponse,
175
- SystemInstanceDescription,
176
- SystemInstanceFilter,
177
- SystemInstanceSummary,
178
- SystemTemplateDescription,
179
- SystemTemplateFilter,
180
- SystemTemplateSummary,
181
- Tag,
182
- TagResourceRequest,
183
- TagResourceResponse,
184
- Thing,
185
- ThrottlingException,
186
- UndeploySystemInstanceRequest,
187
- UndeploySystemInstanceResponse,
188
- UntagResourceRequest,
189
- UntagResourceResponse,
190
- UpdateFlowTemplateRequest,
191
- UpdateFlowTemplateResponse,
192
- UpdateSystemTemplateRequest,
193
- UpdateSystemTemplateResponse,
194
- UploadEntityDefinitionsRequest,
195
- UploadEntityDefinitionsResponse,
196
- } from "../models/models_0";
197
- import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
198
- import {
199
- expectBoolean as __expectBoolean,
200
- expectLong as __expectLong,
201
- expectNonNull as __expectNonNull,
202
- expectNumber as __expectNumber,
203
- expectString as __expectString,
204
- parseEpochTimestamp as __parseEpochTimestamp,
205
- } from "@aws-sdk/smithy-client";
206
- import {
207
- Endpoint as __Endpoint,
208
- HeaderBag as __HeaderBag,
209
- MetadataBearer as __MetadataBearer,
210
- ResponseMetadata as __ResponseMetadata,
211
- SerdeContext as __SerdeContext,
212
- SmithyException as __SmithyException,
213
- } from "@aws-sdk/types";
214
-
215
- export const serializeAws_json1_1AssociateEntityToThingCommand = async (
216
- input: AssociateEntityToThingCommandInput,
217
- context: __SerdeContext
218
- ): Promise<__HttpRequest> => {
219
- const headers: __HeaderBag = {
220
- "content-type": "application/x-amz-json-1.1",
221
- "x-amz-target": "IotThingsGraphFrontEndService.AssociateEntityToThing",
222
- };
223
- let body: any;
224
- body = JSON.stringify(serializeAws_json1_1AssociateEntityToThingRequest(input, context));
225
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
226
- };
227
-
228
- export const serializeAws_json1_1CreateFlowTemplateCommand = async (
229
- input: CreateFlowTemplateCommandInput,
230
- context: __SerdeContext
231
- ): Promise<__HttpRequest> => {
232
- const headers: __HeaderBag = {
233
- "content-type": "application/x-amz-json-1.1",
234
- "x-amz-target": "IotThingsGraphFrontEndService.CreateFlowTemplate",
235
- };
236
- let body: any;
237
- body = JSON.stringify(serializeAws_json1_1CreateFlowTemplateRequest(input, context));
238
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
239
- };
240
-
241
- export const serializeAws_json1_1CreateSystemInstanceCommand = async (
242
- input: CreateSystemInstanceCommandInput,
243
- context: __SerdeContext
244
- ): Promise<__HttpRequest> => {
245
- const headers: __HeaderBag = {
246
- "content-type": "application/x-amz-json-1.1",
247
- "x-amz-target": "IotThingsGraphFrontEndService.CreateSystemInstance",
248
- };
249
- let body: any;
250
- body = JSON.stringify(serializeAws_json1_1CreateSystemInstanceRequest(input, context));
251
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
252
- };
253
-
254
- export const serializeAws_json1_1CreateSystemTemplateCommand = async (
255
- input: CreateSystemTemplateCommandInput,
256
- context: __SerdeContext
257
- ): Promise<__HttpRequest> => {
258
- const headers: __HeaderBag = {
259
- "content-type": "application/x-amz-json-1.1",
260
- "x-amz-target": "IotThingsGraphFrontEndService.CreateSystemTemplate",
261
- };
262
- let body: any;
263
- body = JSON.stringify(serializeAws_json1_1CreateSystemTemplateRequest(input, context));
264
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
265
- };
266
-
267
- export const serializeAws_json1_1DeleteFlowTemplateCommand = async (
268
- input: DeleteFlowTemplateCommandInput,
269
- context: __SerdeContext
270
- ): Promise<__HttpRequest> => {
271
- const headers: __HeaderBag = {
272
- "content-type": "application/x-amz-json-1.1",
273
- "x-amz-target": "IotThingsGraphFrontEndService.DeleteFlowTemplate",
274
- };
275
- let body: any;
276
- body = JSON.stringify(serializeAws_json1_1DeleteFlowTemplateRequest(input, context));
277
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
278
- };
279
-
280
- export const serializeAws_json1_1DeleteNamespaceCommand = async (
281
- input: DeleteNamespaceCommandInput,
282
- context: __SerdeContext
283
- ): Promise<__HttpRequest> => {
284
- const headers: __HeaderBag = {
285
- "content-type": "application/x-amz-json-1.1",
286
- "x-amz-target": "IotThingsGraphFrontEndService.DeleteNamespace",
287
- };
288
- let body: any;
289
- body = JSON.stringify(serializeAws_json1_1DeleteNamespaceRequest(input, context));
290
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
291
- };
292
-
293
- export const serializeAws_json1_1DeleteSystemInstanceCommand = async (
294
- input: DeleteSystemInstanceCommandInput,
295
- context: __SerdeContext
296
- ): Promise<__HttpRequest> => {
297
- const headers: __HeaderBag = {
298
- "content-type": "application/x-amz-json-1.1",
299
- "x-amz-target": "IotThingsGraphFrontEndService.DeleteSystemInstance",
300
- };
301
- let body: any;
302
- body = JSON.stringify(serializeAws_json1_1DeleteSystemInstanceRequest(input, context));
303
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
304
- };
305
-
306
- export const serializeAws_json1_1DeleteSystemTemplateCommand = async (
307
- input: DeleteSystemTemplateCommandInput,
308
- context: __SerdeContext
309
- ): Promise<__HttpRequest> => {
310
- const headers: __HeaderBag = {
311
- "content-type": "application/x-amz-json-1.1",
312
- "x-amz-target": "IotThingsGraphFrontEndService.DeleteSystemTemplate",
313
- };
314
- let body: any;
315
- body = JSON.stringify(serializeAws_json1_1DeleteSystemTemplateRequest(input, context));
316
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
317
- };
318
-
319
- export const serializeAws_json1_1DeploySystemInstanceCommand = async (
320
- input: DeploySystemInstanceCommandInput,
321
- context: __SerdeContext
322
- ): Promise<__HttpRequest> => {
323
- const headers: __HeaderBag = {
324
- "content-type": "application/x-amz-json-1.1",
325
- "x-amz-target": "IotThingsGraphFrontEndService.DeploySystemInstance",
326
- };
327
- let body: any;
328
- body = JSON.stringify(serializeAws_json1_1DeploySystemInstanceRequest(input, context));
329
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
330
- };
331
-
332
- export const serializeAws_json1_1DeprecateFlowTemplateCommand = async (
333
- input: DeprecateFlowTemplateCommandInput,
334
- context: __SerdeContext
335
- ): Promise<__HttpRequest> => {
336
- const headers: __HeaderBag = {
337
- "content-type": "application/x-amz-json-1.1",
338
- "x-amz-target": "IotThingsGraphFrontEndService.DeprecateFlowTemplate",
339
- };
340
- let body: any;
341
- body = JSON.stringify(serializeAws_json1_1DeprecateFlowTemplateRequest(input, context));
342
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
343
- };
344
-
345
- export const serializeAws_json1_1DeprecateSystemTemplateCommand = async (
346
- input: DeprecateSystemTemplateCommandInput,
347
- context: __SerdeContext
348
- ): Promise<__HttpRequest> => {
349
- const headers: __HeaderBag = {
350
- "content-type": "application/x-amz-json-1.1",
351
- "x-amz-target": "IotThingsGraphFrontEndService.DeprecateSystemTemplate",
352
- };
353
- let body: any;
354
- body = JSON.stringify(serializeAws_json1_1DeprecateSystemTemplateRequest(input, context));
355
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
356
- };
357
-
358
- export const serializeAws_json1_1DescribeNamespaceCommand = async (
359
- input: DescribeNamespaceCommandInput,
360
- context: __SerdeContext
361
- ): Promise<__HttpRequest> => {
362
- const headers: __HeaderBag = {
363
- "content-type": "application/x-amz-json-1.1",
364
- "x-amz-target": "IotThingsGraphFrontEndService.DescribeNamespace",
365
- };
366
- let body: any;
367
- body = JSON.stringify(serializeAws_json1_1DescribeNamespaceRequest(input, context));
368
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
369
- };
370
-
371
- export const serializeAws_json1_1DissociateEntityFromThingCommand = async (
372
- input: DissociateEntityFromThingCommandInput,
373
- context: __SerdeContext
374
- ): Promise<__HttpRequest> => {
375
- const headers: __HeaderBag = {
376
- "content-type": "application/x-amz-json-1.1",
377
- "x-amz-target": "IotThingsGraphFrontEndService.DissociateEntityFromThing",
378
- };
379
- let body: any;
380
- body = JSON.stringify(serializeAws_json1_1DissociateEntityFromThingRequest(input, context));
381
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
382
- };
383
-
384
- export const serializeAws_json1_1GetEntitiesCommand = async (
385
- input: GetEntitiesCommandInput,
386
- context: __SerdeContext
387
- ): Promise<__HttpRequest> => {
388
- const headers: __HeaderBag = {
389
- "content-type": "application/x-amz-json-1.1",
390
- "x-amz-target": "IotThingsGraphFrontEndService.GetEntities",
391
- };
392
- let body: any;
393
- body = JSON.stringify(serializeAws_json1_1GetEntitiesRequest(input, context));
394
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
395
- };
396
-
397
- export const serializeAws_json1_1GetFlowTemplateCommand = async (
398
- input: GetFlowTemplateCommandInput,
399
- context: __SerdeContext
400
- ): Promise<__HttpRequest> => {
401
- const headers: __HeaderBag = {
402
- "content-type": "application/x-amz-json-1.1",
403
- "x-amz-target": "IotThingsGraphFrontEndService.GetFlowTemplate",
404
- };
405
- let body: any;
406
- body = JSON.stringify(serializeAws_json1_1GetFlowTemplateRequest(input, context));
407
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
408
- };
409
-
410
- export const serializeAws_json1_1GetFlowTemplateRevisionsCommand = async (
411
- input: GetFlowTemplateRevisionsCommandInput,
412
- context: __SerdeContext
413
- ): Promise<__HttpRequest> => {
414
- const headers: __HeaderBag = {
415
- "content-type": "application/x-amz-json-1.1",
416
- "x-amz-target": "IotThingsGraphFrontEndService.GetFlowTemplateRevisions",
417
- };
418
- let body: any;
419
- body = JSON.stringify(serializeAws_json1_1GetFlowTemplateRevisionsRequest(input, context));
420
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
421
- };
422
-
423
- export const serializeAws_json1_1GetNamespaceDeletionStatusCommand = async (
424
- input: GetNamespaceDeletionStatusCommandInput,
425
- context: __SerdeContext
426
- ): Promise<__HttpRequest> => {
427
- const headers: __HeaderBag = {
428
- "content-type": "application/x-amz-json-1.1",
429
- "x-amz-target": "IotThingsGraphFrontEndService.GetNamespaceDeletionStatus",
430
- };
431
- let body: any;
432
- body = JSON.stringify(serializeAws_json1_1GetNamespaceDeletionStatusRequest(input, context));
433
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
434
- };
435
-
436
- export const serializeAws_json1_1GetSystemInstanceCommand = async (
437
- input: GetSystemInstanceCommandInput,
438
- context: __SerdeContext
439
- ): Promise<__HttpRequest> => {
440
- const headers: __HeaderBag = {
441
- "content-type": "application/x-amz-json-1.1",
442
- "x-amz-target": "IotThingsGraphFrontEndService.GetSystemInstance",
443
- };
444
- let body: any;
445
- body = JSON.stringify(serializeAws_json1_1GetSystemInstanceRequest(input, context));
446
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
447
- };
448
-
449
- export const serializeAws_json1_1GetSystemTemplateCommand = async (
450
- input: GetSystemTemplateCommandInput,
451
- context: __SerdeContext
452
- ): Promise<__HttpRequest> => {
453
- const headers: __HeaderBag = {
454
- "content-type": "application/x-amz-json-1.1",
455
- "x-amz-target": "IotThingsGraphFrontEndService.GetSystemTemplate",
456
- };
457
- let body: any;
458
- body = JSON.stringify(serializeAws_json1_1GetSystemTemplateRequest(input, context));
459
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
460
- };
461
-
462
- export const serializeAws_json1_1GetSystemTemplateRevisionsCommand = async (
463
- input: GetSystemTemplateRevisionsCommandInput,
464
- context: __SerdeContext
465
- ): Promise<__HttpRequest> => {
466
- const headers: __HeaderBag = {
467
- "content-type": "application/x-amz-json-1.1",
468
- "x-amz-target": "IotThingsGraphFrontEndService.GetSystemTemplateRevisions",
469
- };
470
- let body: any;
471
- body = JSON.stringify(serializeAws_json1_1GetSystemTemplateRevisionsRequest(input, context));
472
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
473
- };
474
-
475
- export const serializeAws_json1_1GetUploadStatusCommand = async (
476
- input: GetUploadStatusCommandInput,
477
- context: __SerdeContext
478
- ): Promise<__HttpRequest> => {
479
- const headers: __HeaderBag = {
480
- "content-type": "application/x-amz-json-1.1",
481
- "x-amz-target": "IotThingsGraphFrontEndService.GetUploadStatus",
482
- };
483
- let body: any;
484
- body = JSON.stringify(serializeAws_json1_1GetUploadStatusRequest(input, context));
485
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
486
- };
487
-
488
- export const serializeAws_json1_1ListFlowExecutionMessagesCommand = async (
489
- input: ListFlowExecutionMessagesCommandInput,
490
- context: __SerdeContext
491
- ): Promise<__HttpRequest> => {
492
- const headers: __HeaderBag = {
493
- "content-type": "application/x-amz-json-1.1",
494
- "x-amz-target": "IotThingsGraphFrontEndService.ListFlowExecutionMessages",
495
- };
496
- let body: any;
497
- body = JSON.stringify(serializeAws_json1_1ListFlowExecutionMessagesRequest(input, context));
498
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
499
- };
500
-
501
- export const serializeAws_json1_1ListTagsForResourceCommand = async (
502
- input: ListTagsForResourceCommandInput,
503
- context: __SerdeContext
504
- ): Promise<__HttpRequest> => {
505
- const headers: __HeaderBag = {
506
- "content-type": "application/x-amz-json-1.1",
507
- "x-amz-target": "IotThingsGraphFrontEndService.ListTagsForResource",
508
- };
509
- let body: any;
510
- body = JSON.stringify(serializeAws_json1_1ListTagsForResourceRequest(input, context));
511
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
512
- };
513
-
514
- export const serializeAws_json1_1SearchEntitiesCommand = async (
515
- input: SearchEntitiesCommandInput,
516
- context: __SerdeContext
517
- ): Promise<__HttpRequest> => {
518
- const headers: __HeaderBag = {
519
- "content-type": "application/x-amz-json-1.1",
520
- "x-amz-target": "IotThingsGraphFrontEndService.SearchEntities",
521
- };
522
- let body: any;
523
- body = JSON.stringify(serializeAws_json1_1SearchEntitiesRequest(input, context));
524
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
525
- };
526
-
527
- export const serializeAws_json1_1SearchFlowExecutionsCommand = async (
528
- input: SearchFlowExecutionsCommandInput,
529
- context: __SerdeContext
530
- ): Promise<__HttpRequest> => {
531
- const headers: __HeaderBag = {
532
- "content-type": "application/x-amz-json-1.1",
533
- "x-amz-target": "IotThingsGraphFrontEndService.SearchFlowExecutions",
534
- };
535
- let body: any;
536
- body = JSON.stringify(serializeAws_json1_1SearchFlowExecutionsRequest(input, context));
537
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
538
- };
539
-
540
- export const serializeAws_json1_1SearchFlowTemplatesCommand = async (
541
- input: SearchFlowTemplatesCommandInput,
542
- context: __SerdeContext
543
- ): Promise<__HttpRequest> => {
544
- const headers: __HeaderBag = {
545
- "content-type": "application/x-amz-json-1.1",
546
- "x-amz-target": "IotThingsGraphFrontEndService.SearchFlowTemplates",
547
- };
548
- let body: any;
549
- body = JSON.stringify(serializeAws_json1_1SearchFlowTemplatesRequest(input, context));
550
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
551
- };
552
-
553
- export const serializeAws_json1_1SearchSystemInstancesCommand = async (
554
- input: SearchSystemInstancesCommandInput,
555
- context: __SerdeContext
556
- ): Promise<__HttpRequest> => {
557
- const headers: __HeaderBag = {
558
- "content-type": "application/x-amz-json-1.1",
559
- "x-amz-target": "IotThingsGraphFrontEndService.SearchSystemInstances",
560
- };
561
- let body: any;
562
- body = JSON.stringify(serializeAws_json1_1SearchSystemInstancesRequest(input, context));
563
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
564
- };
565
-
566
- export const serializeAws_json1_1SearchSystemTemplatesCommand = async (
567
- input: SearchSystemTemplatesCommandInput,
568
- context: __SerdeContext
569
- ): Promise<__HttpRequest> => {
570
- const headers: __HeaderBag = {
571
- "content-type": "application/x-amz-json-1.1",
572
- "x-amz-target": "IotThingsGraphFrontEndService.SearchSystemTemplates",
573
- };
574
- let body: any;
575
- body = JSON.stringify(serializeAws_json1_1SearchSystemTemplatesRequest(input, context));
576
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
577
- };
578
-
579
- export const serializeAws_json1_1SearchThingsCommand = async (
580
- input: SearchThingsCommandInput,
581
- context: __SerdeContext
582
- ): Promise<__HttpRequest> => {
583
- const headers: __HeaderBag = {
584
- "content-type": "application/x-amz-json-1.1",
585
- "x-amz-target": "IotThingsGraphFrontEndService.SearchThings",
586
- };
587
- let body: any;
588
- body = JSON.stringify(serializeAws_json1_1SearchThingsRequest(input, context));
589
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
590
- };
591
-
592
- export const serializeAws_json1_1TagResourceCommand = async (
593
- input: TagResourceCommandInput,
594
- context: __SerdeContext
595
- ): Promise<__HttpRequest> => {
596
- const headers: __HeaderBag = {
597
- "content-type": "application/x-amz-json-1.1",
598
- "x-amz-target": "IotThingsGraphFrontEndService.TagResource",
599
- };
600
- let body: any;
601
- body = JSON.stringify(serializeAws_json1_1TagResourceRequest(input, context));
602
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
603
- };
604
-
605
- export const serializeAws_json1_1UndeploySystemInstanceCommand = async (
606
- input: UndeploySystemInstanceCommandInput,
607
- context: __SerdeContext
608
- ): Promise<__HttpRequest> => {
609
- const headers: __HeaderBag = {
610
- "content-type": "application/x-amz-json-1.1",
611
- "x-amz-target": "IotThingsGraphFrontEndService.UndeploySystemInstance",
612
- };
613
- let body: any;
614
- body = JSON.stringify(serializeAws_json1_1UndeploySystemInstanceRequest(input, context));
615
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
616
- };
617
-
618
- export const serializeAws_json1_1UntagResourceCommand = async (
619
- input: UntagResourceCommandInput,
620
- context: __SerdeContext
621
- ): Promise<__HttpRequest> => {
622
- const headers: __HeaderBag = {
623
- "content-type": "application/x-amz-json-1.1",
624
- "x-amz-target": "IotThingsGraphFrontEndService.UntagResource",
625
- };
626
- let body: any;
627
- body = JSON.stringify(serializeAws_json1_1UntagResourceRequest(input, context));
628
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
629
- };
630
-
631
- export const serializeAws_json1_1UpdateFlowTemplateCommand = async (
632
- input: UpdateFlowTemplateCommandInput,
633
- context: __SerdeContext
634
- ): Promise<__HttpRequest> => {
635
- const headers: __HeaderBag = {
636
- "content-type": "application/x-amz-json-1.1",
637
- "x-amz-target": "IotThingsGraphFrontEndService.UpdateFlowTemplate",
638
- };
639
- let body: any;
640
- body = JSON.stringify(serializeAws_json1_1UpdateFlowTemplateRequest(input, context));
641
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
642
- };
643
-
644
- export const serializeAws_json1_1UpdateSystemTemplateCommand = async (
645
- input: UpdateSystemTemplateCommandInput,
646
- context: __SerdeContext
647
- ): Promise<__HttpRequest> => {
648
- const headers: __HeaderBag = {
649
- "content-type": "application/x-amz-json-1.1",
650
- "x-amz-target": "IotThingsGraphFrontEndService.UpdateSystemTemplate",
651
- };
652
- let body: any;
653
- body = JSON.stringify(serializeAws_json1_1UpdateSystemTemplateRequest(input, context));
654
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
655
- };
656
-
657
- export const serializeAws_json1_1UploadEntityDefinitionsCommand = async (
658
- input: UploadEntityDefinitionsCommandInput,
659
- context: __SerdeContext
660
- ): Promise<__HttpRequest> => {
661
- const headers: __HeaderBag = {
662
- "content-type": "application/x-amz-json-1.1",
663
- "x-amz-target": "IotThingsGraphFrontEndService.UploadEntityDefinitions",
664
- };
665
- let body: any;
666
- body = JSON.stringify(serializeAws_json1_1UploadEntityDefinitionsRequest(input, context));
667
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
668
- };
669
-
670
- export const deserializeAws_json1_1AssociateEntityToThingCommand = async (
671
- output: __HttpResponse,
672
- context: __SerdeContext
673
- ): Promise<AssociateEntityToThingCommandOutput> => {
674
- if (output.statusCode >= 300) {
675
- return deserializeAws_json1_1AssociateEntityToThingCommandError(output, context);
676
- }
677
- const data: any = await parseBody(output.body, context);
678
- let contents: any = {};
679
- contents = deserializeAws_json1_1AssociateEntityToThingResponse(data, context);
680
- const response: AssociateEntityToThingCommandOutput = {
681
- $metadata: deserializeMetadata(output),
682
- ...contents,
683
- };
684
- return Promise.resolve(response);
685
- };
686
-
687
- const deserializeAws_json1_1AssociateEntityToThingCommandError = async (
688
- output: __HttpResponse,
689
- context: __SerdeContext
690
- ): Promise<AssociateEntityToThingCommandOutput> => {
691
- const parsedOutput: any = {
692
- ...output,
693
- body: await parseBody(output.body, context),
694
- };
695
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
696
- let errorCode: string = "UnknownError";
697
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
698
- switch (errorCode) {
699
- case "InternalFailureException":
700
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
701
- response = {
702
- ...(await deserializeAws_json1_1InternalFailureExceptionResponse(parsedOutput, context)),
703
- name: errorCode,
704
- $metadata: deserializeMetadata(output),
705
- };
706
- break;
707
- case "InvalidRequestException":
708
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
709
- response = {
710
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
711
- name: errorCode,
712
- $metadata: deserializeMetadata(output),
713
- };
714
- break;
715
- case "ResourceNotFoundException":
716
- case "com.amazonaws.iotthingsgraph#ResourceNotFoundException":
717
- response = {
718
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
719
- name: errorCode,
720
- $metadata: deserializeMetadata(output),
721
- };
722
- break;
723
- case "ThrottlingException":
724
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
725
- response = {
726
- ...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
727
- name: errorCode,
728
- $metadata: deserializeMetadata(output),
729
- };
730
- break;
731
- default:
732
- const parsedBody = parsedOutput.body;
733
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
734
- response = {
735
- ...parsedBody,
736
- name: `${errorCode}`,
737
- message: parsedBody.message || parsedBody.Message || errorCode,
738
- $fault: "client",
739
- $metadata: deserializeMetadata(output),
740
- } as any;
741
- }
742
- const message = response.message || response.Message || errorCode;
743
- response.message = message;
744
- delete response.Message;
745
- return Promise.reject(Object.assign(new Error(message), response));
746
- };
747
-
748
- export const deserializeAws_json1_1CreateFlowTemplateCommand = async (
749
- output: __HttpResponse,
750
- context: __SerdeContext
751
- ): Promise<CreateFlowTemplateCommandOutput> => {
752
- if (output.statusCode >= 300) {
753
- return deserializeAws_json1_1CreateFlowTemplateCommandError(output, context);
754
- }
755
- const data: any = await parseBody(output.body, context);
756
- let contents: any = {};
757
- contents = deserializeAws_json1_1CreateFlowTemplateResponse(data, context);
758
- const response: CreateFlowTemplateCommandOutput = {
759
- $metadata: deserializeMetadata(output),
760
- ...contents,
761
- };
762
- return Promise.resolve(response);
763
- };
764
-
765
- const deserializeAws_json1_1CreateFlowTemplateCommandError = async (
766
- output: __HttpResponse,
767
- context: __SerdeContext
768
- ): Promise<CreateFlowTemplateCommandOutput> => {
769
- const parsedOutput: any = {
770
- ...output,
771
- body: await parseBody(output.body, context),
772
- };
773
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
774
- let errorCode: string = "UnknownError";
775
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
776
- switch (errorCode) {
777
- case "InternalFailureException":
778
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
779
- response = {
780
- ...(await deserializeAws_json1_1InternalFailureExceptionResponse(parsedOutput, context)),
781
- name: errorCode,
782
- $metadata: deserializeMetadata(output),
783
- };
784
- break;
785
- case "InvalidRequestException":
786
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
787
- response = {
788
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
789
- name: errorCode,
790
- $metadata: deserializeMetadata(output),
791
- };
792
- break;
793
- case "LimitExceededException":
794
- case "com.amazonaws.iotthingsgraph#LimitExceededException":
795
- response = {
796
- ...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)),
797
- name: errorCode,
798
- $metadata: deserializeMetadata(output),
799
- };
800
- break;
801
- case "ResourceAlreadyExistsException":
802
- case "com.amazonaws.iotthingsgraph#ResourceAlreadyExistsException":
803
- response = {
804
- ...(await deserializeAws_json1_1ResourceAlreadyExistsExceptionResponse(parsedOutput, context)),
805
- name: errorCode,
806
- $metadata: deserializeMetadata(output),
807
- };
808
- break;
809
- case "ThrottlingException":
810
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
811
- response = {
812
- ...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
813
- name: errorCode,
814
- $metadata: deserializeMetadata(output),
815
- };
816
- break;
817
- default:
818
- const parsedBody = parsedOutput.body;
819
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
820
- response = {
821
- ...parsedBody,
822
- name: `${errorCode}`,
823
- message: parsedBody.message || parsedBody.Message || errorCode,
824
- $fault: "client",
825
- $metadata: deserializeMetadata(output),
826
- } as any;
827
- }
828
- const message = response.message || response.Message || errorCode;
829
- response.message = message;
830
- delete response.Message;
831
- return Promise.reject(Object.assign(new Error(message), response));
832
- };
833
-
834
- export const deserializeAws_json1_1CreateSystemInstanceCommand = async (
835
- output: __HttpResponse,
836
- context: __SerdeContext
837
- ): Promise<CreateSystemInstanceCommandOutput> => {
838
- if (output.statusCode >= 300) {
839
- return deserializeAws_json1_1CreateSystemInstanceCommandError(output, context);
840
- }
841
- const data: any = await parseBody(output.body, context);
842
- let contents: any = {};
843
- contents = deserializeAws_json1_1CreateSystemInstanceResponse(data, context);
844
- const response: CreateSystemInstanceCommandOutput = {
845
- $metadata: deserializeMetadata(output),
846
- ...contents,
847
- };
848
- return Promise.resolve(response);
849
- };
850
-
851
- const deserializeAws_json1_1CreateSystemInstanceCommandError = async (
852
- output: __HttpResponse,
853
- context: __SerdeContext
854
- ): Promise<CreateSystemInstanceCommandOutput> => {
855
- const parsedOutput: any = {
856
- ...output,
857
- body: await parseBody(output.body, context),
858
- };
859
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
860
- let errorCode: string = "UnknownError";
861
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
862
- switch (errorCode) {
863
- case "InternalFailureException":
864
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
865
- response = {
866
- ...(await deserializeAws_json1_1InternalFailureExceptionResponse(parsedOutput, context)),
867
- name: errorCode,
868
- $metadata: deserializeMetadata(output),
869
- };
870
- break;
871
- case "InvalidRequestException":
872
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
873
- response = {
874
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
875
- name: errorCode,
876
- $metadata: deserializeMetadata(output),
877
- };
878
- break;
879
- case "LimitExceededException":
880
- case "com.amazonaws.iotthingsgraph#LimitExceededException":
881
- response = {
882
- ...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)),
883
- name: errorCode,
884
- $metadata: deserializeMetadata(output),
885
- };
886
- break;
887
- case "ResourceAlreadyExistsException":
888
- case "com.amazonaws.iotthingsgraph#ResourceAlreadyExistsException":
889
- response = {
890
- ...(await deserializeAws_json1_1ResourceAlreadyExistsExceptionResponse(parsedOutput, context)),
891
- name: errorCode,
892
- $metadata: deserializeMetadata(output),
893
- };
894
- break;
895
- case "ThrottlingException":
896
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
897
- response = {
898
- ...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
899
- name: errorCode,
900
- $metadata: deserializeMetadata(output),
901
- };
902
- break;
903
- default:
904
- const parsedBody = parsedOutput.body;
905
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
906
- response = {
907
- ...parsedBody,
908
- name: `${errorCode}`,
909
- message: parsedBody.message || parsedBody.Message || errorCode,
910
- $fault: "client",
911
- $metadata: deserializeMetadata(output),
912
- } as any;
913
- }
914
- const message = response.message || response.Message || errorCode;
915
- response.message = message;
916
- delete response.Message;
917
- return Promise.reject(Object.assign(new Error(message), response));
918
- };
919
-
920
- export const deserializeAws_json1_1CreateSystemTemplateCommand = async (
921
- output: __HttpResponse,
922
- context: __SerdeContext
923
- ): Promise<CreateSystemTemplateCommandOutput> => {
924
- if (output.statusCode >= 300) {
925
- return deserializeAws_json1_1CreateSystemTemplateCommandError(output, context);
926
- }
927
- const data: any = await parseBody(output.body, context);
928
- let contents: any = {};
929
- contents = deserializeAws_json1_1CreateSystemTemplateResponse(data, context);
930
- const response: CreateSystemTemplateCommandOutput = {
931
- $metadata: deserializeMetadata(output),
932
- ...contents,
933
- };
934
- return Promise.resolve(response);
935
- };
936
-
937
- const deserializeAws_json1_1CreateSystemTemplateCommandError = async (
938
- output: __HttpResponse,
939
- context: __SerdeContext
940
- ): Promise<CreateSystemTemplateCommandOutput> => {
941
- const parsedOutput: any = {
942
- ...output,
943
- body: await parseBody(output.body, context),
944
- };
945
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
946
- let errorCode: string = "UnknownError";
947
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
948
- switch (errorCode) {
949
- case "InternalFailureException":
950
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
951
- response = {
952
- ...(await deserializeAws_json1_1InternalFailureExceptionResponse(parsedOutput, context)),
953
- name: errorCode,
954
- $metadata: deserializeMetadata(output),
955
- };
956
- break;
957
- case "InvalidRequestException":
958
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
959
- response = {
960
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
961
- name: errorCode,
962
- $metadata: deserializeMetadata(output),
963
- };
964
- break;
965
- case "ResourceAlreadyExistsException":
966
- case "com.amazonaws.iotthingsgraph#ResourceAlreadyExistsException":
967
- response = {
968
- ...(await deserializeAws_json1_1ResourceAlreadyExistsExceptionResponse(parsedOutput, context)),
969
- name: errorCode,
970
- $metadata: deserializeMetadata(output),
971
- };
972
- break;
973
- case "ThrottlingException":
974
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
975
- response = {
976
- ...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
977
- name: errorCode,
978
- $metadata: deserializeMetadata(output),
979
- };
980
- break;
981
- default:
982
- const parsedBody = parsedOutput.body;
983
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
984
- response = {
985
- ...parsedBody,
986
- name: `${errorCode}`,
987
- message: parsedBody.message || parsedBody.Message || errorCode,
988
- $fault: "client",
989
- $metadata: deserializeMetadata(output),
990
- } as any;
991
- }
992
- const message = response.message || response.Message || errorCode;
993
- response.message = message;
994
- delete response.Message;
995
- return Promise.reject(Object.assign(new Error(message), response));
996
- };
997
-
998
- export const deserializeAws_json1_1DeleteFlowTemplateCommand = async (
999
- output: __HttpResponse,
1000
- context: __SerdeContext
1001
- ): Promise<DeleteFlowTemplateCommandOutput> => {
1002
- if (output.statusCode >= 300) {
1003
- return deserializeAws_json1_1DeleteFlowTemplateCommandError(output, context);
1004
- }
1005
- const data: any = await parseBody(output.body, context);
1006
- let contents: any = {};
1007
- contents = deserializeAws_json1_1DeleteFlowTemplateResponse(data, context);
1008
- const response: DeleteFlowTemplateCommandOutput = {
1009
- $metadata: deserializeMetadata(output),
1010
- ...contents,
1011
- };
1012
- return Promise.resolve(response);
1013
- };
1014
-
1015
- const deserializeAws_json1_1DeleteFlowTemplateCommandError = async (
1016
- output: __HttpResponse,
1017
- context: __SerdeContext
1018
- ): Promise<DeleteFlowTemplateCommandOutput> => {
1019
- const parsedOutput: any = {
1020
- ...output,
1021
- body: await parseBody(output.body, context),
1022
- };
1023
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1024
- let errorCode: string = "UnknownError";
1025
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1026
- switch (errorCode) {
1027
- case "InternalFailureException":
1028
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
1029
- response = {
1030
- ...(await deserializeAws_json1_1InternalFailureExceptionResponse(parsedOutput, context)),
1031
- name: errorCode,
1032
- $metadata: deserializeMetadata(output),
1033
- };
1034
- break;
1035
- case "InvalidRequestException":
1036
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
1037
- response = {
1038
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
1039
- name: errorCode,
1040
- $metadata: deserializeMetadata(output),
1041
- };
1042
- break;
1043
- case "ResourceInUseException":
1044
- case "com.amazonaws.iotthingsgraph#ResourceInUseException":
1045
- response = {
1046
- ...(await deserializeAws_json1_1ResourceInUseExceptionResponse(parsedOutput, context)),
1047
- name: errorCode,
1048
- $metadata: deserializeMetadata(output),
1049
- };
1050
- break;
1051
- case "ThrottlingException":
1052
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
1053
- response = {
1054
- ...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
1055
- name: errorCode,
1056
- $metadata: deserializeMetadata(output),
1057
- };
1058
- break;
1059
- default:
1060
- const parsedBody = parsedOutput.body;
1061
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1062
- response = {
1063
- ...parsedBody,
1064
- name: `${errorCode}`,
1065
- message: parsedBody.message || parsedBody.Message || errorCode,
1066
- $fault: "client",
1067
- $metadata: deserializeMetadata(output),
1068
- } as any;
1069
- }
1070
- const message = response.message || response.Message || errorCode;
1071
- response.message = message;
1072
- delete response.Message;
1073
- return Promise.reject(Object.assign(new Error(message), response));
1074
- };
1075
-
1076
- export const deserializeAws_json1_1DeleteNamespaceCommand = async (
1077
- output: __HttpResponse,
1078
- context: __SerdeContext
1079
- ): Promise<DeleteNamespaceCommandOutput> => {
1080
- if (output.statusCode >= 300) {
1081
- return deserializeAws_json1_1DeleteNamespaceCommandError(output, context);
1082
- }
1083
- const data: any = await parseBody(output.body, context);
1084
- let contents: any = {};
1085
- contents = deserializeAws_json1_1DeleteNamespaceResponse(data, context);
1086
- const response: DeleteNamespaceCommandOutput = {
1087
- $metadata: deserializeMetadata(output),
1088
- ...contents,
1089
- };
1090
- return Promise.resolve(response);
1091
- };
1092
-
1093
- const deserializeAws_json1_1DeleteNamespaceCommandError = async (
1094
- output: __HttpResponse,
1095
- context: __SerdeContext
1096
- ): Promise<DeleteNamespaceCommandOutput> => {
1097
- const parsedOutput: any = {
1098
- ...output,
1099
- body: await parseBody(output.body, context),
1100
- };
1101
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1102
- let errorCode: string = "UnknownError";
1103
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1104
- switch (errorCode) {
1105
- case "InternalFailureException":
1106
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
1107
- response = {
1108
- ...(await deserializeAws_json1_1InternalFailureExceptionResponse(parsedOutput, context)),
1109
- name: errorCode,
1110
- $metadata: deserializeMetadata(output),
1111
- };
1112
- break;
1113
- case "ThrottlingException":
1114
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
1115
- response = {
1116
- ...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
1117
- name: errorCode,
1118
- $metadata: deserializeMetadata(output),
1119
- };
1120
- break;
1121
- default:
1122
- const parsedBody = parsedOutput.body;
1123
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1124
- response = {
1125
- ...parsedBody,
1126
- name: `${errorCode}`,
1127
- message: parsedBody.message || parsedBody.Message || errorCode,
1128
- $fault: "client",
1129
- $metadata: deserializeMetadata(output),
1130
- } as any;
1131
- }
1132
- const message = response.message || response.Message || errorCode;
1133
- response.message = message;
1134
- delete response.Message;
1135
- return Promise.reject(Object.assign(new Error(message), response));
1136
- };
1137
-
1138
- export const deserializeAws_json1_1DeleteSystemInstanceCommand = async (
1139
- output: __HttpResponse,
1140
- context: __SerdeContext
1141
- ): Promise<DeleteSystemInstanceCommandOutput> => {
1142
- if (output.statusCode >= 300) {
1143
- return deserializeAws_json1_1DeleteSystemInstanceCommandError(output, context);
1144
- }
1145
- const data: any = await parseBody(output.body, context);
1146
- let contents: any = {};
1147
- contents = deserializeAws_json1_1DeleteSystemInstanceResponse(data, context);
1148
- const response: DeleteSystemInstanceCommandOutput = {
1149
- $metadata: deserializeMetadata(output),
1150
- ...contents,
1151
- };
1152
- return Promise.resolve(response);
1153
- };
1154
-
1155
- const deserializeAws_json1_1DeleteSystemInstanceCommandError = async (
1156
- output: __HttpResponse,
1157
- context: __SerdeContext
1158
- ): Promise<DeleteSystemInstanceCommandOutput> => {
1159
- const parsedOutput: any = {
1160
- ...output,
1161
- body: await parseBody(output.body, context),
1162
- };
1163
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1164
- let errorCode: string = "UnknownError";
1165
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1166
- switch (errorCode) {
1167
- case "InternalFailureException":
1168
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
1169
- response = {
1170
- ...(await deserializeAws_json1_1InternalFailureExceptionResponse(parsedOutput, context)),
1171
- name: errorCode,
1172
- $metadata: deserializeMetadata(output),
1173
- };
1174
- break;
1175
- case "InvalidRequestException":
1176
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
1177
- response = {
1178
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
1179
- name: errorCode,
1180
- $metadata: deserializeMetadata(output),
1181
- };
1182
- break;
1183
- case "ResourceInUseException":
1184
- case "com.amazonaws.iotthingsgraph#ResourceInUseException":
1185
- response = {
1186
- ...(await deserializeAws_json1_1ResourceInUseExceptionResponse(parsedOutput, context)),
1187
- name: errorCode,
1188
- $metadata: deserializeMetadata(output),
1189
- };
1190
- break;
1191
- case "ThrottlingException":
1192
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
1193
- response = {
1194
- ...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
1195
- name: errorCode,
1196
- $metadata: deserializeMetadata(output),
1197
- };
1198
- break;
1199
- default:
1200
- const parsedBody = parsedOutput.body;
1201
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1202
- response = {
1203
- ...parsedBody,
1204
- name: `${errorCode}`,
1205
- message: parsedBody.message || parsedBody.Message || errorCode,
1206
- $fault: "client",
1207
- $metadata: deserializeMetadata(output),
1208
- } as any;
1209
- }
1210
- const message = response.message || response.Message || errorCode;
1211
- response.message = message;
1212
- delete response.Message;
1213
- return Promise.reject(Object.assign(new Error(message), response));
1214
- };
1215
-
1216
- export const deserializeAws_json1_1DeleteSystemTemplateCommand = async (
1217
- output: __HttpResponse,
1218
- context: __SerdeContext
1219
- ): Promise<DeleteSystemTemplateCommandOutput> => {
1220
- if (output.statusCode >= 300) {
1221
- return deserializeAws_json1_1DeleteSystemTemplateCommandError(output, context);
1222
- }
1223
- const data: any = await parseBody(output.body, context);
1224
- let contents: any = {};
1225
- contents = deserializeAws_json1_1DeleteSystemTemplateResponse(data, context);
1226
- const response: DeleteSystemTemplateCommandOutput = {
1227
- $metadata: deserializeMetadata(output),
1228
- ...contents,
1229
- };
1230
- return Promise.resolve(response);
1231
- };
1232
-
1233
- const deserializeAws_json1_1DeleteSystemTemplateCommandError = async (
1234
- output: __HttpResponse,
1235
- context: __SerdeContext
1236
- ): Promise<DeleteSystemTemplateCommandOutput> => {
1237
- const parsedOutput: any = {
1238
- ...output,
1239
- body: await parseBody(output.body, context),
1240
- };
1241
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1242
- let errorCode: string = "UnknownError";
1243
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1244
- switch (errorCode) {
1245
- case "InternalFailureException":
1246
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
1247
- response = {
1248
- ...(await deserializeAws_json1_1InternalFailureExceptionResponse(parsedOutput, context)),
1249
- name: errorCode,
1250
- $metadata: deserializeMetadata(output),
1251
- };
1252
- break;
1253
- case "InvalidRequestException":
1254
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
1255
- response = {
1256
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
1257
- name: errorCode,
1258
- $metadata: deserializeMetadata(output),
1259
- };
1260
- break;
1261
- case "ResourceInUseException":
1262
- case "com.amazonaws.iotthingsgraph#ResourceInUseException":
1263
- response = {
1264
- ...(await deserializeAws_json1_1ResourceInUseExceptionResponse(parsedOutput, context)),
1265
- name: errorCode,
1266
- $metadata: deserializeMetadata(output),
1267
- };
1268
- break;
1269
- case "ThrottlingException":
1270
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
1271
- response = {
1272
- ...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
1273
- name: errorCode,
1274
- $metadata: deserializeMetadata(output),
1275
- };
1276
- break;
1277
- default:
1278
- const parsedBody = parsedOutput.body;
1279
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1280
- response = {
1281
- ...parsedBody,
1282
- name: `${errorCode}`,
1283
- message: parsedBody.message || parsedBody.Message || errorCode,
1284
- $fault: "client",
1285
- $metadata: deserializeMetadata(output),
1286
- } as any;
1287
- }
1288
- const message = response.message || response.Message || errorCode;
1289
- response.message = message;
1290
- delete response.Message;
1291
- return Promise.reject(Object.assign(new Error(message), response));
1292
- };
1293
-
1294
- export const deserializeAws_json1_1DeploySystemInstanceCommand = async (
1295
- output: __HttpResponse,
1296
- context: __SerdeContext
1297
- ): Promise<DeploySystemInstanceCommandOutput> => {
1298
- if (output.statusCode >= 300) {
1299
- return deserializeAws_json1_1DeploySystemInstanceCommandError(output, context);
1300
- }
1301
- const data: any = await parseBody(output.body, context);
1302
- let contents: any = {};
1303
- contents = deserializeAws_json1_1DeploySystemInstanceResponse(data, context);
1304
- const response: DeploySystemInstanceCommandOutput = {
1305
- $metadata: deserializeMetadata(output),
1306
- ...contents,
1307
- };
1308
- return Promise.resolve(response);
1309
- };
1310
-
1311
- const deserializeAws_json1_1DeploySystemInstanceCommandError = async (
1312
- output: __HttpResponse,
1313
- context: __SerdeContext
1314
- ): Promise<DeploySystemInstanceCommandOutput> => {
1315
- const parsedOutput: any = {
1316
- ...output,
1317
- body: await parseBody(output.body, context),
1318
- };
1319
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1320
- let errorCode: string = "UnknownError";
1321
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1322
- switch (errorCode) {
1323
- case "InternalFailureException":
1324
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
1325
- response = {
1326
- ...(await deserializeAws_json1_1InternalFailureExceptionResponse(parsedOutput, context)),
1327
- name: errorCode,
1328
- $metadata: deserializeMetadata(output),
1329
- };
1330
- break;
1331
- case "InvalidRequestException":
1332
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
1333
- response = {
1334
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
1335
- name: errorCode,
1336
- $metadata: deserializeMetadata(output),
1337
- };
1338
- break;
1339
- case "ResourceInUseException":
1340
- case "com.amazonaws.iotthingsgraph#ResourceInUseException":
1341
- response = {
1342
- ...(await deserializeAws_json1_1ResourceInUseExceptionResponse(parsedOutput, context)),
1343
- name: errorCode,
1344
- $metadata: deserializeMetadata(output),
1345
- };
1346
- break;
1347
- case "ResourceNotFoundException":
1348
- case "com.amazonaws.iotthingsgraph#ResourceNotFoundException":
1349
- response = {
1350
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1351
- name: errorCode,
1352
- $metadata: deserializeMetadata(output),
1353
- };
1354
- break;
1355
- case "ThrottlingException":
1356
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
1357
- response = {
1358
- ...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
1359
- name: errorCode,
1360
- $metadata: deserializeMetadata(output),
1361
- };
1362
- break;
1363
- default:
1364
- const parsedBody = parsedOutput.body;
1365
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1366
- response = {
1367
- ...parsedBody,
1368
- name: `${errorCode}`,
1369
- message: parsedBody.message || parsedBody.Message || errorCode,
1370
- $fault: "client",
1371
- $metadata: deserializeMetadata(output),
1372
- } as any;
1373
- }
1374
- const message = response.message || response.Message || errorCode;
1375
- response.message = message;
1376
- delete response.Message;
1377
- return Promise.reject(Object.assign(new Error(message), response));
1378
- };
1379
-
1380
- export const deserializeAws_json1_1DeprecateFlowTemplateCommand = async (
1381
- output: __HttpResponse,
1382
- context: __SerdeContext
1383
- ): Promise<DeprecateFlowTemplateCommandOutput> => {
1384
- if (output.statusCode >= 300) {
1385
- return deserializeAws_json1_1DeprecateFlowTemplateCommandError(output, context);
1386
- }
1387
- const data: any = await parseBody(output.body, context);
1388
- let contents: any = {};
1389
- contents = deserializeAws_json1_1DeprecateFlowTemplateResponse(data, context);
1390
- const response: DeprecateFlowTemplateCommandOutput = {
1391
- $metadata: deserializeMetadata(output),
1392
- ...contents,
1393
- };
1394
- return Promise.resolve(response);
1395
- };
1396
-
1397
- const deserializeAws_json1_1DeprecateFlowTemplateCommandError = async (
1398
- output: __HttpResponse,
1399
- context: __SerdeContext
1400
- ): Promise<DeprecateFlowTemplateCommandOutput> => {
1401
- const parsedOutput: any = {
1402
- ...output,
1403
- body: await parseBody(output.body, context),
1404
- };
1405
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1406
- let errorCode: string = "UnknownError";
1407
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1408
- switch (errorCode) {
1409
- case "InternalFailureException":
1410
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
1411
- response = {
1412
- ...(await deserializeAws_json1_1InternalFailureExceptionResponse(parsedOutput, context)),
1413
- name: errorCode,
1414
- $metadata: deserializeMetadata(output),
1415
- };
1416
- break;
1417
- case "InvalidRequestException":
1418
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
1419
- response = {
1420
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
1421
- name: errorCode,
1422
- $metadata: deserializeMetadata(output),
1423
- };
1424
- break;
1425
- case "ResourceNotFoundException":
1426
- case "com.amazonaws.iotthingsgraph#ResourceNotFoundException":
1427
- response = {
1428
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1429
- name: errorCode,
1430
- $metadata: deserializeMetadata(output),
1431
- };
1432
- break;
1433
- case "ThrottlingException":
1434
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
1435
- response = {
1436
- ...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
1437
- name: errorCode,
1438
- $metadata: deserializeMetadata(output),
1439
- };
1440
- break;
1441
- default:
1442
- const parsedBody = parsedOutput.body;
1443
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1444
- response = {
1445
- ...parsedBody,
1446
- name: `${errorCode}`,
1447
- message: parsedBody.message || parsedBody.Message || errorCode,
1448
- $fault: "client",
1449
- $metadata: deserializeMetadata(output),
1450
- } as any;
1451
- }
1452
- const message = response.message || response.Message || errorCode;
1453
- response.message = message;
1454
- delete response.Message;
1455
- return Promise.reject(Object.assign(new Error(message), response));
1456
- };
1457
-
1458
- export const deserializeAws_json1_1DeprecateSystemTemplateCommand = async (
1459
- output: __HttpResponse,
1460
- context: __SerdeContext
1461
- ): Promise<DeprecateSystemTemplateCommandOutput> => {
1462
- if (output.statusCode >= 300) {
1463
- return deserializeAws_json1_1DeprecateSystemTemplateCommandError(output, context);
1464
- }
1465
- const data: any = await parseBody(output.body, context);
1466
- let contents: any = {};
1467
- contents = deserializeAws_json1_1DeprecateSystemTemplateResponse(data, context);
1468
- const response: DeprecateSystemTemplateCommandOutput = {
1469
- $metadata: deserializeMetadata(output),
1470
- ...contents,
1471
- };
1472
- return Promise.resolve(response);
1473
- };
1474
-
1475
- const deserializeAws_json1_1DeprecateSystemTemplateCommandError = async (
1476
- output: __HttpResponse,
1477
- context: __SerdeContext
1478
- ): Promise<DeprecateSystemTemplateCommandOutput> => {
1479
- const parsedOutput: any = {
1480
- ...output,
1481
- body: await parseBody(output.body, context),
1482
- };
1483
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1484
- let errorCode: string = "UnknownError";
1485
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1486
- switch (errorCode) {
1487
- case "InternalFailureException":
1488
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
1489
- response = {
1490
- ...(await deserializeAws_json1_1InternalFailureExceptionResponse(parsedOutput, context)),
1491
- name: errorCode,
1492
- $metadata: deserializeMetadata(output),
1493
- };
1494
- break;
1495
- case "InvalidRequestException":
1496
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
1497
- response = {
1498
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
1499
- name: errorCode,
1500
- $metadata: deserializeMetadata(output),
1501
- };
1502
- break;
1503
- case "ResourceNotFoundException":
1504
- case "com.amazonaws.iotthingsgraph#ResourceNotFoundException":
1505
- response = {
1506
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1507
- name: errorCode,
1508
- $metadata: deserializeMetadata(output),
1509
- };
1510
- break;
1511
- case "ThrottlingException":
1512
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
1513
- response = {
1514
- ...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
1515
- name: errorCode,
1516
- $metadata: deserializeMetadata(output),
1517
- };
1518
- break;
1519
- default:
1520
- const parsedBody = parsedOutput.body;
1521
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1522
- response = {
1523
- ...parsedBody,
1524
- name: `${errorCode}`,
1525
- message: parsedBody.message || parsedBody.Message || errorCode,
1526
- $fault: "client",
1527
- $metadata: deserializeMetadata(output),
1528
- } as any;
1529
- }
1530
- const message = response.message || response.Message || errorCode;
1531
- response.message = message;
1532
- delete response.Message;
1533
- return Promise.reject(Object.assign(new Error(message), response));
1534
- };
1535
-
1536
- export const deserializeAws_json1_1DescribeNamespaceCommand = async (
1537
- output: __HttpResponse,
1538
- context: __SerdeContext
1539
- ): Promise<DescribeNamespaceCommandOutput> => {
1540
- if (output.statusCode >= 300) {
1541
- return deserializeAws_json1_1DescribeNamespaceCommandError(output, context);
1542
- }
1543
- const data: any = await parseBody(output.body, context);
1544
- let contents: any = {};
1545
- contents = deserializeAws_json1_1DescribeNamespaceResponse(data, context);
1546
- const response: DescribeNamespaceCommandOutput = {
1547
- $metadata: deserializeMetadata(output),
1548
- ...contents,
1549
- };
1550
- return Promise.resolve(response);
1551
- };
1552
-
1553
- const deserializeAws_json1_1DescribeNamespaceCommandError = async (
1554
- output: __HttpResponse,
1555
- context: __SerdeContext
1556
- ): Promise<DescribeNamespaceCommandOutput> => {
1557
- const parsedOutput: any = {
1558
- ...output,
1559
- body: await parseBody(output.body, context),
1560
- };
1561
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1562
- let errorCode: string = "UnknownError";
1563
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1564
- switch (errorCode) {
1565
- case "InternalFailureException":
1566
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
1567
- response = {
1568
- ...(await deserializeAws_json1_1InternalFailureExceptionResponse(parsedOutput, context)),
1569
- name: errorCode,
1570
- $metadata: deserializeMetadata(output),
1571
- };
1572
- break;
1573
- case "InvalidRequestException":
1574
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
1575
- response = {
1576
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
1577
- name: errorCode,
1578
- $metadata: deserializeMetadata(output),
1579
- };
1580
- break;
1581
- case "ResourceNotFoundException":
1582
- case "com.amazonaws.iotthingsgraph#ResourceNotFoundException":
1583
- response = {
1584
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1585
- name: errorCode,
1586
- $metadata: deserializeMetadata(output),
1587
- };
1588
- break;
1589
- case "ThrottlingException":
1590
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
1591
- response = {
1592
- ...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
1593
- name: errorCode,
1594
- $metadata: deserializeMetadata(output),
1595
- };
1596
- break;
1597
- default:
1598
- const parsedBody = parsedOutput.body;
1599
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1600
- response = {
1601
- ...parsedBody,
1602
- name: `${errorCode}`,
1603
- message: parsedBody.message || parsedBody.Message || errorCode,
1604
- $fault: "client",
1605
- $metadata: deserializeMetadata(output),
1606
- } as any;
1607
- }
1608
- const message = response.message || response.Message || errorCode;
1609
- response.message = message;
1610
- delete response.Message;
1611
- return Promise.reject(Object.assign(new Error(message), response));
1612
- };
1613
-
1614
- export const deserializeAws_json1_1DissociateEntityFromThingCommand = async (
1615
- output: __HttpResponse,
1616
- context: __SerdeContext
1617
- ): Promise<DissociateEntityFromThingCommandOutput> => {
1618
- if (output.statusCode >= 300) {
1619
- return deserializeAws_json1_1DissociateEntityFromThingCommandError(output, context);
1620
- }
1621
- const data: any = await parseBody(output.body, context);
1622
- let contents: any = {};
1623
- contents = deserializeAws_json1_1DissociateEntityFromThingResponse(data, context);
1624
- const response: DissociateEntityFromThingCommandOutput = {
1625
- $metadata: deserializeMetadata(output),
1626
- ...contents,
1627
- };
1628
- return Promise.resolve(response);
1629
- };
1630
-
1631
- const deserializeAws_json1_1DissociateEntityFromThingCommandError = async (
1632
- output: __HttpResponse,
1633
- context: __SerdeContext
1634
- ): Promise<DissociateEntityFromThingCommandOutput> => {
1635
- const parsedOutput: any = {
1636
- ...output,
1637
- body: await parseBody(output.body, context),
1638
- };
1639
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1640
- let errorCode: string = "UnknownError";
1641
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1642
- switch (errorCode) {
1643
- case "InternalFailureException":
1644
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
1645
- response = {
1646
- ...(await deserializeAws_json1_1InternalFailureExceptionResponse(parsedOutput, context)),
1647
- name: errorCode,
1648
- $metadata: deserializeMetadata(output),
1649
- };
1650
- break;
1651
- case "InvalidRequestException":
1652
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
1653
- response = {
1654
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
1655
- name: errorCode,
1656
- $metadata: deserializeMetadata(output),
1657
- };
1658
- break;
1659
- case "ResourceNotFoundException":
1660
- case "com.amazonaws.iotthingsgraph#ResourceNotFoundException":
1661
- response = {
1662
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1663
- name: errorCode,
1664
- $metadata: deserializeMetadata(output),
1665
- };
1666
- break;
1667
- case "ThrottlingException":
1668
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
1669
- response = {
1670
- ...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
1671
- name: errorCode,
1672
- $metadata: deserializeMetadata(output),
1673
- };
1674
- break;
1675
- default:
1676
- const parsedBody = parsedOutput.body;
1677
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1678
- response = {
1679
- ...parsedBody,
1680
- name: `${errorCode}`,
1681
- message: parsedBody.message || parsedBody.Message || errorCode,
1682
- $fault: "client",
1683
- $metadata: deserializeMetadata(output),
1684
- } as any;
1685
- }
1686
- const message = response.message || response.Message || errorCode;
1687
- response.message = message;
1688
- delete response.Message;
1689
- return Promise.reject(Object.assign(new Error(message), response));
1690
- };
1691
-
1692
- export const deserializeAws_json1_1GetEntitiesCommand = async (
1693
- output: __HttpResponse,
1694
- context: __SerdeContext
1695
- ): Promise<GetEntitiesCommandOutput> => {
1696
- if (output.statusCode >= 300) {
1697
- return deserializeAws_json1_1GetEntitiesCommandError(output, context);
1698
- }
1699
- const data: any = await parseBody(output.body, context);
1700
- let contents: any = {};
1701
- contents = deserializeAws_json1_1GetEntitiesResponse(data, context);
1702
- const response: GetEntitiesCommandOutput = {
1703
- $metadata: deserializeMetadata(output),
1704
- ...contents,
1705
- };
1706
- return Promise.resolve(response);
1707
- };
1708
-
1709
- const deserializeAws_json1_1GetEntitiesCommandError = async (
1710
- output: __HttpResponse,
1711
- context: __SerdeContext
1712
- ): Promise<GetEntitiesCommandOutput> => {
1713
- const parsedOutput: any = {
1714
- ...output,
1715
- body: await parseBody(output.body, context),
1716
- };
1717
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1718
- let errorCode: string = "UnknownError";
1719
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1720
- switch (errorCode) {
1721
- case "InternalFailureException":
1722
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
1723
- response = {
1724
- ...(await deserializeAws_json1_1InternalFailureExceptionResponse(parsedOutput, context)),
1725
- name: errorCode,
1726
- $metadata: deserializeMetadata(output),
1727
- };
1728
- break;
1729
- case "InvalidRequestException":
1730
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
1731
- response = {
1732
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
1733
- name: errorCode,
1734
- $metadata: deserializeMetadata(output),
1735
- };
1736
- break;
1737
- case "ResourceNotFoundException":
1738
- case "com.amazonaws.iotthingsgraph#ResourceNotFoundException":
1739
- response = {
1740
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1741
- name: errorCode,
1742
- $metadata: deserializeMetadata(output),
1743
- };
1744
- break;
1745
- case "ThrottlingException":
1746
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
1747
- response = {
1748
- ...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
1749
- name: errorCode,
1750
- $metadata: deserializeMetadata(output),
1751
- };
1752
- break;
1753
- default:
1754
- const parsedBody = parsedOutput.body;
1755
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1756
- response = {
1757
- ...parsedBody,
1758
- name: `${errorCode}`,
1759
- message: parsedBody.message || parsedBody.Message || errorCode,
1760
- $fault: "client",
1761
- $metadata: deserializeMetadata(output),
1762
- } as any;
1763
- }
1764
- const message = response.message || response.Message || errorCode;
1765
- response.message = message;
1766
- delete response.Message;
1767
- return Promise.reject(Object.assign(new Error(message), response));
1768
- };
1769
-
1770
- export const deserializeAws_json1_1GetFlowTemplateCommand = async (
1771
- output: __HttpResponse,
1772
- context: __SerdeContext
1773
- ): Promise<GetFlowTemplateCommandOutput> => {
1774
- if (output.statusCode >= 300) {
1775
- return deserializeAws_json1_1GetFlowTemplateCommandError(output, context);
1776
- }
1777
- const data: any = await parseBody(output.body, context);
1778
- let contents: any = {};
1779
- contents = deserializeAws_json1_1GetFlowTemplateResponse(data, context);
1780
- const response: GetFlowTemplateCommandOutput = {
1781
- $metadata: deserializeMetadata(output),
1782
- ...contents,
1783
- };
1784
- return Promise.resolve(response);
1785
- };
1786
-
1787
- const deserializeAws_json1_1GetFlowTemplateCommandError = async (
1788
- output: __HttpResponse,
1789
- context: __SerdeContext
1790
- ): Promise<GetFlowTemplateCommandOutput> => {
1791
- const parsedOutput: any = {
1792
- ...output,
1793
- body: await parseBody(output.body, context),
1794
- };
1795
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1796
- let errorCode: string = "UnknownError";
1797
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1798
- switch (errorCode) {
1799
- case "InternalFailureException":
1800
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
1801
- response = {
1802
- ...(await deserializeAws_json1_1InternalFailureExceptionResponse(parsedOutput, context)),
1803
- name: errorCode,
1804
- $metadata: deserializeMetadata(output),
1805
- };
1806
- break;
1807
- case "InvalidRequestException":
1808
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
1809
- response = {
1810
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
1811
- name: errorCode,
1812
- $metadata: deserializeMetadata(output),
1813
- };
1814
- break;
1815
- case "ResourceNotFoundException":
1816
- case "com.amazonaws.iotthingsgraph#ResourceNotFoundException":
1817
- response = {
1818
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1819
- name: errorCode,
1820
- $metadata: deserializeMetadata(output),
1821
- };
1822
- break;
1823
- case "ThrottlingException":
1824
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
1825
- response = {
1826
- ...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
1827
- name: errorCode,
1828
- $metadata: deserializeMetadata(output),
1829
- };
1830
- break;
1831
- default:
1832
- const parsedBody = parsedOutput.body;
1833
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1834
- response = {
1835
- ...parsedBody,
1836
- name: `${errorCode}`,
1837
- message: parsedBody.message || parsedBody.Message || errorCode,
1838
- $fault: "client",
1839
- $metadata: deserializeMetadata(output),
1840
- } as any;
1841
- }
1842
- const message = response.message || response.Message || errorCode;
1843
- response.message = message;
1844
- delete response.Message;
1845
- return Promise.reject(Object.assign(new Error(message), response));
1846
- };
1847
-
1848
- export const deserializeAws_json1_1GetFlowTemplateRevisionsCommand = async (
1849
- output: __HttpResponse,
1850
- context: __SerdeContext
1851
- ): Promise<GetFlowTemplateRevisionsCommandOutput> => {
1852
- if (output.statusCode >= 300) {
1853
- return deserializeAws_json1_1GetFlowTemplateRevisionsCommandError(output, context);
1854
- }
1855
- const data: any = await parseBody(output.body, context);
1856
- let contents: any = {};
1857
- contents = deserializeAws_json1_1GetFlowTemplateRevisionsResponse(data, context);
1858
- const response: GetFlowTemplateRevisionsCommandOutput = {
1859
- $metadata: deserializeMetadata(output),
1860
- ...contents,
1861
- };
1862
- return Promise.resolve(response);
1863
- };
1864
-
1865
- const deserializeAws_json1_1GetFlowTemplateRevisionsCommandError = async (
1866
- output: __HttpResponse,
1867
- context: __SerdeContext
1868
- ): Promise<GetFlowTemplateRevisionsCommandOutput> => {
1869
- const parsedOutput: any = {
1870
- ...output,
1871
- body: await parseBody(output.body, context),
1872
- };
1873
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1874
- let errorCode: string = "UnknownError";
1875
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1876
- switch (errorCode) {
1877
- case "InternalFailureException":
1878
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
1879
- response = {
1880
- ...(await deserializeAws_json1_1InternalFailureExceptionResponse(parsedOutput, context)),
1881
- name: errorCode,
1882
- $metadata: deserializeMetadata(output),
1883
- };
1884
- break;
1885
- case "InvalidRequestException":
1886
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
1887
- response = {
1888
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
1889
- name: errorCode,
1890
- $metadata: deserializeMetadata(output),
1891
- };
1892
- break;
1893
- case "ResourceNotFoundException":
1894
- case "com.amazonaws.iotthingsgraph#ResourceNotFoundException":
1895
- response = {
1896
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1897
- name: errorCode,
1898
- $metadata: deserializeMetadata(output),
1899
- };
1900
- break;
1901
- case "ThrottlingException":
1902
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
1903
- response = {
1904
- ...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
1905
- name: errorCode,
1906
- $metadata: deserializeMetadata(output),
1907
- };
1908
- break;
1909
- default:
1910
- const parsedBody = parsedOutput.body;
1911
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1912
- response = {
1913
- ...parsedBody,
1914
- name: `${errorCode}`,
1915
- message: parsedBody.message || parsedBody.Message || errorCode,
1916
- $fault: "client",
1917
- $metadata: deserializeMetadata(output),
1918
- } as any;
1919
- }
1920
- const message = response.message || response.Message || errorCode;
1921
- response.message = message;
1922
- delete response.Message;
1923
- return Promise.reject(Object.assign(new Error(message), response));
1924
- };
1925
-
1926
- export const deserializeAws_json1_1GetNamespaceDeletionStatusCommand = async (
1927
- output: __HttpResponse,
1928
- context: __SerdeContext
1929
- ): Promise<GetNamespaceDeletionStatusCommandOutput> => {
1930
- if (output.statusCode >= 300) {
1931
- return deserializeAws_json1_1GetNamespaceDeletionStatusCommandError(output, context);
1932
- }
1933
- const data: any = await parseBody(output.body, context);
1934
- let contents: any = {};
1935
- contents = deserializeAws_json1_1GetNamespaceDeletionStatusResponse(data, context);
1936
- const response: GetNamespaceDeletionStatusCommandOutput = {
1937
- $metadata: deserializeMetadata(output),
1938
- ...contents,
1939
- };
1940
- return Promise.resolve(response);
1941
- };
1942
-
1943
- const deserializeAws_json1_1GetNamespaceDeletionStatusCommandError = async (
1944
- output: __HttpResponse,
1945
- context: __SerdeContext
1946
- ): Promise<GetNamespaceDeletionStatusCommandOutput> => {
1947
- const parsedOutput: any = {
1948
- ...output,
1949
- body: await parseBody(output.body, context),
1950
- };
1951
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1952
- let errorCode: string = "UnknownError";
1953
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1954
- switch (errorCode) {
1955
- case "InternalFailureException":
1956
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
1957
- response = {
1958
- ...(await deserializeAws_json1_1InternalFailureExceptionResponse(parsedOutput, context)),
1959
- name: errorCode,
1960
- $metadata: deserializeMetadata(output),
1961
- };
1962
- break;
1963
- case "InvalidRequestException":
1964
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
1965
- response = {
1966
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
1967
- name: errorCode,
1968
- $metadata: deserializeMetadata(output),
1969
- };
1970
- break;
1971
- case "ThrottlingException":
1972
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
1973
- response = {
1974
- ...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
1975
- name: errorCode,
1976
- $metadata: deserializeMetadata(output),
1977
- };
1978
- break;
1979
- default:
1980
- const parsedBody = parsedOutput.body;
1981
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1982
- response = {
1983
- ...parsedBody,
1984
- name: `${errorCode}`,
1985
- message: parsedBody.message || parsedBody.Message || errorCode,
1986
- $fault: "client",
1987
- $metadata: deserializeMetadata(output),
1988
- } as any;
1989
- }
1990
- const message = response.message || response.Message || errorCode;
1991
- response.message = message;
1992
- delete response.Message;
1993
- return Promise.reject(Object.assign(new Error(message), response));
1994
- };
1995
-
1996
- export const deserializeAws_json1_1GetSystemInstanceCommand = async (
1997
- output: __HttpResponse,
1998
- context: __SerdeContext
1999
- ): Promise<GetSystemInstanceCommandOutput> => {
2000
- if (output.statusCode >= 300) {
2001
- return deserializeAws_json1_1GetSystemInstanceCommandError(output, context);
2002
- }
2003
- const data: any = await parseBody(output.body, context);
2004
- let contents: any = {};
2005
- contents = deserializeAws_json1_1GetSystemInstanceResponse(data, context);
2006
- const response: GetSystemInstanceCommandOutput = {
2007
- $metadata: deserializeMetadata(output),
2008
- ...contents,
2009
- };
2010
- return Promise.resolve(response);
2011
- };
2012
-
2013
- const deserializeAws_json1_1GetSystemInstanceCommandError = async (
2014
- output: __HttpResponse,
2015
- context: __SerdeContext
2016
- ): Promise<GetSystemInstanceCommandOutput> => {
2017
- const parsedOutput: any = {
2018
- ...output,
2019
- body: await parseBody(output.body, context),
2020
- };
2021
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
2022
- let errorCode: string = "UnknownError";
2023
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2024
- switch (errorCode) {
2025
- case "InternalFailureException":
2026
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
2027
- response = {
2028
- ...(await deserializeAws_json1_1InternalFailureExceptionResponse(parsedOutput, context)),
2029
- name: errorCode,
2030
- $metadata: deserializeMetadata(output),
2031
- };
2032
- break;
2033
- case "InvalidRequestException":
2034
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
2035
- response = {
2036
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
2037
- name: errorCode,
2038
- $metadata: deserializeMetadata(output),
2039
- };
2040
- break;
2041
- case "ResourceNotFoundException":
2042
- case "com.amazonaws.iotthingsgraph#ResourceNotFoundException":
2043
- response = {
2044
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
2045
- name: errorCode,
2046
- $metadata: deserializeMetadata(output),
2047
- };
2048
- break;
2049
- case "ThrottlingException":
2050
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
2051
- response = {
2052
- ...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
2053
- name: errorCode,
2054
- $metadata: deserializeMetadata(output),
2055
- };
2056
- break;
2057
- default:
2058
- const parsedBody = parsedOutput.body;
2059
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2060
- response = {
2061
- ...parsedBody,
2062
- name: `${errorCode}`,
2063
- message: parsedBody.message || parsedBody.Message || errorCode,
2064
- $fault: "client",
2065
- $metadata: deserializeMetadata(output),
2066
- } as any;
2067
- }
2068
- const message = response.message || response.Message || errorCode;
2069
- response.message = message;
2070
- delete response.Message;
2071
- return Promise.reject(Object.assign(new Error(message), response));
2072
- };
2073
-
2074
- export const deserializeAws_json1_1GetSystemTemplateCommand = async (
2075
- output: __HttpResponse,
2076
- context: __SerdeContext
2077
- ): Promise<GetSystemTemplateCommandOutput> => {
2078
- if (output.statusCode >= 300) {
2079
- return deserializeAws_json1_1GetSystemTemplateCommandError(output, context);
2080
- }
2081
- const data: any = await parseBody(output.body, context);
2082
- let contents: any = {};
2083
- contents = deserializeAws_json1_1GetSystemTemplateResponse(data, context);
2084
- const response: GetSystemTemplateCommandOutput = {
2085
- $metadata: deserializeMetadata(output),
2086
- ...contents,
2087
- };
2088
- return Promise.resolve(response);
2089
- };
2090
-
2091
- const deserializeAws_json1_1GetSystemTemplateCommandError = async (
2092
- output: __HttpResponse,
2093
- context: __SerdeContext
2094
- ): Promise<GetSystemTemplateCommandOutput> => {
2095
- const parsedOutput: any = {
2096
- ...output,
2097
- body: await parseBody(output.body, context),
2098
- };
2099
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
2100
- let errorCode: string = "UnknownError";
2101
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2102
- switch (errorCode) {
2103
- case "InternalFailureException":
2104
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
2105
- response = {
2106
- ...(await deserializeAws_json1_1InternalFailureExceptionResponse(parsedOutput, context)),
2107
- name: errorCode,
2108
- $metadata: deserializeMetadata(output),
2109
- };
2110
- break;
2111
- case "InvalidRequestException":
2112
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
2113
- response = {
2114
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
2115
- name: errorCode,
2116
- $metadata: deserializeMetadata(output),
2117
- };
2118
- break;
2119
- case "ResourceNotFoundException":
2120
- case "com.amazonaws.iotthingsgraph#ResourceNotFoundException":
2121
- response = {
2122
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
2123
- name: errorCode,
2124
- $metadata: deserializeMetadata(output),
2125
- };
2126
- break;
2127
- case "ThrottlingException":
2128
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
2129
- response = {
2130
- ...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
2131
- name: errorCode,
2132
- $metadata: deserializeMetadata(output),
2133
- };
2134
- break;
2135
- default:
2136
- const parsedBody = parsedOutput.body;
2137
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2138
- response = {
2139
- ...parsedBody,
2140
- name: `${errorCode}`,
2141
- message: parsedBody.message || parsedBody.Message || errorCode,
2142
- $fault: "client",
2143
- $metadata: deserializeMetadata(output),
2144
- } as any;
2145
- }
2146
- const message = response.message || response.Message || errorCode;
2147
- response.message = message;
2148
- delete response.Message;
2149
- return Promise.reject(Object.assign(new Error(message), response));
2150
- };
2151
-
2152
- export const deserializeAws_json1_1GetSystemTemplateRevisionsCommand = async (
2153
- output: __HttpResponse,
2154
- context: __SerdeContext
2155
- ): Promise<GetSystemTemplateRevisionsCommandOutput> => {
2156
- if (output.statusCode >= 300) {
2157
- return deserializeAws_json1_1GetSystemTemplateRevisionsCommandError(output, context);
2158
- }
2159
- const data: any = await parseBody(output.body, context);
2160
- let contents: any = {};
2161
- contents = deserializeAws_json1_1GetSystemTemplateRevisionsResponse(data, context);
2162
- const response: GetSystemTemplateRevisionsCommandOutput = {
2163
- $metadata: deserializeMetadata(output),
2164
- ...contents,
2165
- };
2166
- return Promise.resolve(response);
2167
- };
2168
-
2169
- const deserializeAws_json1_1GetSystemTemplateRevisionsCommandError = async (
2170
- output: __HttpResponse,
2171
- context: __SerdeContext
2172
- ): Promise<GetSystemTemplateRevisionsCommandOutput> => {
2173
- const parsedOutput: any = {
2174
- ...output,
2175
- body: await parseBody(output.body, context),
2176
- };
2177
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
2178
- let errorCode: string = "UnknownError";
2179
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2180
- switch (errorCode) {
2181
- case "InternalFailureException":
2182
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
2183
- response = {
2184
- ...(await deserializeAws_json1_1InternalFailureExceptionResponse(parsedOutput, context)),
2185
- name: errorCode,
2186
- $metadata: deserializeMetadata(output),
2187
- };
2188
- break;
2189
- case "InvalidRequestException":
2190
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
2191
- response = {
2192
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
2193
- name: errorCode,
2194
- $metadata: deserializeMetadata(output),
2195
- };
2196
- break;
2197
- case "ResourceNotFoundException":
2198
- case "com.amazonaws.iotthingsgraph#ResourceNotFoundException":
2199
- response = {
2200
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
2201
- name: errorCode,
2202
- $metadata: deserializeMetadata(output),
2203
- };
2204
- break;
2205
- case "ThrottlingException":
2206
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
2207
- response = {
2208
- ...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
2209
- name: errorCode,
2210
- $metadata: deserializeMetadata(output),
2211
- };
2212
- break;
2213
- default:
2214
- const parsedBody = parsedOutput.body;
2215
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2216
- response = {
2217
- ...parsedBody,
2218
- name: `${errorCode}`,
2219
- message: parsedBody.message || parsedBody.Message || errorCode,
2220
- $fault: "client",
2221
- $metadata: deserializeMetadata(output),
2222
- } as any;
2223
- }
2224
- const message = response.message || response.Message || errorCode;
2225
- response.message = message;
2226
- delete response.Message;
2227
- return Promise.reject(Object.assign(new Error(message), response));
2228
- };
2229
-
2230
- export const deserializeAws_json1_1GetUploadStatusCommand = async (
2231
- output: __HttpResponse,
2232
- context: __SerdeContext
2233
- ): Promise<GetUploadStatusCommandOutput> => {
2234
- if (output.statusCode >= 300) {
2235
- return deserializeAws_json1_1GetUploadStatusCommandError(output, context);
2236
- }
2237
- const data: any = await parseBody(output.body, context);
2238
- let contents: any = {};
2239
- contents = deserializeAws_json1_1GetUploadStatusResponse(data, context);
2240
- const response: GetUploadStatusCommandOutput = {
2241
- $metadata: deserializeMetadata(output),
2242
- ...contents,
2243
- };
2244
- return Promise.resolve(response);
2245
- };
2246
-
2247
- const deserializeAws_json1_1GetUploadStatusCommandError = async (
2248
- output: __HttpResponse,
2249
- context: __SerdeContext
2250
- ): Promise<GetUploadStatusCommandOutput> => {
2251
- const parsedOutput: any = {
2252
- ...output,
2253
- body: await parseBody(output.body, context),
2254
- };
2255
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
2256
- let errorCode: string = "UnknownError";
2257
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2258
- switch (errorCode) {
2259
- case "InternalFailureException":
2260
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
2261
- response = {
2262
- ...(await deserializeAws_json1_1InternalFailureExceptionResponse(parsedOutput, context)),
2263
- name: errorCode,
2264
- $metadata: deserializeMetadata(output),
2265
- };
2266
- break;
2267
- case "InvalidRequestException":
2268
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
2269
- response = {
2270
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
2271
- name: errorCode,
2272
- $metadata: deserializeMetadata(output),
2273
- };
2274
- break;
2275
- case "ResourceNotFoundException":
2276
- case "com.amazonaws.iotthingsgraph#ResourceNotFoundException":
2277
- response = {
2278
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
2279
- name: errorCode,
2280
- $metadata: deserializeMetadata(output),
2281
- };
2282
- break;
2283
- case "ThrottlingException":
2284
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
2285
- response = {
2286
- ...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
2287
- name: errorCode,
2288
- $metadata: deserializeMetadata(output),
2289
- };
2290
- break;
2291
- default:
2292
- const parsedBody = parsedOutput.body;
2293
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2294
- response = {
2295
- ...parsedBody,
2296
- name: `${errorCode}`,
2297
- message: parsedBody.message || parsedBody.Message || errorCode,
2298
- $fault: "client",
2299
- $metadata: deserializeMetadata(output),
2300
- } as any;
2301
- }
2302
- const message = response.message || response.Message || errorCode;
2303
- response.message = message;
2304
- delete response.Message;
2305
- return Promise.reject(Object.assign(new Error(message), response));
2306
- };
2307
-
2308
- export const deserializeAws_json1_1ListFlowExecutionMessagesCommand = async (
2309
- output: __HttpResponse,
2310
- context: __SerdeContext
2311
- ): Promise<ListFlowExecutionMessagesCommandOutput> => {
2312
- if (output.statusCode >= 300) {
2313
- return deserializeAws_json1_1ListFlowExecutionMessagesCommandError(output, context);
2314
- }
2315
- const data: any = await parseBody(output.body, context);
2316
- let contents: any = {};
2317
- contents = deserializeAws_json1_1ListFlowExecutionMessagesResponse(data, context);
2318
- const response: ListFlowExecutionMessagesCommandOutput = {
2319
- $metadata: deserializeMetadata(output),
2320
- ...contents,
2321
- };
2322
- return Promise.resolve(response);
2323
- };
2324
-
2325
- const deserializeAws_json1_1ListFlowExecutionMessagesCommandError = async (
2326
- output: __HttpResponse,
2327
- context: __SerdeContext
2328
- ): Promise<ListFlowExecutionMessagesCommandOutput> => {
2329
- const parsedOutput: any = {
2330
- ...output,
2331
- body: await parseBody(output.body, context),
2332
- };
2333
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
2334
- let errorCode: string = "UnknownError";
2335
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2336
- switch (errorCode) {
2337
- case "InternalFailureException":
2338
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
2339
- response = {
2340
- ...(await deserializeAws_json1_1InternalFailureExceptionResponse(parsedOutput, context)),
2341
- name: errorCode,
2342
- $metadata: deserializeMetadata(output),
2343
- };
2344
- break;
2345
- case "InvalidRequestException":
2346
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
2347
- response = {
2348
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
2349
- name: errorCode,
2350
- $metadata: deserializeMetadata(output),
2351
- };
2352
- break;
2353
- case "ResourceNotFoundException":
2354
- case "com.amazonaws.iotthingsgraph#ResourceNotFoundException":
2355
- response = {
2356
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
2357
- name: errorCode,
2358
- $metadata: deserializeMetadata(output),
2359
- };
2360
- break;
2361
- case "ThrottlingException":
2362
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
2363
- response = {
2364
- ...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
2365
- name: errorCode,
2366
- $metadata: deserializeMetadata(output),
2367
- };
2368
- break;
2369
- default:
2370
- const parsedBody = parsedOutput.body;
2371
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2372
- response = {
2373
- ...parsedBody,
2374
- name: `${errorCode}`,
2375
- message: parsedBody.message || parsedBody.Message || errorCode,
2376
- $fault: "client",
2377
- $metadata: deserializeMetadata(output),
2378
- } as any;
2379
- }
2380
- const message = response.message || response.Message || errorCode;
2381
- response.message = message;
2382
- delete response.Message;
2383
- return Promise.reject(Object.assign(new Error(message), response));
2384
- };
2385
-
2386
- export const deserializeAws_json1_1ListTagsForResourceCommand = async (
2387
- output: __HttpResponse,
2388
- context: __SerdeContext
2389
- ): Promise<ListTagsForResourceCommandOutput> => {
2390
- if (output.statusCode >= 300) {
2391
- return deserializeAws_json1_1ListTagsForResourceCommandError(output, context);
2392
- }
2393
- const data: any = await parseBody(output.body, context);
2394
- let contents: any = {};
2395
- contents = deserializeAws_json1_1ListTagsForResourceResponse(data, context);
2396
- const response: ListTagsForResourceCommandOutput = {
2397
- $metadata: deserializeMetadata(output),
2398
- ...contents,
2399
- };
2400
- return Promise.resolve(response);
2401
- };
2402
-
2403
- const deserializeAws_json1_1ListTagsForResourceCommandError = async (
2404
- output: __HttpResponse,
2405
- context: __SerdeContext
2406
- ): Promise<ListTagsForResourceCommandOutput> => {
2407
- const parsedOutput: any = {
2408
- ...output,
2409
- body: await parseBody(output.body, context),
2410
- };
2411
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
2412
- let errorCode: string = "UnknownError";
2413
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2414
- switch (errorCode) {
2415
- case "InternalFailureException":
2416
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
2417
- response = {
2418
- ...(await deserializeAws_json1_1InternalFailureExceptionResponse(parsedOutput, context)),
2419
- name: errorCode,
2420
- $metadata: deserializeMetadata(output),
2421
- };
2422
- break;
2423
- case "InvalidRequestException":
2424
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
2425
- response = {
2426
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
2427
- name: errorCode,
2428
- $metadata: deserializeMetadata(output),
2429
- };
2430
- break;
2431
- case "ResourceAlreadyExistsException":
2432
- case "com.amazonaws.iotthingsgraph#ResourceAlreadyExistsException":
2433
- response = {
2434
- ...(await deserializeAws_json1_1ResourceAlreadyExistsExceptionResponse(parsedOutput, context)),
2435
- name: errorCode,
2436
- $metadata: deserializeMetadata(output),
2437
- };
2438
- break;
2439
- case "ThrottlingException":
2440
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
2441
- response = {
2442
- ...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
2443
- name: errorCode,
2444
- $metadata: deserializeMetadata(output),
2445
- };
2446
- break;
2447
- default:
2448
- const parsedBody = parsedOutput.body;
2449
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2450
- response = {
2451
- ...parsedBody,
2452
- name: `${errorCode}`,
2453
- message: parsedBody.message || parsedBody.Message || errorCode,
2454
- $fault: "client",
2455
- $metadata: deserializeMetadata(output),
2456
- } as any;
2457
- }
2458
- const message = response.message || response.Message || errorCode;
2459
- response.message = message;
2460
- delete response.Message;
2461
- return Promise.reject(Object.assign(new Error(message), response));
2462
- };
2463
-
2464
- export const deserializeAws_json1_1SearchEntitiesCommand = async (
2465
- output: __HttpResponse,
2466
- context: __SerdeContext
2467
- ): Promise<SearchEntitiesCommandOutput> => {
2468
- if (output.statusCode >= 300) {
2469
- return deserializeAws_json1_1SearchEntitiesCommandError(output, context);
2470
- }
2471
- const data: any = await parseBody(output.body, context);
2472
- let contents: any = {};
2473
- contents = deserializeAws_json1_1SearchEntitiesResponse(data, context);
2474
- const response: SearchEntitiesCommandOutput = {
2475
- $metadata: deserializeMetadata(output),
2476
- ...contents,
2477
- };
2478
- return Promise.resolve(response);
2479
- };
2480
-
2481
- const deserializeAws_json1_1SearchEntitiesCommandError = async (
2482
- output: __HttpResponse,
2483
- context: __SerdeContext
2484
- ): Promise<SearchEntitiesCommandOutput> => {
2485
- const parsedOutput: any = {
2486
- ...output,
2487
- body: await parseBody(output.body, context),
2488
- };
2489
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
2490
- let errorCode: string = "UnknownError";
2491
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2492
- switch (errorCode) {
2493
- case "InternalFailureException":
2494
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
2495
- response = {
2496
- ...(await deserializeAws_json1_1InternalFailureExceptionResponse(parsedOutput, context)),
2497
- name: errorCode,
2498
- $metadata: deserializeMetadata(output),
2499
- };
2500
- break;
2501
- case "InvalidRequestException":
2502
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
2503
- response = {
2504
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
2505
- name: errorCode,
2506
- $metadata: deserializeMetadata(output),
2507
- };
2508
- break;
2509
- case "ThrottlingException":
2510
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
2511
- response = {
2512
- ...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
2513
- name: errorCode,
2514
- $metadata: deserializeMetadata(output),
2515
- };
2516
- break;
2517
- default:
2518
- const parsedBody = parsedOutput.body;
2519
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2520
- response = {
2521
- ...parsedBody,
2522
- name: `${errorCode}`,
2523
- message: parsedBody.message || parsedBody.Message || errorCode,
2524
- $fault: "client",
2525
- $metadata: deserializeMetadata(output),
2526
- } as any;
2527
- }
2528
- const message = response.message || response.Message || errorCode;
2529
- response.message = message;
2530
- delete response.Message;
2531
- return Promise.reject(Object.assign(new Error(message), response));
2532
- };
2533
-
2534
- export const deserializeAws_json1_1SearchFlowExecutionsCommand = async (
2535
- output: __HttpResponse,
2536
- context: __SerdeContext
2537
- ): Promise<SearchFlowExecutionsCommandOutput> => {
2538
- if (output.statusCode >= 300) {
2539
- return deserializeAws_json1_1SearchFlowExecutionsCommandError(output, context);
2540
- }
2541
- const data: any = await parseBody(output.body, context);
2542
- let contents: any = {};
2543
- contents = deserializeAws_json1_1SearchFlowExecutionsResponse(data, context);
2544
- const response: SearchFlowExecutionsCommandOutput = {
2545
- $metadata: deserializeMetadata(output),
2546
- ...contents,
2547
- };
2548
- return Promise.resolve(response);
2549
- };
2550
-
2551
- const deserializeAws_json1_1SearchFlowExecutionsCommandError = async (
2552
- output: __HttpResponse,
2553
- context: __SerdeContext
2554
- ): Promise<SearchFlowExecutionsCommandOutput> => {
2555
- const parsedOutput: any = {
2556
- ...output,
2557
- body: await parseBody(output.body, context),
2558
- };
2559
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
2560
- let errorCode: string = "UnknownError";
2561
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2562
- switch (errorCode) {
2563
- case "InternalFailureException":
2564
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
2565
- response = {
2566
- ...(await deserializeAws_json1_1InternalFailureExceptionResponse(parsedOutput, context)),
2567
- name: errorCode,
2568
- $metadata: deserializeMetadata(output),
2569
- };
2570
- break;
2571
- case "InvalidRequestException":
2572
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
2573
- response = {
2574
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
2575
- name: errorCode,
2576
- $metadata: deserializeMetadata(output),
2577
- };
2578
- break;
2579
- case "ResourceNotFoundException":
2580
- case "com.amazonaws.iotthingsgraph#ResourceNotFoundException":
2581
- response = {
2582
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
2583
- name: errorCode,
2584
- $metadata: deserializeMetadata(output),
2585
- };
2586
- break;
2587
- case "ThrottlingException":
2588
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
2589
- response = {
2590
- ...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
2591
- name: errorCode,
2592
- $metadata: deserializeMetadata(output),
2593
- };
2594
- break;
2595
- default:
2596
- const parsedBody = parsedOutput.body;
2597
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2598
- response = {
2599
- ...parsedBody,
2600
- name: `${errorCode}`,
2601
- message: parsedBody.message || parsedBody.Message || errorCode,
2602
- $fault: "client",
2603
- $metadata: deserializeMetadata(output),
2604
- } as any;
2605
- }
2606
- const message = response.message || response.Message || errorCode;
2607
- response.message = message;
2608
- delete response.Message;
2609
- return Promise.reject(Object.assign(new Error(message), response));
2610
- };
2611
-
2612
- export const deserializeAws_json1_1SearchFlowTemplatesCommand = async (
2613
- output: __HttpResponse,
2614
- context: __SerdeContext
2615
- ): Promise<SearchFlowTemplatesCommandOutput> => {
2616
- if (output.statusCode >= 300) {
2617
- return deserializeAws_json1_1SearchFlowTemplatesCommandError(output, context);
2618
- }
2619
- const data: any = await parseBody(output.body, context);
2620
- let contents: any = {};
2621
- contents = deserializeAws_json1_1SearchFlowTemplatesResponse(data, context);
2622
- const response: SearchFlowTemplatesCommandOutput = {
2623
- $metadata: deserializeMetadata(output),
2624
- ...contents,
2625
- };
2626
- return Promise.resolve(response);
2627
- };
2628
-
2629
- const deserializeAws_json1_1SearchFlowTemplatesCommandError = async (
2630
- output: __HttpResponse,
2631
- context: __SerdeContext
2632
- ): Promise<SearchFlowTemplatesCommandOutput> => {
2633
- const parsedOutput: any = {
2634
- ...output,
2635
- body: await parseBody(output.body, context),
2636
- };
2637
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
2638
- let errorCode: string = "UnknownError";
2639
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2640
- switch (errorCode) {
2641
- case "InternalFailureException":
2642
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
2643
- response = {
2644
- ...(await deserializeAws_json1_1InternalFailureExceptionResponse(parsedOutput, context)),
2645
- name: errorCode,
2646
- $metadata: deserializeMetadata(output),
2647
- };
2648
- break;
2649
- case "InvalidRequestException":
2650
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
2651
- response = {
2652
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
2653
- name: errorCode,
2654
- $metadata: deserializeMetadata(output),
2655
- };
2656
- break;
2657
- case "ThrottlingException":
2658
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
2659
- response = {
2660
- ...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
2661
- name: errorCode,
2662
- $metadata: deserializeMetadata(output),
2663
- };
2664
- break;
2665
- default:
2666
- const parsedBody = parsedOutput.body;
2667
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2668
- response = {
2669
- ...parsedBody,
2670
- name: `${errorCode}`,
2671
- message: parsedBody.message || parsedBody.Message || errorCode,
2672
- $fault: "client",
2673
- $metadata: deserializeMetadata(output),
2674
- } as any;
2675
- }
2676
- const message = response.message || response.Message || errorCode;
2677
- response.message = message;
2678
- delete response.Message;
2679
- return Promise.reject(Object.assign(new Error(message), response));
2680
- };
2681
-
2682
- export const deserializeAws_json1_1SearchSystemInstancesCommand = async (
2683
- output: __HttpResponse,
2684
- context: __SerdeContext
2685
- ): Promise<SearchSystemInstancesCommandOutput> => {
2686
- if (output.statusCode >= 300) {
2687
- return deserializeAws_json1_1SearchSystemInstancesCommandError(output, context);
2688
- }
2689
- const data: any = await parseBody(output.body, context);
2690
- let contents: any = {};
2691
- contents = deserializeAws_json1_1SearchSystemInstancesResponse(data, context);
2692
- const response: SearchSystemInstancesCommandOutput = {
2693
- $metadata: deserializeMetadata(output),
2694
- ...contents,
2695
- };
2696
- return Promise.resolve(response);
2697
- };
2698
-
2699
- const deserializeAws_json1_1SearchSystemInstancesCommandError = async (
2700
- output: __HttpResponse,
2701
- context: __SerdeContext
2702
- ): Promise<SearchSystemInstancesCommandOutput> => {
2703
- const parsedOutput: any = {
2704
- ...output,
2705
- body: await parseBody(output.body, context),
2706
- };
2707
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
2708
- let errorCode: string = "UnknownError";
2709
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2710
- switch (errorCode) {
2711
- case "InternalFailureException":
2712
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
2713
- response = {
2714
- ...(await deserializeAws_json1_1InternalFailureExceptionResponse(parsedOutput, context)),
2715
- name: errorCode,
2716
- $metadata: deserializeMetadata(output),
2717
- };
2718
- break;
2719
- case "InvalidRequestException":
2720
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
2721
- response = {
2722
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
2723
- name: errorCode,
2724
- $metadata: deserializeMetadata(output),
2725
- };
2726
- break;
2727
- case "ThrottlingException":
2728
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
2729
- response = {
2730
- ...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
2731
- name: errorCode,
2732
- $metadata: deserializeMetadata(output),
2733
- };
2734
- break;
2735
- default:
2736
- const parsedBody = parsedOutput.body;
2737
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2738
- response = {
2739
- ...parsedBody,
2740
- name: `${errorCode}`,
2741
- message: parsedBody.message || parsedBody.Message || errorCode,
2742
- $fault: "client",
2743
- $metadata: deserializeMetadata(output),
2744
- } as any;
2745
- }
2746
- const message = response.message || response.Message || errorCode;
2747
- response.message = message;
2748
- delete response.Message;
2749
- return Promise.reject(Object.assign(new Error(message), response));
2750
- };
2751
-
2752
- export const deserializeAws_json1_1SearchSystemTemplatesCommand = async (
2753
- output: __HttpResponse,
2754
- context: __SerdeContext
2755
- ): Promise<SearchSystemTemplatesCommandOutput> => {
2756
- if (output.statusCode >= 300) {
2757
- return deserializeAws_json1_1SearchSystemTemplatesCommandError(output, context);
2758
- }
2759
- const data: any = await parseBody(output.body, context);
2760
- let contents: any = {};
2761
- contents = deserializeAws_json1_1SearchSystemTemplatesResponse(data, context);
2762
- const response: SearchSystemTemplatesCommandOutput = {
2763
- $metadata: deserializeMetadata(output),
2764
- ...contents,
2765
- };
2766
- return Promise.resolve(response);
2767
- };
2768
-
2769
- const deserializeAws_json1_1SearchSystemTemplatesCommandError = async (
2770
- output: __HttpResponse,
2771
- context: __SerdeContext
2772
- ): Promise<SearchSystemTemplatesCommandOutput> => {
2773
- const parsedOutput: any = {
2774
- ...output,
2775
- body: await parseBody(output.body, context),
2776
- };
2777
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
2778
- let errorCode: string = "UnknownError";
2779
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2780
- switch (errorCode) {
2781
- case "InternalFailureException":
2782
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
2783
- response = {
2784
- ...(await deserializeAws_json1_1InternalFailureExceptionResponse(parsedOutput, context)),
2785
- name: errorCode,
2786
- $metadata: deserializeMetadata(output),
2787
- };
2788
- break;
2789
- case "InvalidRequestException":
2790
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
2791
- response = {
2792
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
2793
- name: errorCode,
2794
- $metadata: deserializeMetadata(output),
2795
- };
2796
- break;
2797
- case "ThrottlingException":
2798
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
2799
- response = {
2800
- ...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
2801
- name: errorCode,
2802
- $metadata: deserializeMetadata(output),
2803
- };
2804
- break;
2805
- default:
2806
- const parsedBody = parsedOutput.body;
2807
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2808
- response = {
2809
- ...parsedBody,
2810
- name: `${errorCode}`,
2811
- message: parsedBody.message || parsedBody.Message || errorCode,
2812
- $fault: "client",
2813
- $metadata: deserializeMetadata(output),
2814
- } as any;
2815
- }
2816
- const message = response.message || response.Message || errorCode;
2817
- response.message = message;
2818
- delete response.Message;
2819
- return Promise.reject(Object.assign(new Error(message), response));
2820
- };
2821
-
2822
- export const deserializeAws_json1_1SearchThingsCommand = async (
2823
- output: __HttpResponse,
2824
- context: __SerdeContext
2825
- ): Promise<SearchThingsCommandOutput> => {
2826
- if (output.statusCode >= 300) {
2827
- return deserializeAws_json1_1SearchThingsCommandError(output, context);
2828
- }
2829
- const data: any = await parseBody(output.body, context);
2830
- let contents: any = {};
2831
- contents = deserializeAws_json1_1SearchThingsResponse(data, context);
2832
- const response: SearchThingsCommandOutput = {
2833
- $metadata: deserializeMetadata(output),
2834
- ...contents,
2835
- };
2836
- return Promise.resolve(response);
2837
- };
2838
-
2839
- const deserializeAws_json1_1SearchThingsCommandError = async (
2840
- output: __HttpResponse,
2841
- context: __SerdeContext
2842
- ): Promise<SearchThingsCommandOutput> => {
2843
- const parsedOutput: any = {
2844
- ...output,
2845
- body: await parseBody(output.body, context),
2846
- };
2847
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
2848
- let errorCode: string = "UnknownError";
2849
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2850
- switch (errorCode) {
2851
- case "InternalFailureException":
2852
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
2853
- response = {
2854
- ...(await deserializeAws_json1_1InternalFailureExceptionResponse(parsedOutput, context)),
2855
- name: errorCode,
2856
- $metadata: deserializeMetadata(output),
2857
- };
2858
- break;
2859
- case "InvalidRequestException":
2860
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
2861
- response = {
2862
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
2863
- name: errorCode,
2864
- $metadata: deserializeMetadata(output),
2865
- };
2866
- break;
2867
- case "ResourceNotFoundException":
2868
- case "com.amazonaws.iotthingsgraph#ResourceNotFoundException":
2869
- response = {
2870
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
2871
- name: errorCode,
2872
- $metadata: deserializeMetadata(output),
2873
- };
2874
- break;
2875
- case "ThrottlingException":
2876
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
2877
- response = {
2878
- ...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
2879
- name: errorCode,
2880
- $metadata: deserializeMetadata(output),
2881
- };
2882
- break;
2883
- default:
2884
- const parsedBody = parsedOutput.body;
2885
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2886
- response = {
2887
- ...parsedBody,
2888
- name: `${errorCode}`,
2889
- message: parsedBody.message || parsedBody.Message || errorCode,
2890
- $fault: "client",
2891
- $metadata: deserializeMetadata(output),
2892
- } as any;
2893
- }
2894
- const message = response.message || response.Message || errorCode;
2895
- response.message = message;
2896
- delete response.Message;
2897
- return Promise.reject(Object.assign(new Error(message), response));
2898
- };
2899
-
2900
- export const deserializeAws_json1_1TagResourceCommand = async (
2901
- output: __HttpResponse,
2902
- context: __SerdeContext
2903
- ): Promise<TagResourceCommandOutput> => {
2904
- if (output.statusCode >= 300) {
2905
- return deserializeAws_json1_1TagResourceCommandError(output, context);
2906
- }
2907
- const data: any = await parseBody(output.body, context);
2908
- let contents: any = {};
2909
- contents = deserializeAws_json1_1TagResourceResponse(data, context);
2910
- const response: TagResourceCommandOutput = {
2911
- $metadata: deserializeMetadata(output),
2912
- ...contents,
2913
- };
2914
- return Promise.resolve(response);
2915
- };
2916
-
2917
- const deserializeAws_json1_1TagResourceCommandError = async (
2918
- output: __HttpResponse,
2919
- context: __SerdeContext
2920
- ): Promise<TagResourceCommandOutput> => {
2921
- const parsedOutput: any = {
2922
- ...output,
2923
- body: await parseBody(output.body, context),
2924
- };
2925
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
2926
- let errorCode: string = "UnknownError";
2927
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2928
- switch (errorCode) {
2929
- case "InternalFailureException":
2930
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
2931
- response = {
2932
- ...(await deserializeAws_json1_1InternalFailureExceptionResponse(parsedOutput, context)),
2933
- name: errorCode,
2934
- $metadata: deserializeMetadata(output),
2935
- };
2936
- break;
2937
- case "InvalidRequestException":
2938
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
2939
- response = {
2940
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
2941
- name: errorCode,
2942
- $metadata: deserializeMetadata(output),
2943
- };
2944
- break;
2945
- case "ResourceAlreadyExistsException":
2946
- case "com.amazonaws.iotthingsgraph#ResourceAlreadyExistsException":
2947
- response = {
2948
- ...(await deserializeAws_json1_1ResourceAlreadyExistsExceptionResponse(parsedOutput, context)),
2949
- name: errorCode,
2950
- $metadata: deserializeMetadata(output),
2951
- };
2952
- break;
2953
- case "ThrottlingException":
2954
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
2955
- response = {
2956
- ...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
2957
- name: errorCode,
2958
- $metadata: deserializeMetadata(output),
2959
- };
2960
- break;
2961
- default:
2962
- const parsedBody = parsedOutput.body;
2963
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2964
- response = {
2965
- ...parsedBody,
2966
- name: `${errorCode}`,
2967
- message: parsedBody.message || parsedBody.Message || errorCode,
2968
- $fault: "client",
2969
- $metadata: deserializeMetadata(output),
2970
- } as any;
2971
- }
2972
- const message = response.message || response.Message || errorCode;
2973
- response.message = message;
2974
- delete response.Message;
2975
- return Promise.reject(Object.assign(new Error(message), response));
2976
- };
2977
-
2978
- export const deserializeAws_json1_1UndeploySystemInstanceCommand = async (
2979
- output: __HttpResponse,
2980
- context: __SerdeContext
2981
- ): Promise<UndeploySystemInstanceCommandOutput> => {
2982
- if (output.statusCode >= 300) {
2983
- return deserializeAws_json1_1UndeploySystemInstanceCommandError(output, context);
2984
- }
2985
- const data: any = await parseBody(output.body, context);
2986
- let contents: any = {};
2987
- contents = deserializeAws_json1_1UndeploySystemInstanceResponse(data, context);
2988
- const response: UndeploySystemInstanceCommandOutput = {
2989
- $metadata: deserializeMetadata(output),
2990
- ...contents,
2991
- };
2992
- return Promise.resolve(response);
2993
- };
2994
-
2995
- const deserializeAws_json1_1UndeploySystemInstanceCommandError = async (
2996
- output: __HttpResponse,
2997
- context: __SerdeContext
2998
- ): Promise<UndeploySystemInstanceCommandOutput> => {
2999
- const parsedOutput: any = {
3000
- ...output,
3001
- body: await parseBody(output.body, context),
3002
- };
3003
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
3004
- let errorCode: string = "UnknownError";
3005
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3006
- switch (errorCode) {
3007
- case "InternalFailureException":
3008
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
3009
- response = {
3010
- ...(await deserializeAws_json1_1InternalFailureExceptionResponse(parsedOutput, context)),
3011
- name: errorCode,
3012
- $metadata: deserializeMetadata(output),
3013
- };
3014
- break;
3015
- case "InvalidRequestException":
3016
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
3017
- response = {
3018
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
3019
- name: errorCode,
3020
- $metadata: deserializeMetadata(output),
3021
- };
3022
- break;
3023
- case "ResourceInUseException":
3024
- case "com.amazonaws.iotthingsgraph#ResourceInUseException":
3025
- response = {
3026
- ...(await deserializeAws_json1_1ResourceInUseExceptionResponse(parsedOutput, context)),
3027
- name: errorCode,
3028
- $metadata: deserializeMetadata(output),
3029
- };
3030
- break;
3031
- case "ResourceNotFoundException":
3032
- case "com.amazonaws.iotthingsgraph#ResourceNotFoundException":
3033
- response = {
3034
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
3035
- name: errorCode,
3036
- $metadata: deserializeMetadata(output),
3037
- };
3038
- break;
3039
- case "ThrottlingException":
3040
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
3041
- response = {
3042
- ...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
3043
- name: errorCode,
3044
- $metadata: deserializeMetadata(output),
3045
- };
3046
- break;
3047
- default:
3048
- const parsedBody = parsedOutput.body;
3049
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
3050
- response = {
3051
- ...parsedBody,
3052
- name: `${errorCode}`,
3053
- message: parsedBody.message || parsedBody.Message || errorCode,
3054
- $fault: "client",
3055
- $metadata: deserializeMetadata(output),
3056
- } as any;
3057
- }
3058
- const message = response.message || response.Message || errorCode;
3059
- response.message = message;
3060
- delete response.Message;
3061
- return Promise.reject(Object.assign(new Error(message), response));
3062
- };
3063
-
3064
- export const deserializeAws_json1_1UntagResourceCommand = async (
3065
- output: __HttpResponse,
3066
- context: __SerdeContext
3067
- ): Promise<UntagResourceCommandOutput> => {
3068
- if (output.statusCode >= 300) {
3069
- return deserializeAws_json1_1UntagResourceCommandError(output, context);
3070
- }
3071
- const data: any = await parseBody(output.body, context);
3072
- let contents: any = {};
3073
- contents = deserializeAws_json1_1UntagResourceResponse(data, context);
3074
- const response: UntagResourceCommandOutput = {
3075
- $metadata: deserializeMetadata(output),
3076
- ...contents,
3077
- };
3078
- return Promise.resolve(response);
3079
- };
3080
-
3081
- const deserializeAws_json1_1UntagResourceCommandError = async (
3082
- output: __HttpResponse,
3083
- context: __SerdeContext
3084
- ): Promise<UntagResourceCommandOutput> => {
3085
- const parsedOutput: any = {
3086
- ...output,
3087
- body: await parseBody(output.body, context),
3088
- };
3089
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
3090
- let errorCode: string = "UnknownError";
3091
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3092
- switch (errorCode) {
3093
- case "InternalFailureException":
3094
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
3095
- response = {
3096
- ...(await deserializeAws_json1_1InternalFailureExceptionResponse(parsedOutput, context)),
3097
- name: errorCode,
3098
- $metadata: deserializeMetadata(output),
3099
- };
3100
- break;
3101
- case "InvalidRequestException":
3102
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
3103
- response = {
3104
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
3105
- name: errorCode,
3106
- $metadata: deserializeMetadata(output),
3107
- };
3108
- break;
3109
- case "ResourceAlreadyExistsException":
3110
- case "com.amazonaws.iotthingsgraph#ResourceAlreadyExistsException":
3111
- response = {
3112
- ...(await deserializeAws_json1_1ResourceAlreadyExistsExceptionResponse(parsedOutput, context)),
3113
- name: errorCode,
3114
- $metadata: deserializeMetadata(output),
3115
- };
3116
- break;
3117
- case "ThrottlingException":
3118
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
3119
- response = {
3120
- ...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
3121
- name: errorCode,
3122
- $metadata: deserializeMetadata(output),
3123
- };
3124
- break;
3125
- default:
3126
- const parsedBody = parsedOutput.body;
3127
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
3128
- response = {
3129
- ...parsedBody,
3130
- name: `${errorCode}`,
3131
- message: parsedBody.message || parsedBody.Message || errorCode,
3132
- $fault: "client",
3133
- $metadata: deserializeMetadata(output),
3134
- } as any;
3135
- }
3136
- const message = response.message || response.Message || errorCode;
3137
- response.message = message;
3138
- delete response.Message;
3139
- return Promise.reject(Object.assign(new Error(message), response));
3140
- };
3141
-
3142
- export const deserializeAws_json1_1UpdateFlowTemplateCommand = async (
3143
- output: __HttpResponse,
3144
- context: __SerdeContext
3145
- ): Promise<UpdateFlowTemplateCommandOutput> => {
3146
- if (output.statusCode >= 300) {
3147
- return deserializeAws_json1_1UpdateFlowTemplateCommandError(output, context);
3148
- }
3149
- const data: any = await parseBody(output.body, context);
3150
- let contents: any = {};
3151
- contents = deserializeAws_json1_1UpdateFlowTemplateResponse(data, context);
3152
- const response: UpdateFlowTemplateCommandOutput = {
3153
- $metadata: deserializeMetadata(output),
3154
- ...contents,
3155
- };
3156
- return Promise.resolve(response);
3157
- };
3158
-
3159
- const deserializeAws_json1_1UpdateFlowTemplateCommandError = async (
3160
- output: __HttpResponse,
3161
- context: __SerdeContext
3162
- ): Promise<UpdateFlowTemplateCommandOutput> => {
3163
- const parsedOutput: any = {
3164
- ...output,
3165
- body: await parseBody(output.body, context),
3166
- };
3167
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
3168
- let errorCode: string = "UnknownError";
3169
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3170
- switch (errorCode) {
3171
- case "InternalFailureException":
3172
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
3173
- response = {
3174
- ...(await deserializeAws_json1_1InternalFailureExceptionResponse(parsedOutput, context)),
3175
- name: errorCode,
3176
- $metadata: deserializeMetadata(output),
3177
- };
3178
- break;
3179
- case "InvalidRequestException":
3180
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
3181
- response = {
3182
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
3183
- name: errorCode,
3184
- $metadata: deserializeMetadata(output),
3185
- };
3186
- break;
3187
- case "ResourceNotFoundException":
3188
- case "com.amazonaws.iotthingsgraph#ResourceNotFoundException":
3189
- response = {
3190
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
3191
- name: errorCode,
3192
- $metadata: deserializeMetadata(output),
3193
- };
3194
- break;
3195
- case "ThrottlingException":
3196
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
3197
- response = {
3198
- ...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
3199
- name: errorCode,
3200
- $metadata: deserializeMetadata(output),
3201
- };
3202
- break;
3203
- default:
3204
- const parsedBody = parsedOutput.body;
3205
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
3206
- response = {
3207
- ...parsedBody,
3208
- name: `${errorCode}`,
3209
- message: parsedBody.message || parsedBody.Message || errorCode,
3210
- $fault: "client",
3211
- $metadata: deserializeMetadata(output),
3212
- } as any;
3213
- }
3214
- const message = response.message || response.Message || errorCode;
3215
- response.message = message;
3216
- delete response.Message;
3217
- return Promise.reject(Object.assign(new Error(message), response));
3218
- };
3219
-
3220
- export const deserializeAws_json1_1UpdateSystemTemplateCommand = async (
3221
- output: __HttpResponse,
3222
- context: __SerdeContext
3223
- ): Promise<UpdateSystemTemplateCommandOutput> => {
3224
- if (output.statusCode >= 300) {
3225
- return deserializeAws_json1_1UpdateSystemTemplateCommandError(output, context);
3226
- }
3227
- const data: any = await parseBody(output.body, context);
3228
- let contents: any = {};
3229
- contents = deserializeAws_json1_1UpdateSystemTemplateResponse(data, context);
3230
- const response: UpdateSystemTemplateCommandOutput = {
3231
- $metadata: deserializeMetadata(output),
3232
- ...contents,
3233
- };
3234
- return Promise.resolve(response);
3235
- };
3236
-
3237
- const deserializeAws_json1_1UpdateSystemTemplateCommandError = async (
3238
- output: __HttpResponse,
3239
- context: __SerdeContext
3240
- ): Promise<UpdateSystemTemplateCommandOutput> => {
3241
- const parsedOutput: any = {
3242
- ...output,
3243
- body: await parseBody(output.body, context),
3244
- };
3245
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
3246
- let errorCode: string = "UnknownError";
3247
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3248
- switch (errorCode) {
3249
- case "InternalFailureException":
3250
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
3251
- response = {
3252
- ...(await deserializeAws_json1_1InternalFailureExceptionResponse(parsedOutput, context)),
3253
- name: errorCode,
3254
- $metadata: deserializeMetadata(output),
3255
- };
3256
- break;
3257
- case "InvalidRequestException":
3258
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
3259
- response = {
3260
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
3261
- name: errorCode,
3262
- $metadata: deserializeMetadata(output),
3263
- };
3264
- break;
3265
- case "ResourceNotFoundException":
3266
- case "com.amazonaws.iotthingsgraph#ResourceNotFoundException":
3267
- response = {
3268
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
3269
- name: errorCode,
3270
- $metadata: deserializeMetadata(output),
3271
- };
3272
- break;
3273
- case "ThrottlingException":
3274
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
3275
- response = {
3276
- ...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
3277
- name: errorCode,
3278
- $metadata: deserializeMetadata(output),
3279
- };
3280
- break;
3281
- default:
3282
- const parsedBody = parsedOutput.body;
3283
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
3284
- response = {
3285
- ...parsedBody,
3286
- name: `${errorCode}`,
3287
- message: parsedBody.message || parsedBody.Message || errorCode,
3288
- $fault: "client",
3289
- $metadata: deserializeMetadata(output),
3290
- } as any;
3291
- }
3292
- const message = response.message || response.Message || errorCode;
3293
- response.message = message;
3294
- delete response.Message;
3295
- return Promise.reject(Object.assign(new Error(message), response));
3296
- };
3297
-
3298
- export const deserializeAws_json1_1UploadEntityDefinitionsCommand = async (
3299
- output: __HttpResponse,
3300
- context: __SerdeContext
3301
- ): Promise<UploadEntityDefinitionsCommandOutput> => {
3302
- if (output.statusCode >= 300) {
3303
- return deserializeAws_json1_1UploadEntityDefinitionsCommandError(output, context);
3304
- }
3305
- const data: any = await parseBody(output.body, context);
3306
- let contents: any = {};
3307
- contents = deserializeAws_json1_1UploadEntityDefinitionsResponse(data, context);
3308
- const response: UploadEntityDefinitionsCommandOutput = {
3309
- $metadata: deserializeMetadata(output),
3310
- ...contents,
3311
- };
3312
- return Promise.resolve(response);
3313
- };
3314
-
3315
- const deserializeAws_json1_1UploadEntityDefinitionsCommandError = async (
3316
- output: __HttpResponse,
3317
- context: __SerdeContext
3318
- ): Promise<UploadEntityDefinitionsCommandOutput> => {
3319
- const parsedOutput: any = {
3320
- ...output,
3321
- body: await parseBody(output.body, context),
3322
- };
3323
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
3324
- let errorCode: string = "UnknownError";
3325
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3326
- switch (errorCode) {
3327
- case "InternalFailureException":
3328
- case "com.amazonaws.iotthingsgraph#InternalFailureException":
3329
- response = {
3330
- ...(await deserializeAws_json1_1InternalFailureExceptionResponse(parsedOutput, context)),
3331
- name: errorCode,
3332
- $metadata: deserializeMetadata(output),
3333
- };
3334
- break;
3335
- case "InvalidRequestException":
3336
- case "com.amazonaws.iotthingsgraph#InvalidRequestException":
3337
- response = {
3338
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
3339
- name: errorCode,
3340
- $metadata: deserializeMetadata(output),
3341
- };
3342
- break;
3343
- case "ThrottlingException":
3344
- case "com.amazonaws.iotthingsgraph#ThrottlingException":
3345
- response = {
3346
- ...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
3347
- name: errorCode,
3348
- $metadata: deserializeMetadata(output),
3349
- };
3350
- break;
3351
- default:
3352
- const parsedBody = parsedOutput.body;
3353
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
3354
- response = {
3355
- ...parsedBody,
3356
- name: `${errorCode}`,
3357
- message: parsedBody.message || parsedBody.Message || errorCode,
3358
- $fault: "client",
3359
- $metadata: deserializeMetadata(output),
3360
- } as any;
3361
- }
3362
- const message = response.message || response.Message || errorCode;
3363
- response.message = message;
3364
- delete response.Message;
3365
- return Promise.reject(Object.assign(new Error(message), response));
3366
- };
3367
-
3368
- const deserializeAws_json1_1InternalFailureExceptionResponse = async (
3369
- parsedOutput: any,
3370
- context: __SerdeContext
3371
- ): Promise<InternalFailureException> => {
3372
- const body = parsedOutput.body;
3373
- const deserialized: any = deserializeAws_json1_1InternalFailureException(body, context);
3374
- const contents: InternalFailureException = {
3375
- name: "InternalFailureException",
3376
- $fault: "server",
3377
- $metadata: deserializeMetadata(parsedOutput),
3378
- ...deserialized,
3379
- };
3380
- return contents;
3381
- };
3382
-
3383
- const deserializeAws_json1_1InvalidRequestExceptionResponse = async (
3384
- parsedOutput: any,
3385
- context: __SerdeContext
3386
- ): Promise<InvalidRequestException> => {
3387
- const body = parsedOutput.body;
3388
- const deserialized: any = deserializeAws_json1_1InvalidRequestException(body, context);
3389
- const contents: InvalidRequestException = {
3390
- name: "InvalidRequestException",
3391
- $fault: "client",
3392
- $metadata: deserializeMetadata(parsedOutput),
3393
- ...deserialized,
3394
- };
3395
- return contents;
3396
- };
3397
-
3398
- const deserializeAws_json1_1LimitExceededExceptionResponse = async (
3399
- parsedOutput: any,
3400
- context: __SerdeContext
3401
- ): Promise<LimitExceededException> => {
3402
- const body = parsedOutput.body;
3403
- const deserialized: any = deserializeAws_json1_1LimitExceededException(body, context);
3404
- const contents: LimitExceededException = {
3405
- name: "LimitExceededException",
3406
- $fault: "client",
3407
- $metadata: deserializeMetadata(parsedOutput),
3408
- ...deserialized,
3409
- };
3410
- return contents;
3411
- };
3412
-
3413
- const deserializeAws_json1_1ResourceAlreadyExistsExceptionResponse = async (
3414
- parsedOutput: any,
3415
- context: __SerdeContext
3416
- ): Promise<ResourceAlreadyExistsException> => {
3417
- const body = parsedOutput.body;
3418
- const deserialized: any = deserializeAws_json1_1ResourceAlreadyExistsException(body, context);
3419
- const contents: ResourceAlreadyExistsException = {
3420
- name: "ResourceAlreadyExistsException",
3421
- $fault: "client",
3422
- $metadata: deserializeMetadata(parsedOutput),
3423
- ...deserialized,
3424
- };
3425
- return contents;
3426
- };
3427
-
3428
- const deserializeAws_json1_1ResourceInUseExceptionResponse = async (
3429
- parsedOutput: any,
3430
- context: __SerdeContext
3431
- ): Promise<ResourceInUseException> => {
3432
- const body = parsedOutput.body;
3433
- const deserialized: any = deserializeAws_json1_1ResourceInUseException(body, context);
3434
- const contents: ResourceInUseException = {
3435
- name: "ResourceInUseException",
3436
- $fault: "client",
3437
- $metadata: deserializeMetadata(parsedOutput),
3438
- ...deserialized,
3439
- };
3440
- return contents;
3441
- };
3442
-
3443
- const deserializeAws_json1_1ResourceNotFoundExceptionResponse = async (
3444
- parsedOutput: any,
3445
- context: __SerdeContext
3446
- ): Promise<ResourceNotFoundException> => {
3447
- const body = parsedOutput.body;
3448
- const deserialized: any = deserializeAws_json1_1ResourceNotFoundException(body, context);
3449
- const contents: ResourceNotFoundException = {
3450
- name: "ResourceNotFoundException",
3451
- $fault: "client",
3452
- $metadata: deserializeMetadata(parsedOutput),
3453
- ...deserialized,
3454
- };
3455
- return contents;
3456
- };
3457
-
3458
- const deserializeAws_json1_1ThrottlingExceptionResponse = async (
3459
- parsedOutput: any,
3460
- context: __SerdeContext
3461
- ): Promise<ThrottlingException> => {
3462
- const body = parsedOutput.body;
3463
- const deserialized: any = deserializeAws_json1_1ThrottlingException(body, context);
3464
- const contents: ThrottlingException = {
3465
- name: "ThrottlingException",
3466
- $fault: "client",
3467
- $metadata: deserializeMetadata(parsedOutput),
3468
- ...deserialized,
3469
- };
3470
- return contents;
3471
- };
3472
-
3473
- const serializeAws_json1_1AssociateEntityToThingRequest = (
3474
- input: AssociateEntityToThingRequest,
3475
- context: __SerdeContext
3476
- ): any => {
3477
- return {
3478
- ...(input.entityId !== undefined && input.entityId !== null && { entityId: input.entityId }),
3479
- ...(input.namespaceVersion !== undefined &&
3480
- input.namespaceVersion !== null && { namespaceVersion: input.namespaceVersion }),
3481
- ...(input.thingName !== undefined && input.thingName !== null && { thingName: input.thingName }),
3482
- };
3483
- };
3484
-
3485
- const serializeAws_json1_1CreateFlowTemplateRequest = (
3486
- input: CreateFlowTemplateRequest,
3487
- context: __SerdeContext
3488
- ): any => {
3489
- return {
3490
- ...(input.compatibleNamespaceVersion !== undefined &&
3491
- input.compatibleNamespaceVersion !== null && { compatibleNamespaceVersion: input.compatibleNamespaceVersion }),
3492
- ...(input.definition !== undefined &&
3493
- input.definition !== null && { definition: serializeAws_json1_1DefinitionDocument(input.definition, context) }),
3494
- };
3495
- };
3496
-
3497
- const serializeAws_json1_1CreateSystemInstanceRequest = (
3498
- input: CreateSystemInstanceRequest,
3499
- context: __SerdeContext
3500
- ): any => {
3501
- return {
3502
- ...(input.definition !== undefined &&
3503
- input.definition !== null && { definition: serializeAws_json1_1DefinitionDocument(input.definition, context) }),
3504
- ...(input.flowActionsRoleArn !== undefined &&
3505
- input.flowActionsRoleArn !== null && { flowActionsRoleArn: input.flowActionsRoleArn }),
3506
- ...(input.greengrassGroupName !== undefined &&
3507
- input.greengrassGroupName !== null && { greengrassGroupName: input.greengrassGroupName }),
3508
- ...(input.metricsConfiguration !== undefined &&
3509
- input.metricsConfiguration !== null && {
3510
- metricsConfiguration: serializeAws_json1_1MetricsConfiguration(input.metricsConfiguration, context),
3511
- }),
3512
- ...(input.s3BucketName !== undefined && input.s3BucketName !== null && { s3BucketName: input.s3BucketName }),
3513
- ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_json1_1TagList(input.tags, context) }),
3514
- ...(input.target !== undefined && input.target !== null && { target: input.target }),
3515
- };
3516
- };
3517
-
3518
- const serializeAws_json1_1CreateSystemTemplateRequest = (
3519
- input: CreateSystemTemplateRequest,
3520
- context: __SerdeContext
3521
- ): any => {
3522
- return {
3523
- ...(input.compatibleNamespaceVersion !== undefined &&
3524
- input.compatibleNamespaceVersion !== null && { compatibleNamespaceVersion: input.compatibleNamespaceVersion }),
3525
- ...(input.definition !== undefined &&
3526
- input.definition !== null && { definition: serializeAws_json1_1DefinitionDocument(input.definition, context) }),
3527
- };
3528
- };
3529
-
3530
- const serializeAws_json1_1DefinitionDocument = (input: DefinitionDocument, context: __SerdeContext): any => {
3531
- return {
3532
- ...(input.language !== undefined && input.language !== null && { language: input.language }),
3533
- ...(input.text !== undefined && input.text !== null && { text: input.text }),
3534
- };
3535
- };
3536
-
3537
- const serializeAws_json1_1DeleteFlowTemplateRequest = (
3538
- input: DeleteFlowTemplateRequest,
3539
- context: __SerdeContext
3540
- ): any => {
3541
- return {
3542
- ...(input.id !== undefined && input.id !== null && { id: input.id }),
3543
- };
3544
- };
3545
-
3546
- const serializeAws_json1_1DeleteNamespaceRequest = (input: DeleteNamespaceRequest, context: __SerdeContext): any => {
3547
- return {};
3548
- };
3549
-
3550
- const serializeAws_json1_1DeleteSystemInstanceRequest = (
3551
- input: DeleteSystemInstanceRequest,
3552
- context: __SerdeContext
3553
- ): any => {
3554
- return {
3555
- ...(input.id !== undefined && input.id !== null && { id: input.id }),
3556
- };
3557
- };
3558
-
3559
- const serializeAws_json1_1DeleteSystemTemplateRequest = (
3560
- input: DeleteSystemTemplateRequest,
3561
- context: __SerdeContext
3562
- ): any => {
3563
- return {
3564
- ...(input.id !== undefined && input.id !== null && { id: input.id }),
3565
- };
3566
- };
3567
-
3568
- const serializeAws_json1_1DeploySystemInstanceRequest = (
3569
- input: DeploySystemInstanceRequest,
3570
- context: __SerdeContext
3571
- ): any => {
3572
- return {
3573
- ...(input.id !== undefined && input.id !== null && { id: input.id }),
3574
- };
3575
- };
3576
-
3577
- const serializeAws_json1_1DeprecateFlowTemplateRequest = (
3578
- input: DeprecateFlowTemplateRequest,
3579
- context: __SerdeContext
3580
- ): any => {
3581
- return {
3582
- ...(input.id !== undefined && input.id !== null && { id: input.id }),
3583
- };
3584
- };
3585
-
3586
- const serializeAws_json1_1DeprecateSystemTemplateRequest = (
3587
- input: DeprecateSystemTemplateRequest,
3588
- context: __SerdeContext
3589
- ): any => {
3590
- return {
3591
- ...(input.id !== undefined && input.id !== null && { id: input.id }),
3592
- };
3593
- };
3594
-
3595
- const serializeAws_json1_1DescribeNamespaceRequest = (
3596
- input: DescribeNamespaceRequest,
3597
- context: __SerdeContext
3598
- ): any => {
3599
- return {
3600
- ...(input.namespaceName !== undefined && input.namespaceName !== null && { namespaceName: input.namespaceName }),
3601
- };
3602
- };
3603
-
3604
- const serializeAws_json1_1DissociateEntityFromThingRequest = (
3605
- input: DissociateEntityFromThingRequest,
3606
- context: __SerdeContext
3607
- ): any => {
3608
- return {
3609
- ...(input.entityType !== undefined && input.entityType !== null && { entityType: input.entityType }),
3610
- ...(input.thingName !== undefined && input.thingName !== null && { thingName: input.thingName }),
3611
- };
3612
- };
3613
-
3614
- const serializeAws_json1_1EntityFilter = (input: EntityFilter, context: __SerdeContext): any => {
3615
- return {
3616
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
3617
- ...(input.value !== undefined &&
3618
- input.value !== null && { value: serializeAws_json1_1EntityFilterValues(input.value, context) }),
3619
- };
3620
- };
3621
-
3622
- const serializeAws_json1_1EntityFilters = (input: EntityFilter[], context: __SerdeContext): any => {
3623
- return input
3624
- .filter((e: any) => e != null)
3625
- .map((entry) => {
3626
- if (entry === null) {
3627
- return null as any;
3628
- }
3629
- return serializeAws_json1_1EntityFilter(entry, context);
3630
- });
3631
- };
3632
-
3633
- const serializeAws_json1_1EntityFilterValues = (input: string[], context: __SerdeContext): any => {
3634
- return input
3635
- .filter((e: any) => e != null)
3636
- .map((entry) => {
3637
- if (entry === null) {
3638
- return null as any;
3639
- }
3640
- return entry;
3641
- });
3642
- };
3643
-
3644
- const serializeAws_json1_1EntityTypes = (input: (EntityType | string)[], context: __SerdeContext): any => {
3645
- return input
3646
- .filter((e: any) => e != null)
3647
- .map((entry) => {
3648
- if (entry === null) {
3649
- return null as any;
3650
- }
3651
- return entry;
3652
- });
3653
- };
3654
-
3655
- const serializeAws_json1_1FlowTemplateFilter = (input: FlowTemplateFilter, context: __SerdeContext): any => {
3656
- return {
3657
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
3658
- ...(input.value !== undefined &&
3659
- input.value !== null && { value: serializeAws_json1_1FlowTemplateFilterValues(input.value, context) }),
3660
- };
3661
- };
3662
-
3663
- const serializeAws_json1_1FlowTemplateFilters = (input: FlowTemplateFilter[], context: __SerdeContext): any => {
3664
- return input
3665
- .filter((e: any) => e != null)
3666
- .map((entry) => {
3667
- if (entry === null) {
3668
- return null as any;
3669
- }
3670
- return serializeAws_json1_1FlowTemplateFilter(entry, context);
3671
- });
3672
- };
3673
-
3674
- const serializeAws_json1_1FlowTemplateFilterValues = (input: string[], context: __SerdeContext): any => {
3675
- return input
3676
- .filter((e: any) => e != null)
3677
- .map((entry) => {
3678
- if (entry === null) {
3679
- return null as any;
3680
- }
3681
- return entry;
3682
- });
3683
- };
3684
-
3685
- const serializeAws_json1_1GetEntitiesRequest = (input: GetEntitiesRequest, context: __SerdeContext): any => {
3686
- return {
3687
- ...(input.ids !== undefined && input.ids !== null && { ids: serializeAws_json1_1Urns(input.ids, context) }),
3688
- ...(input.namespaceVersion !== undefined &&
3689
- input.namespaceVersion !== null && { namespaceVersion: input.namespaceVersion }),
3690
- };
3691
- };
3692
-
3693
- const serializeAws_json1_1GetFlowTemplateRequest = (input: GetFlowTemplateRequest, context: __SerdeContext): any => {
3694
- return {
3695
- ...(input.id !== undefined && input.id !== null && { id: input.id }),
3696
- ...(input.revisionNumber !== undefined &&
3697
- input.revisionNumber !== null && { revisionNumber: input.revisionNumber }),
3698
- };
3699
- };
3700
-
3701
- const serializeAws_json1_1GetFlowTemplateRevisionsRequest = (
3702
- input: GetFlowTemplateRevisionsRequest,
3703
- context: __SerdeContext
3704
- ): any => {
3705
- return {
3706
- ...(input.id !== undefined && input.id !== null && { id: input.id }),
3707
- ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
3708
- ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
3709
- };
3710
- };
3711
-
3712
- const serializeAws_json1_1GetNamespaceDeletionStatusRequest = (
3713
- input: GetNamespaceDeletionStatusRequest,
3714
- context: __SerdeContext
3715
- ): any => {
3716
- return {};
3717
- };
3718
-
3719
- const serializeAws_json1_1GetSystemInstanceRequest = (
3720
- input: GetSystemInstanceRequest,
3721
- context: __SerdeContext
3722
- ): any => {
3723
- return {
3724
- ...(input.id !== undefined && input.id !== null && { id: input.id }),
3725
- };
3726
- };
3727
-
3728
- const serializeAws_json1_1GetSystemTemplateRequest = (
3729
- input: GetSystemTemplateRequest,
3730
- context: __SerdeContext
3731
- ): any => {
3732
- return {
3733
- ...(input.id !== undefined && input.id !== null && { id: input.id }),
3734
- ...(input.revisionNumber !== undefined &&
3735
- input.revisionNumber !== null && { revisionNumber: input.revisionNumber }),
3736
- };
3737
- };
3738
-
3739
- const serializeAws_json1_1GetSystemTemplateRevisionsRequest = (
3740
- input: GetSystemTemplateRevisionsRequest,
3741
- context: __SerdeContext
3742
- ): any => {
3743
- return {
3744
- ...(input.id !== undefined && input.id !== null && { id: input.id }),
3745
- ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
3746
- ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
3747
- };
3748
- };
3749
-
3750
- const serializeAws_json1_1GetUploadStatusRequest = (input: GetUploadStatusRequest, context: __SerdeContext): any => {
3751
- return {
3752
- ...(input.uploadId !== undefined && input.uploadId !== null && { uploadId: input.uploadId }),
3753
- };
3754
- };
3755
-
3756
- const serializeAws_json1_1ListFlowExecutionMessagesRequest = (
3757
- input: ListFlowExecutionMessagesRequest,
3758
- context: __SerdeContext
3759
- ): any => {
3760
- return {
3761
- ...(input.flowExecutionId !== undefined &&
3762
- input.flowExecutionId !== null && { flowExecutionId: input.flowExecutionId }),
3763
- ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
3764
- ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
3765
- };
3766
- };
3767
-
3768
- const serializeAws_json1_1ListTagsForResourceRequest = (
3769
- input: ListTagsForResourceRequest,
3770
- context: __SerdeContext
3771
- ): any => {
3772
- return {
3773
- ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
3774
- ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
3775
- ...(input.resourceArn !== undefined && input.resourceArn !== null && { resourceArn: input.resourceArn }),
3776
- };
3777
- };
3778
-
3779
- const serializeAws_json1_1MetricsConfiguration = (input: MetricsConfiguration, context: __SerdeContext): any => {
3780
- return {
3781
- ...(input.cloudMetricEnabled !== undefined &&
3782
- input.cloudMetricEnabled !== null && { cloudMetricEnabled: input.cloudMetricEnabled }),
3783
- ...(input.metricRuleRoleArn !== undefined &&
3784
- input.metricRuleRoleArn !== null && { metricRuleRoleArn: input.metricRuleRoleArn }),
3785
- };
3786
- };
3787
-
3788
- const serializeAws_json1_1SearchEntitiesRequest = (input: SearchEntitiesRequest, context: __SerdeContext): any => {
3789
- return {
3790
- ...(input.entityTypes !== undefined &&
3791
- input.entityTypes !== null && { entityTypes: serializeAws_json1_1EntityTypes(input.entityTypes, context) }),
3792
- ...(input.filters !== undefined &&
3793
- input.filters !== null && { filters: serializeAws_json1_1EntityFilters(input.filters, context) }),
3794
- ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
3795
- ...(input.namespaceVersion !== undefined &&
3796
- input.namespaceVersion !== null && { namespaceVersion: input.namespaceVersion }),
3797
- ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
3798
- };
3799
- };
3800
-
3801
- const serializeAws_json1_1SearchFlowExecutionsRequest = (
3802
- input: SearchFlowExecutionsRequest,
3803
- context: __SerdeContext
3804
- ): any => {
3805
- return {
3806
- ...(input.endTime !== undefined &&
3807
- input.endTime !== null && { endTime: Math.round(input.endTime.getTime() / 1000) }),
3808
- ...(input.flowExecutionId !== undefined &&
3809
- input.flowExecutionId !== null && { flowExecutionId: input.flowExecutionId }),
3810
- ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
3811
- ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
3812
- ...(input.startTime !== undefined &&
3813
- input.startTime !== null && { startTime: Math.round(input.startTime.getTime() / 1000) }),
3814
- ...(input.systemInstanceId !== undefined &&
3815
- input.systemInstanceId !== null && { systemInstanceId: input.systemInstanceId }),
3816
- };
3817
- };
3818
-
3819
- const serializeAws_json1_1SearchFlowTemplatesRequest = (
3820
- input: SearchFlowTemplatesRequest,
3821
- context: __SerdeContext
3822
- ): any => {
3823
- return {
3824
- ...(input.filters !== undefined &&
3825
- input.filters !== null && { filters: serializeAws_json1_1FlowTemplateFilters(input.filters, context) }),
3826
- ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
3827
- ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
3828
- };
3829
- };
3830
-
3831
- const serializeAws_json1_1SearchSystemInstancesRequest = (
3832
- input: SearchSystemInstancesRequest,
3833
- context: __SerdeContext
3834
- ): any => {
3835
- return {
3836
- ...(input.filters !== undefined &&
3837
- input.filters !== null && { filters: serializeAws_json1_1SystemInstanceFilters(input.filters, context) }),
3838
- ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
3839
- ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
3840
- };
3841
- };
3842
-
3843
- const serializeAws_json1_1SearchSystemTemplatesRequest = (
3844
- input: SearchSystemTemplatesRequest,
3845
- context: __SerdeContext
3846
- ): any => {
3847
- return {
3848
- ...(input.filters !== undefined &&
3849
- input.filters !== null && { filters: serializeAws_json1_1SystemTemplateFilters(input.filters, context) }),
3850
- ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
3851
- ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
3852
- };
3853
- };
3854
-
3855
- const serializeAws_json1_1SearchThingsRequest = (input: SearchThingsRequest, context: __SerdeContext): any => {
3856
- return {
3857
- ...(input.entityId !== undefined && input.entityId !== null && { entityId: input.entityId }),
3858
- ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
3859
- ...(input.namespaceVersion !== undefined &&
3860
- input.namespaceVersion !== null && { namespaceVersion: input.namespaceVersion }),
3861
- ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
3862
- };
3863
- };
3864
-
3865
- const serializeAws_json1_1SystemInstanceFilter = (input: SystemInstanceFilter, context: __SerdeContext): any => {
3866
- return {
3867
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
3868
- ...(input.value !== undefined &&
3869
- input.value !== null && { value: serializeAws_json1_1SystemInstanceFilterValues(input.value, context) }),
3870
- };
3871
- };
3872
-
3873
- const serializeAws_json1_1SystemInstanceFilters = (input: SystemInstanceFilter[], context: __SerdeContext): any => {
3874
- return input
3875
- .filter((e: any) => e != null)
3876
- .map((entry) => {
3877
- if (entry === null) {
3878
- return null as any;
3879
- }
3880
- return serializeAws_json1_1SystemInstanceFilter(entry, context);
3881
- });
3882
- };
3883
-
3884
- const serializeAws_json1_1SystemInstanceFilterValues = (input: string[], context: __SerdeContext): any => {
3885
- return input
3886
- .filter((e: any) => e != null)
3887
- .map((entry) => {
3888
- if (entry === null) {
3889
- return null as any;
3890
- }
3891
- return entry;
3892
- });
3893
- };
3894
-
3895
- const serializeAws_json1_1SystemTemplateFilter = (input: SystemTemplateFilter, context: __SerdeContext): any => {
3896
- return {
3897
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
3898
- ...(input.value !== undefined &&
3899
- input.value !== null && { value: serializeAws_json1_1SystemTemplateFilterValues(input.value, context) }),
3900
- };
3901
- };
3902
-
3903
- const serializeAws_json1_1SystemTemplateFilters = (input: SystemTemplateFilter[], context: __SerdeContext): any => {
3904
- return input
3905
- .filter((e: any) => e != null)
3906
- .map((entry) => {
3907
- if (entry === null) {
3908
- return null as any;
3909
- }
3910
- return serializeAws_json1_1SystemTemplateFilter(entry, context);
3911
- });
3912
- };
3913
-
3914
- const serializeAws_json1_1SystemTemplateFilterValues = (input: string[], context: __SerdeContext): any => {
3915
- return input
3916
- .filter((e: any) => e != null)
3917
- .map((entry) => {
3918
- if (entry === null) {
3919
- return null as any;
3920
- }
3921
- return entry;
3922
- });
3923
- };
3924
-
3925
- const serializeAws_json1_1Tag = (input: Tag, context: __SerdeContext): any => {
3926
- return {
3927
- ...(input.key !== undefined && input.key !== null && { key: input.key }),
3928
- ...(input.value !== undefined && input.value !== null && { value: input.value }),
3929
- };
3930
- };
3931
-
3932
- const serializeAws_json1_1TagKeyList = (input: string[], context: __SerdeContext): any => {
3933
- return input
3934
- .filter((e: any) => e != null)
3935
- .map((entry) => {
3936
- if (entry === null) {
3937
- return null as any;
3938
- }
3939
- return entry;
3940
- });
3941
- };
3942
-
3943
- const serializeAws_json1_1TagList = (input: Tag[], context: __SerdeContext): any => {
3944
- return input
3945
- .filter((e: any) => e != null)
3946
- .map((entry) => {
3947
- if (entry === null) {
3948
- return null as any;
3949
- }
3950
- return serializeAws_json1_1Tag(entry, context);
3951
- });
3952
- };
3953
-
3954
- const serializeAws_json1_1TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => {
3955
- return {
3956
- ...(input.resourceArn !== undefined && input.resourceArn !== null && { resourceArn: input.resourceArn }),
3957
- ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_json1_1TagList(input.tags, context) }),
3958
- };
3959
- };
3960
-
3961
- const serializeAws_json1_1UndeploySystemInstanceRequest = (
3962
- input: UndeploySystemInstanceRequest,
3963
- context: __SerdeContext
3964
- ): any => {
3965
- return {
3966
- ...(input.id !== undefined && input.id !== null && { id: input.id }),
3967
- };
3968
- };
3969
-
3970
- const serializeAws_json1_1UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => {
3971
- return {
3972
- ...(input.resourceArn !== undefined && input.resourceArn !== null && { resourceArn: input.resourceArn }),
3973
- ...(input.tagKeys !== undefined &&
3974
- input.tagKeys !== null && { tagKeys: serializeAws_json1_1TagKeyList(input.tagKeys, context) }),
3975
- };
3976
- };
3977
-
3978
- const serializeAws_json1_1UpdateFlowTemplateRequest = (
3979
- input: UpdateFlowTemplateRequest,
3980
- context: __SerdeContext
3981
- ): any => {
3982
- return {
3983
- ...(input.compatibleNamespaceVersion !== undefined &&
3984
- input.compatibleNamespaceVersion !== null && { compatibleNamespaceVersion: input.compatibleNamespaceVersion }),
3985
- ...(input.definition !== undefined &&
3986
- input.definition !== null && { definition: serializeAws_json1_1DefinitionDocument(input.definition, context) }),
3987
- ...(input.id !== undefined && input.id !== null && { id: input.id }),
3988
- };
3989
- };
3990
-
3991
- const serializeAws_json1_1UpdateSystemTemplateRequest = (
3992
- input: UpdateSystemTemplateRequest,
3993
- context: __SerdeContext
3994
- ): any => {
3995
- return {
3996
- ...(input.compatibleNamespaceVersion !== undefined &&
3997
- input.compatibleNamespaceVersion !== null && { compatibleNamespaceVersion: input.compatibleNamespaceVersion }),
3998
- ...(input.definition !== undefined &&
3999
- input.definition !== null && { definition: serializeAws_json1_1DefinitionDocument(input.definition, context) }),
4000
- ...(input.id !== undefined && input.id !== null && { id: input.id }),
4001
- };
4002
- };
4003
-
4004
- const serializeAws_json1_1UploadEntityDefinitionsRequest = (
4005
- input: UploadEntityDefinitionsRequest,
4006
- context: __SerdeContext
4007
- ): any => {
4008
- return {
4009
- ...(input.deprecateExistingEntities !== undefined &&
4010
- input.deprecateExistingEntities !== null && { deprecateExistingEntities: input.deprecateExistingEntities }),
4011
- ...(input.document !== undefined &&
4012
- input.document !== null && { document: serializeAws_json1_1DefinitionDocument(input.document, context) }),
4013
- ...(input.syncWithPublicNamespace !== undefined &&
4014
- input.syncWithPublicNamespace !== null && { syncWithPublicNamespace: input.syncWithPublicNamespace }),
4015
- };
4016
- };
4017
-
4018
- const serializeAws_json1_1Urns = (input: string[], context: __SerdeContext): any => {
4019
- return input
4020
- .filter((e: any) => e != null)
4021
- .map((entry) => {
4022
- if (entry === null) {
4023
- return null as any;
4024
- }
4025
- return entry;
4026
- });
4027
- };
4028
-
4029
- const deserializeAws_json1_1AssociateEntityToThingResponse = (
4030
- output: any,
4031
- context: __SerdeContext
4032
- ): AssociateEntityToThingResponse => {
4033
- return {} as any;
4034
- };
4035
-
4036
- const deserializeAws_json1_1CreateFlowTemplateResponse = (
4037
- output: any,
4038
- context: __SerdeContext
4039
- ): CreateFlowTemplateResponse => {
4040
- return {
4041
- summary:
4042
- output.summary !== undefined && output.summary !== null
4043
- ? deserializeAws_json1_1FlowTemplateSummary(output.summary, context)
4044
- : undefined,
4045
- } as any;
4046
- };
4047
-
4048
- const deserializeAws_json1_1CreateSystemInstanceResponse = (
4049
- output: any,
4050
- context: __SerdeContext
4051
- ): CreateSystemInstanceResponse => {
4052
- return {
4053
- summary:
4054
- output.summary !== undefined && output.summary !== null
4055
- ? deserializeAws_json1_1SystemInstanceSummary(output.summary, context)
4056
- : undefined,
4057
- } as any;
4058
- };
4059
-
4060
- const deserializeAws_json1_1CreateSystemTemplateResponse = (
4061
- output: any,
4062
- context: __SerdeContext
4063
- ): CreateSystemTemplateResponse => {
4064
- return {
4065
- summary:
4066
- output.summary !== undefined && output.summary !== null
4067
- ? deserializeAws_json1_1SystemTemplateSummary(output.summary, context)
4068
- : undefined,
4069
- } as any;
4070
- };
4071
-
4072
- const deserializeAws_json1_1DefinitionDocument = (output: any, context: __SerdeContext): DefinitionDocument => {
4073
- return {
4074
- language: __expectString(output.language),
4075
- text: __expectString(output.text),
4076
- } as any;
4077
- };
4078
-
4079
- const deserializeAws_json1_1DeleteFlowTemplateResponse = (
4080
- output: any,
4081
- context: __SerdeContext
4082
- ): DeleteFlowTemplateResponse => {
4083
- return {} as any;
4084
- };
4085
-
4086
- const deserializeAws_json1_1DeleteNamespaceResponse = (
4087
- output: any,
4088
- context: __SerdeContext
4089
- ): DeleteNamespaceResponse => {
4090
- return {
4091
- namespaceArn: __expectString(output.namespaceArn),
4092
- namespaceName: __expectString(output.namespaceName),
4093
- } as any;
4094
- };
4095
-
4096
- const deserializeAws_json1_1DeleteSystemInstanceResponse = (
4097
- output: any,
4098
- context: __SerdeContext
4099
- ): DeleteSystemInstanceResponse => {
4100
- return {} as any;
4101
- };
4102
-
4103
- const deserializeAws_json1_1DeleteSystemTemplateResponse = (
4104
- output: any,
4105
- context: __SerdeContext
4106
- ): DeleteSystemTemplateResponse => {
4107
- return {} as any;
4108
- };
4109
-
4110
- const deserializeAws_json1_1DependencyRevision = (output: any, context: __SerdeContext): DependencyRevision => {
4111
- return {
4112
- id: __expectString(output.id),
4113
- revisionNumber: __expectLong(output.revisionNumber),
4114
- } as any;
4115
- };
4116
-
4117
- const deserializeAws_json1_1DependencyRevisions = (output: any, context: __SerdeContext): DependencyRevision[] => {
4118
- return (output || [])
4119
- .filter((e: any) => e != null)
4120
- .map((entry: any) => {
4121
- if (entry === null) {
4122
- return null as any;
4123
- }
4124
- return deserializeAws_json1_1DependencyRevision(entry, context);
4125
- });
4126
- };
4127
-
4128
- const deserializeAws_json1_1DeploySystemInstanceResponse = (
4129
- output: any,
4130
- context: __SerdeContext
4131
- ): DeploySystemInstanceResponse => {
4132
- return {
4133
- greengrassDeploymentId: __expectString(output.greengrassDeploymentId),
4134
- summary:
4135
- output.summary !== undefined && output.summary !== null
4136
- ? deserializeAws_json1_1SystemInstanceSummary(output.summary, context)
4137
- : undefined,
4138
- } as any;
4139
- };
4140
-
4141
- const deserializeAws_json1_1DeprecateFlowTemplateResponse = (
4142
- output: any,
4143
- context: __SerdeContext
4144
- ): DeprecateFlowTemplateResponse => {
4145
- return {} as any;
4146
- };
4147
-
4148
- const deserializeAws_json1_1DeprecateSystemTemplateResponse = (
4149
- output: any,
4150
- context: __SerdeContext
4151
- ): DeprecateSystemTemplateResponse => {
4152
- return {} as any;
4153
- };
4154
-
4155
- const deserializeAws_json1_1DescribeNamespaceResponse = (
4156
- output: any,
4157
- context: __SerdeContext
4158
- ): DescribeNamespaceResponse => {
4159
- return {
4160
- namespaceArn: __expectString(output.namespaceArn),
4161
- namespaceName: __expectString(output.namespaceName),
4162
- namespaceVersion: __expectLong(output.namespaceVersion),
4163
- trackingNamespaceName: __expectString(output.trackingNamespaceName),
4164
- trackingNamespaceVersion: __expectLong(output.trackingNamespaceVersion),
4165
- } as any;
4166
- };
4167
-
4168
- const deserializeAws_json1_1DissociateEntityFromThingResponse = (
4169
- output: any,
4170
- context: __SerdeContext
4171
- ): DissociateEntityFromThingResponse => {
4172
- return {} as any;
4173
- };
4174
-
4175
- const deserializeAws_json1_1EntityDescription = (output: any, context: __SerdeContext): EntityDescription => {
4176
- return {
4177
- arn: __expectString(output.arn),
4178
- createdAt:
4179
- output.createdAt !== undefined && output.createdAt !== null
4180
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt)))
4181
- : undefined,
4182
- definition:
4183
- output.definition !== undefined && output.definition !== null
4184
- ? deserializeAws_json1_1DefinitionDocument(output.definition, context)
4185
- : undefined,
4186
- id: __expectString(output.id),
4187
- type: __expectString(output.type),
4188
- } as any;
4189
- };
4190
-
4191
- const deserializeAws_json1_1EntityDescriptions = (output: any, context: __SerdeContext): EntityDescription[] => {
4192
- return (output || [])
4193
- .filter((e: any) => e != null)
4194
- .map((entry: any) => {
4195
- if (entry === null) {
4196
- return null as any;
4197
- }
4198
- return deserializeAws_json1_1EntityDescription(entry, context);
4199
- });
4200
- };
4201
-
4202
- const deserializeAws_json1_1FlowExecutionMessage = (output: any, context: __SerdeContext): FlowExecutionMessage => {
4203
- return {
4204
- eventType: __expectString(output.eventType),
4205
- messageId: __expectString(output.messageId),
4206
- payload: __expectString(output.payload),
4207
- timestamp:
4208
- output.timestamp !== undefined && output.timestamp !== null
4209
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.timestamp)))
4210
- : undefined,
4211
- } as any;
4212
- };
4213
-
4214
- const deserializeAws_json1_1FlowExecutionMessages = (output: any, context: __SerdeContext): FlowExecutionMessage[] => {
4215
- return (output || [])
4216
- .filter((e: any) => e != null)
4217
- .map((entry: any) => {
4218
- if (entry === null) {
4219
- return null as any;
4220
- }
4221
- return deserializeAws_json1_1FlowExecutionMessage(entry, context);
4222
- });
4223
- };
4224
-
4225
- const deserializeAws_json1_1FlowExecutionSummaries = (output: any, context: __SerdeContext): FlowExecutionSummary[] => {
4226
- return (output || [])
4227
- .filter((e: any) => e != null)
4228
- .map((entry: any) => {
4229
- if (entry === null) {
4230
- return null as any;
4231
- }
4232
- return deserializeAws_json1_1FlowExecutionSummary(entry, context);
4233
- });
4234
- };
4235
-
4236
- const deserializeAws_json1_1FlowExecutionSummary = (output: any, context: __SerdeContext): FlowExecutionSummary => {
4237
- return {
4238
- createdAt:
4239
- output.createdAt !== undefined && output.createdAt !== null
4240
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt)))
4241
- : undefined,
4242
- flowExecutionId: __expectString(output.flowExecutionId),
4243
- flowTemplateId: __expectString(output.flowTemplateId),
4244
- status: __expectString(output.status),
4245
- systemInstanceId: __expectString(output.systemInstanceId),
4246
- updatedAt:
4247
- output.updatedAt !== undefined && output.updatedAt !== null
4248
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updatedAt)))
4249
- : undefined,
4250
- } as any;
4251
- };
4252
-
4253
- const deserializeAws_json1_1FlowTemplateDescription = (
4254
- output: any,
4255
- context: __SerdeContext
4256
- ): FlowTemplateDescription => {
4257
- return {
4258
- definition:
4259
- output.definition !== undefined && output.definition !== null
4260
- ? deserializeAws_json1_1DefinitionDocument(output.definition, context)
4261
- : undefined,
4262
- summary:
4263
- output.summary !== undefined && output.summary !== null
4264
- ? deserializeAws_json1_1FlowTemplateSummary(output.summary, context)
4265
- : undefined,
4266
- validatedNamespaceVersion: __expectLong(output.validatedNamespaceVersion),
4267
- } as any;
4268
- };
4269
-
4270
- const deserializeAws_json1_1FlowTemplateSummaries = (output: any, context: __SerdeContext): FlowTemplateSummary[] => {
4271
- return (output || [])
4272
- .filter((e: any) => e != null)
4273
- .map((entry: any) => {
4274
- if (entry === null) {
4275
- return null as any;
4276
- }
4277
- return deserializeAws_json1_1FlowTemplateSummary(entry, context);
4278
- });
4279
- };
4280
-
4281
- const deserializeAws_json1_1FlowTemplateSummary = (output: any, context: __SerdeContext): FlowTemplateSummary => {
4282
- return {
4283
- arn: __expectString(output.arn),
4284
- createdAt:
4285
- output.createdAt !== undefined && output.createdAt !== null
4286
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt)))
4287
- : undefined,
4288
- id: __expectString(output.id),
4289
- revisionNumber: __expectLong(output.revisionNumber),
4290
- } as any;
4291
- };
4292
-
4293
- const deserializeAws_json1_1GetEntitiesResponse = (output: any, context: __SerdeContext): GetEntitiesResponse => {
4294
- return {
4295
- descriptions:
4296
- output.descriptions !== undefined && output.descriptions !== null
4297
- ? deserializeAws_json1_1EntityDescriptions(output.descriptions, context)
4298
- : undefined,
4299
- } as any;
4300
- };
4301
-
4302
- const deserializeAws_json1_1GetFlowTemplateResponse = (
4303
- output: any,
4304
- context: __SerdeContext
4305
- ): GetFlowTemplateResponse => {
4306
- return {
4307
- description:
4308
- output.description !== undefined && output.description !== null
4309
- ? deserializeAws_json1_1FlowTemplateDescription(output.description, context)
4310
- : undefined,
4311
- } as any;
4312
- };
4313
-
4314
- const deserializeAws_json1_1GetFlowTemplateRevisionsResponse = (
4315
- output: any,
4316
- context: __SerdeContext
4317
- ): GetFlowTemplateRevisionsResponse => {
4318
- return {
4319
- nextToken: __expectString(output.nextToken),
4320
- summaries:
4321
- output.summaries !== undefined && output.summaries !== null
4322
- ? deserializeAws_json1_1FlowTemplateSummaries(output.summaries, context)
4323
- : undefined,
4324
- } as any;
4325
- };
4326
-
4327
- const deserializeAws_json1_1GetNamespaceDeletionStatusResponse = (
4328
- output: any,
4329
- context: __SerdeContext
4330
- ): GetNamespaceDeletionStatusResponse => {
4331
- return {
4332
- errorCode: __expectString(output.errorCode),
4333
- errorMessage: __expectString(output.errorMessage),
4334
- namespaceArn: __expectString(output.namespaceArn),
4335
- namespaceName: __expectString(output.namespaceName),
4336
- status: __expectString(output.status),
4337
- } as any;
4338
- };
4339
-
4340
- const deserializeAws_json1_1GetSystemInstanceResponse = (
4341
- output: any,
4342
- context: __SerdeContext
4343
- ): GetSystemInstanceResponse => {
4344
- return {
4345
- description:
4346
- output.description !== undefined && output.description !== null
4347
- ? deserializeAws_json1_1SystemInstanceDescription(output.description, context)
4348
- : undefined,
4349
- } as any;
4350
- };
4351
-
4352
- const deserializeAws_json1_1GetSystemTemplateResponse = (
4353
- output: any,
4354
- context: __SerdeContext
4355
- ): GetSystemTemplateResponse => {
4356
- return {
4357
- description:
4358
- output.description !== undefined && output.description !== null
4359
- ? deserializeAws_json1_1SystemTemplateDescription(output.description, context)
4360
- : undefined,
4361
- } as any;
4362
- };
4363
-
4364
- const deserializeAws_json1_1GetSystemTemplateRevisionsResponse = (
4365
- output: any,
4366
- context: __SerdeContext
4367
- ): GetSystemTemplateRevisionsResponse => {
4368
- return {
4369
- nextToken: __expectString(output.nextToken),
4370
- summaries:
4371
- output.summaries !== undefined && output.summaries !== null
4372
- ? deserializeAws_json1_1SystemTemplateSummaries(output.summaries, context)
4373
- : undefined,
4374
- } as any;
4375
- };
4376
-
4377
- const deserializeAws_json1_1GetUploadStatusResponse = (
4378
- output: any,
4379
- context: __SerdeContext
4380
- ): GetUploadStatusResponse => {
4381
- return {
4382
- createdDate:
4383
- output.createdDate !== undefined && output.createdDate !== null
4384
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdDate)))
4385
- : undefined,
4386
- failureReason:
4387
- output.failureReason !== undefined && output.failureReason !== null
4388
- ? deserializeAws_json1_1StringList(output.failureReason, context)
4389
- : undefined,
4390
- namespaceArn: __expectString(output.namespaceArn),
4391
- namespaceName: __expectString(output.namespaceName),
4392
- namespaceVersion: __expectLong(output.namespaceVersion),
4393
- uploadId: __expectString(output.uploadId),
4394
- uploadStatus: __expectString(output.uploadStatus),
4395
- } as any;
4396
- };
4397
-
4398
- const deserializeAws_json1_1InternalFailureException = (
4399
- output: any,
4400
- context: __SerdeContext
4401
- ): InternalFailureException => {
4402
- return {
4403
- message: __expectString(output.message),
4404
- } as any;
4405
- };
4406
-
4407
- const deserializeAws_json1_1InvalidRequestException = (
4408
- output: any,
4409
- context: __SerdeContext
4410
- ): InvalidRequestException => {
4411
- return {
4412
- message: __expectString(output.message),
4413
- } as any;
4414
- };
4415
-
4416
- const deserializeAws_json1_1LimitExceededException = (output: any, context: __SerdeContext): LimitExceededException => {
4417
- return {
4418
- message: __expectString(output.message),
4419
- } as any;
4420
- };
4421
-
4422
- const deserializeAws_json1_1ListFlowExecutionMessagesResponse = (
4423
- output: any,
4424
- context: __SerdeContext
4425
- ): ListFlowExecutionMessagesResponse => {
4426
- return {
4427
- messages:
4428
- output.messages !== undefined && output.messages !== null
4429
- ? deserializeAws_json1_1FlowExecutionMessages(output.messages, context)
4430
- : undefined,
4431
- nextToken: __expectString(output.nextToken),
4432
- } as any;
4433
- };
4434
-
4435
- const deserializeAws_json1_1ListTagsForResourceResponse = (
4436
- output: any,
4437
- context: __SerdeContext
4438
- ): ListTagsForResourceResponse => {
4439
- return {
4440
- nextToken: __expectString(output.nextToken),
4441
- tags:
4442
- output.tags !== undefined && output.tags !== null
4443
- ? deserializeAws_json1_1TagList(output.tags, context)
4444
- : undefined,
4445
- } as any;
4446
- };
4447
-
4448
- const deserializeAws_json1_1MetricsConfiguration = (output: any, context: __SerdeContext): MetricsConfiguration => {
4449
- return {
4450
- cloudMetricEnabled: __expectBoolean(output.cloudMetricEnabled),
4451
- metricRuleRoleArn: __expectString(output.metricRuleRoleArn),
4452
- } as any;
4453
- };
4454
-
4455
- const deserializeAws_json1_1ResourceAlreadyExistsException = (
4456
- output: any,
4457
- context: __SerdeContext
4458
- ): ResourceAlreadyExistsException => {
4459
- return {
4460
- message: __expectString(output.message),
4461
- } as any;
4462
- };
4463
-
4464
- const deserializeAws_json1_1ResourceInUseException = (output: any, context: __SerdeContext): ResourceInUseException => {
4465
- return {
4466
- message: __expectString(output.message),
4467
- } as any;
4468
- };
4469
-
4470
- const deserializeAws_json1_1ResourceNotFoundException = (
4471
- output: any,
4472
- context: __SerdeContext
4473
- ): ResourceNotFoundException => {
4474
- return {
4475
- message: __expectString(output.message),
4476
- } as any;
4477
- };
4478
-
4479
- const deserializeAws_json1_1SearchEntitiesResponse = (output: any, context: __SerdeContext): SearchEntitiesResponse => {
4480
- return {
4481
- descriptions:
4482
- output.descriptions !== undefined && output.descriptions !== null
4483
- ? deserializeAws_json1_1EntityDescriptions(output.descriptions, context)
4484
- : undefined,
4485
- nextToken: __expectString(output.nextToken),
4486
- } as any;
4487
- };
4488
-
4489
- const deserializeAws_json1_1SearchFlowExecutionsResponse = (
4490
- output: any,
4491
- context: __SerdeContext
4492
- ): SearchFlowExecutionsResponse => {
4493
- return {
4494
- nextToken: __expectString(output.nextToken),
4495
- summaries:
4496
- output.summaries !== undefined && output.summaries !== null
4497
- ? deserializeAws_json1_1FlowExecutionSummaries(output.summaries, context)
4498
- : undefined,
4499
- } as any;
4500
- };
4501
-
4502
- const deserializeAws_json1_1SearchFlowTemplatesResponse = (
4503
- output: any,
4504
- context: __SerdeContext
4505
- ): SearchFlowTemplatesResponse => {
4506
- return {
4507
- nextToken: __expectString(output.nextToken),
4508
- summaries:
4509
- output.summaries !== undefined && output.summaries !== null
4510
- ? deserializeAws_json1_1FlowTemplateSummaries(output.summaries, context)
4511
- : undefined,
4512
- } as any;
4513
- };
4514
-
4515
- const deserializeAws_json1_1SearchSystemInstancesResponse = (
4516
- output: any,
4517
- context: __SerdeContext
4518
- ): SearchSystemInstancesResponse => {
4519
- return {
4520
- nextToken: __expectString(output.nextToken),
4521
- summaries:
4522
- output.summaries !== undefined && output.summaries !== null
4523
- ? deserializeAws_json1_1SystemInstanceSummaries(output.summaries, context)
4524
- : undefined,
4525
- } as any;
4526
- };
4527
-
4528
- const deserializeAws_json1_1SearchSystemTemplatesResponse = (
4529
- output: any,
4530
- context: __SerdeContext
4531
- ): SearchSystemTemplatesResponse => {
4532
- return {
4533
- nextToken: __expectString(output.nextToken),
4534
- summaries:
4535
- output.summaries !== undefined && output.summaries !== null
4536
- ? deserializeAws_json1_1SystemTemplateSummaries(output.summaries, context)
4537
- : undefined,
4538
- } as any;
4539
- };
4540
-
4541
- const deserializeAws_json1_1SearchThingsResponse = (output: any, context: __SerdeContext): SearchThingsResponse => {
4542
- return {
4543
- nextToken: __expectString(output.nextToken),
4544
- things:
4545
- output.things !== undefined && output.things !== null
4546
- ? deserializeAws_json1_1Things(output.things, context)
4547
- : undefined,
4548
- } as any;
4549
- };
4550
-
4551
- const deserializeAws_json1_1StringList = (output: any, context: __SerdeContext): string[] => {
4552
- return (output || [])
4553
- .filter((e: any) => e != null)
4554
- .map((entry: any) => {
4555
- if (entry === null) {
4556
- return null as any;
4557
- }
4558
- return __expectString(entry) as any;
4559
- });
4560
- };
4561
-
4562
- const deserializeAws_json1_1SystemInstanceDescription = (
4563
- output: any,
4564
- context: __SerdeContext
4565
- ): SystemInstanceDescription => {
4566
- return {
4567
- definition:
4568
- output.definition !== undefined && output.definition !== null
4569
- ? deserializeAws_json1_1DefinitionDocument(output.definition, context)
4570
- : undefined,
4571
- flowActionsRoleArn: __expectString(output.flowActionsRoleArn),
4572
- metricsConfiguration:
4573
- output.metricsConfiguration !== undefined && output.metricsConfiguration !== null
4574
- ? deserializeAws_json1_1MetricsConfiguration(output.metricsConfiguration, context)
4575
- : undefined,
4576
- s3BucketName: __expectString(output.s3BucketName),
4577
- summary:
4578
- output.summary !== undefined && output.summary !== null
4579
- ? deserializeAws_json1_1SystemInstanceSummary(output.summary, context)
4580
- : undefined,
4581
- validatedDependencyRevisions:
4582
- output.validatedDependencyRevisions !== undefined && output.validatedDependencyRevisions !== null
4583
- ? deserializeAws_json1_1DependencyRevisions(output.validatedDependencyRevisions, context)
4584
- : undefined,
4585
- validatedNamespaceVersion: __expectLong(output.validatedNamespaceVersion),
4586
- } as any;
4587
- };
4588
-
4589
- const deserializeAws_json1_1SystemInstanceSummaries = (
4590
- output: any,
4591
- context: __SerdeContext
4592
- ): SystemInstanceSummary[] => {
4593
- return (output || [])
4594
- .filter((e: any) => e != null)
4595
- .map((entry: any) => {
4596
- if (entry === null) {
4597
- return null as any;
4598
- }
4599
- return deserializeAws_json1_1SystemInstanceSummary(entry, context);
4600
- });
4601
- };
4602
-
4603
- const deserializeAws_json1_1SystemInstanceSummary = (output: any, context: __SerdeContext): SystemInstanceSummary => {
4604
- return {
4605
- arn: __expectString(output.arn),
4606
- createdAt:
4607
- output.createdAt !== undefined && output.createdAt !== null
4608
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt)))
4609
- : undefined,
4610
- greengrassGroupId: __expectString(output.greengrassGroupId),
4611
- greengrassGroupName: __expectString(output.greengrassGroupName),
4612
- greengrassGroupVersionId: __expectString(output.greengrassGroupVersionId),
4613
- id: __expectString(output.id),
4614
- status: __expectString(output.status),
4615
- target: __expectString(output.target),
4616
- updatedAt:
4617
- output.updatedAt !== undefined && output.updatedAt !== null
4618
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updatedAt)))
4619
- : undefined,
4620
- } as any;
4621
- };
4622
-
4623
- const deserializeAws_json1_1SystemTemplateDescription = (
4624
- output: any,
4625
- context: __SerdeContext
4626
- ): SystemTemplateDescription => {
4627
- return {
4628
- definition:
4629
- output.definition !== undefined && output.definition !== null
4630
- ? deserializeAws_json1_1DefinitionDocument(output.definition, context)
4631
- : undefined,
4632
- summary:
4633
- output.summary !== undefined && output.summary !== null
4634
- ? deserializeAws_json1_1SystemTemplateSummary(output.summary, context)
4635
- : undefined,
4636
- validatedNamespaceVersion: __expectLong(output.validatedNamespaceVersion),
4637
- } as any;
4638
- };
4639
-
4640
- const deserializeAws_json1_1SystemTemplateSummaries = (
4641
- output: any,
4642
- context: __SerdeContext
4643
- ): SystemTemplateSummary[] => {
4644
- return (output || [])
4645
- .filter((e: any) => e != null)
4646
- .map((entry: any) => {
4647
- if (entry === null) {
4648
- return null as any;
4649
- }
4650
- return deserializeAws_json1_1SystemTemplateSummary(entry, context);
4651
- });
4652
- };
4653
-
4654
- const deserializeAws_json1_1SystemTemplateSummary = (output: any, context: __SerdeContext): SystemTemplateSummary => {
4655
- return {
4656
- arn: __expectString(output.arn),
4657
- createdAt:
4658
- output.createdAt !== undefined && output.createdAt !== null
4659
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt)))
4660
- : undefined,
4661
- id: __expectString(output.id),
4662
- revisionNumber: __expectLong(output.revisionNumber),
4663
- } as any;
4664
- };
4665
-
4666
- const deserializeAws_json1_1Tag = (output: any, context: __SerdeContext): Tag => {
4667
- return {
4668
- key: __expectString(output.key),
4669
- value: __expectString(output.value),
4670
- } as any;
4671
- };
4672
-
4673
- const deserializeAws_json1_1TagList = (output: any, context: __SerdeContext): Tag[] => {
4674
- return (output || [])
4675
- .filter((e: any) => e != null)
4676
- .map((entry: any) => {
4677
- if (entry === null) {
4678
- return null as any;
4679
- }
4680
- return deserializeAws_json1_1Tag(entry, context);
4681
- });
4682
- };
4683
-
4684
- const deserializeAws_json1_1TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => {
4685
- return {} as any;
4686
- };
4687
-
4688
- const deserializeAws_json1_1Thing = (output: any, context: __SerdeContext): Thing => {
4689
- return {
4690
- thingArn: __expectString(output.thingArn),
4691
- thingName: __expectString(output.thingName),
4692
- } as any;
4693
- };
4694
-
4695
- const deserializeAws_json1_1Things = (output: any, context: __SerdeContext): Thing[] => {
4696
- return (output || [])
4697
- .filter((e: any) => e != null)
4698
- .map((entry: any) => {
4699
- if (entry === null) {
4700
- return null as any;
4701
- }
4702
- return deserializeAws_json1_1Thing(entry, context);
4703
- });
4704
- };
4705
-
4706
- const deserializeAws_json1_1ThrottlingException = (output: any, context: __SerdeContext): ThrottlingException => {
4707
- return {
4708
- message: __expectString(output.message),
4709
- } as any;
4710
- };
4711
-
4712
- const deserializeAws_json1_1UndeploySystemInstanceResponse = (
4713
- output: any,
4714
- context: __SerdeContext
4715
- ): UndeploySystemInstanceResponse => {
4716
- return {
4717
- summary:
4718
- output.summary !== undefined && output.summary !== null
4719
- ? deserializeAws_json1_1SystemInstanceSummary(output.summary, context)
4720
- : undefined,
4721
- } as any;
4722
- };
4723
-
4724
- const deserializeAws_json1_1UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => {
4725
- return {} as any;
4726
- };
4727
-
4728
- const deserializeAws_json1_1UpdateFlowTemplateResponse = (
4729
- output: any,
4730
- context: __SerdeContext
4731
- ): UpdateFlowTemplateResponse => {
4732
- return {
4733
- summary:
4734
- output.summary !== undefined && output.summary !== null
4735
- ? deserializeAws_json1_1FlowTemplateSummary(output.summary, context)
4736
- : undefined,
4737
- } as any;
4738
- };
4739
-
4740
- const deserializeAws_json1_1UpdateSystemTemplateResponse = (
4741
- output: any,
4742
- context: __SerdeContext
4743
- ): UpdateSystemTemplateResponse => {
4744
- return {
4745
- summary:
4746
- output.summary !== undefined && output.summary !== null
4747
- ? deserializeAws_json1_1SystemTemplateSummary(output.summary, context)
4748
- : undefined,
4749
- } as any;
4750
- };
4751
-
4752
- const deserializeAws_json1_1UploadEntityDefinitionsResponse = (
4753
- output: any,
4754
- context: __SerdeContext
4755
- ): UploadEntityDefinitionsResponse => {
4756
- return {
4757
- uploadId: __expectString(output.uploadId),
4758
- } as any;
4759
- };
4760
-
4761
- const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({
4762
- httpStatusCode: output.statusCode,
4763
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
4764
- extendedRequestId: output.headers["x-amz-id-2"],
4765
- cfId: output.headers["x-amz-cf-id"],
4766
- });
4767
-
4768
- // Collect low-level response body stream to Uint8Array.
4769
- const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext): Promise<Uint8Array> => {
4770
- if (streamBody instanceof Uint8Array) {
4771
- return Promise.resolve(streamBody);
4772
- }
4773
- return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
4774
- };
4775
-
4776
- // Encode Uint8Array data into string with utf-8.
4777
- const collectBodyString = (streamBody: any, context: __SerdeContext): Promise<string> =>
4778
- collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
4779
-
4780
- const buildHttpRpcRequest = async (
4781
- context: __SerdeContext,
4782
- headers: __HeaderBag,
4783
- path: string,
4784
- resolvedHostname: string | undefined,
4785
- body: any
4786
- ): Promise<__HttpRequest> => {
4787
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
4788
- const contents: any = {
4789
- protocol,
4790
- hostname,
4791
- port,
4792
- method: "POST",
4793
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
4794
- headers,
4795
- };
4796
- if (resolvedHostname !== undefined) {
4797
- contents.hostname = resolvedHostname;
4798
- }
4799
- if (body !== undefined) {
4800
- contents.body = body;
4801
- }
4802
- return new __HttpRequest(contents);
4803
- };
4804
-
4805
- const parseBody = (streamBody: any, context: __SerdeContext): any =>
4806
- collectBodyString(streamBody, context).then((encoded) => {
4807
- if (encoded.length) {
4808
- return JSON.parse(encoded);
4809
- }
4810
- return {};
4811
- });
4812
-
4813
- /**
4814
- * Load an error code for the aws.rest-json-1.1 protocol.
4815
- */
4816
- const loadRestJsonErrorCode = (output: __HttpResponse, data: any): string => {
4817
- const findKey = (object: any, key: string) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
4818
-
4819
- const sanitizeErrorCode = (rawValue: string): string => {
4820
- let cleanValue = rawValue;
4821
- if (cleanValue.indexOf(":") >= 0) {
4822
- cleanValue = cleanValue.split(":")[0];
4823
- }
4824
- if (cleanValue.indexOf("#") >= 0) {
4825
- cleanValue = cleanValue.split("#")[1];
4826
- }
4827
- return cleanValue;
4828
- };
4829
-
4830
- const headerKey = findKey(output.headers, "x-amzn-errortype");
4831
- if (headerKey !== undefined) {
4832
- return sanitizeErrorCode(output.headers[headerKey]);
4833
- }
4834
-
4835
- if (data.code !== undefined) {
4836
- return sanitizeErrorCode(data.code);
4837
- }
4838
-
4839
- if (data["__type"] !== undefined) {
4840
- return sanitizeErrorCode(data["__type"]);
4841
- }
4842
-
4843
- return "";
4844
- };