@aws-sdk/client-qbusiness 3.461.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 (347) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +646 -0
  3. package/dist-cjs/QBusiness.js +121 -0
  4. package/dist-cjs/QBusinessClient.js +43 -0
  5. package/dist-cjs/commands/BatchDeleteDocumentCommand.js +50 -0
  6. package/dist-cjs/commands/BatchPutDocumentCommand.js +50 -0
  7. package/dist-cjs/commands/ChatSyncCommand.js +50 -0
  8. package/dist-cjs/commands/CreateApplicationCommand.js +51 -0
  9. package/dist-cjs/commands/CreateDataSourceCommand.js +50 -0
  10. package/dist-cjs/commands/CreateIndexCommand.js +50 -0
  11. package/dist-cjs/commands/CreatePluginCommand.js +50 -0
  12. package/dist-cjs/commands/CreateRetrieverCommand.js +50 -0
  13. package/dist-cjs/commands/CreateUserCommand.js +50 -0
  14. package/dist-cjs/commands/CreateWebExperienceCommand.js +50 -0
  15. package/dist-cjs/commands/DeleteApplicationCommand.js +50 -0
  16. package/dist-cjs/commands/DeleteChatControlsConfigurationCommand.js +50 -0
  17. package/dist-cjs/commands/DeleteConversationCommand.js +50 -0
  18. package/dist-cjs/commands/DeleteDataSourceCommand.js +50 -0
  19. package/dist-cjs/commands/DeleteGroupCommand.js +50 -0
  20. package/dist-cjs/commands/DeleteIndexCommand.js +50 -0
  21. package/dist-cjs/commands/DeletePluginCommand.js +50 -0
  22. package/dist-cjs/commands/DeleteRetrieverCommand.js +50 -0
  23. package/dist-cjs/commands/DeleteUserCommand.js +50 -0
  24. package/dist-cjs/commands/DeleteWebExperienceCommand.js +50 -0
  25. package/dist-cjs/commands/GetApplicationCommand.js +51 -0
  26. package/dist-cjs/commands/GetChatControlsConfigurationCommand.js +50 -0
  27. package/dist-cjs/commands/GetDataSourceCommand.js +50 -0
  28. package/dist-cjs/commands/GetGroupCommand.js +50 -0
  29. package/dist-cjs/commands/GetIndexCommand.js +50 -0
  30. package/dist-cjs/commands/GetPluginCommand.js +50 -0
  31. package/dist-cjs/commands/GetRetrieverCommand.js +50 -0
  32. package/dist-cjs/commands/GetUserCommand.js +50 -0
  33. package/dist-cjs/commands/GetWebExperienceCommand.js +50 -0
  34. package/dist-cjs/commands/ListApplicationsCommand.js +50 -0
  35. package/dist-cjs/commands/ListConversationsCommand.js +50 -0
  36. package/dist-cjs/commands/ListDataSourceSyncJobsCommand.js +50 -0
  37. package/dist-cjs/commands/ListDataSourcesCommand.js +50 -0
  38. package/dist-cjs/commands/ListDocumentsCommand.js +50 -0
  39. package/dist-cjs/commands/ListGroupsCommand.js +50 -0
  40. package/dist-cjs/commands/ListIndicesCommand.js +50 -0
  41. package/dist-cjs/commands/ListMessagesCommand.js +50 -0
  42. package/dist-cjs/commands/ListPluginsCommand.js +50 -0
  43. package/dist-cjs/commands/ListRetrieversCommand.js +50 -0
  44. package/dist-cjs/commands/ListTagsForResourceCommand.js +50 -0
  45. package/dist-cjs/commands/ListWebExperiencesCommand.js +50 -0
  46. package/dist-cjs/commands/PutFeedbackCommand.js +50 -0
  47. package/dist-cjs/commands/PutGroupCommand.js +50 -0
  48. package/dist-cjs/commands/StartDataSourceSyncJobCommand.js +50 -0
  49. package/dist-cjs/commands/StopDataSourceSyncJobCommand.js +50 -0
  50. package/dist-cjs/commands/TagResourceCommand.js +50 -0
  51. package/dist-cjs/commands/UntagResourceCommand.js +50 -0
  52. package/dist-cjs/commands/UpdateApplicationCommand.js +50 -0
  53. package/dist-cjs/commands/UpdateChatControlsConfigurationCommand.js +50 -0
  54. package/dist-cjs/commands/UpdateDataSourceCommand.js +50 -0
  55. package/dist-cjs/commands/UpdateIndexCommand.js +50 -0
  56. package/dist-cjs/commands/UpdatePluginCommand.js +50 -0
  57. package/dist-cjs/commands/UpdateRetrieverCommand.js +50 -0
  58. package/dist-cjs/commands/UpdateUserCommand.js +50 -0
  59. package/dist-cjs/commands/UpdateWebExperienceCommand.js +50 -0
  60. package/dist-cjs/commands/index.js +58 -0
  61. package/dist-cjs/endpoint/EndpointParameters.js +11 -0
  62. package/dist-cjs/endpoint/endpointResolver.js +12 -0
  63. package/dist-cjs/endpoint/ruleset.js +7 -0
  64. package/dist-cjs/extensionConfiguration.js +2 -0
  65. package/dist-cjs/index.js +12 -0
  66. package/dist-cjs/models/QBusinessServiceException.js +12 -0
  67. package/dist-cjs/models/index.js +4 -0
  68. package/dist-cjs/models/models_0.js +392 -0
  69. package/dist-cjs/pagination/GetChatControlsConfigurationPaginator.js +29 -0
  70. package/dist-cjs/pagination/Interfaces.js +2 -0
  71. package/dist-cjs/pagination/ListApplicationsPaginator.js +29 -0
  72. package/dist-cjs/pagination/ListConversationsPaginator.js +29 -0
  73. package/dist-cjs/pagination/ListDataSourceSyncJobsPaginator.js +29 -0
  74. package/dist-cjs/pagination/ListDataSourcesPaginator.js +29 -0
  75. package/dist-cjs/pagination/ListDocumentsPaginator.js +29 -0
  76. package/dist-cjs/pagination/ListGroupsPaginator.js +29 -0
  77. package/dist-cjs/pagination/ListIndicesPaginator.js +29 -0
  78. package/dist-cjs/pagination/ListMessagesPaginator.js +29 -0
  79. package/dist-cjs/pagination/ListPluginsPaginator.js +29 -0
  80. package/dist-cjs/pagination/ListRetrieversPaginator.js +29 -0
  81. package/dist-cjs/pagination/ListWebExperiencesPaginator.js +29 -0
  82. package/dist-cjs/pagination/index.js +16 -0
  83. package/dist-cjs/protocols/Aws_restJson1.js +4637 -0
  84. package/dist-cjs/runtimeConfig.browser.js +39 -0
  85. package/dist-cjs/runtimeConfig.js +51 -0
  86. package/dist-cjs/runtimeConfig.native.js +15 -0
  87. package/dist-cjs/runtimeConfig.shared.js +24 -0
  88. package/dist-cjs/runtimeExtensions.js +22 -0
  89. package/dist-es/QBusiness.js +117 -0
  90. package/dist-es/QBusinessClient.js +39 -0
  91. package/dist-es/commands/BatchDeleteDocumentCommand.js +46 -0
  92. package/dist-es/commands/BatchPutDocumentCommand.js +46 -0
  93. package/dist-es/commands/ChatSyncCommand.js +46 -0
  94. package/dist-es/commands/CreateApplicationCommand.js +47 -0
  95. package/dist-es/commands/CreateDataSourceCommand.js +46 -0
  96. package/dist-es/commands/CreateIndexCommand.js +46 -0
  97. package/dist-es/commands/CreatePluginCommand.js +46 -0
  98. package/dist-es/commands/CreateRetrieverCommand.js +46 -0
  99. package/dist-es/commands/CreateUserCommand.js +46 -0
  100. package/dist-es/commands/CreateWebExperienceCommand.js +46 -0
  101. package/dist-es/commands/DeleteApplicationCommand.js +46 -0
  102. package/dist-es/commands/DeleteChatControlsConfigurationCommand.js +46 -0
  103. package/dist-es/commands/DeleteConversationCommand.js +46 -0
  104. package/dist-es/commands/DeleteDataSourceCommand.js +46 -0
  105. package/dist-es/commands/DeleteGroupCommand.js +46 -0
  106. package/dist-es/commands/DeleteIndexCommand.js +46 -0
  107. package/dist-es/commands/DeletePluginCommand.js +46 -0
  108. package/dist-es/commands/DeleteRetrieverCommand.js +46 -0
  109. package/dist-es/commands/DeleteUserCommand.js +46 -0
  110. package/dist-es/commands/DeleteWebExperienceCommand.js +46 -0
  111. package/dist-es/commands/GetApplicationCommand.js +47 -0
  112. package/dist-es/commands/GetChatControlsConfigurationCommand.js +46 -0
  113. package/dist-es/commands/GetDataSourceCommand.js +46 -0
  114. package/dist-es/commands/GetGroupCommand.js +46 -0
  115. package/dist-es/commands/GetIndexCommand.js +46 -0
  116. package/dist-es/commands/GetPluginCommand.js +46 -0
  117. package/dist-es/commands/GetRetrieverCommand.js +46 -0
  118. package/dist-es/commands/GetUserCommand.js +46 -0
  119. package/dist-es/commands/GetWebExperienceCommand.js +46 -0
  120. package/dist-es/commands/ListApplicationsCommand.js +46 -0
  121. package/dist-es/commands/ListConversationsCommand.js +46 -0
  122. package/dist-es/commands/ListDataSourceSyncJobsCommand.js +46 -0
  123. package/dist-es/commands/ListDataSourcesCommand.js +46 -0
  124. package/dist-es/commands/ListDocumentsCommand.js +46 -0
  125. package/dist-es/commands/ListGroupsCommand.js +46 -0
  126. package/dist-es/commands/ListIndicesCommand.js +46 -0
  127. package/dist-es/commands/ListMessagesCommand.js +46 -0
  128. package/dist-es/commands/ListPluginsCommand.js +46 -0
  129. package/dist-es/commands/ListRetrieversCommand.js +46 -0
  130. package/dist-es/commands/ListTagsForResourceCommand.js +46 -0
  131. package/dist-es/commands/ListWebExperiencesCommand.js +46 -0
  132. package/dist-es/commands/PutFeedbackCommand.js +46 -0
  133. package/dist-es/commands/PutGroupCommand.js +46 -0
  134. package/dist-es/commands/StartDataSourceSyncJobCommand.js +46 -0
  135. package/dist-es/commands/StopDataSourceSyncJobCommand.js +46 -0
  136. package/dist-es/commands/TagResourceCommand.js +46 -0
  137. package/dist-es/commands/UntagResourceCommand.js +46 -0
  138. package/dist-es/commands/UpdateApplicationCommand.js +46 -0
  139. package/dist-es/commands/UpdateChatControlsConfigurationCommand.js +46 -0
  140. package/dist-es/commands/UpdateDataSourceCommand.js +46 -0
  141. package/dist-es/commands/UpdateIndexCommand.js +46 -0
  142. package/dist-es/commands/UpdatePluginCommand.js +46 -0
  143. package/dist-es/commands/UpdateRetrieverCommand.js +46 -0
  144. package/dist-es/commands/UpdateUserCommand.js +46 -0
  145. package/dist-es/commands/UpdateWebExperienceCommand.js +46 -0
  146. package/dist-es/commands/index.js +55 -0
  147. package/dist-es/endpoint/EndpointParameters.js +7 -0
  148. package/dist-es/endpoint/endpointResolver.js +8 -0
  149. package/dist-es/endpoint/ruleset.js +4 -0
  150. package/dist-es/extensionConfiguration.js +1 -0
  151. package/dist-es/index.js +7 -0
  152. package/dist-es/models/QBusinessServiceException.js +8 -0
  153. package/dist-es/models/index.js +1 -0
  154. package/dist-es/models/models_0.js +378 -0
  155. package/dist-es/pagination/GetChatControlsConfigurationPaginator.js +25 -0
  156. package/dist-es/pagination/Interfaces.js +1 -0
  157. package/dist-es/pagination/ListApplicationsPaginator.js +25 -0
  158. package/dist-es/pagination/ListConversationsPaginator.js +25 -0
  159. package/dist-es/pagination/ListDataSourceSyncJobsPaginator.js +25 -0
  160. package/dist-es/pagination/ListDataSourcesPaginator.js +25 -0
  161. package/dist-es/pagination/ListDocumentsPaginator.js +25 -0
  162. package/dist-es/pagination/ListGroupsPaginator.js +25 -0
  163. package/dist-es/pagination/ListIndicesPaginator.js +25 -0
  164. package/dist-es/pagination/ListMessagesPaginator.js +25 -0
  165. package/dist-es/pagination/ListPluginsPaginator.js +25 -0
  166. package/dist-es/pagination/ListRetrieversPaginator.js +25 -0
  167. package/dist-es/pagination/ListWebExperiencesPaginator.js +25 -0
  168. package/dist-es/pagination/index.js +13 -0
  169. package/dist-es/protocols/Aws_restJson1.js +4522 -0
  170. package/dist-es/runtimeConfig.browser.js +34 -0
  171. package/dist-es/runtimeConfig.js +46 -0
  172. package/dist-es/runtimeConfig.native.js +11 -0
  173. package/dist-es/runtimeConfig.shared.js +20 -0
  174. package/dist-es/runtimeExtensions.js +18 -0
  175. package/dist-types/QBusiness.d.ts +396 -0
  176. package/dist-types/QBusinessClient.d.ts +225 -0
  177. package/dist-types/commands/BatchDeleteDocumentCommand.d.ts +116 -0
  178. package/dist-types/commands/BatchPutDocumentCommand.d.ts +228 -0
  179. package/dist-types/commands/ChatSyncCommand.d.ts +253 -0
  180. package/dist-types/commands/CreateApplicationCommand.d.ts +116 -0
  181. package/dist-types/commands/CreateDataSourceCommand.d.ts +190 -0
  182. package/dist-types/commands/CreateIndexCommand.d.ts +121 -0
  183. package/dist-types/commands/CreatePluginCommand.d.ts +121 -0
  184. package/dist-types/commands/CreateRetrieverCommand.d.ts +119 -0
  185. package/dist-types/commands/CreateUserCommand.d.ts +108 -0
  186. package/dist-types/commands/CreateWebExperienceCommand.d.ts +112 -0
  187. package/dist-types/commands/DeleteApplicationCommand.d.ts +95 -0
  188. package/dist-types/commands/DeleteChatControlsConfigurationCommand.d.ts +91 -0
  189. package/dist-types/commands/DeleteConversationCommand.d.ts +97 -0
  190. package/dist-types/commands/DeleteDataSourceCommand.d.ts +99 -0
  191. package/dist-types/commands/DeleteGroupCommand.d.ts +106 -0
  192. package/dist-types/commands/DeleteIndexCommand.d.ts +96 -0
  193. package/dist-types/commands/DeletePluginCommand.d.ts +96 -0
  194. package/dist-types/commands/DeleteRetrieverCommand.d.ts +96 -0
  195. package/dist-types/commands/DeleteUserCommand.d.ts +96 -0
  196. package/dist-types/commands/DeleteWebExperienceCommand.d.ts +96 -0
  197. package/dist-types/commands/GetApplicationCommand.d.ts +110 -0
  198. package/dist-types/commands/GetChatControlsConfigurationCommand.d.ts +146 -0
  199. package/dist-types/commands/GetDataSourceCommand.d.ts +184 -0
  200. package/dist-types/commands/GetGroupCommand.d.ts +117 -0
  201. package/dist-types/commands/GetIndexCommand.d.ts +121 -0
  202. package/dist-types/commands/GetPluginCommand.d.ts +112 -0
  203. package/dist-types/commands/GetRetrieverCommand.d.ts +111 -0
  204. package/dist-types/commands/GetUserCommand.d.ts +105 -0
  205. package/dist-types/commands/GetWebExperienceCommand.d.ts +116 -0
  206. package/dist-types/commands/ListApplicationsCommand.d.ts +99 -0
  207. package/dist-types/commands/ListConversationsCommand.d.ts +107 -0
  208. package/dist-types/commands/ListDataSourceSyncJobsCommand.d.ts +120 -0
  209. package/dist-types/commands/ListDataSourcesCommand.d.ts +106 -0
  210. package/dist-types/commands/ListDocumentsCommand.d.ts +111 -0
  211. package/dist-types/commands/ListGroupsCommand.d.ts +107 -0
  212. package/dist-types/commands/ListIndicesCommand.d.ts +104 -0
  213. package/dist-types/commands/ListMessagesCommand.d.ts +163 -0
  214. package/dist-types/commands/ListPluginsCommand.d.ts +106 -0
  215. package/dist-types/commands/ListRetrieversCommand.d.ts +104 -0
  216. package/dist-types/commands/ListTagsForResourceCommand.d.ts +99 -0
  217. package/dist-types/commands/ListWebExperiencesCommand.d.ts +104 -0
  218. package/dist-types/commands/PutFeedbackCommand.d.ts +102 -0
  219. package/dist-types/commands/PutGroupCommand.d.ts +122 -0
  220. package/dist-types/commands/StartDataSourceSyncJobCommand.d.ts +103 -0
  221. package/dist-types/commands/StopDataSourceSyncJobCommand.d.ts +94 -0
  222. package/dist-types/commands/TagResourceCommand.d.ts +103 -0
  223. package/dist-types/commands/UntagResourceCommand.d.ts +94 -0
  224. package/dist-types/commands/UpdateApplicationCommand.d.ts +101 -0
  225. package/dist-types/commands/UpdateChatControlsConfigurationCommand.d.ts +196 -0
  226. package/dist-types/commands/UpdateDataSourceCommand.d.ts +175 -0
  227. package/dist-types/commands/UpdateIndexCommand.d.ts +111 -0
  228. package/dist-types/commands/UpdatePluginCommand.d.ts +112 -0
  229. package/dist-types/commands/UpdateRetrieverCommand.d.ts +109 -0
  230. package/dist-types/commands/UpdateUserCommand.d.ts +131 -0
  231. package/dist-types/commands/UpdateWebExperienceCommand.d.ts +108 -0
  232. package/dist-types/commands/index.d.ts +55 -0
  233. package/dist-types/endpoint/EndpointParameters.d.ts +20 -0
  234. package/dist-types/endpoint/endpointResolver.d.ts +5 -0
  235. package/dist-types/endpoint/ruleset.d.ts +2 -0
  236. package/dist-types/extensionConfiguration.d.ts +8 -0
  237. package/dist-types/index.d.ts +16 -0
  238. package/dist-types/models/QBusinessServiceException.d.ts +13 -0
  239. package/dist-types/models/index.d.ts +1 -0
  240. package/dist-types/models/models_0.d.ts +5077 -0
  241. package/dist-types/pagination/GetChatControlsConfigurationPaginator.d.ts +7 -0
  242. package/dist-types/pagination/Interfaces.d.ts +8 -0
  243. package/dist-types/pagination/ListApplicationsPaginator.d.ts +7 -0
  244. package/dist-types/pagination/ListConversationsPaginator.d.ts +7 -0
  245. package/dist-types/pagination/ListDataSourceSyncJobsPaginator.d.ts +7 -0
  246. package/dist-types/pagination/ListDataSourcesPaginator.d.ts +7 -0
  247. package/dist-types/pagination/ListDocumentsPaginator.d.ts +7 -0
  248. package/dist-types/pagination/ListGroupsPaginator.d.ts +7 -0
  249. package/dist-types/pagination/ListIndicesPaginator.d.ts +7 -0
  250. package/dist-types/pagination/ListMessagesPaginator.d.ts +7 -0
  251. package/dist-types/pagination/ListPluginsPaginator.d.ts +7 -0
  252. package/dist-types/pagination/ListRetrieversPaginator.d.ts +7 -0
  253. package/dist-types/pagination/ListWebExperiencesPaginator.d.ts +7 -0
  254. package/dist-types/pagination/index.d.ts +13 -0
  255. package/dist-types/protocols/Aws_restJson1.d.ts +497 -0
  256. package/dist-types/runtimeConfig.browser.d.ts +46 -0
  257. package/dist-types/runtimeConfig.d.ts +46 -0
  258. package/dist-types/runtimeConfig.native.d.ts +45 -0
  259. package/dist-types/runtimeConfig.shared.d.ts +19 -0
  260. package/dist-types/runtimeExtensions.d.ts +17 -0
  261. package/dist-types/ts3.4/QBusiness.d.ts +940 -0
  262. package/dist-types/ts3.4/QBusinessClient.d.ts +448 -0
  263. package/dist-types/ts3.4/commands/BatchDeleteDocumentCommand.d.ts +39 -0
  264. package/dist-types/ts3.4/commands/BatchPutDocumentCommand.d.ts +38 -0
  265. package/dist-types/ts3.4/commands/ChatSyncCommand.d.ts +35 -0
  266. package/dist-types/ts3.4/commands/CreateApplicationCommand.d.ts +39 -0
  267. package/dist-types/ts3.4/commands/CreateDataSourceCommand.d.ts +38 -0
  268. package/dist-types/ts3.4/commands/CreateIndexCommand.d.ts +35 -0
  269. package/dist-types/ts3.4/commands/CreatePluginCommand.d.ts +35 -0
  270. package/dist-types/ts3.4/commands/CreateRetrieverCommand.d.ts +38 -0
  271. package/dist-types/ts3.4/commands/CreateUserCommand.d.ts +35 -0
  272. package/dist-types/ts3.4/commands/CreateWebExperienceCommand.d.ts +39 -0
  273. package/dist-types/ts3.4/commands/DeleteApplicationCommand.d.ts +39 -0
  274. package/dist-types/ts3.4/commands/DeleteChatControlsConfigurationCommand.d.ts +42 -0
  275. package/dist-types/ts3.4/commands/DeleteConversationCommand.d.ts +39 -0
  276. package/dist-types/ts3.4/commands/DeleteDataSourceCommand.d.ts +38 -0
  277. package/dist-types/ts3.4/commands/DeleteGroupCommand.d.ts +35 -0
  278. package/dist-types/ts3.4/commands/DeleteIndexCommand.d.ts +35 -0
  279. package/dist-types/ts3.4/commands/DeletePluginCommand.d.ts +35 -0
  280. package/dist-types/ts3.4/commands/DeleteRetrieverCommand.d.ts +38 -0
  281. package/dist-types/ts3.4/commands/DeleteUserCommand.d.ts +35 -0
  282. package/dist-types/ts3.4/commands/DeleteWebExperienceCommand.d.ts +39 -0
  283. package/dist-types/ts3.4/commands/GetApplicationCommand.d.ts +38 -0
  284. package/dist-types/ts3.4/commands/GetChatControlsConfigurationCommand.d.ts +42 -0
  285. package/dist-types/ts3.4/commands/GetDataSourceCommand.d.ts +38 -0
  286. package/dist-types/ts3.4/commands/GetGroupCommand.d.ts +35 -0
  287. package/dist-types/ts3.4/commands/GetIndexCommand.d.ts +35 -0
  288. package/dist-types/ts3.4/commands/GetPluginCommand.d.ts +35 -0
  289. package/dist-types/ts3.4/commands/GetRetrieverCommand.d.ts +35 -0
  290. package/dist-types/ts3.4/commands/GetUserCommand.d.ts +35 -0
  291. package/dist-types/ts3.4/commands/GetWebExperienceCommand.d.ts +38 -0
  292. package/dist-types/ts3.4/commands/ListApplicationsCommand.d.ts +38 -0
  293. package/dist-types/ts3.4/commands/ListConversationsCommand.d.ts +39 -0
  294. package/dist-types/ts3.4/commands/ListDataSourceSyncJobsCommand.d.ts +42 -0
  295. package/dist-types/ts3.4/commands/ListDataSourcesCommand.d.ts +38 -0
  296. package/dist-types/ts3.4/commands/ListDocumentsCommand.d.ts +38 -0
  297. package/dist-types/ts3.4/commands/ListGroupsCommand.d.ts +35 -0
  298. package/dist-types/ts3.4/commands/ListIndicesCommand.d.ts +35 -0
  299. package/dist-types/ts3.4/commands/ListMessagesCommand.d.ts +35 -0
  300. package/dist-types/ts3.4/commands/ListPluginsCommand.d.ts +35 -0
  301. package/dist-types/ts3.4/commands/ListRetrieversCommand.d.ts +38 -0
  302. package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +39 -0
  303. package/dist-types/ts3.4/commands/ListWebExperiencesCommand.d.ts +39 -0
  304. package/dist-types/ts3.4/commands/PutFeedbackCommand.d.ts +33 -0
  305. package/dist-types/ts3.4/commands/PutGroupCommand.d.ts +35 -0
  306. package/dist-types/ts3.4/commands/StartDataSourceSyncJobCommand.d.ts +42 -0
  307. package/dist-types/ts3.4/commands/StopDataSourceSyncJobCommand.d.ts +42 -0
  308. package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +35 -0
  309. package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +38 -0
  310. package/dist-types/ts3.4/commands/UpdateApplicationCommand.d.ts +39 -0
  311. package/dist-types/ts3.4/commands/UpdateChatControlsConfigurationCommand.d.ts +42 -0
  312. package/dist-types/ts3.4/commands/UpdateDataSourceCommand.d.ts +38 -0
  313. package/dist-types/ts3.4/commands/UpdateIndexCommand.d.ts +35 -0
  314. package/dist-types/ts3.4/commands/UpdatePluginCommand.d.ts +35 -0
  315. package/dist-types/ts3.4/commands/UpdateRetrieverCommand.d.ts +38 -0
  316. package/dist-types/ts3.4/commands/UpdateUserCommand.d.ts +35 -0
  317. package/dist-types/ts3.4/commands/UpdateWebExperienceCommand.d.ts +39 -0
  318. package/dist-types/ts3.4/commands/index.d.ts +55 -0
  319. package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +31 -0
  320. package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
  321. package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
  322. package/dist-types/ts3.4/extensionConfiguration.d.ts +7 -0
  323. package/dist-types/ts3.4/index.d.ts +10 -0
  324. package/dist-types/ts3.4/models/QBusinessServiceException.d.ts +8 -0
  325. package/dist-types/ts3.4/models/index.d.ts +1 -0
  326. package/dist-types/ts3.4/models/models_0.d.ts +1406 -0
  327. package/dist-types/ts3.4/pagination/GetChatControlsConfigurationPaginator.d.ts +11 -0
  328. package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
  329. package/dist-types/ts3.4/pagination/ListApplicationsPaginator.d.ts +11 -0
  330. package/dist-types/ts3.4/pagination/ListConversationsPaginator.d.ts +11 -0
  331. package/dist-types/ts3.4/pagination/ListDataSourceSyncJobsPaginator.d.ts +11 -0
  332. package/dist-types/ts3.4/pagination/ListDataSourcesPaginator.d.ts +11 -0
  333. package/dist-types/ts3.4/pagination/ListDocumentsPaginator.d.ts +11 -0
  334. package/dist-types/ts3.4/pagination/ListGroupsPaginator.d.ts +11 -0
  335. package/dist-types/ts3.4/pagination/ListIndicesPaginator.d.ts +11 -0
  336. package/dist-types/ts3.4/pagination/ListMessagesPaginator.d.ts +11 -0
  337. package/dist-types/ts3.4/pagination/ListPluginsPaginator.d.ts +11 -0
  338. package/dist-types/ts3.4/pagination/ListRetrieversPaginator.d.ts +11 -0
  339. package/dist-types/ts3.4/pagination/ListWebExperiencesPaginator.d.ts +11 -0
  340. package/dist-types/ts3.4/pagination/index.d.ts +13 -0
  341. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +665 -0
  342. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +97 -0
  343. package/dist-types/ts3.4/runtimeConfig.d.ts +97 -0
  344. package/dist-types/ts3.4/runtimeConfig.native.d.ts +88 -0
  345. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +19 -0
  346. package/dist-types/ts3.4/runtimeExtensions.d.ts +11 -0
  347. package/package.json +104 -0
@@ -0,0 +1,4522 @@
1
+ import { awsExpectUnion as __expectUnion } from "@aws-sdk/core";
2
+ import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
3
+ import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, take, withBaseException, } from "@smithy/smithy-client";
4
+ import { v4 as generateIdempotencyToken } from "uuid";
5
+ import { AccessDeniedException, ConflictException, DocumentAttributeValue, DocumentContent, InternalServerException, LicenseNotFoundException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
6
+ import { QBusinessServiceException as __BaseException } from "../models/QBusinessServiceException";
7
+ export const se_BatchDeleteDocumentCommand = async (input, context) => {
8
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
9
+ const headers = {
10
+ "content-type": "application/json",
11
+ };
12
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
13
+ "/applications/{applicationId}/indices/{indexId}/documents/delete";
14
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
15
+ resolvedPath = __resolvedPath(resolvedPath, input, "indexId", () => input.indexId, "{indexId}", false);
16
+ let body;
17
+ body = JSON.stringify(take(input, {
18
+ dataSourceSyncId: [],
19
+ documents: (_) => _json(_),
20
+ }));
21
+ return new __HttpRequest({
22
+ protocol,
23
+ hostname,
24
+ port,
25
+ method: "POST",
26
+ headers,
27
+ path: resolvedPath,
28
+ body,
29
+ });
30
+ };
31
+ export const se_BatchPutDocumentCommand = async (input, context) => {
32
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
33
+ const headers = {
34
+ "content-type": "application/json",
35
+ };
36
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
37
+ "/applications/{applicationId}/indices/{indexId}/documents";
38
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
39
+ resolvedPath = __resolvedPath(resolvedPath, input, "indexId", () => input.indexId, "{indexId}", false);
40
+ let body;
41
+ body = JSON.stringify(take(input, {
42
+ dataSourceSyncId: [],
43
+ documents: (_) => se_Documents(_, context),
44
+ roleArn: [],
45
+ }));
46
+ return new __HttpRequest({
47
+ protocol,
48
+ hostname,
49
+ port,
50
+ method: "POST",
51
+ headers,
52
+ path: resolvedPath,
53
+ body,
54
+ });
55
+ };
56
+ export const se_ChatSyncCommand = async (input, context) => {
57
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
58
+ const headers = {
59
+ "content-type": "application/json",
60
+ };
61
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
62
+ "/applications/{applicationId}/conversations";
63
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
64
+ const query = map({
65
+ sync: [, ""],
66
+ userId: [, __expectNonNull(input.userId, `userId`)],
67
+ userGroups: [() => input.userGroups !== void 0, () => (input.userGroups || []).map((_entry) => _entry)],
68
+ });
69
+ let body;
70
+ body = JSON.stringify(take(input, {
71
+ actionExecution: (_) => se_ActionExecution(_, context),
72
+ attachments: (_) => se_AttachmentsInput(_, context),
73
+ attributeFilter: (_) => se_AttributeFilter(_, context),
74
+ clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
75
+ conversationId: [],
76
+ parentMessageId: [],
77
+ userMessage: [],
78
+ }));
79
+ return new __HttpRequest({
80
+ protocol,
81
+ hostname,
82
+ port,
83
+ method: "POST",
84
+ headers,
85
+ path: resolvedPath,
86
+ query,
87
+ body,
88
+ });
89
+ };
90
+ export const se_CreateApplicationCommand = async (input, context) => {
91
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
92
+ const headers = {
93
+ "content-type": "application/json",
94
+ };
95
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications";
96
+ let body;
97
+ body = JSON.stringify(take(input, {
98
+ attachmentsConfiguration: (_) => _json(_),
99
+ clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
100
+ description: [],
101
+ displayName: [],
102
+ encryptionConfiguration: (_) => _json(_),
103
+ roleArn: [],
104
+ tags: (_) => _json(_),
105
+ }));
106
+ return new __HttpRequest({
107
+ protocol,
108
+ hostname,
109
+ port,
110
+ method: "POST",
111
+ headers,
112
+ path: resolvedPath,
113
+ body,
114
+ });
115
+ };
116
+ export const se_CreateDataSourceCommand = async (input, context) => {
117
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
118
+ const headers = {
119
+ "content-type": "application/json",
120
+ };
121
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
122
+ "/applications/{applicationId}/indices/{indexId}/datasources";
123
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
124
+ resolvedPath = __resolvedPath(resolvedPath, input, "indexId", () => input.indexId, "{indexId}", false);
125
+ let body;
126
+ body = JSON.stringify(take(input, {
127
+ clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
128
+ configuration: (_) => se_DataSourceConfiguration(_, context),
129
+ description: [],
130
+ displayName: [],
131
+ documentEnrichmentConfiguration: (_) => se_DocumentEnrichmentConfiguration(_, context),
132
+ roleArn: [],
133
+ syncSchedule: [],
134
+ tags: (_) => _json(_),
135
+ vpcConfiguration: (_) => _json(_),
136
+ }));
137
+ return new __HttpRequest({
138
+ protocol,
139
+ hostname,
140
+ port,
141
+ method: "POST",
142
+ headers,
143
+ path: resolvedPath,
144
+ body,
145
+ });
146
+ };
147
+ export const se_CreateIndexCommand = async (input, context) => {
148
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
149
+ const headers = {
150
+ "content-type": "application/json",
151
+ };
152
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{applicationId}/indices";
153
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
154
+ let body;
155
+ body = JSON.stringify(take(input, {
156
+ capacityConfiguration: (_) => _json(_),
157
+ clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
158
+ description: [],
159
+ displayName: [],
160
+ tags: (_) => _json(_),
161
+ }));
162
+ return new __HttpRequest({
163
+ protocol,
164
+ hostname,
165
+ port,
166
+ method: "POST",
167
+ headers,
168
+ path: resolvedPath,
169
+ body,
170
+ });
171
+ };
172
+ export const se_CreatePluginCommand = async (input, context) => {
173
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
174
+ const headers = {
175
+ "content-type": "application/json",
176
+ };
177
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{applicationId}/plugins";
178
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
179
+ let body;
180
+ body = JSON.stringify(take(input, {
181
+ authConfiguration: (_) => _json(_),
182
+ clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
183
+ displayName: [],
184
+ serverUrl: [],
185
+ tags: (_) => _json(_),
186
+ type: [],
187
+ }));
188
+ return new __HttpRequest({
189
+ protocol,
190
+ hostname,
191
+ port,
192
+ method: "POST",
193
+ headers,
194
+ path: resolvedPath,
195
+ body,
196
+ });
197
+ };
198
+ export const se_CreateRetrieverCommand = async (input, context) => {
199
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
200
+ const headers = {
201
+ "content-type": "application/json",
202
+ };
203
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{applicationId}/retrievers";
204
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
205
+ let body;
206
+ body = JSON.stringify(take(input, {
207
+ clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
208
+ configuration: (_) => _json(_),
209
+ displayName: [],
210
+ roleArn: [],
211
+ tags: (_) => _json(_),
212
+ type: [],
213
+ }));
214
+ return new __HttpRequest({
215
+ protocol,
216
+ hostname,
217
+ port,
218
+ method: "POST",
219
+ headers,
220
+ path: resolvedPath,
221
+ body,
222
+ });
223
+ };
224
+ export const se_CreateUserCommand = async (input, context) => {
225
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
226
+ const headers = {
227
+ "content-type": "application/json",
228
+ };
229
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{applicationId}/users";
230
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
231
+ let body;
232
+ body = JSON.stringify(take(input, {
233
+ clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
234
+ userAliases: (_) => _json(_),
235
+ userId: [],
236
+ }));
237
+ return new __HttpRequest({
238
+ protocol,
239
+ hostname,
240
+ port,
241
+ method: "POST",
242
+ headers,
243
+ path: resolvedPath,
244
+ body,
245
+ });
246
+ };
247
+ export const se_CreateWebExperienceCommand = async (input, context) => {
248
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
249
+ const headers = {
250
+ "content-type": "application/json",
251
+ };
252
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{applicationId}/experiences";
253
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
254
+ let body;
255
+ body = JSON.stringify(take(input, {
256
+ clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
257
+ samplePromptsControlMode: [],
258
+ subtitle: [],
259
+ tags: (_) => _json(_),
260
+ title: [],
261
+ welcomeMessage: [],
262
+ }));
263
+ return new __HttpRequest({
264
+ protocol,
265
+ hostname,
266
+ port,
267
+ method: "POST",
268
+ headers,
269
+ path: resolvedPath,
270
+ body,
271
+ });
272
+ };
273
+ export const se_DeleteApplicationCommand = async (input, context) => {
274
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
275
+ const headers = {};
276
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{applicationId}";
277
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
278
+ let body;
279
+ return new __HttpRequest({
280
+ protocol,
281
+ hostname,
282
+ port,
283
+ method: "DELETE",
284
+ headers,
285
+ path: resolvedPath,
286
+ body,
287
+ });
288
+ };
289
+ export const se_DeleteChatControlsConfigurationCommand = async (input, context) => {
290
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
291
+ const headers = {};
292
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
293
+ "/applications/{applicationId}/chatcontrols";
294
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
295
+ let body;
296
+ return new __HttpRequest({
297
+ protocol,
298
+ hostname,
299
+ port,
300
+ method: "DELETE",
301
+ headers,
302
+ path: resolvedPath,
303
+ body,
304
+ });
305
+ };
306
+ export const se_DeleteConversationCommand = async (input, context) => {
307
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
308
+ const headers = {};
309
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
310
+ "/applications/{applicationId}/conversations/{conversationId}";
311
+ resolvedPath = __resolvedPath(resolvedPath, input, "conversationId", () => input.conversationId, "{conversationId}", false);
312
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
313
+ const query = map({
314
+ userId: [, __expectNonNull(input.userId, `userId`)],
315
+ });
316
+ let body;
317
+ return new __HttpRequest({
318
+ protocol,
319
+ hostname,
320
+ port,
321
+ method: "DELETE",
322
+ headers,
323
+ path: resolvedPath,
324
+ query,
325
+ body,
326
+ });
327
+ };
328
+ export const se_DeleteDataSourceCommand = async (input, context) => {
329
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
330
+ const headers = {};
331
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
332
+ "/applications/{applicationId}/indices/{indexId}/datasources/{dataSourceId}";
333
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
334
+ resolvedPath = __resolvedPath(resolvedPath, input, "indexId", () => input.indexId, "{indexId}", false);
335
+ resolvedPath = __resolvedPath(resolvedPath, input, "dataSourceId", () => input.dataSourceId, "{dataSourceId}", false);
336
+ let body;
337
+ return new __HttpRequest({
338
+ protocol,
339
+ hostname,
340
+ port,
341
+ method: "DELETE",
342
+ headers,
343
+ path: resolvedPath,
344
+ body,
345
+ });
346
+ };
347
+ export const se_DeleteGroupCommand = async (input, context) => {
348
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
349
+ const headers = {};
350
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
351
+ "/applications/{applicationId}/indices/{indexId}/groups/{groupName}";
352
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
353
+ resolvedPath = __resolvedPath(resolvedPath, input, "indexId", () => input.indexId, "{indexId}", false);
354
+ resolvedPath = __resolvedPath(resolvedPath, input, "groupName", () => input.groupName, "{groupName}", false);
355
+ const query = map({
356
+ dataSourceId: [, input.dataSourceId],
357
+ });
358
+ let body;
359
+ return new __HttpRequest({
360
+ protocol,
361
+ hostname,
362
+ port,
363
+ method: "DELETE",
364
+ headers,
365
+ path: resolvedPath,
366
+ query,
367
+ body,
368
+ });
369
+ };
370
+ export const se_DeleteIndexCommand = async (input, context) => {
371
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
372
+ const headers = {};
373
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
374
+ "/applications/{applicationId}/indices/{indexId}";
375
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
376
+ resolvedPath = __resolvedPath(resolvedPath, input, "indexId", () => input.indexId, "{indexId}", false);
377
+ let body;
378
+ return new __HttpRequest({
379
+ protocol,
380
+ hostname,
381
+ port,
382
+ method: "DELETE",
383
+ headers,
384
+ path: resolvedPath,
385
+ body,
386
+ });
387
+ };
388
+ export const se_DeletePluginCommand = async (input, context) => {
389
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
390
+ const headers = {};
391
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
392
+ "/applications/{applicationId}/plugins/{pluginId}";
393
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
394
+ resolvedPath = __resolvedPath(resolvedPath, input, "pluginId", () => input.pluginId, "{pluginId}", false);
395
+ let body;
396
+ return new __HttpRequest({
397
+ protocol,
398
+ hostname,
399
+ port,
400
+ method: "DELETE",
401
+ headers,
402
+ path: resolvedPath,
403
+ body,
404
+ });
405
+ };
406
+ export const se_DeleteRetrieverCommand = async (input, context) => {
407
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
408
+ const headers = {};
409
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
410
+ "/applications/{applicationId}/retrievers/{retrieverId}";
411
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
412
+ resolvedPath = __resolvedPath(resolvedPath, input, "retrieverId", () => input.retrieverId, "{retrieverId}", false);
413
+ let body;
414
+ return new __HttpRequest({
415
+ protocol,
416
+ hostname,
417
+ port,
418
+ method: "DELETE",
419
+ headers,
420
+ path: resolvedPath,
421
+ body,
422
+ });
423
+ };
424
+ export const se_DeleteUserCommand = async (input, context) => {
425
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
426
+ const headers = {};
427
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
428
+ "/applications/{applicationId}/users/{userId}";
429
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
430
+ resolvedPath = __resolvedPath(resolvedPath, input, "userId", () => input.userId, "{userId}", false);
431
+ let body;
432
+ return new __HttpRequest({
433
+ protocol,
434
+ hostname,
435
+ port,
436
+ method: "DELETE",
437
+ headers,
438
+ path: resolvedPath,
439
+ body,
440
+ });
441
+ };
442
+ export const se_DeleteWebExperienceCommand = async (input, context) => {
443
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
444
+ const headers = {};
445
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
446
+ "/applications/{applicationId}/experiences/{webExperienceId}";
447
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
448
+ resolvedPath = __resolvedPath(resolvedPath, input, "webExperienceId", () => input.webExperienceId, "{webExperienceId}", false);
449
+ let body;
450
+ return new __HttpRequest({
451
+ protocol,
452
+ hostname,
453
+ port,
454
+ method: "DELETE",
455
+ headers,
456
+ path: resolvedPath,
457
+ body,
458
+ });
459
+ };
460
+ export const se_GetApplicationCommand = async (input, context) => {
461
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
462
+ const headers = {};
463
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{applicationId}";
464
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
465
+ let body;
466
+ return new __HttpRequest({
467
+ protocol,
468
+ hostname,
469
+ port,
470
+ method: "GET",
471
+ headers,
472
+ path: resolvedPath,
473
+ body,
474
+ });
475
+ };
476
+ export const se_GetChatControlsConfigurationCommand = async (input, context) => {
477
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
478
+ const headers = {};
479
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
480
+ "/applications/{applicationId}/chatcontrols";
481
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
482
+ const query = map({
483
+ maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
484
+ nextToken: [, input.nextToken],
485
+ });
486
+ let body;
487
+ return new __HttpRequest({
488
+ protocol,
489
+ hostname,
490
+ port,
491
+ method: "GET",
492
+ headers,
493
+ path: resolvedPath,
494
+ query,
495
+ body,
496
+ });
497
+ };
498
+ export const se_GetDataSourceCommand = async (input, context) => {
499
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
500
+ const headers = {};
501
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
502
+ "/applications/{applicationId}/indices/{indexId}/datasources/{dataSourceId}";
503
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
504
+ resolvedPath = __resolvedPath(resolvedPath, input, "indexId", () => input.indexId, "{indexId}", false);
505
+ resolvedPath = __resolvedPath(resolvedPath, input, "dataSourceId", () => input.dataSourceId, "{dataSourceId}", false);
506
+ let body;
507
+ return new __HttpRequest({
508
+ protocol,
509
+ hostname,
510
+ port,
511
+ method: "GET",
512
+ headers,
513
+ path: resolvedPath,
514
+ body,
515
+ });
516
+ };
517
+ export const se_GetGroupCommand = async (input, context) => {
518
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
519
+ const headers = {};
520
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
521
+ "/applications/{applicationId}/indices/{indexId}/groups/{groupName}";
522
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
523
+ resolvedPath = __resolvedPath(resolvedPath, input, "indexId", () => input.indexId, "{indexId}", false);
524
+ resolvedPath = __resolvedPath(resolvedPath, input, "groupName", () => input.groupName, "{groupName}", false);
525
+ const query = map({
526
+ dataSourceId: [, input.dataSourceId],
527
+ });
528
+ let body;
529
+ return new __HttpRequest({
530
+ protocol,
531
+ hostname,
532
+ port,
533
+ method: "GET",
534
+ headers,
535
+ path: resolvedPath,
536
+ query,
537
+ body,
538
+ });
539
+ };
540
+ export const se_GetIndexCommand = async (input, context) => {
541
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
542
+ const headers = {};
543
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
544
+ "/applications/{applicationId}/indices/{indexId}";
545
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
546
+ resolvedPath = __resolvedPath(resolvedPath, input, "indexId", () => input.indexId, "{indexId}", false);
547
+ let body;
548
+ return new __HttpRequest({
549
+ protocol,
550
+ hostname,
551
+ port,
552
+ method: "GET",
553
+ headers,
554
+ path: resolvedPath,
555
+ body,
556
+ });
557
+ };
558
+ export const se_GetPluginCommand = async (input, context) => {
559
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
560
+ const headers = {};
561
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
562
+ "/applications/{applicationId}/plugins/{pluginId}";
563
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
564
+ resolvedPath = __resolvedPath(resolvedPath, input, "pluginId", () => input.pluginId, "{pluginId}", false);
565
+ let body;
566
+ return new __HttpRequest({
567
+ protocol,
568
+ hostname,
569
+ port,
570
+ method: "GET",
571
+ headers,
572
+ path: resolvedPath,
573
+ body,
574
+ });
575
+ };
576
+ export const se_GetRetrieverCommand = async (input, context) => {
577
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
578
+ const headers = {};
579
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
580
+ "/applications/{applicationId}/retrievers/{retrieverId}";
581
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
582
+ resolvedPath = __resolvedPath(resolvedPath, input, "retrieverId", () => input.retrieverId, "{retrieverId}", false);
583
+ let body;
584
+ return new __HttpRequest({
585
+ protocol,
586
+ hostname,
587
+ port,
588
+ method: "GET",
589
+ headers,
590
+ path: resolvedPath,
591
+ body,
592
+ });
593
+ };
594
+ export const se_GetUserCommand = async (input, context) => {
595
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
596
+ const headers = {};
597
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
598
+ "/applications/{applicationId}/users/{userId}";
599
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
600
+ resolvedPath = __resolvedPath(resolvedPath, input, "userId", () => input.userId, "{userId}", false);
601
+ let body;
602
+ return new __HttpRequest({
603
+ protocol,
604
+ hostname,
605
+ port,
606
+ method: "GET",
607
+ headers,
608
+ path: resolvedPath,
609
+ body,
610
+ });
611
+ };
612
+ export const se_GetWebExperienceCommand = async (input, context) => {
613
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
614
+ const headers = {};
615
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
616
+ "/applications/{applicationId}/experiences/{webExperienceId}";
617
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
618
+ resolvedPath = __resolvedPath(resolvedPath, input, "webExperienceId", () => input.webExperienceId, "{webExperienceId}", false);
619
+ let body;
620
+ return new __HttpRequest({
621
+ protocol,
622
+ hostname,
623
+ port,
624
+ method: "GET",
625
+ headers,
626
+ path: resolvedPath,
627
+ body,
628
+ });
629
+ };
630
+ export const se_ListApplicationsCommand = async (input, context) => {
631
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
632
+ const headers = {};
633
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications";
634
+ const query = map({
635
+ nextToken: [, input.nextToken],
636
+ maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
637
+ });
638
+ let body;
639
+ return new __HttpRequest({
640
+ protocol,
641
+ hostname,
642
+ port,
643
+ method: "GET",
644
+ headers,
645
+ path: resolvedPath,
646
+ query,
647
+ body,
648
+ });
649
+ };
650
+ export const se_ListConversationsCommand = async (input, context) => {
651
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
652
+ const headers = {};
653
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
654
+ "/applications/{applicationId}/conversations";
655
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
656
+ const query = map({
657
+ userId: [, __expectNonNull(input.userId, `userId`)],
658
+ nextToken: [, input.nextToken],
659
+ maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
660
+ });
661
+ let body;
662
+ return new __HttpRequest({
663
+ protocol,
664
+ hostname,
665
+ port,
666
+ method: "GET",
667
+ headers,
668
+ path: resolvedPath,
669
+ query,
670
+ body,
671
+ });
672
+ };
673
+ export const se_ListDataSourcesCommand = async (input, context) => {
674
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
675
+ const headers = {};
676
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
677
+ "/applications/{applicationId}/indices/{indexId}/datasources";
678
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
679
+ resolvedPath = __resolvedPath(resolvedPath, input, "indexId", () => input.indexId, "{indexId}", false);
680
+ const query = map({
681
+ nextToken: [, input.nextToken],
682
+ maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
683
+ });
684
+ let body;
685
+ return new __HttpRequest({
686
+ protocol,
687
+ hostname,
688
+ port,
689
+ method: "GET",
690
+ headers,
691
+ path: resolvedPath,
692
+ query,
693
+ body,
694
+ });
695
+ };
696
+ export const se_ListDataSourceSyncJobsCommand = async (input, context) => {
697
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
698
+ const headers = {};
699
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
700
+ "/applications/{applicationId}/indices/{indexId}/datasources/{dataSourceId}/syncjobs";
701
+ resolvedPath = __resolvedPath(resolvedPath, input, "dataSourceId", () => input.dataSourceId, "{dataSourceId}", false);
702
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
703
+ resolvedPath = __resolvedPath(resolvedPath, input, "indexId", () => input.indexId, "{indexId}", false);
704
+ const query = map({
705
+ nextToken: [, input.nextToken],
706
+ maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
707
+ startTime: [
708
+ () => input.startTime !== void 0,
709
+ () => (input.startTime.toISOString().split(".")[0] + "Z").toString(),
710
+ ],
711
+ endTime: [() => input.endTime !== void 0, () => (input.endTime.toISOString().split(".")[0] + "Z").toString()],
712
+ syncStatus: [, input.statusFilter],
713
+ });
714
+ let body;
715
+ return new __HttpRequest({
716
+ protocol,
717
+ hostname,
718
+ port,
719
+ method: "GET",
720
+ headers,
721
+ path: resolvedPath,
722
+ query,
723
+ body,
724
+ });
725
+ };
726
+ export const se_ListDocumentsCommand = async (input, context) => {
727
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
728
+ const headers = {};
729
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
730
+ "/applications/{applicationId}/index/{indexId}/documents";
731
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
732
+ resolvedPath = __resolvedPath(resolvedPath, input, "indexId", () => input.indexId, "{indexId}", false);
733
+ const query = map({
734
+ dataSourceIds: [
735
+ () => input.dataSourceIds !== void 0,
736
+ () => (input.dataSourceIds || []).map((_entry) => _entry),
737
+ ],
738
+ nextToken: [, input.nextToken],
739
+ maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
740
+ });
741
+ let body;
742
+ return new __HttpRequest({
743
+ protocol,
744
+ hostname,
745
+ port,
746
+ method: "GET",
747
+ headers,
748
+ path: resolvedPath,
749
+ query,
750
+ body,
751
+ });
752
+ };
753
+ export const se_ListGroupsCommand = async (input, context) => {
754
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
755
+ const headers = {};
756
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
757
+ "/applications/{applicationId}/indices/{indexId}/groups";
758
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
759
+ resolvedPath = __resolvedPath(resolvedPath, input, "indexId", () => input.indexId, "{indexId}", false);
760
+ const query = map({
761
+ updatedEarlierThan: [
762
+ __expectNonNull(input.updatedEarlierThan, `updatedEarlierThan`) != null,
763
+ () => (input.updatedEarlierThan.toISOString().split(".")[0] + "Z").toString(),
764
+ ],
765
+ dataSourceId: [, input.dataSourceId],
766
+ nextToken: [, input.nextToken],
767
+ maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
768
+ });
769
+ let body;
770
+ return new __HttpRequest({
771
+ protocol,
772
+ hostname,
773
+ port,
774
+ method: "GET",
775
+ headers,
776
+ path: resolvedPath,
777
+ query,
778
+ body,
779
+ });
780
+ };
781
+ export const se_ListIndicesCommand = async (input, context) => {
782
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
783
+ const headers = {};
784
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{applicationId}/indices";
785
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
786
+ const query = map({
787
+ nextToken: [, input.nextToken],
788
+ maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
789
+ });
790
+ let body;
791
+ return new __HttpRequest({
792
+ protocol,
793
+ hostname,
794
+ port,
795
+ method: "GET",
796
+ headers,
797
+ path: resolvedPath,
798
+ query,
799
+ body,
800
+ });
801
+ };
802
+ export const se_ListMessagesCommand = async (input, context) => {
803
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
804
+ const headers = {};
805
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
806
+ "/applications/{applicationId}/conversations/{conversationId}";
807
+ resolvedPath = __resolvedPath(resolvedPath, input, "conversationId", () => input.conversationId, "{conversationId}", false);
808
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
809
+ const query = map({
810
+ userId: [, __expectNonNull(input.userId, `userId`)],
811
+ nextToken: [, input.nextToken],
812
+ maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
813
+ });
814
+ let body;
815
+ return new __HttpRequest({
816
+ protocol,
817
+ hostname,
818
+ port,
819
+ method: "GET",
820
+ headers,
821
+ path: resolvedPath,
822
+ query,
823
+ body,
824
+ });
825
+ };
826
+ export const se_ListPluginsCommand = async (input, context) => {
827
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
828
+ const headers = {};
829
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{applicationId}/plugins";
830
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
831
+ const query = map({
832
+ nextToken: [, input.nextToken],
833
+ maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
834
+ });
835
+ let body;
836
+ return new __HttpRequest({
837
+ protocol,
838
+ hostname,
839
+ port,
840
+ method: "GET",
841
+ headers,
842
+ path: resolvedPath,
843
+ query,
844
+ body,
845
+ });
846
+ };
847
+ export const se_ListRetrieversCommand = async (input, context) => {
848
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
849
+ const headers = {};
850
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{applicationId}/retrievers";
851
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
852
+ const query = map({
853
+ nextToken: [, input.nextToken],
854
+ maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
855
+ });
856
+ let body;
857
+ return new __HttpRequest({
858
+ protocol,
859
+ hostname,
860
+ port,
861
+ method: "GET",
862
+ headers,
863
+ path: resolvedPath,
864
+ query,
865
+ body,
866
+ });
867
+ };
868
+ export const se_ListTagsForResourceCommand = async (input, context) => {
869
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
870
+ const headers = {};
871
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/tags/{resourceARN}";
872
+ resolvedPath = __resolvedPath(resolvedPath, input, "resourceARN", () => input.resourceARN, "{resourceARN}", false);
873
+ let body;
874
+ return new __HttpRequest({
875
+ protocol,
876
+ hostname,
877
+ port,
878
+ method: "GET",
879
+ headers,
880
+ path: resolvedPath,
881
+ body,
882
+ });
883
+ };
884
+ export const se_ListWebExperiencesCommand = async (input, context) => {
885
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
886
+ const headers = {};
887
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{applicationId}/experiences";
888
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
889
+ const query = map({
890
+ nextToken: [, input.nextToken],
891
+ maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
892
+ });
893
+ let body;
894
+ return new __HttpRequest({
895
+ protocol,
896
+ hostname,
897
+ port,
898
+ method: "GET",
899
+ headers,
900
+ path: resolvedPath,
901
+ query,
902
+ body,
903
+ });
904
+ };
905
+ export const se_PutFeedbackCommand = async (input, context) => {
906
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
907
+ const headers = {
908
+ "content-type": "application/json",
909
+ };
910
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
911
+ "/applications/{applicationId}/conversations/{conversationId}/messages/{messageId}/feedback";
912
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
913
+ resolvedPath = __resolvedPath(resolvedPath, input, "conversationId", () => input.conversationId, "{conversationId}", false);
914
+ resolvedPath = __resolvedPath(resolvedPath, input, "messageId", () => input.messageId, "{messageId}", false);
915
+ const query = map({
916
+ userId: [, __expectNonNull(input.userId, `userId`)],
917
+ });
918
+ let body;
919
+ body = JSON.stringify(take(input, {
920
+ messageCopiedAt: (_) => Math.round(_.getTime() / 1000),
921
+ messageUsefulness: (_) => se_MessageUsefulnessFeedback(_, context),
922
+ }));
923
+ return new __HttpRequest({
924
+ protocol,
925
+ hostname,
926
+ port,
927
+ method: "POST",
928
+ headers,
929
+ path: resolvedPath,
930
+ query,
931
+ body,
932
+ });
933
+ };
934
+ export const se_PutGroupCommand = async (input, context) => {
935
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
936
+ const headers = {
937
+ "content-type": "application/json",
938
+ };
939
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
940
+ "/applications/{applicationId}/indices/{indexId}/groups";
941
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
942
+ resolvedPath = __resolvedPath(resolvedPath, input, "indexId", () => input.indexId, "{indexId}", false);
943
+ let body;
944
+ body = JSON.stringify(take(input, {
945
+ dataSourceId: [],
946
+ groupMembers: (_) => _json(_),
947
+ groupName: [],
948
+ type: [],
949
+ }));
950
+ return new __HttpRequest({
951
+ protocol,
952
+ hostname,
953
+ port,
954
+ method: "PUT",
955
+ headers,
956
+ path: resolvedPath,
957
+ body,
958
+ });
959
+ };
960
+ export const se_StartDataSourceSyncJobCommand = async (input, context) => {
961
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
962
+ const headers = {};
963
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
964
+ "/applications/{applicationId}/indices/{indexId}/datasources/{dataSourceId}/startsync";
965
+ resolvedPath = __resolvedPath(resolvedPath, input, "dataSourceId", () => input.dataSourceId, "{dataSourceId}", false);
966
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
967
+ resolvedPath = __resolvedPath(resolvedPath, input, "indexId", () => input.indexId, "{indexId}", false);
968
+ let body;
969
+ return new __HttpRequest({
970
+ protocol,
971
+ hostname,
972
+ port,
973
+ method: "POST",
974
+ headers,
975
+ path: resolvedPath,
976
+ body,
977
+ });
978
+ };
979
+ export const se_StopDataSourceSyncJobCommand = async (input, context) => {
980
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
981
+ const headers = {};
982
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
983
+ "/applications/{applicationId}/indices/{indexId}/datasources/{dataSourceId}/stopsync";
984
+ resolvedPath = __resolvedPath(resolvedPath, input, "dataSourceId", () => input.dataSourceId, "{dataSourceId}", false);
985
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
986
+ resolvedPath = __resolvedPath(resolvedPath, input, "indexId", () => input.indexId, "{indexId}", false);
987
+ let body;
988
+ return new __HttpRequest({
989
+ protocol,
990
+ hostname,
991
+ port,
992
+ method: "POST",
993
+ headers,
994
+ path: resolvedPath,
995
+ body,
996
+ });
997
+ };
998
+ export const se_TagResourceCommand = async (input, context) => {
999
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1000
+ const headers = {
1001
+ "content-type": "application/json",
1002
+ };
1003
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/tags/{resourceARN}";
1004
+ resolvedPath = __resolvedPath(resolvedPath, input, "resourceARN", () => input.resourceARN, "{resourceARN}", false);
1005
+ let body;
1006
+ body = JSON.stringify(take(input, {
1007
+ tags: (_) => _json(_),
1008
+ }));
1009
+ return new __HttpRequest({
1010
+ protocol,
1011
+ hostname,
1012
+ port,
1013
+ method: "POST",
1014
+ headers,
1015
+ path: resolvedPath,
1016
+ body,
1017
+ });
1018
+ };
1019
+ export const se_UntagResourceCommand = async (input, context) => {
1020
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1021
+ const headers = {};
1022
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/tags/{resourceARN}";
1023
+ resolvedPath = __resolvedPath(resolvedPath, input, "resourceARN", () => input.resourceARN, "{resourceARN}", false);
1024
+ const query = map({
1025
+ tagKeys: [
1026
+ __expectNonNull(input.tagKeys, `tagKeys`) != null,
1027
+ () => (input.tagKeys || []).map((_entry) => _entry),
1028
+ ],
1029
+ });
1030
+ let body;
1031
+ return new __HttpRequest({
1032
+ protocol,
1033
+ hostname,
1034
+ port,
1035
+ method: "DELETE",
1036
+ headers,
1037
+ path: resolvedPath,
1038
+ query,
1039
+ body,
1040
+ });
1041
+ };
1042
+ export const se_UpdateApplicationCommand = async (input, context) => {
1043
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1044
+ const headers = {
1045
+ "content-type": "application/json",
1046
+ };
1047
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{applicationId}";
1048
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
1049
+ let body;
1050
+ body = JSON.stringify(take(input, {
1051
+ attachmentsConfiguration: (_) => _json(_),
1052
+ description: [],
1053
+ displayName: [],
1054
+ roleArn: [],
1055
+ }));
1056
+ return new __HttpRequest({
1057
+ protocol,
1058
+ hostname,
1059
+ port,
1060
+ method: "PUT",
1061
+ headers,
1062
+ path: resolvedPath,
1063
+ body,
1064
+ });
1065
+ };
1066
+ export const se_UpdateChatControlsConfigurationCommand = async (input, context) => {
1067
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1068
+ const headers = {
1069
+ "content-type": "application/json",
1070
+ };
1071
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1072
+ "/applications/{applicationId}/chatcontrols";
1073
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
1074
+ let body;
1075
+ body = JSON.stringify(take(input, {
1076
+ blockedPhrasesConfigurationUpdate: (_) => _json(_),
1077
+ clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
1078
+ responseScope: [],
1079
+ topicConfigurationsToCreateOrUpdate: (_) => _json(_),
1080
+ topicConfigurationsToDelete: (_) => _json(_),
1081
+ }));
1082
+ return new __HttpRequest({
1083
+ protocol,
1084
+ hostname,
1085
+ port,
1086
+ method: "PATCH",
1087
+ headers,
1088
+ path: resolvedPath,
1089
+ body,
1090
+ });
1091
+ };
1092
+ export const se_UpdateDataSourceCommand = async (input, context) => {
1093
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1094
+ const headers = {
1095
+ "content-type": "application/json",
1096
+ };
1097
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1098
+ "/applications/{applicationId}/indices/{indexId}/datasources/{dataSourceId}";
1099
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
1100
+ resolvedPath = __resolvedPath(resolvedPath, input, "indexId", () => input.indexId, "{indexId}", false);
1101
+ resolvedPath = __resolvedPath(resolvedPath, input, "dataSourceId", () => input.dataSourceId, "{dataSourceId}", false);
1102
+ let body;
1103
+ body = JSON.stringify(take(input, {
1104
+ configuration: (_) => se_DataSourceConfiguration(_, context),
1105
+ description: [],
1106
+ displayName: [],
1107
+ documentEnrichmentConfiguration: (_) => se_DocumentEnrichmentConfiguration(_, context),
1108
+ roleArn: [],
1109
+ syncSchedule: [],
1110
+ vpcConfiguration: (_) => _json(_),
1111
+ }));
1112
+ return new __HttpRequest({
1113
+ protocol,
1114
+ hostname,
1115
+ port,
1116
+ method: "PUT",
1117
+ headers,
1118
+ path: resolvedPath,
1119
+ body,
1120
+ });
1121
+ };
1122
+ export const se_UpdateIndexCommand = async (input, context) => {
1123
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1124
+ const headers = {
1125
+ "content-type": "application/json",
1126
+ };
1127
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1128
+ "/applications/{applicationId}/indices/{indexId}";
1129
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
1130
+ resolvedPath = __resolvedPath(resolvedPath, input, "indexId", () => input.indexId, "{indexId}", false);
1131
+ let body;
1132
+ body = JSON.stringify(take(input, {
1133
+ capacityConfiguration: (_) => _json(_),
1134
+ description: [],
1135
+ displayName: [],
1136
+ documentAttributeConfigurations: (_) => _json(_),
1137
+ }));
1138
+ return new __HttpRequest({
1139
+ protocol,
1140
+ hostname,
1141
+ port,
1142
+ method: "PUT",
1143
+ headers,
1144
+ path: resolvedPath,
1145
+ body,
1146
+ });
1147
+ };
1148
+ export const se_UpdatePluginCommand = async (input, context) => {
1149
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1150
+ const headers = {
1151
+ "content-type": "application/json",
1152
+ };
1153
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1154
+ "/applications/{applicationId}/plugins/{pluginId}";
1155
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
1156
+ resolvedPath = __resolvedPath(resolvedPath, input, "pluginId", () => input.pluginId, "{pluginId}", false);
1157
+ let body;
1158
+ body = JSON.stringify(take(input, {
1159
+ authConfiguration: (_) => _json(_),
1160
+ displayName: [],
1161
+ serverUrl: [],
1162
+ state: [],
1163
+ }));
1164
+ return new __HttpRequest({
1165
+ protocol,
1166
+ hostname,
1167
+ port,
1168
+ method: "PUT",
1169
+ headers,
1170
+ path: resolvedPath,
1171
+ body,
1172
+ });
1173
+ };
1174
+ export const se_UpdateRetrieverCommand = async (input, context) => {
1175
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1176
+ const headers = {
1177
+ "content-type": "application/json",
1178
+ };
1179
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1180
+ "/applications/{applicationId}/retrievers/{retrieverId}";
1181
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
1182
+ resolvedPath = __resolvedPath(resolvedPath, input, "retrieverId", () => input.retrieverId, "{retrieverId}", false);
1183
+ let body;
1184
+ body = JSON.stringify(take(input, {
1185
+ configuration: (_) => _json(_),
1186
+ displayName: [],
1187
+ roleArn: [],
1188
+ }));
1189
+ return new __HttpRequest({
1190
+ protocol,
1191
+ hostname,
1192
+ port,
1193
+ method: "PUT",
1194
+ headers,
1195
+ path: resolvedPath,
1196
+ body,
1197
+ });
1198
+ };
1199
+ export const se_UpdateUserCommand = async (input, context) => {
1200
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1201
+ const headers = {
1202
+ "content-type": "application/json",
1203
+ };
1204
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1205
+ "/applications/{applicationId}/users/{userId}";
1206
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
1207
+ resolvedPath = __resolvedPath(resolvedPath, input, "userId", () => input.userId, "{userId}", false);
1208
+ let body;
1209
+ body = JSON.stringify(take(input, {
1210
+ userAliasesToDelete: (_) => _json(_),
1211
+ userAliasesToUpdate: (_) => _json(_),
1212
+ }));
1213
+ return new __HttpRequest({
1214
+ protocol,
1215
+ hostname,
1216
+ port,
1217
+ method: "PUT",
1218
+ headers,
1219
+ path: resolvedPath,
1220
+ body,
1221
+ });
1222
+ };
1223
+ export const se_UpdateWebExperienceCommand = async (input, context) => {
1224
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1225
+ const headers = {
1226
+ "content-type": "application/json",
1227
+ };
1228
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1229
+ "/applications/{applicationId}/experiences/{webExperienceId}";
1230
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
1231
+ resolvedPath = __resolvedPath(resolvedPath, input, "webExperienceId", () => input.webExperienceId, "{webExperienceId}", false);
1232
+ let body;
1233
+ body = JSON.stringify(take(input, {
1234
+ authenticationConfiguration: (_) => _json(_),
1235
+ samplePromptsControlMode: [],
1236
+ subtitle: [],
1237
+ title: [],
1238
+ welcomeMessage: [],
1239
+ }));
1240
+ return new __HttpRequest({
1241
+ protocol,
1242
+ hostname,
1243
+ port,
1244
+ method: "PUT",
1245
+ headers,
1246
+ path: resolvedPath,
1247
+ body,
1248
+ });
1249
+ };
1250
+ export const de_BatchDeleteDocumentCommand = async (output, context) => {
1251
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1252
+ return de_BatchDeleteDocumentCommandError(output, context);
1253
+ }
1254
+ const contents = map({
1255
+ $metadata: deserializeMetadata(output),
1256
+ });
1257
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1258
+ const doc = take(data, {
1259
+ failedDocuments: _json,
1260
+ });
1261
+ Object.assign(contents, doc);
1262
+ return contents;
1263
+ };
1264
+ const de_BatchDeleteDocumentCommandError = async (output, context) => {
1265
+ const parsedOutput = {
1266
+ ...output,
1267
+ body: await parseErrorBody(output.body, context),
1268
+ };
1269
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1270
+ switch (errorCode) {
1271
+ case "AccessDeniedException":
1272
+ case "com.amazonaws.qbusiness#AccessDeniedException":
1273
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1274
+ case "ConflictException":
1275
+ case "com.amazonaws.qbusiness#ConflictException":
1276
+ throw await de_ConflictExceptionRes(parsedOutput, context);
1277
+ case "InternalServerException":
1278
+ case "com.amazonaws.qbusiness#InternalServerException":
1279
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1280
+ case "ResourceNotFoundException":
1281
+ case "com.amazonaws.qbusiness#ResourceNotFoundException":
1282
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1283
+ case "ThrottlingException":
1284
+ case "com.amazonaws.qbusiness#ThrottlingException":
1285
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1286
+ case "ValidationException":
1287
+ case "com.amazonaws.qbusiness#ValidationException":
1288
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1289
+ default:
1290
+ const parsedBody = parsedOutput.body;
1291
+ return throwDefaultError({
1292
+ output,
1293
+ parsedBody,
1294
+ errorCode,
1295
+ });
1296
+ }
1297
+ };
1298
+ export const de_BatchPutDocumentCommand = async (output, context) => {
1299
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1300
+ return de_BatchPutDocumentCommandError(output, context);
1301
+ }
1302
+ const contents = map({
1303
+ $metadata: deserializeMetadata(output),
1304
+ });
1305
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1306
+ const doc = take(data, {
1307
+ failedDocuments: _json,
1308
+ });
1309
+ Object.assign(contents, doc);
1310
+ return contents;
1311
+ };
1312
+ const de_BatchPutDocumentCommandError = async (output, context) => {
1313
+ const parsedOutput = {
1314
+ ...output,
1315
+ body: await parseErrorBody(output.body, context),
1316
+ };
1317
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1318
+ switch (errorCode) {
1319
+ case "AccessDeniedException":
1320
+ case "com.amazonaws.qbusiness#AccessDeniedException":
1321
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1322
+ case "ConflictException":
1323
+ case "com.amazonaws.qbusiness#ConflictException":
1324
+ throw await de_ConflictExceptionRes(parsedOutput, context);
1325
+ case "InternalServerException":
1326
+ case "com.amazonaws.qbusiness#InternalServerException":
1327
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1328
+ case "ResourceNotFoundException":
1329
+ case "com.amazonaws.qbusiness#ResourceNotFoundException":
1330
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1331
+ case "ServiceQuotaExceededException":
1332
+ case "com.amazonaws.qbusiness#ServiceQuotaExceededException":
1333
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1334
+ case "ThrottlingException":
1335
+ case "com.amazonaws.qbusiness#ThrottlingException":
1336
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1337
+ case "ValidationException":
1338
+ case "com.amazonaws.qbusiness#ValidationException":
1339
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1340
+ default:
1341
+ const parsedBody = parsedOutput.body;
1342
+ return throwDefaultError({
1343
+ output,
1344
+ parsedBody,
1345
+ errorCode,
1346
+ });
1347
+ }
1348
+ };
1349
+ export const de_ChatSyncCommand = async (output, context) => {
1350
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1351
+ return de_ChatSyncCommandError(output, context);
1352
+ }
1353
+ const contents = map({
1354
+ $metadata: deserializeMetadata(output),
1355
+ });
1356
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1357
+ const doc = take(data, {
1358
+ actionReview: (_) => de_ActionReview(_, context),
1359
+ conversationId: __expectString,
1360
+ failedAttachments: _json,
1361
+ sourceAttributions: (_) => de_SourceAttributions(_, context),
1362
+ systemMessage: __expectString,
1363
+ systemMessageId: __expectString,
1364
+ userMessageId: __expectString,
1365
+ });
1366
+ Object.assign(contents, doc);
1367
+ return contents;
1368
+ };
1369
+ const de_ChatSyncCommandError = async (output, context) => {
1370
+ const parsedOutput = {
1371
+ ...output,
1372
+ body: await parseErrorBody(output.body, context),
1373
+ };
1374
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1375
+ switch (errorCode) {
1376
+ case "AccessDeniedException":
1377
+ case "com.amazonaws.qbusiness#AccessDeniedException":
1378
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1379
+ case "ConflictException":
1380
+ case "com.amazonaws.qbusiness#ConflictException":
1381
+ throw await de_ConflictExceptionRes(parsedOutput, context);
1382
+ case "InternalServerException":
1383
+ case "com.amazonaws.qbusiness#InternalServerException":
1384
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1385
+ case "LicenseNotFoundException":
1386
+ case "com.amazonaws.qbusiness#LicenseNotFoundException":
1387
+ throw await de_LicenseNotFoundExceptionRes(parsedOutput, context);
1388
+ case "ResourceNotFoundException":
1389
+ case "com.amazonaws.qbusiness#ResourceNotFoundException":
1390
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1391
+ case "ThrottlingException":
1392
+ case "com.amazonaws.qbusiness#ThrottlingException":
1393
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1394
+ case "ValidationException":
1395
+ case "com.amazonaws.qbusiness#ValidationException":
1396
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1397
+ default:
1398
+ const parsedBody = parsedOutput.body;
1399
+ return throwDefaultError({
1400
+ output,
1401
+ parsedBody,
1402
+ errorCode,
1403
+ });
1404
+ }
1405
+ };
1406
+ export const de_CreateApplicationCommand = async (output, context) => {
1407
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1408
+ return de_CreateApplicationCommandError(output, context);
1409
+ }
1410
+ const contents = map({
1411
+ $metadata: deserializeMetadata(output),
1412
+ });
1413
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1414
+ const doc = take(data, {
1415
+ applicationArn: __expectString,
1416
+ applicationId: __expectString,
1417
+ });
1418
+ Object.assign(contents, doc);
1419
+ return contents;
1420
+ };
1421
+ const de_CreateApplicationCommandError = async (output, context) => {
1422
+ const parsedOutput = {
1423
+ ...output,
1424
+ body: await parseErrorBody(output.body, context),
1425
+ };
1426
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1427
+ switch (errorCode) {
1428
+ case "AccessDeniedException":
1429
+ case "com.amazonaws.qbusiness#AccessDeniedException":
1430
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1431
+ case "ConflictException":
1432
+ case "com.amazonaws.qbusiness#ConflictException":
1433
+ throw await de_ConflictExceptionRes(parsedOutput, context);
1434
+ case "InternalServerException":
1435
+ case "com.amazonaws.qbusiness#InternalServerException":
1436
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1437
+ case "ResourceNotFoundException":
1438
+ case "com.amazonaws.qbusiness#ResourceNotFoundException":
1439
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1440
+ case "ServiceQuotaExceededException":
1441
+ case "com.amazonaws.qbusiness#ServiceQuotaExceededException":
1442
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1443
+ case "ThrottlingException":
1444
+ case "com.amazonaws.qbusiness#ThrottlingException":
1445
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1446
+ case "ValidationException":
1447
+ case "com.amazonaws.qbusiness#ValidationException":
1448
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1449
+ default:
1450
+ const parsedBody = parsedOutput.body;
1451
+ return throwDefaultError({
1452
+ output,
1453
+ parsedBody,
1454
+ errorCode,
1455
+ });
1456
+ }
1457
+ };
1458
+ export const de_CreateDataSourceCommand = async (output, context) => {
1459
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1460
+ return de_CreateDataSourceCommandError(output, context);
1461
+ }
1462
+ const contents = map({
1463
+ $metadata: deserializeMetadata(output),
1464
+ });
1465
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1466
+ const doc = take(data, {
1467
+ dataSourceArn: __expectString,
1468
+ dataSourceId: __expectString,
1469
+ });
1470
+ Object.assign(contents, doc);
1471
+ return contents;
1472
+ };
1473
+ const de_CreateDataSourceCommandError = async (output, context) => {
1474
+ const parsedOutput = {
1475
+ ...output,
1476
+ body: await parseErrorBody(output.body, context),
1477
+ };
1478
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1479
+ switch (errorCode) {
1480
+ case "AccessDeniedException":
1481
+ case "com.amazonaws.qbusiness#AccessDeniedException":
1482
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1483
+ case "ConflictException":
1484
+ case "com.amazonaws.qbusiness#ConflictException":
1485
+ throw await de_ConflictExceptionRes(parsedOutput, context);
1486
+ case "InternalServerException":
1487
+ case "com.amazonaws.qbusiness#InternalServerException":
1488
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1489
+ case "ResourceNotFoundException":
1490
+ case "com.amazonaws.qbusiness#ResourceNotFoundException":
1491
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1492
+ case "ServiceQuotaExceededException":
1493
+ case "com.amazonaws.qbusiness#ServiceQuotaExceededException":
1494
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1495
+ case "ThrottlingException":
1496
+ case "com.amazonaws.qbusiness#ThrottlingException":
1497
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1498
+ case "ValidationException":
1499
+ case "com.amazonaws.qbusiness#ValidationException":
1500
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1501
+ default:
1502
+ const parsedBody = parsedOutput.body;
1503
+ return throwDefaultError({
1504
+ output,
1505
+ parsedBody,
1506
+ errorCode,
1507
+ });
1508
+ }
1509
+ };
1510
+ export const de_CreateIndexCommand = async (output, context) => {
1511
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1512
+ return de_CreateIndexCommandError(output, context);
1513
+ }
1514
+ const contents = map({
1515
+ $metadata: deserializeMetadata(output),
1516
+ });
1517
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1518
+ const doc = take(data, {
1519
+ indexArn: __expectString,
1520
+ indexId: __expectString,
1521
+ });
1522
+ Object.assign(contents, doc);
1523
+ return contents;
1524
+ };
1525
+ const de_CreateIndexCommandError = async (output, context) => {
1526
+ const parsedOutput = {
1527
+ ...output,
1528
+ body: await parseErrorBody(output.body, context),
1529
+ };
1530
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1531
+ switch (errorCode) {
1532
+ case "AccessDeniedException":
1533
+ case "com.amazonaws.qbusiness#AccessDeniedException":
1534
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1535
+ case "ConflictException":
1536
+ case "com.amazonaws.qbusiness#ConflictException":
1537
+ throw await de_ConflictExceptionRes(parsedOutput, context);
1538
+ case "InternalServerException":
1539
+ case "com.amazonaws.qbusiness#InternalServerException":
1540
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1541
+ case "ResourceNotFoundException":
1542
+ case "com.amazonaws.qbusiness#ResourceNotFoundException":
1543
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1544
+ case "ServiceQuotaExceededException":
1545
+ case "com.amazonaws.qbusiness#ServiceQuotaExceededException":
1546
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1547
+ case "ThrottlingException":
1548
+ case "com.amazonaws.qbusiness#ThrottlingException":
1549
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1550
+ case "ValidationException":
1551
+ case "com.amazonaws.qbusiness#ValidationException":
1552
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1553
+ default:
1554
+ const parsedBody = parsedOutput.body;
1555
+ return throwDefaultError({
1556
+ output,
1557
+ parsedBody,
1558
+ errorCode,
1559
+ });
1560
+ }
1561
+ };
1562
+ export const de_CreatePluginCommand = async (output, context) => {
1563
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1564
+ return de_CreatePluginCommandError(output, context);
1565
+ }
1566
+ const contents = map({
1567
+ $metadata: deserializeMetadata(output),
1568
+ });
1569
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1570
+ const doc = take(data, {
1571
+ pluginArn: __expectString,
1572
+ pluginId: __expectString,
1573
+ });
1574
+ Object.assign(contents, doc);
1575
+ return contents;
1576
+ };
1577
+ const de_CreatePluginCommandError = async (output, context) => {
1578
+ const parsedOutput = {
1579
+ ...output,
1580
+ body: await parseErrorBody(output.body, context),
1581
+ };
1582
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1583
+ switch (errorCode) {
1584
+ case "AccessDeniedException":
1585
+ case "com.amazonaws.qbusiness#AccessDeniedException":
1586
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1587
+ case "ConflictException":
1588
+ case "com.amazonaws.qbusiness#ConflictException":
1589
+ throw await de_ConflictExceptionRes(parsedOutput, context);
1590
+ case "InternalServerException":
1591
+ case "com.amazonaws.qbusiness#InternalServerException":
1592
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1593
+ case "ResourceNotFoundException":
1594
+ case "com.amazonaws.qbusiness#ResourceNotFoundException":
1595
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1596
+ case "ServiceQuotaExceededException":
1597
+ case "com.amazonaws.qbusiness#ServiceQuotaExceededException":
1598
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1599
+ case "ThrottlingException":
1600
+ case "com.amazonaws.qbusiness#ThrottlingException":
1601
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1602
+ case "ValidationException":
1603
+ case "com.amazonaws.qbusiness#ValidationException":
1604
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1605
+ default:
1606
+ const parsedBody = parsedOutput.body;
1607
+ return throwDefaultError({
1608
+ output,
1609
+ parsedBody,
1610
+ errorCode,
1611
+ });
1612
+ }
1613
+ };
1614
+ export const de_CreateRetrieverCommand = async (output, context) => {
1615
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1616
+ return de_CreateRetrieverCommandError(output, context);
1617
+ }
1618
+ const contents = map({
1619
+ $metadata: deserializeMetadata(output),
1620
+ });
1621
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1622
+ const doc = take(data, {
1623
+ retrieverArn: __expectString,
1624
+ retrieverId: __expectString,
1625
+ });
1626
+ Object.assign(contents, doc);
1627
+ return contents;
1628
+ };
1629
+ const de_CreateRetrieverCommandError = async (output, context) => {
1630
+ const parsedOutput = {
1631
+ ...output,
1632
+ body: await parseErrorBody(output.body, context),
1633
+ };
1634
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1635
+ switch (errorCode) {
1636
+ case "AccessDeniedException":
1637
+ case "com.amazonaws.qbusiness#AccessDeniedException":
1638
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1639
+ case "ConflictException":
1640
+ case "com.amazonaws.qbusiness#ConflictException":
1641
+ throw await de_ConflictExceptionRes(parsedOutput, context);
1642
+ case "InternalServerException":
1643
+ case "com.amazonaws.qbusiness#InternalServerException":
1644
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1645
+ case "ResourceNotFoundException":
1646
+ case "com.amazonaws.qbusiness#ResourceNotFoundException":
1647
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1648
+ case "ServiceQuotaExceededException":
1649
+ case "com.amazonaws.qbusiness#ServiceQuotaExceededException":
1650
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1651
+ case "ThrottlingException":
1652
+ case "com.amazonaws.qbusiness#ThrottlingException":
1653
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1654
+ case "ValidationException":
1655
+ case "com.amazonaws.qbusiness#ValidationException":
1656
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1657
+ default:
1658
+ const parsedBody = parsedOutput.body;
1659
+ return throwDefaultError({
1660
+ output,
1661
+ parsedBody,
1662
+ errorCode,
1663
+ });
1664
+ }
1665
+ };
1666
+ export const de_CreateUserCommand = async (output, context) => {
1667
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1668
+ return de_CreateUserCommandError(output, context);
1669
+ }
1670
+ const contents = map({
1671
+ $metadata: deserializeMetadata(output),
1672
+ });
1673
+ await collectBody(output.body, context);
1674
+ return contents;
1675
+ };
1676
+ const de_CreateUserCommandError = async (output, context) => {
1677
+ const parsedOutput = {
1678
+ ...output,
1679
+ body: await parseErrorBody(output.body, context),
1680
+ };
1681
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1682
+ switch (errorCode) {
1683
+ case "AccessDeniedException":
1684
+ case "com.amazonaws.qbusiness#AccessDeniedException":
1685
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1686
+ case "ConflictException":
1687
+ case "com.amazonaws.qbusiness#ConflictException":
1688
+ throw await de_ConflictExceptionRes(parsedOutput, context);
1689
+ case "InternalServerException":
1690
+ case "com.amazonaws.qbusiness#InternalServerException":
1691
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1692
+ case "ResourceNotFoundException":
1693
+ case "com.amazonaws.qbusiness#ResourceNotFoundException":
1694
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1695
+ case "ServiceQuotaExceededException":
1696
+ case "com.amazonaws.qbusiness#ServiceQuotaExceededException":
1697
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1698
+ case "ThrottlingException":
1699
+ case "com.amazonaws.qbusiness#ThrottlingException":
1700
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1701
+ case "ValidationException":
1702
+ case "com.amazonaws.qbusiness#ValidationException":
1703
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1704
+ default:
1705
+ const parsedBody = parsedOutput.body;
1706
+ return throwDefaultError({
1707
+ output,
1708
+ parsedBody,
1709
+ errorCode,
1710
+ });
1711
+ }
1712
+ };
1713
+ export const de_CreateWebExperienceCommand = async (output, context) => {
1714
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1715
+ return de_CreateWebExperienceCommandError(output, context);
1716
+ }
1717
+ const contents = map({
1718
+ $metadata: deserializeMetadata(output),
1719
+ });
1720
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1721
+ const doc = take(data, {
1722
+ webExperienceArn: __expectString,
1723
+ webExperienceId: __expectString,
1724
+ });
1725
+ Object.assign(contents, doc);
1726
+ return contents;
1727
+ };
1728
+ const de_CreateWebExperienceCommandError = async (output, context) => {
1729
+ const parsedOutput = {
1730
+ ...output,
1731
+ body: await parseErrorBody(output.body, context),
1732
+ };
1733
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1734
+ switch (errorCode) {
1735
+ case "AccessDeniedException":
1736
+ case "com.amazonaws.qbusiness#AccessDeniedException":
1737
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1738
+ case "ConflictException":
1739
+ case "com.amazonaws.qbusiness#ConflictException":
1740
+ throw await de_ConflictExceptionRes(parsedOutput, context);
1741
+ case "InternalServerException":
1742
+ case "com.amazonaws.qbusiness#InternalServerException":
1743
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1744
+ case "ResourceNotFoundException":
1745
+ case "com.amazonaws.qbusiness#ResourceNotFoundException":
1746
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1747
+ case "ServiceQuotaExceededException":
1748
+ case "com.amazonaws.qbusiness#ServiceQuotaExceededException":
1749
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1750
+ case "ThrottlingException":
1751
+ case "com.amazonaws.qbusiness#ThrottlingException":
1752
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1753
+ case "ValidationException":
1754
+ case "com.amazonaws.qbusiness#ValidationException":
1755
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1756
+ default:
1757
+ const parsedBody = parsedOutput.body;
1758
+ return throwDefaultError({
1759
+ output,
1760
+ parsedBody,
1761
+ errorCode,
1762
+ });
1763
+ }
1764
+ };
1765
+ export const de_DeleteApplicationCommand = async (output, context) => {
1766
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1767
+ return de_DeleteApplicationCommandError(output, context);
1768
+ }
1769
+ const contents = map({
1770
+ $metadata: deserializeMetadata(output),
1771
+ });
1772
+ await collectBody(output.body, context);
1773
+ return contents;
1774
+ };
1775
+ const de_DeleteApplicationCommandError = async (output, context) => {
1776
+ const parsedOutput = {
1777
+ ...output,
1778
+ body: await parseErrorBody(output.body, context),
1779
+ };
1780
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1781
+ switch (errorCode) {
1782
+ case "AccessDeniedException":
1783
+ case "com.amazonaws.qbusiness#AccessDeniedException":
1784
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1785
+ case "ConflictException":
1786
+ case "com.amazonaws.qbusiness#ConflictException":
1787
+ throw await de_ConflictExceptionRes(parsedOutput, context);
1788
+ case "InternalServerException":
1789
+ case "com.amazonaws.qbusiness#InternalServerException":
1790
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1791
+ case "ResourceNotFoundException":
1792
+ case "com.amazonaws.qbusiness#ResourceNotFoundException":
1793
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1794
+ case "ThrottlingException":
1795
+ case "com.amazonaws.qbusiness#ThrottlingException":
1796
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1797
+ case "ValidationException":
1798
+ case "com.amazonaws.qbusiness#ValidationException":
1799
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1800
+ default:
1801
+ const parsedBody = parsedOutput.body;
1802
+ return throwDefaultError({
1803
+ output,
1804
+ parsedBody,
1805
+ errorCode,
1806
+ });
1807
+ }
1808
+ };
1809
+ export const de_DeleteChatControlsConfigurationCommand = async (output, context) => {
1810
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1811
+ return de_DeleteChatControlsConfigurationCommandError(output, context);
1812
+ }
1813
+ const contents = map({
1814
+ $metadata: deserializeMetadata(output),
1815
+ });
1816
+ await collectBody(output.body, context);
1817
+ return contents;
1818
+ };
1819
+ const de_DeleteChatControlsConfigurationCommandError = async (output, context) => {
1820
+ const parsedOutput = {
1821
+ ...output,
1822
+ body: await parseErrorBody(output.body, context),
1823
+ };
1824
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1825
+ switch (errorCode) {
1826
+ case "AccessDeniedException":
1827
+ case "com.amazonaws.qbusiness#AccessDeniedException":
1828
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1829
+ case "InternalServerException":
1830
+ case "com.amazonaws.qbusiness#InternalServerException":
1831
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1832
+ case "ResourceNotFoundException":
1833
+ case "com.amazonaws.qbusiness#ResourceNotFoundException":
1834
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1835
+ case "ThrottlingException":
1836
+ case "com.amazonaws.qbusiness#ThrottlingException":
1837
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1838
+ case "ValidationException":
1839
+ case "com.amazonaws.qbusiness#ValidationException":
1840
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1841
+ default:
1842
+ const parsedBody = parsedOutput.body;
1843
+ return throwDefaultError({
1844
+ output,
1845
+ parsedBody,
1846
+ errorCode,
1847
+ });
1848
+ }
1849
+ };
1850
+ export const de_DeleteConversationCommand = async (output, context) => {
1851
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1852
+ return de_DeleteConversationCommandError(output, context);
1853
+ }
1854
+ const contents = map({
1855
+ $metadata: deserializeMetadata(output),
1856
+ });
1857
+ await collectBody(output.body, context);
1858
+ return contents;
1859
+ };
1860
+ const de_DeleteConversationCommandError = async (output, context) => {
1861
+ const parsedOutput = {
1862
+ ...output,
1863
+ body: await parseErrorBody(output.body, context),
1864
+ };
1865
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1866
+ switch (errorCode) {
1867
+ case "AccessDeniedException":
1868
+ case "com.amazonaws.qbusiness#AccessDeniedException":
1869
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1870
+ case "InternalServerException":
1871
+ case "com.amazonaws.qbusiness#InternalServerException":
1872
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1873
+ case "LicenseNotFoundException":
1874
+ case "com.amazonaws.qbusiness#LicenseNotFoundException":
1875
+ throw await de_LicenseNotFoundExceptionRes(parsedOutput, context);
1876
+ case "ResourceNotFoundException":
1877
+ case "com.amazonaws.qbusiness#ResourceNotFoundException":
1878
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1879
+ case "ThrottlingException":
1880
+ case "com.amazonaws.qbusiness#ThrottlingException":
1881
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1882
+ case "ValidationException":
1883
+ case "com.amazonaws.qbusiness#ValidationException":
1884
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1885
+ default:
1886
+ const parsedBody = parsedOutput.body;
1887
+ return throwDefaultError({
1888
+ output,
1889
+ parsedBody,
1890
+ errorCode,
1891
+ });
1892
+ }
1893
+ };
1894
+ export const de_DeleteDataSourceCommand = async (output, context) => {
1895
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1896
+ return de_DeleteDataSourceCommandError(output, context);
1897
+ }
1898
+ const contents = map({
1899
+ $metadata: deserializeMetadata(output),
1900
+ });
1901
+ await collectBody(output.body, context);
1902
+ return contents;
1903
+ };
1904
+ const de_DeleteDataSourceCommandError = async (output, context) => {
1905
+ const parsedOutput = {
1906
+ ...output,
1907
+ body: await parseErrorBody(output.body, context),
1908
+ };
1909
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1910
+ switch (errorCode) {
1911
+ case "AccessDeniedException":
1912
+ case "com.amazonaws.qbusiness#AccessDeniedException":
1913
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1914
+ case "ConflictException":
1915
+ case "com.amazonaws.qbusiness#ConflictException":
1916
+ throw await de_ConflictExceptionRes(parsedOutput, context);
1917
+ case "InternalServerException":
1918
+ case "com.amazonaws.qbusiness#InternalServerException":
1919
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1920
+ case "ResourceNotFoundException":
1921
+ case "com.amazonaws.qbusiness#ResourceNotFoundException":
1922
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1923
+ case "ThrottlingException":
1924
+ case "com.amazonaws.qbusiness#ThrottlingException":
1925
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1926
+ case "ValidationException":
1927
+ case "com.amazonaws.qbusiness#ValidationException":
1928
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1929
+ default:
1930
+ const parsedBody = parsedOutput.body;
1931
+ return throwDefaultError({
1932
+ output,
1933
+ parsedBody,
1934
+ errorCode,
1935
+ });
1936
+ }
1937
+ };
1938
+ export const de_DeleteGroupCommand = async (output, context) => {
1939
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1940
+ return de_DeleteGroupCommandError(output, context);
1941
+ }
1942
+ const contents = map({
1943
+ $metadata: deserializeMetadata(output),
1944
+ });
1945
+ await collectBody(output.body, context);
1946
+ return contents;
1947
+ };
1948
+ const de_DeleteGroupCommandError = async (output, context) => {
1949
+ const parsedOutput = {
1950
+ ...output,
1951
+ body: await parseErrorBody(output.body, context),
1952
+ };
1953
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1954
+ switch (errorCode) {
1955
+ case "AccessDeniedException":
1956
+ case "com.amazonaws.qbusiness#AccessDeniedException":
1957
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1958
+ case "ConflictException":
1959
+ case "com.amazonaws.qbusiness#ConflictException":
1960
+ throw await de_ConflictExceptionRes(parsedOutput, context);
1961
+ case "InternalServerException":
1962
+ case "com.amazonaws.qbusiness#InternalServerException":
1963
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1964
+ case "ResourceNotFoundException":
1965
+ case "com.amazonaws.qbusiness#ResourceNotFoundException":
1966
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1967
+ case "ThrottlingException":
1968
+ case "com.amazonaws.qbusiness#ThrottlingException":
1969
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1970
+ case "ValidationException":
1971
+ case "com.amazonaws.qbusiness#ValidationException":
1972
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1973
+ default:
1974
+ const parsedBody = parsedOutput.body;
1975
+ return throwDefaultError({
1976
+ output,
1977
+ parsedBody,
1978
+ errorCode,
1979
+ });
1980
+ }
1981
+ };
1982
+ export const de_DeleteIndexCommand = async (output, context) => {
1983
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1984
+ return de_DeleteIndexCommandError(output, context);
1985
+ }
1986
+ const contents = map({
1987
+ $metadata: deserializeMetadata(output),
1988
+ });
1989
+ await collectBody(output.body, context);
1990
+ return contents;
1991
+ };
1992
+ const de_DeleteIndexCommandError = async (output, context) => {
1993
+ const parsedOutput = {
1994
+ ...output,
1995
+ body: await parseErrorBody(output.body, context),
1996
+ };
1997
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1998
+ switch (errorCode) {
1999
+ case "AccessDeniedException":
2000
+ case "com.amazonaws.qbusiness#AccessDeniedException":
2001
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2002
+ case "ConflictException":
2003
+ case "com.amazonaws.qbusiness#ConflictException":
2004
+ throw await de_ConflictExceptionRes(parsedOutput, context);
2005
+ case "InternalServerException":
2006
+ case "com.amazonaws.qbusiness#InternalServerException":
2007
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
2008
+ case "ResourceNotFoundException":
2009
+ case "com.amazonaws.qbusiness#ResourceNotFoundException":
2010
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2011
+ case "ThrottlingException":
2012
+ case "com.amazonaws.qbusiness#ThrottlingException":
2013
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
2014
+ case "ValidationException":
2015
+ case "com.amazonaws.qbusiness#ValidationException":
2016
+ throw await de_ValidationExceptionRes(parsedOutput, context);
2017
+ default:
2018
+ const parsedBody = parsedOutput.body;
2019
+ return throwDefaultError({
2020
+ output,
2021
+ parsedBody,
2022
+ errorCode,
2023
+ });
2024
+ }
2025
+ };
2026
+ export const de_DeletePluginCommand = async (output, context) => {
2027
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2028
+ return de_DeletePluginCommandError(output, context);
2029
+ }
2030
+ const contents = map({
2031
+ $metadata: deserializeMetadata(output),
2032
+ });
2033
+ await collectBody(output.body, context);
2034
+ return contents;
2035
+ };
2036
+ const de_DeletePluginCommandError = async (output, context) => {
2037
+ const parsedOutput = {
2038
+ ...output,
2039
+ body: await parseErrorBody(output.body, context),
2040
+ };
2041
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2042
+ switch (errorCode) {
2043
+ case "AccessDeniedException":
2044
+ case "com.amazonaws.qbusiness#AccessDeniedException":
2045
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2046
+ case "ConflictException":
2047
+ case "com.amazonaws.qbusiness#ConflictException":
2048
+ throw await de_ConflictExceptionRes(parsedOutput, context);
2049
+ case "InternalServerException":
2050
+ case "com.amazonaws.qbusiness#InternalServerException":
2051
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
2052
+ case "ResourceNotFoundException":
2053
+ case "com.amazonaws.qbusiness#ResourceNotFoundException":
2054
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2055
+ case "ThrottlingException":
2056
+ case "com.amazonaws.qbusiness#ThrottlingException":
2057
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
2058
+ case "ValidationException":
2059
+ case "com.amazonaws.qbusiness#ValidationException":
2060
+ throw await de_ValidationExceptionRes(parsedOutput, context);
2061
+ default:
2062
+ const parsedBody = parsedOutput.body;
2063
+ return throwDefaultError({
2064
+ output,
2065
+ parsedBody,
2066
+ errorCode,
2067
+ });
2068
+ }
2069
+ };
2070
+ export const de_DeleteRetrieverCommand = async (output, context) => {
2071
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2072
+ return de_DeleteRetrieverCommandError(output, context);
2073
+ }
2074
+ const contents = map({
2075
+ $metadata: deserializeMetadata(output),
2076
+ });
2077
+ await collectBody(output.body, context);
2078
+ return contents;
2079
+ };
2080
+ const de_DeleteRetrieverCommandError = async (output, context) => {
2081
+ const parsedOutput = {
2082
+ ...output,
2083
+ body: await parseErrorBody(output.body, context),
2084
+ };
2085
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2086
+ switch (errorCode) {
2087
+ case "AccessDeniedException":
2088
+ case "com.amazonaws.qbusiness#AccessDeniedException":
2089
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2090
+ case "ConflictException":
2091
+ case "com.amazonaws.qbusiness#ConflictException":
2092
+ throw await de_ConflictExceptionRes(parsedOutput, context);
2093
+ case "InternalServerException":
2094
+ case "com.amazonaws.qbusiness#InternalServerException":
2095
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
2096
+ case "ResourceNotFoundException":
2097
+ case "com.amazonaws.qbusiness#ResourceNotFoundException":
2098
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2099
+ case "ThrottlingException":
2100
+ case "com.amazonaws.qbusiness#ThrottlingException":
2101
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
2102
+ case "ValidationException":
2103
+ case "com.amazonaws.qbusiness#ValidationException":
2104
+ throw await de_ValidationExceptionRes(parsedOutput, context);
2105
+ default:
2106
+ const parsedBody = parsedOutput.body;
2107
+ return throwDefaultError({
2108
+ output,
2109
+ parsedBody,
2110
+ errorCode,
2111
+ });
2112
+ }
2113
+ };
2114
+ export const de_DeleteUserCommand = async (output, context) => {
2115
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2116
+ return de_DeleteUserCommandError(output, context);
2117
+ }
2118
+ const contents = map({
2119
+ $metadata: deserializeMetadata(output),
2120
+ });
2121
+ await collectBody(output.body, context);
2122
+ return contents;
2123
+ };
2124
+ const de_DeleteUserCommandError = async (output, context) => {
2125
+ const parsedOutput = {
2126
+ ...output,
2127
+ body: await parseErrorBody(output.body, context),
2128
+ };
2129
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2130
+ switch (errorCode) {
2131
+ case "AccessDeniedException":
2132
+ case "com.amazonaws.qbusiness#AccessDeniedException":
2133
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2134
+ case "ConflictException":
2135
+ case "com.amazonaws.qbusiness#ConflictException":
2136
+ throw await de_ConflictExceptionRes(parsedOutput, context);
2137
+ case "InternalServerException":
2138
+ case "com.amazonaws.qbusiness#InternalServerException":
2139
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
2140
+ case "ResourceNotFoundException":
2141
+ case "com.amazonaws.qbusiness#ResourceNotFoundException":
2142
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2143
+ case "ThrottlingException":
2144
+ case "com.amazonaws.qbusiness#ThrottlingException":
2145
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
2146
+ case "ValidationException":
2147
+ case "com.amazonaws.qbusiness#ValidationException":
2148
+ throw await de_ValidationExceptionRes(parsedOutput, context);
2149
+ default:
2150
+ const parsedBody = parsedOutput.body;
2151
+ return throwDefaultError({
2152
+ output,
2153
+ parsedBody,
2154
+ errorCode,
2155
+ });
2156
+ }
2157
+ };
2158
+ export const de_DeleteWebExperienceCommand = async (output, context) => {
2159
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2160
+ return de_DeleteWebExperienceCommandError(output, context);
2161
+ }
2162
+ const contents = map({
2163
+ $metadata: deserializeMetadata(output),
2164
+ });
2165
+ await collectBody(output.body, context);
2166
+ return contents;
2167
+ };
2168
+ const de_DeleteWebExperienceCommandError = async (output, context) => {
2169
+ const parsedOutput = {
2170
+ ...output,
2171
+ body: await parseErrorBody(output.body, context),
2172
+ };
2173
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2174
+ switch (errorCode) {
2175
+ case "AccessDeniedException":
2176
+ case "com.amazonaws.qbusiness#AccessDeniedException":
2177
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2178
+ case "ConflictException":
2179
+ case "com.amazonaws.qbusiness#ConflictException":
2180
+ throw await de_ConflictExceptionRes(parsedOutput, context);
2181
+ case "InternalServerException":
2182
+ case "com.amazonaws.qbusiness#InternalServerException":
2183
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
2184
+ case "ResourceNotFoundException":
2185
+ case "com.amazonaws.qbusiness#ResourceNotFoundException":
2186
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2187
+ case "ThrottlingException":
2188
+ case "com.amazonaws.qbusiness#ThrottlingException":
2189
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
2190
+ case "ValidationException":
2191
+ case "com.amazonaws.qbusiness#ValidationException":
2192
+ throw await de_ValidationExceptionRes(parsedOutput, context);
2193
+ default:
2194
+ const parsedBody = parsedOutput.body;
2195
+ return throwDefaultError({
2196
+ output,
2197
+ parsedBody,
2198
+ errorCode,
2199
+ });
2200
+ }
2201
+ };
2202
+ export const de_GetApplicationCommand = async (output, context) => {
2203
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2204
+ return de_GetApplicationCommandError(output, context);
2205
+ }
2206
+ const contents = map({
2207
+ $metadata: deserializeMetadata(output),
2208
+ });
2209
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2210
+ const doc = take(data, {
2211
+ applicationArn: __expectString,
2212
+ applicationId: __expectString,
2213
+ attachmentsConfiguration: _json,
2214
+ createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2215
+ description: __expectString,
2216
+ displayName: __expectString,
2217
+ encryptionConfiguration: _json,
2218
+ error: _json,
2219
+ roleArn: __expectString,
2220
+ status: __expectString,
2221
+ updatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2222
+ });
2223
+ Object.assign(contents, doc);
2224
+ return contents;
2225
+ };
2226
+ const de_GetApplicationCommandError = async (output, context) => {
2227
+ const parsedOutput = {
2228
+ ...output,
2229
+ body: await parseErrorBody(output.body, context),
2230
+ };
2231
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2232
+ switch (errorCode) {
2233
+ case "AccessDeniedException":
2234
+ case "com.amazonaws.qbusiness#AccessDeniedException":
2235
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2236
+ case "InternalServerException":
2237
+ case "com.amazonaws.qbusiness#InternalServerException":
2238
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
2239
+ case "ResourceNotFoundException":
2240
+ case "com.amazonaws.qbusiness#ResourceNotFoundException":
2241
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2242
+ case "ThrottlingException":
2243
+ case "com.amazonaws.qbusiness#ThrottlingException":
2244
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
2245
+ case "ValidationException":
2246
+ case "com.amazonaws.qbusiness#ValidationException":
2247
+ throw await de_ValidationExceptionRes(parsedOutput, context);
2248
+ default:
2249
+ const parsedBody = parsedOutput.body;
2250
+ return throwDefaultError({
2251
+ output,
2252
+ parsedBody,
2253
+ errorCode,
2254
+ });
2255
+ }
2256
+ };
2257
+ export const de_GetChatControlsConfigurationCommand = async (output, context) => {
2258
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2259
+ return de_GetChatControlsConfigurationCommandError(output, context);
2260
+ }
2261
+ const contents = map({
2262
+ $metadata: deserializeMetadata(output),
2263
+ });
2264
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2265
+ const doc = take(data, {
2266
+ blockedPhrases: _json,
2267
+ nextToken: __expectString,
2268
+ responseScope: __expectString,
2269
+ topicConfigurations: _json,
2270
+ });
2271
+ Object.assign(contents, doc);
2272
+ return contents;
2273
+ };
2274
+ const de_GetChatControlsConfigurationCommandError = async (output, context) => {
2275
+ const parsedOutput = {
2276
+ ...output,
2277
+ body: await parseErrorBody(output.body, context),
2278
+ };
2279
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2280
+ switch (errorCode) {
2281
+ case "AccessDeniedException":
2282
+ case "com.amazonaws.qbusiness#AccessDeniedException":
2283
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2284
+ case "InternalServerException":
2285
+ case "com.amazonaws.qbusiness#InternalServerException":
2286
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
2287
+ case "ResourceNotFoundException":
2288
+ case "com.amazonaws.qbusiness#ResourceNotFoundException":
2289
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2290
+ case "ThrottlingException":
2291
+ case "com.amazonaws.qbusiness#ThrottlingException":
2292
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
2293
+ case "ValidationException":
2294
+ case "com.amazonaws.qbusiness#ValidationException":
2295
+ throw await de_ValidationExceptionRes(parsedOutput, context);
2296
+ default:
2297
+ const parsedBody = parsedOutput.body;
2298
+ return throwDefaultError({
2299
+ output,
2300
+ parsedBody,
2301
+ errorCode,
2302
+ });
2303
+ }
2304
+ };
2305
+ export const de_GetDataSourceCommand = async (output, context) => {
2306
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2307
+ return de_GetDataSourceCommandError(output, context);
2308
+ }
2309
+ const contents = map({
2310
+ $metadata: deserializeMetadata(output),
2311
+ });
2312
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2313
+ const doc = take(data, {
2314
+ applicationId: __expectString,
2315
+ configuration: (_) => de_DataSourceConfiguration(_, context),
2316
+ createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2317
+ dataSourceArn: __expectString,
2318
+ dataSourceId: __expectString,
2319
+ description: __expectString,
2320
+ displayName: __expectString,
2321
+ documentEnrichmentConfiguration: (_) => de_DocumentEnrichmentConfiguration(_, context),
2322
+ error: _json,
2323
+ indexId: __expectString,
2324
+ roleArn: __expectString,
2325
+ status: __expectString,
2326
+ syncSchedule: __expectString,
2327
+ type: __expectString,
2328
+ updatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2329
+ vpcConfiguration: _json,
2330
+ });
2331
+ Object.assign(contents, doc);
2332
+ return contents;
2333
+ };
2334
+ const de_GetDataSourceCommandError = async (output, context) => {
2335
+ const parsedOutput = {
2336
+ ...output,
2337
+ body: await parseErrorBody(output.body, context),
2338
+ };
2339
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2340
+ switch (errorCode) {
2341
+ case "AccessDeniedException":
2342
+ case "com.amazonaws.qbusiness#AccessDeniedException":
2343
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2344
+ case "InternalServerException":
2345
+ case "com.amazonaws.qbusiness#InternalServerException":
2346
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
2347
+ case "ResourceNotFoundException":
2348
+ case "com.amazonaws.qbusiness#ResourceNotFoundException":
2349
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2350
+ case "ThrottlingException":
2351
+ case "com.amazonaws.qbusiness#ThrottlingException":
2352
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
2353
+ case "ValidationException":
2354
+ case "com.amazonaws.qbusiness#ValidationException":
2355
+ throw await de_ValidationExceptionRes(parsedOutput, context);
2356
+ default:
2357
+ const parsedBody = parsedOutput.body;
2358
+ return throwDefaultError({
2359
+ output,
2360
+ parsedBody,
2361
+ errorCode,
2362
+ });
2363
+ }
2364
+ };
2365
+ export const de_GetGroupCommand = async (output, context) => {
2366
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2367
+ return de_GetGroupCommandError(output, context);
2368
+ }
2369
+ const contents = map({
2370
+ $metadata: deserializeMetadata(output),
2371
+ });
2372
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2373
+ const doc = take(data, {
2374
+ status: (_) => de_GroupStatusDetail(_, context),
2375
+ statusHistory: (_) => de_GroupStatusDetails(_, context),
2376
+ });
2377
+ Object.assign(contents, doc);
2378
+ return contents;
2379
+ };
2380
+ const de_GetGroupCommandError = async (output, context) => {
2381
+ const parsedOutput = {
2382
+ ...output,
2383
+ body: await parseErrorBody(output.body, context),
2384
+ };
2385
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2386
+ switch (errorCode) {
2387
+ case "AccessDeniedException":
2388
+ case "com.amazonaws.qbusiness#AccessDeniedException":
2389
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2390
+ case "ConflictException":
2391
+ case "com.amazonaws.qbusiness#ConflictException":
2392
+ throw await de_ConflictExceptionRes(parsedOutput, context);
2393
+ case "InternalServerException":
2394
+ case "com.amazonaws.qbusiness#InternalServerException":
2395
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
2396
+ case "ResourceNotFoundException":
2397
+ case "com.amazonaws.qbusiness#ResourceNotFoundException":
2398
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2399
+ case "ThrottlingException":
2400
+ case "com.amazonaws.qbusiness#ThrottlingException":
2401
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
2402
+ case "ValidationException":
2403
+ case "com.amazonaws.qbusiness#ValidationException":
2404
+ throw await de_ValidationExceptionRes(parsedOutput, context);
2405
+ default:
2406
+ const parsedBody = parsedOutput.body;
2407
+ return throwDefaultError({
2408
+ output,
2409
+ parsedBody,
2410
+ errorCode,
2411
+ });
2412
+ }
2413
+ };
2414
+ export const de_GetIndexCommand = async (output, context) => {
2415
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2416
+ return de_GetIndexCommandError(output, context);
2417
+ }
2418
+ const contents = map({
2419
+ $metadata: deserializeMetadata(output),
2420
+ });
2421
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2422
+ const doc = take(data, {
2423
+ applicationId: __expectString,
2424
+ capacityConfiguration: _json,
2425
+ createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2426
+ description: __expectString,
2427
+ displayName: __expectString,
2428
+ documentAttributeConfigurations: _json,
2429
+ error: _json,
2430
+ indexArn: __expectString,
2431
+ indexId: __expectString,
2432
+ indexStatistics: _json,
2433
+ status: __expectString,
2434
+ updatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2435
+ });
2436
+ Object.assign(contents, doc);
2437
+ return contents;
2438
+ };
2439
+ const de_GetIndexCommandError = async (output, context) => {
2440
+ const parsedOutput = {
2441
+ ...output,
2442
+ body: await parseErrorBody(output.body, context),
2443
+ };
2444
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2445
+ switch (errorCode) {
2446
+ case "AccessDeniedException":
2447
+ case "com.amazonaws.qbusiness#AccessDeniedException":
2448
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2449
+ case "InternalServerException":
2450
+ case "com.amazonaws.qbusiness#InternalServerException":
2451
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
2452
+ case "ResourceNotFoundException":
2453
+ case "com.amazonaws.qbusiness#ResourceNotFoundException":
2454
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2455
+ case "ThrottlingException":
2456
+ case "com.amazonaws.qbusiness#ThrottlingException":
2457
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
2458
+ case "ValidationException":
2459
+ case "com.amazonaws.qbusiness#ValidationException":
2460
+ throw await de_ValidationExceptionRes(parsedOutput, context);
2461
+ default:
2462
+ const parsedBody = parsedOutput.body;
2463
+ return throwDefaultError({
2464
+ output,
2465
+ parsedBody,
2466
+ errorCode,
2467
+ });
2468
+ }
2469
+ };
2470
+ export const de_GetPluginCommand = async (output, context) => {
2471
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2472
+ return de_GetPluginCommandError(output, context);
2473
+ }
2474
+ const contents = map({
2475
+ $metadata: deserializeMetadata(output),
2476
+ });
2477
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2478
+ const doc = take(data, {
2479
+ applicationId: __expectString,
2480
+ authConfiguration: (_) => _json(__expectUnion(_)),
2481
+ createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2482
+ displayName: __expectString,
2483
+ pluginArn: __expectString,
2484
+ pluginId: __expectString,
2485
+ serverUrl: __expectString,
2486
+ state: __expectString,
2487
+ type: __expectString,
2488
+ updatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2489
+ });
2490
+ Object.assign(contents, doc);
2491
+ return contents;
2492
+ };
2493
+ const de_GetPluginCommandError = async (output, context) => {
2494
+ const parsedOutput = {
2495
+ ...output,
2496
+ body: await parseErrorBody(output.body, context),
2497
+ };
2498
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2499
+ switch (errorCode) {
2500
+ case "AccessDeniedException":
2501
+ case "com.amazonaws.qbusiness#AccessDeniedException":
2502
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2503
+ case "InternalServerException":
2504
+ case "com.amazonaws.qbusiness#InternalServerException":
2505
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
2506
+ case "ResourceNotFoundException":
2507
+ case "com.amazonaws.qbusiness#ResourceNotFoundException":
2508
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2509
+ case "ThrottlingException":
2510
+ case "com.amazonaws.qbusiness#ThrottlingException":
2511
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
2512
+ case "ValidationException":
2513
+ case "com.amazonaws.qbusiness#ValidationException":
2514
+ throw await de_ValidationExceptionRes(parsedOutput, context);
2515
+ default:
2516
+ const parsedBody = parsedOutput.body;
2517
+ return throwDefaultError({
2518
+ output,
2519
+ parsedBody,
2520
+ errorCode,
2521
+ });
2522
+ }
2523
+ };
2524
+ export const de_GetRetrieverCommand = async (output, context) => {
2525
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2526
+ return de_GetRetrieverCommandError(output, context);
2527
+ }
2528
+ const contents = map({
2529
+ $metadata: deserializeMetadata(output),
2530
+ });
2531
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2532
+ const doc = take(data, {
2533
+ applicationId: __expectString,
2534
+ configuration: (_) => _json(__expectUnion(_)),
2535
+ createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2536
+ displayName: __expectString,
2537
+ retrieverArn: __expectString,
2538
+ retrieverId: __expectString,
2539
+ roleArn: __expectString,
2540
+ status: __expectString,
2541
+ type: __expectString,
2542
+ updatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2543
+ });
2544
+ Object.assign(contents, doc);
2545
+ return contents;
2546
+ };
2547
+ const de_GetRetrieverCommandError = async (output, context) => {
2548
+ const parsedOutput = {
2549
+ ...output,
2550
+ body: await parseErrorBody(output.body, context),
2551
+ };
2552
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2553
+ switch (errorCode) {
2554
+ case "AccessDeniedException":
2555
+ case "com.amazonaws.qbusiness#AccessDeniedException":
2556
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2557
+ case "InternalServerException":
2558
+ case "com.amazonaws.qbusiness#InternalServerException":
2559
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
2560
+ case "ResourceNotFoundException":
2561
+ case "com.amazonaws.qbusiness#ResourceNotFoundException":
2562
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2563
+ case "ThrottlingException":
2564
+ case "com.amazonaws.qbusiness#ThrottlingException":
2565
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
2566
+ case "ValidationException":
2567
+ case "com.amazonaws.qbusiness#ValidationException":
2568
+ throw await de_ValidationExceptionRes(parsedOutput, context);
2569
+ default:
2570
+ const parsedBody = parsedOutput.body;
2571
+ return throwDefaultError({
2572
+ output,
2573
+ parsedBody,
2574
+ errorCode,
2575
+ });
2576
+ }
2577
+ };
2578
+ export const de_GetUserCommand = async (output, context) => {
2579
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2580
+ return de_GetUserCommandError(output, context);
2581
+ }
2582
+ const contents = map({
2583
+ $metadata: deserializeMetadata(output),
2584
+ });
2585
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2586
+ const doc = take(data, {
2587
+ userAliases: _json,
2588
+ });
2589
+ Object.assign(contents, doc);
2590
+ return contents;
2591
+ };
2592
+ const de_GetUserCommandError = async (output, context) => {
2593
+ const parsedOutput = {
2594
+ ...output,
2595
+ body: await parseErrorBody(output.body, context),
2596
+ };
2597
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2598
+ switch (errorCode) {
2599
+ case "AccessDeniedException":
2600
+ case "com.amazonaws.qbusiness#AccessDeniedException":
2601
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2602
+ case "ConflictException":
2603
+ case "com.amazonaws.qbusiness#ConflictException":
2604
+ throw await de_ConflictExceptionRes(parsedOutput, context);
2605
+ case "InternalServerException":
2606
+ case "com.amazonaws.qbusiness#InternalServerException":
2607
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
2608
+ case "ResourceNotFoundException":
2609
+ case "com.amazonaws.qbusiness#ResourceNotFoundException":
2610
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2611
+ case "ThrottlingException":
2612
+ case "com.amazonaws.qbusiness#ThrottlingException":
2613
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
2614
+ case "ValidationException":
2615
+ case "com.amazonaws.qbusiness#ValidationException":
2616
+ throw await de_ValidationExceptionRes(parsedOutput, context);
2617
+ default:
2618
+ const parsedBody = parsedOutput.body;
2619
+ return throwDefaultError({
2620
+ output,
2621
+ parsedBody,
2622
+ errorCode,
2623
+ });
2624
+ }
2625
+ };
2626
+ export const de_GetWebExperienceCommand = async (output, context) => {
2627
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2628
+ return de_GetWebExperienceCommandError(output, context);
2629
+ }
2630
+ const contents = map({
2631
+ $metadata: deserializeMetadata(output),
2632
+ });
2633
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2634
+ const doc = take(data, {
2635
+ applicationId: __expectString,
2636
+ authenticationConfiguration: (_) => _json(__expectUnion(_)),
2637
+ createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2638
+ defaultEndpoint: __expectString,
2639
+ error: _json,
2640
+ samplePromptsControlMode: __expectString,
2641
+ status: __expectString,
2642
+ subtitle: __expectString,
2643
+ title: __expectString,
2644
+ updatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2645
+ webExperienceArn: __expectString,
2646
+ webExperienceId: __expectString,
2647
+ welcomeMessage: __expectString,
2648
+ });
2649
+ Object.assign(contents, doc);
2650
+ return contents;
2651
+ };
2652
+ const de_GetWebExperienceCommandError = async (output, context) => {
2653
+ const parsedOutput = {
2654
+ ...output,
2655
+ body: await parseErrorBody(output.body, context),
2656
+ };
2657
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2658
+ switch (errorCode) {
2659
+ case "AccessDeniedException":
2660
+ case "com.amazonaws.qbusiness#AccessDeniedException":
2661
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2662
+ case "InternalServerException":
2663
+ case "com.amazonaws.qbusiness#InternalServerException":
2664
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
2665
+ case "ResourceNotFoundException":
2666
+ case "com.amazonaws.qbusiness#ResourceNotFoundException":
2667
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2668
+ case "ThrottlingException":
2669
+ case "com.amazonaws.qbusiness#ThrottlingException":
2670
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
2671
+ case "ValidationException":
2672
+ case "com.amazonaws.qbusiness#ValidationException":
2673
+ throw await de_ValidationExceptionRes(parsedOutput, context);
2674
+ default:
2675
+ const parsedBody = parsedOutput.body;
2676
+ return throwDefaultError({
2677
+ output,
2678
+ parsedBody,
2679
+ errorCode,
2680
+ });
2681
+ }
2682
+ };
2683
+ export const de_ListApplicationsCommand = async (output, context) => {
2684
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2685
+ return de_ListApplicationsCommandError(output, context);
2686
+ }
2687
+ const contents = map({
2688
+ $metadata: deserializeMetadata(output),
2689
+ });
2690
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2691
+ const doc = take(data, {
2692
+ applications: (_) => de_Applications(_, context),
2693
+ nextToken: __expectString,
2694
+ });
2695
+ Object.assign(contents, doc);
2696
+ return contents;
2697
+ };
2698
+ const de_ListApplicationsCommandError = async (output, context) => {
2699
+ const parsedOutput = {
2700
+ ...output,
2701
+ body: await parseErrorBody(output.body, context),
2702
+ };
2703
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2704
+ switch (errorCode) {
2705
+ case "AccessDeniedException":
2706
+ case "com.amazonaws.qbusiness#AccessDeniedException":
2707
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2708
+ case "InternalServerException":
2709
+ case "com.amazonaws.qbusiness#InternalServerException":
2710
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
2711
+ case "ThrottlingException":
2712
+ case "com.amazonaws.qbusiness#ThrottlingException":
2713
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
2714
+ case "ValidationException":
2715
+ case "com.amazonaws.qbusiness#ValidationException":
2716
+ throw await de_ValidationExceptionRes(parsedOutput, context);
2717
+ default:
2718
+ const parsedBody = parsedOutput.body;
2719
+ return throwDefaultError({
2720
+ output,
2721
+ parsedBody,
2722
+ errorCode,
2723
+ });
2724
+ }
2725
+ };
2726
+ export const de_ListConversationsCommand = async (output, context) => {
2727
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2728
+ return de_ListConversationsCommandError(output, context);
2729
+ }
2730
+ const contents = map({
2731
+ $metadata: deserializeMetadata(output),
2732
+ });
2733
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2734
+ const doc = take(data, {
2735
+ conversations: (_) => de_Conversations(_, context),
2736
+ nextToken: __expectString,
2737
+ });
2738
+ Object.assign(contents, doc);
2739
+ return contents;
2740
+ };
2741
+ const de_ListConversationsCommandError = async (output, context) => {
2742
+ const parsedOutput = {
2743
+ ...output,
2744
+ body: await parseErrorBody(output.body, context),
2745
+ };
2746
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2747
+ switch (errorCode) {
2748
+ case "AccessDeniedException":
2749
+ case "com.amazonaws.qbusiness#AccessDeniedException":
2750
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2751
+ case "InternalServerException":
2752
+ case "com.amazonaws.qbusiness#InternalServerException":
2753
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
2754
+ case "LicenseNotFoundException":
2755
+ case "com.amazonaws.qbusiness#LicenseNotFoundException":
2756
+ throw await de_LicenseNotFoundExceptionRes(parsedOutput, context);
2757
+ case "ResourceNotFoundException":
2758
+ case "com.amazonaws.qbusiness#ResourceNotFoundException":
2759
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2760
+ case "ThrottlingException":
2761
+ case "com.amazonaws.qbusiness#ThrottlingException":
2762
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
2763
+ case "ValidationException":
2764
+ case "com.amazonaws.qbusiness#ValidationException":
2765
+ throw await de_ValidationExceptionRes(parsedOutput, context);
2766
+ default:
2767
+ const parsedBody = parsedOutput.body;
2768
+ return throwDefaultError({
2769
+ output,
2770
+ parsedBody,
2771
+ errorCode,
2772
+ });
2773
+ }
2774
+ };
2775
+ export const de_ListDataSourcesCommand = async (output, context) => {
2776
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2777
+ return de_ListDataSourcesCommandError(output, context);
2778
+ }
2779
+ const contents = map({
2780
+ $metadata: deserializeMetadata(output),
2781
+ });
2782
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2783
+ const doc = take(data, {
2784
+ dataSources: (_) => de_DataSources(_, context),
2785
+ nextToken: __expectString,
2786
+ });
2787
+ Object.assign(contents, doc);
2788
+ return contents;
2789
+ };
2790
+ const de_ListDataSourcesCommandError = async (output, context) => {
2791
+ const parsedOutput = {
2792
+ ...output,
2793
+ body: await parseErrorBody(output.body, context),
2794
+ };
2795
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2796
+ switch (errorCode) {
2797
+ case "AccessDeniedException":
2798
+ case "com.amazonaws.qbusiness#AccessDeniedException":
2799
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2800
+ case "InternalServerException":
2801
+ case "com.amazonaws.qbusiness#InternalServerException":
2802
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
2803
+ case "ResourceNotFoundException":
2804
+ case "com.amazonaws.qbusiness#ResourceNotFoundException":
2805
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2806
+ case "ThrottlingException":
2807
+ case "com.amazonaws.qbusiness#ThrottlingException":
2808
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
2809
+ case "ValidationException":
2810
+ case "com.amazonaws.qbusiness#ValidationException":
2811
+ throw await de_ValidationExceptionRes(parsedOutput, context);
2812
+ default:
2813
+ const parsedBody = parsedOutput.body;
2814
+ return throwDefaultError({
2815
+ output,
2816
+ parsedBody,
2817
+ errorCode,
2818
+ });
2819
+ }
2820
+ };
2821
+ export const de_ListDataSourceSyncJobsCommand = async (output, context) => {
2822
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2823
+ return de_ListDataSourceSyncJobsCommandError(output, context);
2824
+ }
2825
+ const contents = map({
2826
+ $metadata: deserializeMetadata(output),
2827
+ });
2828
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2829
+ const doc = take(data, {
2830
+ history: (_) => de_DataSourceSyncJobs(_, context),
2831
+ nextToken: __expectString,
2832
+ });
2833
+ Object.assign(contents, doc);
2834
+ return contents;
2835
+ };
2836
+ const de_ListDataSourceSyncJobsCommandError = async (output, context) => {
2837
+ const parsedOutput = {
2838
+ ...output,
2839
+ body: await parseErrorBody(output.body, context),
2840
+ };
2841
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2842
+ switch (errorCode) {
2843
+ case "AccessDeniedException":
2844
+ case "com.amazonaws.qbusiness#AccessDeniedException":
2845
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2846
+ case "InternalServerException":
2847
+ case "com.amazonaws.qbusiness#InternalServerException":
2848
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
2849
+ case "ResourceNotFoundException":
2850
+ case "com.amazonaws.qbusiness#ResourceNotFoundException":
2851
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2852
+ case "ThrottlingException":
2853
+ case "com.amazonaws.qbusiness#ThrottlingException":
2854
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
2855
+ case "ValidationException":
2856
+ case "com.amazonaws.qbusiness#ValidationException":
2857
+ throw await de_ValidationExceptionRes(parsedOutput, context);
2858
+ default:
2859
+ const parsedBody = parsedOutput.body;
2860
+ return throwDefaultError({
2861
+ output,
2862
+ parsedBody,
2863
+ errorCode,
2864
+ });
2865
+ }
2866
+ };
2867
+ export const de_ListDocumentsCommand = async (output, context) => {
2868
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2869
+ return de_ListDocumentsCommandError(output, context);
2870
+ }
2871
+ const contents = map({
2872
+ $metadata: deserializeMetadata(output),
2873
+ });
2874
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2875
+ const doc = take(data, {
2876
+ documentDetailList: (_) => de_DocumentDetailList(_, context),
2877
+ nextToken: __expectString,
2878
+ });
2879
+ Object.assign(contents, doc);
2880
+ return contents;
2881
+ };
2882
+ const de_ListDocumentsCommandError = async (output, context) => {
2883
+ const parsedOutput = {
2884
+ ...output,
2885
+ body: await parseErrorBody(output.body, context),
2886
+ };
2887
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2888
+ switch (errorCode) {
2889
+ case "AccessDeniedException":
2890
+ case "com.amazonaws.qbusiness#AccessDeniedException":
2891
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2892
+ case "InternalServerException":
2893
+ case "com.amazonaws.qbusiness#InternalServerException":
2894
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
2895
+ case "ResourceNotFoundException":
2896
+ case "com.amazonaws.qbusiness#ResourceNotFoundException":
2897
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2898
+ case "ThrottlingException":
2899
+ case "com.amazonaws.qbusiness#ThrottlingException":
2900
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
2901
+ case "ValidationException":
2902
+ case "com.amazonaws.qbusiness#ValidationException":
2903
+ throw await de_ValidationExceptionRes(parsedOutput, context);
2904
+ default:
2905
+ const parsedBody = parsedOutput.body;
2906
+ return throwDefaultError({
2907
+ output,
2908
+ parsedBody,
2909
+ errorCode,
2910
+ });
2911
+ }
2912
+ };
2913
+ export const de_ListGroupsCommand = async (output, context) => {
2914
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2915
+ return de_ListGroupsCommandError(output, context);
2916
+ }
2917
+ const contents = map({
2918
+ $metadata: deserializeMetadata(output),
2919
+ });
2920
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2921
+ const doc = take(data, {
2922
+ items: _json,
2923
+ nextToken: __expectString,
2924
+ });
2925
+ Object.assign(contents, doc);
2926
+ return contents;
2927
+ };
2928
+ const de_ListGroupsCommandError = async (output, context) => {
2929
+ const parsedOutput = {
2930
+ ...output,
2931
+ body: await parseErrorBody(output.body, context),
2932
+ };
2933
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2934
+ switch (errorCode) {
2935
+ case "AccessDeniedException":
2936
+ case "com.amazonaws.qbusiness#AccessDeniedException":
2937
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2938
+ case "ConflictException":
2939
+ case "com.amazonaws.qbusiness#ConflictException":
2940
+ throw await de_ConflictExceptionRes(parsedOutput, context);
2941
+ case "InternalServerException":
2942
+ case "com.amazonaws.qbusiness#InternalServerException":
2943
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
2944
+ case "ResourceNotFoundException":
2945
+ case "com.amazonaws.qbusiness#ResourceNotFoundException":
2946
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2947
+ case "ThrottlingException":
2948
+ case "com.amazonaws.qbusiness#ThrottlingException":
2949
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
2950
+ case "ValidationException":
2951
+ case "com.amazonaws.qbusiness#ValidationException":
2952
+ throw await de_ValidationExceptionRes(parsedOutput, context);
2953
+ default:
2954
+ const parsedBody = parsedOutput.body;
2955
+ return throwDefaultError({
2956
+ output,
2957
+ parsedBody,
2958
+ errorCode,
2959
+ });
2960
+ }
2961
+ };
2962
+ export const de_ListIndicesCommand = async (output, context) => {
2963
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2964
+ return de_ListIndicesCommandError(output, context);
2965
+ }
2966
+ const contents = map({
2967
+ $metadata: deserializeMetadata(output),
2968
+ });
2969
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2970
+ const doc = take(data, {
2971
+ indices: (_) => de_Indices(_, context),
2972
+ nextToken: __expectString,
2973
+ });
2974
+ Object.assign(contents, doc);
2975
+ return contents;
2976
+ };
2977
+ const de_ListIndicesCommandError = async (output, context) => {
2978
+ const parsedOutput = {
2979
+ ...output,
2980
+ body: await parseErrorBody(output.body, context),
2981
+ };
2982
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2983
+ switch (errorCode) {
2984
+ case "AccessDeniedException":
2985
+ case "com.amazonaws.qbusiness#AccessDeniedException":
2986
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2987
+ case "InternalServerException":
2988
+ case "com.amazonaws.qbusiness#InternalServerException":
2989
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
2990
+ case "ResourceNotFoundException":
2991
+ case "com.amazonaws.qbusiness#ResourceNotFoundException":
2992
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2993
+ case "ThrottlingException":
2994
+ case "com.amazonaws.qbusiness#ThrottlingException":
2995
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
2996
+ case "ValidationException":
2997
+ case "com.amazonaws.qbusiness#ValidationException":
2998
+ throw await de_ValidationExceptionRes(parsedOutput, context);
2999
+ default:
3000
+ const parsedBody = parsedOutput.body;
3001
+ return throwDefaultError({
3002
+ output,
3003
+ parsedBody,
3004
+ errorCode,
3005
+ });
3006
+ }
3007
+ };
3008
+ export const de_ListMessagesCommand = async (output, context) => {
3009
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
3010
+ return de_ListMessagesCommandError(output, context);
3011
+ }
3012
+ const contents = map({
3013
+ $metadata: deserializeMetadata(output),
3014
+ });
3015
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3016
+ const doc = take(data, {
3017
+ messages: (_) => de_Messages(_, context),
3018
+ nextToken: __expectString,
3019
+ });
3020
+ Object.assign(contents, doc);
3021
+ return contents;
3022
+ };
3023
+ const de_ListMessagesCommandError = async (output, context) => {
3024
+ const parsedOutput = {
3025
+ ...output,
3026
+ body: await parseErrorBody(output.body, context),
3027
+ };
3028
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3029
+ switch (errorCode) {
3030
+ case "AccessDeniedException":
3031
+ case "com.amazonaws.qbusiness#AccessDeniedException":
3032
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3033
+ case "InternalServerException":
3034
+ case "com.amazonaws.qbusiness#InternalServerException":
3035
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
3036
+ case "LicenseNotFoundException":
3037
+ case "com.amazonaws.qbusiness#LicenseNotFoundException":
3038
+ throw await de_LicenseNotFoundExceptionRes(parsedOutput, context);
3039
+ case "ResourceNotFoundException":
3040
+ case "com.amazonaws.qbusiness#ResourceNotFoundException":
3041
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3042
+ case "ThrottlingException":
3043
+ case "com.amazonaws.qbusiness#ThrottlingException":
3044
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
3045
+ case "ValidationException":
3046
+ case "com.amazonaws.qbusiness#ValidationException":
3047
+ throw await de_ValidationExceptionRes(parsedOutput, context);
3048
+ default:
3049
+ const parsedBody = parsedOutput.body;
3050
+ return throwDefaultError({
3051
+ output,
3052
+ parsedBody,
3053
+ errorCode,
3054
+ });
3055
+ }
3056
+ };
3057
+ export const de_ListPluginsCommand = async (output, context) => {
3058
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
3059
+ return de_ListPluginsCommandError(output, context);
3060
+ }
3061
+ const contents = map({
3062
+ $metadata: deserializeMetadata(output),
3063
+ });
3064
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3065
+ const doc = take(data, {
3066
+ nextToken: __expectString,
3067
+ plugins: (_) => de_Plugins(_, context),
3068
+ });
3069
+ Object.assign(contents, doc);
3070
+ return contents;
3071
+ };
3072
+ const de_ListPluginsCommandError = async (output, context) => {
3073
+ const parsedOutput = {
3074
+ ...output,
3075
+ body: await parseErrorBody(output.body, context),
3076
+ };
3077
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3078
+ switch (errorCode) {
3079
+ case "AccessDeniedException":
3080
+ case "com.amazonaws.qbusiness#AccessDeniedException":
3081
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3082
+ case "InternalServerException":
3083
+ case "com.amazonaws.qbusiness#InternalServerException":
3084
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
3085
+ case "ResourceNotFoundException":
3086
+ case "com.amazonaws.qbusiness#ResourceNotFoundException":
3087
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3088
+ case "ThrottlingException":
3089
+ case "com.amazonaws.qbusiness#ThrottlingException":
3090
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
3091
+ case "ValidationException":
3092
+ case "com.amazonaws.qbusiness#ValidationException":
3093
+ throw await de_ValidationExceptionRes(parsedOutput, context);
3094
+ default:
3095
+ const parsedBody = parsedOutput.body;
3096
+ return throwDefaultError({
3097
+ output,
3098
+ parsedBody,
3099
+ errorCode,
3100
+ });
3101
+ }
3102
+ };
3103
+ export const de_ListRetrieversCommand = async (output, context) => {
3104
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
3105
+ return de_ListRetrieversCommandError(output, context);
3106
+ }
3107
+ const contents = map({
3108
+ $metadata: deserializeMetadata(output),
3109
+ });
3110
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3111
+ const doc = take(data, {
3112
+ nextToken: __expectString,
3113
+ retrievers: _json,
3114
+ });
3115
+ Object.assign(contents, doc);
3116
+ return contents;
3117
+ };
3118
+ const de_ListRetrieversCommandError = async (output, context) => {
3119
+ const parsedOutput = {
3120
+ ...output,
3121
+ body: await parseErrorBody(output.body, context),
3122
+ };
3123
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3124
+ switch (errorCode) {
3125
+ case "AccessDeniedException":
3126
+ case "com.amazonaws.qbusiness#AccessDeniedException":
3127
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3128
+ case "InternalServerException":
3129
+ case "com.amazonaws.qbusiness#InternalServerException":
3130
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
3131
+ case "ResourceNotFoundException":
3132
+ case "com.amazonaws.qbusiness#ResourceNotFoundException":
3133
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3134
+ case "ThrottlingException":
3135
+ case "com.amazonaws.qbusiness#ThrottlingException":
3136
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
3137
+ case "ValidationException":
3138
+ case "com.amazonaws.qbusiness#ValidationException":
3139
+ throw await de_ValidationExceptionRes(parsedOutput, context);
3140
+ default:
3141
+ const parsedBody = parsedOutput.body;
3142
+ return throwDefaultError({
3143
+ output,
3144
+ parsedBody,
3145
+ errorCode,
3146
+ });
3147
+ }
3148
+ };
3149
+ export const de_ListTagsForResourceCommand = async (output, context) => {
3150
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
3151
+ return de_ListTagsForResourceCommandError(output, context);
3152
+ }
3153
+ const contents = map({
3154
+ $metadata: deserializeMetadata(output),
3155
+ });
3156
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3157
+ const doc = take(data, {
3158
+ tags: _json,
3159
+ });
3160
+ Object.assign(contents, doc);
3161
+ return contents;
3162
+ };
3163
+ const de_ListTagsForResourceCommandError = async (output, context) => {
3164
+ const parsedOutput = {
3165
+ ...output,
3166
+ body: await parseErrorBody(output.body, context),
3167
+ };
3168
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3169
+ switch (errorCode) {
3170
+ case "AccessDeniedException":
3171
+ case "com.amazonaws.qbusiness#AccessDeniedException":
3172
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3173
+ case "InternalServerException":
3174
+ case "com.amazonaws.qbusiness#InternalServerException":
3175
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
3176
+ case "ResourceNotFoundException":
3177
+ case "com.amazonaws.qbusiness#ResourceNotFoundException":
3178
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3179
+ case "ThrottlingException":
3180
+ case "com.amazonaws.qbusiness#ThrottlingException":
3181
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
3182
+ case "ValidationException":
3183
+ case "com.amazonaws.qbusiness#ValidationException":
3184
+ throw await de_ValidationExceptionRes(parsedOutput, context);
3185
+ default:
3186
+ const parsedBody = parsedOutput.body;
3187
+ return throwDefaultError({
3188
+ output,
3189
+ parsedBody,
3190
+ errorCode,
3191
+ });
3192
+ }
3193
+ };
3194
+ export const de_ListWebExperiencesCommand = async (output, context) => {
3195
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
3196
+ return de_ListWebExperiencesCommandError(output, context);
3197
+ }
3198
+ const contents = map({
3199
+ $metadata: deserializeMetadata(output),
3200
+ });
3201
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3202
+ const doc = take(data, {
3203
+ nextToken: __expectString,
3204
+ webExperiences: (_) => de_WebExperiences(_, context),
3205
+ });
3206
+ Object.assign(contents, doc);
3207
+ return contents;
3208
+ };
3209
+ const de_ListWebExperiencesCommandError = async (output, context) => {
3210
+ const parsedOutput = {
3211
+ ...output,
3212
+ body: await parseErrorBody(output.body, context),
3213
+ };
3214
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3215
+ switch (errorCode) {
3216
+ case "AccessDeniedException":
3217
+ case "com.amazonaws.qbusiness#AccessDeniedException":
3218
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3219
+ case "InternalServerException":
3220
+ case "com.amazonaws.qbusiness#InternalServerException":
3221
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
3222
+ case "ResourceNotFoundException":
3223
+ case "com.amazonaws.qbusiness#ResourceNotFoundException":
3224
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3225
+ case "ThrottlingException":
3226
+ case "com.amazonaws.qbusiness#ThrottlingException":
3227
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
3228
+ case "ValidationException":
3229
+ case "com.amazonaws.qbusiness#ValidationException":
3230
+ throw await de_ValidationExceptionRes(parsedOutput, context);
3231
+ default:
3232
+ const parsedBody = parsedOutput.body;
3233
+ return throwDefaultError({
3234
+ output,
3235
+ parsedBody,
3236
+ errorCode,
3237
+ });
3238
+ }
3239
+ };
3240
+ export const de_PutFeedbackCommand = async (output, context) => {
3241
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
3242
+ return de_PutFeedbackCommandError(output, context);
3243
+ }
3244
+ const contents = map({
3245
+ $metadata: deserializeMetadata(output),
3246
+ });
3247
+ await collectBody(output.body, context);
3248
+ return contents;
3249
+ };
3250
+ const de_PutFeedbackCommandError = async (output, context) => {
3251
+ const parsedOutput = {
3252
+ ...output,
3253
+ body: await parseErrorBody(output.body, context),
3254
+ };
3255
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3256
+ switch (errorCode) {
3257
+ case "AccessDeniedException":
3258
+ case "com.amazonaws.qbusiness#AccessDeniedException":
3259
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3260
+ case "InternalServerException":
3261
+ case "com.amazonaws.qbusiness#InternalServerException":
3262
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
3263
+ case "ResourceNotFoundException":
3264
+ case "com.amazonaws.qbusiness#ResourceNotFoundException":
3265
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3266
+ case "ThrottlingException":
3267
+ case "com.amazonaws.qbusiness#ThrottlingException":
3268
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
3269
+ case "ValidationException":
3270
+ case "com.amazonaws.qbusiness#ValidationException":
3271
+ throw await de_ValidationExceptionRes(parsedOutput, context);
3272
+ default:
3273
+ const parsedBody = parsedOutput.body;
3274
+ return throwDefaultError({
3275
+ output,
3276
+ parsedBody,
3277
+ errorCode,
3278
+ });
3279
+ }
3280
+ };
3281
+ export const de_PutGroupCommand = async (output, context) => {
3282
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
3283
+ return de_PutGroupCommandError(output, context);
3284
+ }
3285
+ const contents = map({
3286
+ $metadata: deserializeMetadata(output),
3287
+ });
3288
+ await collectBody(output.body, context);
3289
+ return contents;
3290
+ };
3291
+ const de_PutGroupCommandError = async (output, context) => {
3292
+ const parsedOutput = {
3293
+ ...output,
3294
+ body: await parseErrorBody(output.body, context),
3295
+ };
3296
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3297
+ switch (errorCode) {
3298
+ case "AccessDeniedException":
3299
+ case "com.amazonaws.qbusiness#AccessDeniedException":
3300
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3301
+ case "ConflictException":
3302
+ case "com.amazonaws.qbusiness#ConflictException":
3303
+ throw await de_ConflictExceptionRes(parsedOutput, context);
3304
+ case "InternalServerException":
3305
+ case "com.amazonaws.qbusiness#InternalServerException":
3306
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
3307
+ case "ResourceNotFoundException":
3308
+ case "com.amazonaws.qbusiness#ResourceNotFoundException":
3309
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3310
+ case "ServiceQuotaExceededException":
3311
+ case "com.amazonaws.qbusiness#ServiceQuotaExceededException":
3312
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
3313
+ case "ThrottlingException":
3314
+ case "com.amazonaws.qbusiness#ThrottlingException":
3315
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
3316
+ case "ValidationException":
3317
+ case "com.amazonaws.qbusiness#ValidationException":
3318
+ throw await de_ValidationExceptionRes(parsedOutput, context);
3319
+ default:
3320
+ const parsedBody = parsedOutput.body;
3321
+ return throwDefaultError({
3322
+ output,
3323
+ parsedBody,
3324
+ errorCode,
3325
+ });
3326
+ }
3327
+ };
3328
+ export const de_StartDataSourceSyncJobCommand = async (output, context) => {
3329
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
3330
+ return de_StartDataSourceSyncJobCommandError(output, context);
3331
+ }
3332
+ const contents = map({
3333
+ $metadata: deserializeMetadata(output),
3334
+ });
3335
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3336
+ const doc = take(data, {
3337
+ executionId: __expectString,
3338
+ });
3339
+ Object.assign(contents, doc);
3340
+ return contents;
3341
+ };
3342
+ const de_StartDataSourceSyncJobCommandError = async (output, context) => {
3343
+ const parsedOutput = {
3344
+ ...output,
3345
+ body: await parseErrorBody(output.body, context),
3346
+ };
3347
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3348
+ switch (errorCode) {
3349
+ case "AccessDeniedException":
3350
+ case "com.amazonaws.qbusiness#AccessDeniedException":
3351
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3352
+ case "ConflictException":
3353
+ case "com.amazonaws.qbusiness#ConflictException":
3354
+ throw await de_ConflictExceptionRes(parsedOutput, context);
3355
+ case "InternalServerException":
3356
+ case "com.amazonaws.qbusiness#InternalServerException":
3357
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
3358
+ case "ResourceNotFoundException":
3359
+ case "com.amazonaws.qbusiness#ResourceNotFoundException":
3360
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3361
+ case "ServiceQuotaExceededException":
3362
+ case "com.amazonaws.qbusiness#ServiceQuotaExceededException":
3363
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
3364
+ case "ThrottlingException":
3365
+ case "com.amazonaws.qbusiness#ThrottlingException":
3366
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
3367
+ case "ValidationException":
3368
+ case "com.amazonaws.qbusiness#ValidationException":
3369
+ throw await de_ValidationExceptionRes(parsedOutput, context);
3370
+ default:
3371
+ const parsedBody = parsedOutput.body;
3372
+ return throwDefaultError({
3373
+ output,
3374
+ parsedBody,
3375
+ errorCode,
3376
+ });
3377
+ }
3378
+ };
3379
+ export const de_StopDataSourceSyncJobCommand = async (output, context) => {
3380
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
3381
+ return de_StopDataSourceSyncJobCommandError(output, context);
3382
+ }
3383
+ const contents = map({
3384
+ $metadata: deserializeMetadata(output),
3385
+ });
3386
+ await collectBody(output.body, context);
3387
+ return contents;
3388
+ };
3389
+ const de_StopDataSourceSyncJobCommandError = async (output, context) => {
3390
+ const parsedOutput = {
3391
+ ...output,
3392
+ body: await parseErrorBody(output.body, context),
3393
+ };
3394
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3395
+ switch (errorCode) {
3396
+ case "AccessDeniedException":
3397
+ case "com.amazonaws.qbusiness#AccessDeniedException":
3398
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3399
+ case "InternalServerException":
3400
+ case "com.amazonaws.qbusiness#InternalServerException":
3401
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
3402
+ case "ResourceNotFoundException":
3403
+ case "com.amazonaws.qbusiness#ResourceNotFoundException":
3404
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3405
+ case "ThrottlingException":
3406
+ case "com.amazonaws.qbusiness#ThrottlingException":
3407
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
3408
+ case "ValidationException":
3409
+ case "com.amazonaws.qbusiness#ValidationException":
3410
+ throw await de_ValidationExceptionRes(parsedOutput, context);
3411
+ default:
3412
+ const parsedBody = parsedOutput.body;
3413
+ return throwDefaultError({
3414
+ output,
3415
+ parsedBody,
3416
+ errorCode,
3417
+ });
3418
+ }
3419
+ };
3420
+ export const de_TagResourceCommand = async (output, context) => {
3421
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
3422
+ return de_TagResourceCommandError(output, context);
3423
+ }
3424
+ const contents = map({
3425
+ $metadata: deserializeMetadata(output),
3426
+ });
3427
+ await collectBody(output.body, context);
3428
+ return contents;
3429
+ };
3430
+ const de_TagResourceCommandError = async (output, context) => {
3431
+ const parsedOutput = {
3432
+ ...output,
3433
+ body: await parseErrorBody(output.body, context),
3434
+ };
3435
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3436
+ switch (errorCode) {
3437
+ case "AccessDeniedException":
3438
+ case "com.amazonaws.qbusiness#AccessDeniedException":
3439
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3440
+ case "ConflictException":
3441
+ case "com.amazonaws.qbusiness#ConflictException":
3442
+ throw await de_ConflictExceptionRes(parsedOutput, context);
3443
+ case "InternalServerException":
3444
+ case "com.amazonaws.qbusiness#InternalServerException":
3445
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
3446
+ case "ResourceNotFoundException":
3447
+ case "com.amazonaws.qbusiness#ResourceNotFoundException":
3448
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3449
+ case "ThrottlingException":
3450
+ case "com.amazonaws.qbusiness#ThrottlingException":
3451
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
3452
+ case "ValidationException":
3453
+ case "com.amazonaws.qbusiness#ValidationException":
3454
+ throw await de_ValidationExceptionRes(parsedOutput, context);
3455
+ default:
3456
+ const parsedBody = parsedOutput.body;
3457
+ return throwDefaultError({
3458
+ output,
3459
+ parsedBody,
3460
+ errorCode,
3461
+ });
3462
+ }
3463
+ };
3464
+ export const de_UntagResourceCommand = async (output, context) => {
3465
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
3466
+ return de_UntagResourceCommandError(output, context);
3467
+ }
3468
+ const contents = map({
3469
+ $metadata: deserializeMetadata(output),
3470
+ });
3471
+ await collectBody(output.body, context);
3472
+ return contents;
3473
+ };
3474
+ const de_UntagResourceCommandError = async (output, context) => {
3475
+ const parsedOutput = {
3476
+ ...output,
3477
+ body: await parseErrorBody(output.body, context),
3478
+ };
3479
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3480
+ switch (errorCode) {
3481
+ case "AccessDeniedException":
3482
+ case "com.amazonaws.qbusiness#AccessDeniedException":
3483
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3484
+ case "InternalServerException":
3485
+ case "com.amazonaws.qbusiness#InternalServerException":
3486
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
3487
+ case "ResourceNotFoundException":
3488
+ case "com.amazonaws.qbusiness#ResourceNotFoundException":
3489
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3490
+ case "ThrottlingException":
3491
+ case "com.amazonaws.qbusiness#ThrottlingException":
3492
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
3493
+ case "ValidationException":
3494
+ case "com.amazonaws.qbusiness#ValidationException":
3495
+ throw await de_ValidationExceptionRes(parsedOutput, context);
3496
+ default:
3497
+ const parsedBody = parsedOutput.body;
3498
+ return throwDefaultError({
3499
+ output,
3500
+ parsedBody,
3501
+ errorCode,
3502
+ });
3503
+ }
3504
+ };
3505
+ export const de_UpdateApplicationCommand = async (output, context) => {
3506
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
3507
+ return de_UpdateApplicationCommandError(output, context);
3508
+ }
3509
+ const contents = map({
3510
+ $metadata: deserializeMetadata(output),
3511
+ });
3512
+ await collectBody(output.body, context);
3513
+ return contents;
3514
+ };
3515
+ const de_UpdateApplicationCommandError = async (output, context) => {
3516
+ const parsedOutput = {
3517
+ ...output,
3518
+ body: await parseErrorBody(output.body, context),
3519
+ };
3520
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3521
+ switch (errorCode) {
3522
+ case "AccessDeniedException":
3523
+ case "com.amazonaws.qbusiness#AccessDeniedException":
3524
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3525
+ case "ConflictException":
3526
+ case "com.amazonaws.qbusiness#ConflictException":
3527
+ throw await de_ConflictExceptionRes(parsedOutput, context);
3528
+ case "InternalServerException":
3529
+ case "com.amazonaws.qbusiness#InternalServerException":
3530
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
3531
+ case "ResourceNotFoundException":
3532
+ case "com.amazonaws.qbusiness#ResourceNotFoundException":
3533
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3534
+ case "ThrottlingException":
3535
+ case "com.amazonaws.qbusiness#ThrottlingException":
3536
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
3537
+ case "ValidationException":
3538
+ case "com.amazonaws.qbusiness#ValidationException":
3539
+ throw await de_ValidationExceptionRes(parsedOutput, context);
3540
+ default:
3541
+ const parsedBody = parsedOutput.body;
3542
+ return throwDefaultError({
3543
+ output,
3544
+ parsedBody,
3545
+ errorCode,
3546
+ });
3547
+ }
3548
+ };
3549
+ export const de_UpdateChatControlsConfigurationCommand = async (output, context) => {
3550
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
3551
+ return de_UpdateChatControlsConfigurationCommandError(output, context);
3552
+ }
3553
+ const contents = map({
3554
+ $metadata: deserializeMetadata(output),
3555
+ });
3556
+ await collectBody(output.body, context);
3557
+ return contents;
3558
+ };
3559
+ const de_UpdateChatControlsConfigurationCommandError = async (output, context) => {
3560
+ const parsedOutput = {
3561
+ ...output,
3562
+ body: await parseErrorBody(output.body, context),
3563
+ };
3564
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3565
+ switch (errorCode) {
3566
+ case "AccessDeniedException":
3567
+ case "com.amazonaws.qbusiness#AccessDeniedException":
3568
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3569
+ case "ConflictException":
3570
+ case "com.amazonaws.qbusiness#ConflictException":
3571
+ throw await de_ConflictExceptionRes(parsedOutput, context);
3572
+ case "InternalServerException":
3573
+ case "com.amazonaws.qbusiness#InternalServerException":
3574
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
3575
+ case "ResourceNotFoundException":
3576
+ case "com.amazonaws.qbusiness#ResourceNotFoundException":
3577
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3578
+ case "ServiceQuotaExceededException":
3579
+ case "com.amazonaws.qbusiness#ServiceQuotaExceededException":
3580
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
3581
+ case "ThrottlingException":
3582
+ case "com.amazonaws.qbusiness#ThrottlingException":
3583
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
3584
+ case "ValidationException":
3585
+ case "com.amazonaws.qbusiness#ValidationException":
3586
+ throw await de_ValidationExceptionRes(parsedOutput, context);
3587
+ default:
3588
+ const parsedBody = parsedOutput.body;
3589
+ return throwDefaultError({
3590
+ output,
3591
+ parsedBody,
3592
+ errorCode,
3593
+ });
3594
+ }
3595
+ };
3596
+ export const de_UpdateDataSourceCommand = async (output, context) => {
3597
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
3598
+ return de_UpdateDataSourceCommandError(output, context);
3599
+ }
3600
+ const contents = map({
3601
+ $metadata: deserializeMetadata(output),
3602
+ });
3603
+ await collectBody(output.body, context);
3604
+ return contents;
3605
+ };
3606
+ const de_UpdateDataSourceCommandError = async (output, context) => {
3607
+ const parsedOutput = {
3608
+ ...output,
3609
+ body: await parseErrorBody(output.body, context),
3610
+ };
3611
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3612
+ switch (errorCode) {
3613
+ case "AccessDeniedException":
3614
+ case "com.amazonaws.qbusiness#AccessDeniedException":
3615
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3616
+ case "ConflictException":
3617
+ case "com.amazonaws.qbusiness#ConflictException":
3618
+ throw await de_ConflictExceptionRes(parsedOutput, context);
3619
+ case "InternalServerException":
3620
+ case "com.amazonaws.qbusiness#InternalServerException":
3621
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
3622
+ case "ResourceNotFoundException":
3623
+ case "com.amazonaws.qbusiness#ResourceNotFoundException":
3624
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3625
+ case "ThrottlingException":
3626
+ case "com.amazonaws.qbusiness#ThrottlingException":
3627
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
3628
+ case "ValidationException":
3629
+ case "com.amazonaws.qbusiness#ValidationException":
3630
+ throw await de_ValidationExceptionRes(parsedOutput, context);
3631
+ default:
3632
+ const parsedBody = parsedOutput.body;
3633
+ return throwDefaultError({
3634
+ output,
3635
+ parsedBody,
3636
+ errorCode,
3637
+ });
3638
+ }
3639
+ };
3640
+ export const de_UpdateIndexCommand = async (output, context) => {
3641
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
3642
+ return de_UpdateIndexCommandError(output, context);
3643
+ }
3644
+ const contents = map({
3645
+ $metadata: deserializeMetadata(output),
3646
+ });
3647
+ await collectBody(output.body, context);
3648
+ return contents;
3649
+ };
3650
+ const de_UpdateIndexCommandError = async (output, context) => {
3651
+ const parsedOutput = {
3652
+ ...output,
3653
+ body: await parseErrorBody(output.body, context),
3654
+ };
3655
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3656
+ switch (errorCode) {
3657
+ case "AccessDeniedException":
3658
+ case "com.amazonaws.qbusiness#AccessDeniedException":
3659
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3660
+ case "ConflictException":
3661
+ case "com.amazonaws.qbusiness#ConflictException":
3662
+ throw await de_ConflictExceptionRes(parsedOutput, context);
3663
+ case "InternalServerException":
3664
+ case "com.amazonaws.qbusiness#InternalServerException":
3665
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
3666
+ case "ResourceNotFoundException":
3667
+ case "com.amazonaws.qbusiness#ResourceNotFoundException":
3668
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3669
+ case "ServiceQuotaExceededException":
3670
+ case "com.amazonaws.qbusiness#ServiceQuotaExceededException":
3671
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
3672
+ case "ThrottlingException":
3673
+ case "com.amazonaws.qbusiness#ThrottlingException":
3674
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
3675
+ case "ValidationException":
3676
+ case "com.amazonaws.qbusiness#ValidationException":
3677
+ throw await de_ValidationExceptionRes(parsedOutput, context);
3678
+ default:
3679
+ const parsedBody = parsedOutput.body;
3680
+ return throwDefaultError({
3681
+ output,
3682
+ parsedBody,
3683
+ errorCode,
3684
+ });
3685
+ }
3686
+ };
3687
+ export const de_UpdatePluginCommand = async (output, context) => {
3688
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
3689
+ return de_UpdatePluginCommandError(output, context);
3690
+ }
3691
+ const contents = map({
3692
+ $metadata: deserializeMetadata(output),
3693
+ });
3694
+ await collectBody(output.body, context);
3695
+ return contents;
3696
+ };
3697
+ const de_UpdatePluginCommandError = async (output, context) => {
3698
+ const parsedOutput = {
3699
+ ...output,
3700
+ body: await parseErrorBody(output.body, context),
3701
+ };
3702
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3703
+ switch (errorCode) {
3704
+ case "AccessDeniedException":
3705
+ case "com.amazonaws.qbusiness#AccessDeniedException":
3706
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3707
+ case "ConflictException":
3708
+ case "com.amazonaws.qbusiness#ConflictException":
3709
+ throw await de_ConflictExceptionRes(parsedOutput, context);
3710
+ case "InternalServerException":
3711
+ case "com.amazonaws.qbusiness#InternalServerException":
3712
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
3713
+ case "ResourceNotFoundException":
3714
+ case "com.amazonaws.qbusiness#ResourceNotFoundException":
3715
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3716
+ case "ServiceQuotaExceededException":
3717
+ case "com.amazonaws.qbusiness#ServiceQuotaExceededException":
3718
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
3719
+ case "ThrottlingException":
3720
+ case "com.amazonaws.qbusiness#ThrottlingException":
3721
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
3722
+ case "ValidationException":
3723
+ case "com.amazonaws.qbusiness#ValidationException":
3724
+ throw await de_ValidationExceptionRes(parsedOutput, context);
3725
+ default:
3726
+ const parsedBody = parsedOutput.body;
3727
+ return throwDefaultError({
3728
+ output,
3729
+ parsedBody,
3730
+ errorCode,
3731
+ });
3732
+ }
3733
+ };
3734
+ export const de_UpdateRetrieverCommand = async (output, context) => {
3735
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
3736
+ return de_UpdateRetrieverCommandError(output, context);
3737
+ }
3738
+ const contents = map({
3739
+ $metadata: deserializeMetadata(output),
3740
+ });
3741
+ await collectBody(output.body, context);
3742
+ return contents;
3743
+ };
3744
+ const de_UpdateRetrieverCommandError = async (output, context) => {
3745
+ const parsedOutput = {
3746
+ ...output,
3747
+ body: await parseErrorBody(output.body, context),
3748
+ };
3749
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3750
+ switch (errorCode) {
3751
+ case "AccessDeniedException":
3752
+ case "com.amazonaws.qbusiness#AccessDeniedException":
3753
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3754
+ case "ConflictException":
3755
+ case "com.amazonaws.qbusiness#ConflictException":
3756
+ throw await de_ConflictExceptionRes(parsedOutput, context);
3757
+ case "InternalServerException":
3758
+ case "com.amazonaws.qbusiness#InternalServerException":
3759
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
3760
+ case "ResourceNotFoundException":
3761
+ case "com.amazonaws.qbusiness#ResourceNotFoundException":
3762
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3763
+ case "ServiceQuotaExceededException":
3764
+ case "com.amazonaws.qbusiness#ServiceQuotaExceededException":
3765
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
3766
+ case "ThrottlingException":
3767
+ case "com.amazonaws.qbusiness#ThrottlingException":
3768
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
3769
+ case "ValidationException":
3770
+ case "com.amazonaws.qbusiness#ValidationException":
3771
+ throw await de_ValidationExceptionRes(parsedOutput, context);
3772
+ default:
3773
+ const parsedBody = parsedOutput.body;
3774
+ return throwDefaultError({
3775
+ output,
3776
+ parsedBody,
3777
+ errorCode,
3778
+ });
3779
+ }
3780
+ };
3781
+ export const de_UpdateUserCommand = async (output, context) => {
3782
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
3783
+ return de_UpdateUserCommandError(output, context);
3784
+ }
3785
+ const contents = map({
3786
+ $metadata: deserializeMetadata(output),
3787
+ });
3788
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3789
+ const doc = take(data, {
3790
+ userAliasesAdded: _json,
3791
+ userAliasesDeleted: _json,
3792
+ userAliasesUpdated: _json,
3793
+ });
3794
+ Object.assign(contents, doc);
3795
+ return contents;
3796
+ };
3797
+ const de_UpdateUserCommandError = async (output, context) => {
3798
+ const parsedOutput = {
3799
+ ...output,
3800
+ body: await parseErrorBody(output.body, context),
3801
+ };
3802
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3803
+ switch (errorCode) {
3804
+ case "AccessDeniedException":
3805
+ case "com.amazonaws.qbusiness#AccessDeniedException":
3806
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3807
+ case "InternalServerException":
3808
+ case "com.amazonaws.qbusiness#InternalServerException":
3809
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
3810
+ case "ResourceNotFoundException":
3811
+ case "com.amazonaws.qbusiness#ResourceNotFoundException":
3812
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3813
+ case "ServiceQuotaExceededException":
3814
+ case "com.amazonaws.qbusiness#ServiceQuotaExceededException":
3815
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
3816
+ case "ThrottlingException":
3817
+ case "com.amazonaws.qbusiness#ThrottlingException":
3818
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
3819
+ case "ValidationException":
3820
+ case "com.amazonaws.qbusiness#ValidationException":
3821
+ throw await de_ValidationExceptionRes(parsedOutput, context);
3822
+ default:
3823
+ const parsedBody = parsedOutput.body;
3824
+ return throwDefaultError({
3825
+ output,
3826
+ parsedBody,
3827
+ errorCode,
3828
+ });
3829
+ }
3830
+ };
3831
+ export const de_UpdateWebExperienceCommand = async (output, context) => {
3832
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
3833
+ return de_UpdateWebExperienceCommandError(output, context);
3834
+ }
3835
+ const contents = map({
3836
+ $metadata: deserializeMetadata(output),
3837
+ });
3838
+ await collectBody(output.body, context);
3839
+ return contents;
3840
+ };
3841
+ const de_UpdateWebExperienceCommandError = async (output, context) => {
3842
+ const parsedOutput = {
3843
+ ...output,
3844
+ body: await parseErrorBody(output.body, context),
3845
+ };
3846
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3847
+ switch (errorCode) {
3848
+ case "AccessDeniedException":
3849
+ case "com.amazonaws.qbusiness#AccessDeniedException":
3850
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3851
+ case "ConflictException":
3852
+ case "com.amazonaws.qbusiness#ConflictException":
3853
+ throw await de_ConflictExceptionRes(parsedOutput, context);
3854
+ case "InternalServerException":
3855
+ case "com.amazonaws.qbusiness#InternalServerException":
3856
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
3857
+ case "ResourceNotFoundException":
3858
+ case "com.amazonaws.qbusiness#ResourceNotFoundException":
3859
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3860
+ case "ThrottlingException":
3861
+ case "com.amazonaws.qbusiness#ThrottlingException":
3862
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
3863
+ case "ValidationException":
3864
+ case "com.amazonaws.qbusiness#ValidationException":
3865
+ throw await de_ValidationExceptionRes(parsedOutput, context);
3866
+ default:
3867
+ const parsedBody = parsedOutput.body;
3868
+ return throwDefaultError({
3869
+ output,
3870
+ parsedBody,
3871
+ errorCode,
3872
+ });
3873
+ }
3874
+ };
3875
+ const throwDefaultError = withBaseException(__BaseException);
3876
+ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
3877
+ const contents = map({});
3878
+ const data = parsedOutput.body;
3879
+ const doc = take(data, {
3880
+ message: __expectString,
3881
+ });
3882
+ Object.assign(contents, doc);
3883
+ const exception = new AccessDeniedException({
3884
+ $metadata: deserializeMetadata(parsedOutput),
3885
+ ...contents,
3886
+ });
3887
+ return __decorateServiceException(exception, parsedOutput.body);
3888
+ };
3889
+ const de_ConflictExceptionRes = async (parsedOutput, context) => {
3890
+ const contents = map({});
3891
+ const data = parsedOutput.body;
3892
+ const doc = take(data, {
3893
+ message: __expectString,
3894
+ resourceId: __expectString,
3895
+ resourceType: __expectString,
3896
+ });
3897
+ Object.assign(contents, doc);
3898
+ const exception = new ConflictException({
3899
+ $metadata: deserializeMetadata(parsedOutput),
3900
+ ...contents,
3901
+ });
3902
+ return __decorateServiceException(exception, parsedOutput.body);
3903
+ };
3904
+ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
3905
+ const contents = map({});
3906
+ const data = parsedOutput.body;
3907
+ const doc = take(data, {
3908
+ message: __expectString,
3909
+ });
3910
+ Object.assign(contents, doc);
3911
+ const exception = new InternalServerException({
3912
+ $metadata: deserializeMetadata(parsedOutput),
3913
+ ...contents,
3914
+ });
3915
+ return __decorateServiceException(exception, parsedOutput.body);
3916
+ };
3917
+ const de_LicenseNotFoundExceptionRes = async (parsedOutput, context) => {
3918
+ const contents = map({});
3919
+ const data = parsedOutput.body;
3920
+ const doc = take(data, {
3921
+ message: __expectString,
3922
+ });
3923
+ Object.assign(contents, doc);
3924
+ const exception = new LicenseNotFoundException({
3925
+ $metadata: deserializeMetadata(parsedOutput),
3926
+ ...contents,
3927
+ });
3928
+ return __decorateServiceException(exception, parsedOutput.body);
3929
+ };
3930
+ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
3931
+ const contents = map({});
3932
+ const data = parsedOutput.body;
3933
+ const doc = take(data, {
3934
+ message: __expectString,
3935
+ resourceId: __expectString,
3936
+ resourceType: __expectString,
3937
+ });
3938
+ Object.assign(contents, doc);
3939
+ const exception = new ResourceNotFoundException({
3940
+ $metadata: deserializeMetadata(parsedOutput),
3941
+ ...contents,
3942
+ });
3943
+ return __decorateServiceException(exception, parsedOutput.body);
3944
+ };
3945
+ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
3946
+ const contents = map({});
3947
+ const data = parsedOutput.body;
3948
+ const doc = take(data, {
3949
+ message: __expectString,
3950
+ resourceId: __expectString,
3951
+ resourceType: __expectString,
3952
+ });
3953
+ Object.assign(contents, doc);
3954
+ const exception = new ServiceQuotaExceededException({
3955
+ $metadata: deserializeMetadata(parsedOutput),
3956
+ ...contents,
3957
+ });
3958
+ return __decorateServiceException(exception, parsedOutput.body);
3959
+ };
3960
+ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
3961
+ const contents = map({});
3962
+ const data = parsedOutput.body;
3963
+ const doc = take(data, {
3964
+ message: __expectString,
3965
+ });
3966
+ Object.assign(contents, doc);
3967
+ const exception = new ThrottlingException({
3968
+ $metadata: deserializeMetadata(parsedOutput),
3969
+ ...contents,
3970
+ });
3971
+ return __decorateServiceException(exception, parsedOutput.body);
3972
+ };
3973
+ const de_ValidationExceptionRes = async (parsedOutput, context) => {
3974
+ const contents = map({});
3975
+ const data = parsedOutput.body;
3976
+ const doc = take(data, {
3977
+ fields: _json,
3978
+ message: __expectString,
3979
+ reason: __expectString,
3980
+ });
3981
+ Object.assign(contents, doc);
3982
+ const exception = new ValidationException({
3983
+ $metadata: deserializeMetadata(parsedOutput),
3984
+ ...contents,
3985
+ });
3986
+ return __decorateServiceException(exception, parsedOutput.body);
3987
+ };
3988
+ const se_ActionExecution = (input, context) => {
3989
+ return take(input, {
3990
+ payload: (_) => se_ActionExecutionPayload(_, context),
3991
+ payloadFieldNameSeparator: [],
3992
+ pluginId: [],
3993
+ });
3994
+ };
3995
+ const se_ActionExecutionPayload = (input, context) => {
3996
+ return Object.entries(input).reduce((acc, [key, value]) => {
3997
+ if (value === null) {
3998
+ return acc;
3999
+ }
4000
+ acc[key] = se_ActionExecutionPayloadField(value, context);
4001
+ return acc;
4002
+ }, {});
4003
+ };
4004
+ const se_ActionExecutionPayloadField = (input, context) => {
4005
+ return take(input, {
4006
+ value: (_) => se_ActionPayloadFieldValue(_, context),
4007
+ });
4008
+ };
4009
+ const se_ActionPayloadFieldValue = (input, context) => {
4010
+ return input;
4011
+ };
4012
+ const se_AttachmentInput = (input, context) => {
4013
+ return take(input, {
4014
+ data: context.base64Encoder,
4015
+ name: [],
4016
+ });
4017
+ };
4018
+ const se_AttachmentsInput = (input, context) => {
4019
+ return input
4020
+ .filter((e) => e != null)
4021
+ .map((entry) => {
4022
+ return se_AttachmentInput(entry, context);
4023
+ });
4024
+ };
4025
+ const se_AttributeFilter = (input, context) => {
4026
+ return take(input, {
4027
+ andAllFilters: (_) => se_AttributeFilters(_, context),
4028
+ containsAll: (_) => se_DocumentAttribute(_, context),
4029
+ containsAny: (_) => se_DocumentAttribute(_, context),
4030
+ equalsTo: (_) => se_DocumentAttribute(_, context),
4031
+ greaterThan: (_) => se_DocumentAttribute(_, context),
4032
+ greaterThanOrEquals: (_) => se_DocumentAttribute(_, context),
4033
+ lessThan: (_) => se_DocumentAttribute(_, context),
4034
+ lessThanOrEquals: (_) => se_DocumentAttribute(_, context),
4035
+ notFilter: (_) => se_AttributeFilter(_, context),
4036
+ orAllFilters: (_) => se_AttributeFilters(_, context),
4037
+ });
4038
+ };
4039
+ const se_AttributeFilters = (input, context) => {
4040
+ return input
4041
+ .filter((e) => e != null)
4042
+ .map((entry) => {
4043
+ return se_AttributeFilter(entry, context);
4044
+ });
4045
+ };
4046
+ const se_DataSourceConfiguration = (input, context) => {
4047
+ return input;
4048
+ };
4049
+ const se_Document = (input, context) => {
4050
+ return take(input, {
4051
+ accessConfiguration: _json,
4052
+ attributes: (_) => se_DocumentAttributes(_, context),
4053
+ content: (_) => se_DocumentContent(_, context),
4054
+ contentType: [],
4055
+ documentEnrichmentConfiguration: (_) => se_DocumentEnrichmentConfiguration(_, context),
4056
+ id: [],
4057
+ title: [],
4058
+ });
4059
+ };
4060
+ const se_DocumentAttribute = (input, context) => {
4061
+ return take(input, {
4062
+ name: [],
4063
+ value: (_) => se_DocumentAttributeValue(_, context),
4064
+ });
4065
+ };
4066
+ const se_DocumentAttributeCondition = (input, context) => {
4067
+ return take(input, {
4068
+ key: [],
4069
+ operator: [],
4070
+ value: (_) => se_DocumentAttributeValue(_, context),
4071
+ });
4072
+ };
4073
+ const se_DocumentAttributes = (input, context) => {
4074
+ return input
4075
+ .filter((e) => e != null)
4076
+ .map((entry) => {
4077
+ return se_DocumentAttribute(entry, context);
4078
+ });
4079
+ };
4080
+ const se_DocumentAttributeTarget = (input, context) => {
4081
+ return take(input, {
4082
+ attributeValueOperator: [],
4083
+ key: [],
4084
+ value: (_) => se_DocumentAttributeValue(_, context),
4085
+ });
4086
+ };
4087
+ const se_DocumentAttributeValue = (input, context) => {
4088
+ return DocumentAttributeValue.visit(input, {
4089
+ dateValue: (value) => ({ dateValue: Math.round(value.getTime() / 1000) }),
4090
+ longValue: (value) => ({ longValue: value }),
4091
+ stringListValue: (value) => ({ stringListValue: _json(value) }),
4092
+ stringValue: (value) => ({ stringValue: value }),
4093
+ _: (name, value) => ({ name: value }),
4094
+ });
4095
+ };
4096
+ const se_DocumentContent = (input, context) => {
4097
+ return DocumentContent.visit(input, {
4098
+ blob: (value) => ({ blob: context.base64Encoder(value) }),
4099
+ s3: (value) => ({ s3: _json(value) }),
4100
+ _: (name, value) => ({ name: value }),
4101
+ });
4102
+ };
4103
+ const se_DocumentEnrichmentConfiguration = (input, context) => {
4104
+ return take(input, {
4105
+ inlineConfigurations: (_) => se_InlineDocumentEnrichmentConfigurations(_, context),
4106
+ postExtractionHookConfiguration: (_) => se_HookConfiguration(_, context),
4107
+ preExtractionHookConfiguration: (_) => se_HookConfiguration(_, context),
4108
+ });
4109
+ };
4110
+ const se_Documents = (input, context) => {
4111
+ return input
4112
+ .filter((e) => e != null)
4113
+ .map((entry) => {
4114
+ return se_Document(entry, context);
4115
+ });
4116
+ };
4117
+ const se_HookConfiguration = (input, context) => {
4118
+ return take(input, {
4119
+ invocationCondition: (_) => se_DocumentAttributeCondition(_, context),
4120
+ lambdaArn: [],
4121
+ roleArn: [],
4122
+ s3BucketName: [],
4123
+ });
4124
+ };
4125
+ const se_InlineDocumentEnrichmentConfiguration = (input, context) => {
4126
+ return take(input, {
4127
+ condition: (_) => se_DocumentAttributeCondition(_, context),
4128
+ documentContentOperator: [],
4129
+ target: (_) => se_DocumentAttributeTarget(_, context),
4130
+ });
4131
+ };
4132
+ const se_InlineDocumentEnrichmentConfigurations = (input, context) => {
4133
+ return input
4134
+ .filter((e) => e != null)
4135
+ .map((entry) => {
4136
+ return se_InlineDocumentEnrichmentConfiguration(entry, context);
4137
+ });
4138
+ };
4139
+ const se_MessageUsefulnessFeedback = (input, context) => {
4140
+ return take(input, {
4141
+ comment: [],
4142
+ reason: [],
4143
+ submittedAt: (_) => Math.round(_.getTime() / 1000),
4144
+ usefulness: [],
4145
+ });
4146
+ };
4147
+ const de_ActionExecution = (output, context) => {
4148
+ return take(output, {
4149
+ payload: (_) => de_ActionExecutionPayload(_, context),
4150
+ payloadFieldNameSeparator: __expectString,
4151
+ pluginId: __expectString,
4152
+ });
4153
+ };
4154
+ const de_ActionExecutionPayload = (output, context) => {
4155
+ return Object.entries(output).reduce((acc, [key, value]) => {
4156
+ if (value === null) {
4157
+ return acc;
4158
+ }
4159
+ acc[key] = de_ActionExecutionPayloadField(value, context);
4160
+ return acc;
4161
+ }, {});
4162
+ };
4163
+ const de_ActionExecutionPayloadField = (output, context) => {
4164
+ return take(output, {
4165
+ value: (_) => de_ActionPayloadFieldValue(_, context),
4166
+ });
4167
+ };
4168
+ const de_ActionPayloadFieldValue = (output, context) => {
4169
+ return output;
4170
+ };
4171
+ const de_ActionReview = (output, context) => {
4172
+ return take(output, {
4173
+ payload: (_) => de_ActionReviewPayload(_, context),
4174
+ payloadFieldNameSeparator: __expectString,
4175
+ pluginId: __expectString,
4176
+ pluginType: __expectString,
4177
+ });
4178
+ };
4179
+ const de_ActionReviewPayload = (output, context) => {
4180
+ return Object.entries(output).reduce((acc, [key, value]) => {
4181
+ if (value === null) {
4182
+ return acc;
4183
+ }
4184
+ acc[key] = de_ActionReviewPayloadField(value, context);
4185
+ return acc;
4186
+ }, {});
4187
+ };
4188
+ const de_ActionReviewPayloadField = (output, context) => {
4189
+ return take(output, {
4190
+ allowedValues: (_) => de_ActionReviewPayloadFieldAllowedValues(_, context),
4191
+ displayName: __expectString,
4192
+ displayOrder: __expectInt32,
4193
+ required: __expectBoolean,
4194
+ type: __expectString,
4195
+ value: (_) => de_ActionPayloadFieldValue(_, context),
4196
+ });
4197
+ };
4198
+ const de_ActionReviewPayloadFieldAllowedValue = (output, context) => {
4199
+ return take(output, {
4200
+ displayValue: (_) => de_ActionPayloadFieldValue(_, context),
4201
+ value: (_) => de_ActionPayloadFieldValue(_, context),
4202
+ });
4203
+ };
4204
+ const de_ActionReviewPayloadFieldAllowedValues = (output, context) => {
4205
+ const retVal = (output || [])
4206
+ .filter((e) => e != null)
4207
+ .map((entry) => {
4208
+ return de_ActionReviewPayloadFieldAllowedValue(entry, context);
4209
+ });
4210
+ return retVal;
4211
+ };
4212
+ const de_Application = (output, context) => {
4213
+ return take(output, {
4214
+ applicationId: __expectString,
4215
+ createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
4216
+ displayName: __expectString,
4217
+ status: __expectString,
4218
+ updatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
4219
+ });
4220
+ };
4221
+ const de_Applications = (output, context) => {
4222
+ const retVal = (output || [])
4223
+ .filter((e) => e != null)
4224
+ .map((entry) => {
4225
+ return de_Application(entry, context);
4226
+ });
4227
+ return retVal;
4228
+ };
4229
+ const de_Conversation = (output, context) => {
4230
+ return take(output, {
4231
+ conversationId: __expectString,
4232
+ startTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
4233
+ title: __expectString,
4234
+ });
4235
+ };
4236
+ const de_Conversations = (output, context) => {
4237
+ const retVal = (output || [])
4238
+ .filter((e) => e != null)
4239
+ .map((entry) => {
4240
+ return de_Conversation(entry, context);
4241
+ });
4242
+ return retVal;
4243
+ };
4244
+ const de_DataSource = (output, context) => {
4245
+ return take(output, {
4246
+ createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
4247
+ dataSourceId: __expectString,
4248
+ displayName: __expectString,
4249
+ status: __expectString,
4250
+ type: __expectString,
4251
+ updatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
4252
+ });
4253
+ };
4254
+ const de_DataSourceConfiguration = (output, context) => {
4255
+ return output;
4256
+ };
4257
+ const de_DataSources = (output, context) => {
4258
+ const retVal = (output || [])
4259
+ .filter((e) => e != null)
4260
+ .map((entry) => {
4261
+ return de_DataSource(entry, context);
4262
+ });
4263
+ return retVal;
4264
+ };
4265
+ const de_DataSourceSyncJob = (output, context) => {
4266
+ return take(output, {
4267
+ dataSourceErrorCode: __expectString,
4268
+ endTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
4269
+ error: _json,
4270
+ executionId: __expectString,
4271
+ metrics: _json,
4272
+ startTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
4273
+ status: __expectString,
4274
+ });
4275
+ };
4276
+ const de_DataSourceSyncJobs = (output, context) => {
4277
+ const retVal = (output || [])
4278
+ .filter((e) => e != null)
4279
+ .map((entry) => {
4280
+ return de_DataSourceSyncJob(entry, context);
4281
+ });
4282
+ return retVal;
4283
+ };
4284
+ const de_DocumentAttributeCondition = (output, context) => {
4285
+ return take(output, {
4286
+ key: __expectString,
4287
+ operator: __expectString,
4288
+ value: (_) => de_DocumentAttributeValue(__expectUnion(_), context),
4289
+ });
4290
+ };
4291
+ const de_DocumentAttributeTarget = (output, context) => {
4292
+ return take(output, {
4293
+ attributeValueOperator: __expectString,
4294
+ key: __expectString,
4295
+ value: (_) => de_DocumentAttributeValue(__expectUnion(_), context),
4296
+ });
4297
+ };
4298
+ const de_DocumentAttributeValue = (output, context) => {
4299
+ if (output.dateValue != null) {
4300
+ return {
4301
+ dateValue: __expectNonNull(__parseEpochTimestamp(__expectNumber(output.dateValue))),
4302
+ };
4303
+ }
4304
+ if (__expectLong(output.longValue) !== undefined) {
4305
+ return { longValue: __expectLong(output.longValue) };
4306
+ }
4307
+ if (output.stringListValue != null) {
4308
+ return {
4309
+ stringListValue: _json(output.stringListValue),
4310
+ };
4311
+ }
4312
+ if (__expectString(output.stringValue) !== undefined) {
4313
+ return { stringValue: __expectString(output.stringValue) };
4314
+ }
4315
+ return { $unknown: Object.entries(output)[0] };
4316
+ };
4317
+ const de_DocumentDetailList = (output, context) => {
4318
+ const retVal = (output || [])
4319
+ .filter((e) => e != null)
4320
+ .map((entry) => {
4321
+ return de_DocumentDetails(entry, context);
4322
+ });
4323
+ return retVal;
4324
+ };
4325
+ const de_DocumentDetails = (output, context) => {
4326
+ return take(output, {
4327
+ createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
4328
+ documentId: __expectString,
4329
+ error: _json,
4330
+ status: __expectString,
4331
+ updatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
4332
+ });
4333
+ };
4334
+ const de_DocumentEnrichmentConfiguration = (output, context) => {
4335
+ return take(output, {
4336
+ inlineConfigurations: (_) => de_InlineDocumentEnrichmentConfigurations(_, context),
4337
+ postExtractionHookConfiguration: (_) => de_HookConfiguration(_, context),
4338
+ preExtractionHookConfiguration: (_) => de_HookConfiguration(_, context),
4339
+ });
4340
+ };
4341
+ const de_GroupStatusDetail = (output, context) => {
4342
+ return take(output, {
4343
+ errorDetail: _json,
4344
+ lastUpdatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
4345
+ status: __expectString,
4346
+ });
4347
+ };
4348
+ const de_GroupStatusDetails = (output, context) => {
4349
+ const retVal = (output || [])
4350
+ .filter((e) => e != null)
4351
+ .map((entry) => {
4352
+ return de_GroupStatusDetail(entry, context);
4353
+ });
4354
+ return retVal;
4355
+ };
4356
+ const de_HookConfiguration = (output, context) => {
4357
+ return take(output, {
4358
+ invocationCondition: (_) => de_DocumentAttributeCondition(_, context),
4359
+ lambdaArn: __expectString,
4360
+ roleArn: __expectString,
4361
+ s3BucketName: __expectString,
4362
+ });
4363
+ };
4364
+ const de_Index = (output, context) => {
4365
+ return take(output, {
4366
+ createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
4367
+ displayName: __expectString,
4368
+ indexId: __expectString,
4369
+ status: __expectString,
4370
+ updatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
4371
+ });
4372
+ };
4373
+ const de_Indices = (output, context) => {
4374
+ const retVal = (output || [])
4375
+ .filter((e) => e != null)
4376
+ .map((entry) => {
4377
+ return de_Index(entry, context);
4378
+ });
4379
+ return retVal;
4380
+ };
4381
+ const de_InlineDocumentEnrichmentConfiguration = (output, context) => {
4382
+ return take(output, {
4383
+ condition: (_) => de_DocumentAttributeCondition(_, context),
4384
+ documentContentOperator: __expectString,
4385
+ target: (_) => de_DocumentAttributeTarget(_, context),
4386
+ });
4387
+ };
4388
+ const de_InlineDocumentEnrichmentConfigurations = (output, context) => {
4389
+ const retVal = (output || [])
4390
+ .filter((e) => e != null)
4391
+ .map((entry) => {
4392
+ return de_InlineDocumentEnrichmentConfiguration(entry, context);
4393
+ });
4394
+ return retVal;
4395
+ };
4396
+ const de_Message = (output, context) => {
4397
+ return take(output, {
4398
+ actionExecution: (_) => de_ActionExecution(_, context),
4399
+ actionReview: (_) => de_ActionReview(_, context),
4400
+ attachments: _json,
4401
+ body: __expectString,
4402
+ messageId: __expectString,
4403
+ sourceAttribution: (_) => de_SourceAttributions(_, context),
4404
+ time: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
4405
+ type: __expectString,
4406
+ });
4407
+ };
4408
+ const de_Messages = (output, context) => {
4409
+ const retVal = (output || [])
4410
+ .filter((e) => e != null)
4411
+ .map((entry) => {
4412
+ return de_Message(entry, context);
4413
+ });
4414
+ return retVal;
4415
+ };
4416
+ const de_Plugin = (output, context) => {
4417
+ return take(output, {
4418
+ createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
4419
+ displayName: __expectString,
4420
+ pluginId: __expectString,
4421
+ serverUrl: __expectString,
4422
+ state: __expectString,
4423
+ type: __expectString,
4424
+ updatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
4425
+ });
4426
+ };
4427
+ const de_Plugins = (output, context) => {
4428
+ const retVal = (output || [])
4429
+ .filter((e) => e != null)
4430
+ .map((entry) => {
4431
+ return de_Plugin(entry, context);
4432
+ });
4433
+ return retVal;
4434
+ };
4435
+ const de_SourceAttribution = (output, context) => {
4436
+ return take(output, {
4437
+ citationNumber: __expectInt32,
4438
+ snippet: __expectString,
4439
+ textMessageSegments: _json,
4440
+ title: __expectString,
4441
+ updatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
4442
+ url: __expectString,
4443
+ });
4444
+ };
4445
+ const de_SourceAttributions = (output, context) => {
4446
+ const retVal = (output || []).map((entry) => {
4447
+ if (entry === null) {
4448
+ return null;
4449
+ }
4450
+ return de_SourceAttribution(entry, context);
4451
+ });
4452
+ return retVal;
4453
+ };
4454
+ const de_WebExperience = (output, context) => {
4455
+ return take(output, {
4456
+ createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
4457
+ defaultEndpoint: __expectString,
4458
+ status: __expectString,
4459
+ updatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
4460
+ webExperienceId: __expectString,
4461
+ });
4462
+ };
4463
+ const de_WebExperiences = (output, context) => {
4464
+ const retVal = (output || [])
4465
+ .filter((e) => e != null)
4466
+ .map((entry) => {
4467
+ return de_WebExperience(entry, context);
4468
+ });
4469
+ return retVal;
4470
+ };
4471
+ const deserializeMetadata = (output) => ({
4472
+ httpStatusCode: output.statusCode,
4473
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
4474
+ extendedRequestId: output.headers["x-amz-id-2"],
4475
+ cfId: output.headers["x-amz-cf-id"],
4476
+ });
4477
+ const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
4478
+ const isSerializableHeaderValue = (value) => value !== undefined &&
4479
+ value !== null &&
4480
+ value !== "" &&
4481
+ (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
4482
+ (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
4483
+ const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
4484
+ if (encoded.length) {
4485
+ return JSON.parse(encoded);
4486
+ }
4487
+ return {};
4488
+ });
4489
+ const parseErrorBody = async (errorBody, context) => {
4490
+ const value = await parseBody(errorBody, context);
4491
+ value.message = value.message ?? value.Message;
4492
+ return value;
4493
+ };
4494
+ const loadRestJsonErrorCode = (output, data) => {
4495
+ const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
4496
+ const sanitizeErrorCode = (rawValue) => {
4497
+ let cleanValue = rawValue;
4498
+ if (typeof cleanValue === "number") {
4499
+ cleanValue = cleanValue.toString();
4500
+ }
4501
+ if (cleanValue.indexOf(",") >= 0) {
4502
+ cleanValue = cleanValue.split(",")[0];
4503
+ }
4504
+ if (cleanValue.indexOf(":") >= 0) {
4505
+ cleanValue = cleanValue.split(":")[0];
4506
+ }
4507
+ if (cleanValue.indexOf("#") >= 0) {
4508
+ cleanValue = cleanValue.split("#")[1];
4509
+ }
4510
+ return cleanValue;
4511
+ };
4512
+ const headerKey = findKey(output.headers, "x-amzn-errortype");
4513
+ if (headerKey !== undefined) {
4514
+ return sanitizeErrorCode(output.headers[headerKey]);
4515
+ }
4516
+ if (data.code !== undefined) {
4517
+ return sanitizeErrorCode(data.code);
4518
+ }
4519
+ if (data["__type"] !== undefined) {
4520
+ return sanitizeErrorCode(data["__type"]);
4521
+ }
4522
+ };