@aws-sdk/client-connect 3.39.0 → 3.43.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 (323) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/README.md +2 -4
  3. package/dist-cjs/Connect.js +285 -0
  4. package/dist-cjs/commands/CreateContactFlowModuleCommand.js +36 -0
  5. package/dist-cjs/commands/CreateSecurityProfileCommand.js +36 -0
  6. package/dist-cjs/commands/DeleteContactFlowCommand.js +36 -0
  7. package/dist-cjs/commands/DeleteContactFlowModuleCommand.js +36 -0
  8. package/dist-cjs/commands/DeleteSecurityProfileCommand.js +36 -0
  9. package/dist-cjs/commands/DescribeContactCommand.js +36 -0
  10. package/dist-cjs/commands/DescribeContactFlowModuleCommand.js +36 -0
  11. package/dist-cjs/commands/DescribeSecurityProfileCommand.js +36 -0
  12. package/dist-cjs/commands/ListContactFlowModulesCommand.js +36 -0
  13. package/dist-cjs/commands/ListContactReferencesCommand.js +36 -0
  14. package/dist-cjs/commands/ListSecurityProfilePermissionsCommand.js +36 -0
  15. package/dist-cjs/commands/StartContactStreamingCommand.js +36 -0
  16. package/dist-cjs/commands/StopContactStreamingCommand.js +36 -0
  17. package/dist-cjs/commands/TagResourceCommand.js +2 -2
  18. package/dist-cjs/commands/UntagResourceCommand.js +2 -2
  19. package/dist-cjs/commands/UpdateAgentStatusCommand.js +2 -2
  20. package/dist-cjs/commands/UpdateContactAttributesCommand.js +3 -3
  21. package/dist-cjs/commands/UpdateContactCommand.js +36 -0
  22. package/dist-cjs/commands/UpdateContactFlowContentCommand.js +2 -2
  23. package/dist-cjs/commands/UpdateContactFlowMetadataCommand.js +36 -0
  24. package/dist-cjs/commands/UpdateContactFlowModuleContentCommand.js +36 -0
  25. package/dist-cjs/commands/UpdateContactFlowModuleMetadataCommand.js +36 -0
  26. package/dist-cjs/commands/UpdateContactFlowNameCommand.js +2 -2
  27. package/dist-cjs/commands/UpdateContactScheduleCommand.js +36 -0
  28. package/dist-cjs/commands/UpdateHoursOfOperationCommand.js +2 -2
  29. package/dist-cjs/commands/UpdateInstanceAttributeCommand.js +2 -2
  30. package/dist-cjs/commands/UpdateInstanceStorageConfigCommand.js +2 -2
  31. package/dist-cjs/commands/UpdateQueueHoursOfOperationCommand.js +2 -2
  32. package/dist-cjs/commands/UpdateQueueMaxContactsCommand.js +2 -2
  33. package/dist-cjs/commands/UpdateQueueNameCommand.js +2 -2
  34. package/dist-cjs/commands/UpdateQueueOutboundCallerConfigCommand.js +2 -2
  35. package/dist-cjs/commands/UpdateQueueStatusCommand.js +2 -2
  36. package/dist-cjs/commands/UpdateQuickConnectConfigCommand.js +2 -2
  37. package/dist-cjs/commands/UpdateQuickConnectNameCommand.js +2 -2
  38. package/dist-cjs/commands/UpdateRoutingProfileConcurrencyCommand.js +2 -2
  39. package/dist-cjs/commands/UpdateRoutingProfileDefaultOutboundQueueCommand.js +2 -2
  40. package/dist-cjs/commands/UpdateRoutingProfileNameCommand.js +2 -2
  41. package/dist-cjs/commands/UpdateRoutingProfileQueuesCommand.js +2 -2
  42. package/dist-cjs/commands/UpdateSecurityProfileCommand.js +36 -0
  43. package/dist-cjs/commands/UpdateUserHierarchyCommand.js +2 -2
  44. package/dist-cjs/commands/UpdateUserHierarchyGroupNameCommand.js +2 -2
  45. package/dist-cjs/commands/UpdateUserHierarchyStructureCommand.js +2 -2
  46. package/dist-cjs/commands/UpdateUserIdentityInfoCommand.js +2 -2
  47. package/dist-cjs/commands/UpdateUserPhoneConfigCommand.js +2 -2
  48. package/dist-cjs/commands/UpdateUserRoutingProfileCommand.js +2 -2
  49. package/dist-cjs/commands/UpdateUserSecurityProfilesCommand.js +2 -2
  50. package/dist-cjs/commands/index.js +19 -0
  51. package/dist-cjs/endpoints.js +74 -5
  52. package/dist-cjs/models/index.js +1 -0
  53. package/dist-cjs/models/models_0.js +293 -206
  54. package/dist-cjs/models/models_1.js +243 -0
  55. package/dist-cjs/pagination/ListContactFlowModulesPaginator.js +35 -0
  56. package/dist-cjs/pagination/ListContactReferencesPaginator.js +34 -0
  57. package/dist-cjs/pagination/ListSecurityProfilePermissionsPaginator.js +35 -0
  58. package/dist-cjs/pagination/index.js +3 -0
  59. package/dist-cjs/protocols/Aws_restJson1.js +3268 -730
  60. package/dist-cjs/runtimeConfig.browser.js +6 -3
  61. package/dist-cjs/runtimeConfig.js +5 -3
  62. package/dist-es/Connect.js +285 -0
  63. package/dist-es/commands/CreateContactFlowModuleCommand.js +39 -0
  64. package/dist-es/commands/CreateSecurityProfileCommand.js +39 -0
  65. package/dist-es/commands/DeleteContactFlowCommand.js +39 -0
  66. package/dist-es/commands/DeleteContactFlowModuleCommand.js +39 -0
  67. package/dist-es/commands/DeleteSecurityProfileCommand.js +39 -0
  68. package/dist-es/commands/DescribeContactCommand.js +39 -0
  69. package/dist-es/commands/DescribeContactFlowModuleCommand.js +39 -0
  70. package/dist-es/commands/DescribeSecurityProfileCommand.js +39 -0
  71. package/dist-es/commands/ListContactFlowModulesCommand.js +39 -0
  72. package/dist-es/commands/ListContactReferencesCommand.js +39 -0
  73. package/dist-es/commands/ListSecurityProfilePermissionsCommand.js +39 -0
  74. package/dist-es/commands/StartContactStreamingCommand.js +39 -0
  75. package/dist-es/commands/StopContactStreamingCommand.js +39 -0
  76. package/dist-es/commands/TagResourceCommand.js +1 -1
  77. package/dist-es/commands/UntagResourceCommand.js +1 -1
  78. package/dist-es/commands/UpdateAgentStatusCommand.js +1 -1
  79. package/dist-es/commands/UpdateContactAttributesCommand.js +1 -1
  80. package/dist-es/commands/UpdateContactCommand.js +39 -0
  81. package/dist-es/commands/UpdateContactFlowContentCommand.js +1 -1
  82. package/dist-es/commands/UpdateContactFlowMetadataCommand.js +39 -0
  83. package/dist-es/commands/UpdateContactFlowModuleContentCommand.js +39 -0
  84. package/dist-es/commands/UpdateContactFlowModuleMetadataCommand.js +39 -0
  85. package/dist-es/commands/UpdateContactFlowNameCommand.js +1 -1
  86. package/dist-es/commands/UpdateContactScheduleCommand.js +39 -0
  87. package/dist-es/commands/UpdateHoursOfOperationCommand.js +1 -1
  88. package/dist-es/commands/UpdateInstanceAttributeCommand.js +1 -1
  89. package/dist-es/commands/UpdateInstanceStorageConfigCommand.js +1 -1
  90. package/dist-es/commands/UpdateQueueHoursOfOperationCommand.js +1 -1
  91. package/dist-es/commands/UpdateQueueMaxContactsCommand.js +1 -1
  92. package/dist-es/commands/UpdateQueueNameCommand.js +1 -1
  93. package/dist-es/commands/UpdateQueueOutboundCallerConfigCommand.js +1 -1
  94. package/dist-es/commands/UpdateQueueStatusCommand.js +1 -1
  95. package/dist-es/commands/UpdateQuickConnectConfigCommand.js +1 -1
  96. package/dist-es/commands/UpdateQuickConnectNameCommand.js +1 -1
  97. package/dist-es/commands/UpdateRoutingProfileConcurrencyCommand.js +1 -1
  98. package/dist-es/commands/UpdateRoutingProfileDefaultOutboundQueueCommand.js +1 -1
  99. package/dist-es/commands/UpdateRoutingProfileNameCommand.js +1 -1
  100. package/dist-es/commands/UpdateRoutingProfileQueuesCommand.js +1 -1
  101. package/dist-es/commands/UpdateSecurityProfileCommand.js +39 -0
  102. package/dist-es/commands/UpdateUserHierarchyCommand.js +1 -1
  103. package/dist-es/commands/UpdateUserHierarchyGroupNameCommand.js +1 -1
  104. package/dist-es/commands/UpdateUserHierarchyStructureCommand.js +1 -1
  105. package/dist-es/commands/UpdateUserIdentityInfoCommand.js +1 -1
  106. package/dist-es/commands/UpdateUserPhoneConfigCommand.js +1 -1
  107. package/dist-es/commands/UpdateUserRoutingProfileCommand.js +1 -1
  108. package/dist-es/commands/UpdateUserSecurityProfilesCommand.js +1 -1
  109. package/dist-es/commands/index.js +19 -0
  110. package/dist-es/endpoints.js +74 -5
  111. package/dist-es/models/index.js +1 -0
  112. package/dist-es/models/models_0.js +211 -136
  113. package/dist-es/models/models_1.js +161 -0
  114. package/dist-es/pagination/ListContactFlowModulesPaginator.js +74 -0
  115. package/dist-es/pagination/ListContactReferencesPaginator.js +73 -0
  116. package/dist-es/pagination/ListSecurityProfilePermissionsPaginator.js +74 -0
  117. package/dist-es/pagination/index.js +3 -0
  118. package/dist-es/protocols/Aws_restJson1.js +3135 -302
  119. package/dist-es/runtimeConfig.browser.js +3 -2
  120. package/dist-es/runtimeConfig.js +3 -3
  121. package/dist-types/Connect.d.ts +166 -9
  122. package/dist-types/ConnectClient.d.ts +32 -7
  123. package/dist-types/commands/AssociateApprovedOriginCommand.d.ts +1 -1
  124. package/dist-types/commands/AssociateBotCommand.d.ts +1 -1
  125. package/dist-types/commands/AssociateInstanceStorageConfigCommand.d.ts +1 -1
  126. package/dist-types/commands/AssociateLambdaFunctionCommand.d.ts +1 -1
  127. package/dist-types/commands/AssociateLexBotCommand.d.ts +1 -1
  128. package/dist-types/commands/AssociateQueueQuickConnectsCommand.d.ts +1 -1
  129. package/dist-types/commands/AssociateRoutingProfileQueuesCommand.d.ts +1 -1
  130. package/dist-types/commands/AssociateSecurityKeyCommand.d.ts +1 -1
  131. package/dist-types/commands/CreateAgentStatusCommand.d.ts +1 -1
  132. package/dist-types/commands/CreateContactFlowCommand.d.ts +1 -1
  133. package/dist-types/commands/CreateContactFlowModuleCommand.d.ts +35 -0
  134. package/dist-types/commands/CreateHoursOfOperationCommand.d.ts +3 -2
  135. package/dist-types/commands/CreateInstanceCommand.d.ts +1 -1
  136. package/dist-types/commands/CreateIntegrationAssociationCommand.d.ts +1 -1
  137. package/dist-types/commands/CreateQueueCommand.d.ts +1 -1
  138. package/dist-types/commands/CreateQuickConnectCommand.d.ts +1 -1
  139. package/dist-types/commands/CreateRoutingProfileCommand.d.ts +1 -1
  140. package/dist-types/commands/CreateSecurityProfileCommand.d.ts +36 -0
  141. package/dist-types/commands/CreateUseCaseCommand.d.ts +1 -1
  142. package/dist-types/commands/CreateUserCommand.d.ts +1 -1
  143. package/dist-types/commands/CreateUserHierarchyGroupCommand.d.ts +1 -1
  144. package/dist-types/commands/DeleteContactFlowCommand.d.ts +35 -0
  145. package/dist-types/commands/DeleteContactFlowModuleCommand.d.ts +35 -0
  146. package/dist-types/commands/DeleteHoursOfOperationCommand.d.ts +3 -2
  147. package/dist-types/commands/DeleteInstanceCommand.d.ts +1 -1
  148. package/dist-types/commands/DeleteIntegrationAssociationCommand.d.ts +1 -1
  149. package/dist-types/commands/DeleteQuickConnectCommand.d.ts +1 -1
  150. package/dist-types/commands/DeleteSecurityProfileCommand.d.ts +36 -0
  151. package/dist-types/commands/DeleteUseCaseCommand.d.ts +1 -1
  152. package/dist-types/commands/DeleteUserCommand.d.ts +1 -1
  153. package/dist-types/commands/DeleteUserHierarchyGroupCommand.d.ts +1 -1
  154. package/dist-types/commands/DescribeAgentStatusCommand.d.ts +1 -1
  155. package/dist-types/commands/DescribeContactCommand.d.ts +40 -0
  156. package/dist-types/commands/DescribeContactFlowCommand.d.ts +1 -1
  157. package/dist-types/commands/DescribeContactFlowModuleCommand.d.ts +35 -0
  158. package/dist-types/commands/DescribeHoursOfOperationCommand.d.ts +3 -2
  159. package/dist-types/commands/DescribeInstanceAttributeCommand.d.ts +1 -1
  160. package/dist-types/commands/DescribeInstanceCommand.d.ts +1 -1
  161. package/dist-types/commands/DescribeInstanceStorageConfigCommand.d.ts +1 -1
  162. package/dist-types/commands/DescribeQueueCommand.d.ts +1 -1
  163. package/dist-types/commands/DescribeQuickConnectCommand.d.ts +1 -1
  164. package/dist-types/commands/DescribeRoutingProfileCommand.d.ts +1 -1
  165. package/dist-types/commands/DescribeSecurityProfileCommand.d.ts +36 -0
  166. package/dist-types/commands/DescribeUserCommand.d.ts +1 -1
  167. package/dist-types/commands/DescribeUserHierarchyGroupCommand.d.ts +1 -1
  168. package/dist-types/commands/DescribeUserHierarchyStructureCommand.d.ts +1 -1
  169. package/dist-types/commands/DisassociateApprovedOriginCommand.d.ts +1 -1
  170. package/dist-types/commands/DisassociateBotCommand.d.ts +1 -1
  171. package/dist-types/commands/DisassociateInstanceStorageConfigCommand.d.ts +1 -1
  172. package/dist-types/commands/DisassociateLambdaFunctionCommand.d.ts +1 -1
  173. package/dist-types/commands/DisassociateLexBotCommand.d.ts +1 -1
  174. package/dist-types/commands/DisassociateQueueQuickConnectsCommand.d.ts +1 -1
  175. package/dist-types/commands/DisassociateRoutingProfileQueuesCommand.d.ts +1 -1
  176. package/dist-types/commands/DisassociateSecurityKeyCommand.d.ts +1 -1
  177. package/dist-types/commands/GetContactAttributesCommand.d.ts +1 -1
  178. package/dist-types/commands/GetCurrentMetricDataCommand.d.ts +1 -1
  179. package/dist-types/commands/GetFederationTokenCommand.d.ts +1 -1
  180. package/dist-types/commands/GetMetricDataCommand.d.ts +1 -1
  181. package/dist-types/commands/ListAgentStatusesCommand.d.ts +1 -1
  182. package/dist-types/commands/ListApprovedOriginsCommand.d.ts +1 -1
  183. package/dist-types/commands/ListBotsCommand.d.ts +1 -1
  184. package/dist-types/commands/ListContactFlowModulesCommand.d.ts +35 -0
  185. package/dist-types/commands/ListContactFlowsCommand.d.ts +1 -1
  186. package/dist-types/commands/ListContactReferencesCommand.d.ts +37 -0
  187. package/dist-types/commands/ListHoursOfOperationsCommand.d.ts +1 -1
  188. package/dist-types/commands/ListInstanceAttributesCommand.d.ts +1 -1
  189. package/dist-types/commands/ListInstanceStorageConfigsCommand.d.ts +1 -1
  190. package/dist-types/commands/ListInstancesCommand.d.ts +1 -1
  191. package/dist-types/commands/ListIntegrationAssociationsCommand.d.ts +1 -1
  192. package/dist-types/commands/ListLambdaFunctionsCommand.d.ts +1 -1
  193. package/dist-types/commands/ListLexBotsCommand.d.ts +1 -1
  194. package/dist-types/commands/ListPhoneNumbersCommand.d.ts +1 -1
  195. package/dist-types/commands/ListPromptsCommand.d.ts +1 -1
  196. package/dist-types/commands/ListQueueQuickConnectsCommand.d.ts +1 -1
  197. package/dist-types/commands/ListQueuesCommand.d.ts +1 -1
  198. package/dist-types/commands/ListQuickConnectsCommand.d.ts +1 -1
  199. package/dist-types/commands/ListRoutingProfileQueuesCommand.d.ts +1 -1
  200. package/dist-types/commands/ListRoutingProfilesCommand.d.ts +1 -1
  201. package/dist-types/commands/ListSecurityKeysCommand.d.ts +1 -1
  202. package/dist-types/commands/ListSecurityProfilePermissionsCommand.d.ts +36 -0
  203. package/dist-types/commands/ListSecurityProfilesCommand.d.ts +1 -1
  204. package/dist-types/commands/ListTagsForResourceCommand.d.ts +1 -1
  205. package/dist-types/commands/ListUseCasesCommand.d.ts +1 -1
  206. package/dist-types/commands/ListUserHierarchyGroupsCommand.d.ts +1 -1
  207. package/dist-types/commands/ListUsersCommand.d.ts +1 -1
  208. package/dist-types/commands/ResumeContactRecordingCommand.d.ts +1 -1
  209. package/dist-types/commands/StartChatContactCommand.d.ts +1 -1
  210. package/dist-types/commands/StartContactRecordingCommand.d.ts +1 -1
  211. package/dist-types/commands/StartContactStreamingCommand.d.ts +37 -0
  212. package/dist-types/commands/StartOutboundVoiceContactCommand.d.ts +1 -1
  213. package/dist-types/commands/StartTaskContactCommand.d.ts +1 -1
  214. package/dist-types/commands/StopContactCommand.d.ts +1 -1
  215. package/dist-types/commands/StopContactRecordingCommand.d.ts +1 -1
  216. package/dist-types/commands/StopContactStreamingCommand.d.ts +37 -0
  217. package/dist-types/commands/SuspendContactRecordingCommand.d.ts +1 -1
  218. package/dist-types/commands/TagResourceCommand.d.ts +2 -2
  219. package/dist-types/commands/UntagResourceCommand.d.ts +2 -2
  220. package/dist-types/commands/UpdateAgentStatusCommand.d.ts +2 -2
  221. package/dist-types/commands/UpdateContactAttributesCommand.d.ts +2 -2
  222. package/dist-types/commands/UpdateContactCommand.d.ts +41 -0
  223. package/dist-types/commands/UpdateContactFlowContentCommand.d.ts +2 -2
  224. package/dist-types/commands/UpdateContactFlowMetadataCommand.d.ts +35 -0
  225. package/dist-types/commands/UpdateContactFlowModuleContentCommand.d.ts +35 -0
  226. package/dist-types/commands/UpdateContactFlowModuleMetadataCommand.d.ts +35 -0
  227. package/dist-types/commands/UpdateContactFlowNameCommand.d.ts +2 -2
  228. package/dist-types/commands/UpdateContactScheduleCommand.d.ts +35 -0
  229. package/dist-types/commands/UpdateHoursOfOperationCommand.d.ts +4 -3
  230. package/dist-types/commands/UpdateInstanceAttributeCommand.d.ts +2 -2
  231. package/dist-types/commands/UpdateInstanceStorageConfigCommand.d.ts +2 -2
  232. package/dist-types/commands/UpdateQueueHoursOfOperationCommand.d.ts +2 -2
  233. package/dist-types/commands/UpdateQueueMaxContactsCommand.d.ts +2 -2
  234. package/dist-types/commands/UpdateQueueNameCommand.d.ts +2 -2
  235. package/dist-types/commands/UpdateQueueOutboundCallerConfigCommand.d.ts +2 -2
  236. package/dist-types/commands/UpdateQueueStatusCommand.d.ts +2 -2
  237. package/dist-types/commands/UpdateQuickConnectConfigCommand.d.ts +2 -2
  238. package/dist-types/commands/UpdateQuickConnectNameCommand.d.ts +2 -2
  239. package/dist-types/commands/UpdateRoutingProfileConcurrencyCommand.d.ts +2 -2
  240. package/dist-types/commands/UpdateRoutingProfileDefaultOutboundQueueCommand.d.ts +2 -2
  241. package/dist-types/commands/UpdateRoutingProfileNameCommand.d.ts +2 -2
  242. package/dist-types/commands/UpdateRoutingProfileQueuesCommand.d.ts +2 -2
  243. package/dist-types/commands/UpdateSecurityProfileCommand.d.ts +36 -0
  244. package/dist-types/commands/UpdateUserHierarchyCommand.d.ts +2 -2
  245. package/dist-types/commands/UpdateUserHierarchyGroupNameCommand.d.ts +2 -2
  246. package/dist-types/commands/UpdateUserHierarchyStructureCommand.d.ts +2 -2
  247. package/dist-types/commands/UpdateUserIdentityInfoCommand.d.ts +2 -2
  248. package/dist-types/commands/UpdateUserPhoneConfigCommand.d.ts +2 -2
  249. package/dist-types/commands/UpdateUserRoutingProfileCommand.d.ts +2 -2
  250. package/dist-types/commands/UpdateUserSecurityProfilesCommand.d.ts +2 -2
  251. package/dist-types/commands/index.d.ts +19 -0
  252. package/dist-types/models/index.d.ts +1 -0
  253. package/dist-types/models/models_0.d.ts +932 -754
  254. package/dist-types/models/models_1.d.ts +831 -0
  255. package/dist-types/pagination/ListContactFlowModulesPaginator.d.ts +4 -0
  256. package/dist-types/pagination/ListContactReferencesPaginator.d.ts +4 -0
  257. package/dist-types/pagination/ListSecurityProfilePermissionsPaginator.d.ts +4 -0
  258. package/dist-types/pagination/index.d.ts +3 -0
  259. package/dist-types/protocols/Aws_restJson1.d.ts +57 -0
  260. package/dist-types/runtimeConfig.browser.d.ts +2 -0
  261. package/dist-types/runtimeConfig.d.ts +2 -0
  262. package/dist-types/runtimeConfig.native.d.ts +2 -0
  263. package/dist-types/ts3.4/Connect.d.ts +95 -0
  264. package/dist-types/ts3.4/ConnectClient.d.ts +25 -2
  265. package/dist-types/ts3.4/commands/CreateContactFlowModuleCommand.d.ts +17 -0
  266. package/dist-types/ts3.4/commands/CreateSecurityProfileCommand.d.ts +17 -0
  267. package/dist-types/ts3.4/commands/DeleteContactFlowCommand.d.ts +17 -0
  268. package/dist-types/ts3.4/commands/DeleteContactFlowModuleCommand.d.ts +17 -0
  269. package/dist-types/ts3.4/commands/DeleteSecurityProfileCommand.d.ts +17 -0
  270. package/dist-types/ts3.4/commands/DescribeContactCommand.d.ts +17 -0
  271. package/dist-types/ts3.4/commands/DescribeContactFlowModuleCommand.d.ts +17 -0
  272. package/dist-types/ts3.4/commands/DescribeSecurityProfileCommand.d.ts +17 -0
  273. package/dist-types/ts3.4/commands/ListContactFlowModulesCommand.d.ts +17 -0
  274. package/dist-types/ts3.4/commands/ListContactReferencesCommand.d.ts +17 -0
  275. package/dist-types/ts3.4/commands/ListSecurityProfilePermissionsCommand.d.ts +17 -0
  276. package/dist-types/ts3.4/commands/StartContactStreamingCommand.d.ts +17 -0
  277. package/dist-types/ts3.4/commands/StopContactStreamingCommand.d.ts +17 -0
  278. package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +1 -1
  279. package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +1 -1
  280. package/dist-types/ts3.4/commands/UpdateAgentStatusCommand.d.ts +1 -1
  281. package/dist-types/ts3.4/commands/UpdateContactAttributesCommand.d.ts +1 -1
  282. package/dist-types/ts3.4/commands/UpdateContactCommand.d.ts +17 -0
  283. package/dist-types/ts3.4/commands/UpdateContactFlowContentCommand.d.ts +1 -1
  284. package/dist-types/ts3.4/commands/UpdateContactFlowMetadataCommand.d.ts +17 -0
  285. package/dist-types/ts3.4/commands/UpdateContactFlowModuleContentCommand.d.ts +17 -0
  286. package/dist-types/ts3.4/commands/UpdateContactFlowModuleMetadataCommand.d.ts +17 -0
  287. package/dist-types/ts3.4/commands/UpdateContactFlowNameCommand.d.ts +1 -1
  288. package/dist-types/ts3.4/commands/UpdateContactScheduleCommand.d.ts +17 -0
  289. package/dist-types/ts3.4/commands/UpdateHoursOfOperationCommand.d.ts +1 -1
  290. package/dist-types/ts3.4/commands/UpdateInstanceAttributeCommand.d.ts +1 -1
  291. package/dist-types/ts3.4/commands/UpdateInstanceStorageConfigCommand.d.ts +1 -1
  292. package/dist-types/ts3.4/commands/UpdateQueueHoursOfOperationCommand.d.ts +1 -1
  293. package/dist-types/ts3.4/commands/UpdateQueueMaxContactsCommand.d.ts +1 -1
  294. package/dist-types/ts3.4/commands/UpdateQueueNameCommand.d.ts +1 -1
  295. package/dist-types/ts3.4/commands/UpdateQueueOutboundCallerConfigCommand.d.ts +1 -1
  296. package/dist-types/ts3.4/commands/UpdateQueueStatusCommand.d.ts +1 -1
  297. package/dist-types/ts3.4/commands/UpdateQuickConnectConfigCommand.d.ts +1 -1
  298. package/dist-types/ts3.4/commands/UpdateQuickConnectNameCommand.d.ts +1 -1
  299. package/dist-types/ts3.4/commands/UpdateRoutingProfileConcurrencyCommand.d.ts +1 -1
  300. package/dist-types/ts3.4/commands/UpdateRoutingProfileDefaultOutboundQueueCommand.d.ts +1 -1
  301. package/dist-types/ts3.4/commands/UpdateRoutingProfileNameCommand.d.ts +1 -1
  302. package/dist-types/ts3.4/commands/UpdateRoutingProfileQueuesCommand.d.ts +1 -1
  303. package/dist-types/ts3.4/commands/UpdateSecurityProfileCommand.d.ts +17 -0
  304. package/dist-types/ts3.4/commands/UpdateUserHierarchyCommand.d.ts +1 -1
  305. package/dist-types/ts3.4/commands/UpdateUserHierarchyGroupNameCommand.d.ts +1 -1
  306. package/dist-types/ts3.4/commands/UpdateUserHierarchyStructureCommand.d.ts +1 -1
  307. package/dist-types/ts3.4/commands/UpdateUserIdentityInfoCommand.d.ts +1 -1
  308. package/dist-types/ts3.4/commands/UpdateUserPhoneConfigCommand.d.ts +1 -1
  309. package/dist-types/ts3.4/commands/UpdateUserRoutingProfileCommand.d.ts +1 -1
  310. package/dist-types/ts3.4/commands/UpdateUserSecurityProfilesCommand.d.ts +1 -1
  311. package/dist-types/ts3.4/commands/index.d.ts +19 -0
  312. package/dist-types/ts3.4/models/index.d.ts +1 -0
  313. package/dist-types/ts3.4/models/models_0.d.ts +541 -415
  314. package/dist-types/ts3.4/models/models_1.d.ts +491 -0
  315. package/dist-types/ts3.4/pagination/ListContactFlowModulesPaginator.d.ts +4 -0
  316. package/dist-types/ts3.4/pagination/ListContactReferencesPaginator.d.ts +4 -0
  317. package/dist-types/ts3.4/pagination/ListSecurityProfilePermissionsPaginator.d.ts +4 -0
  318. package/dist-types/ts3.4/pagination/index.d.ts +3 -0
  319. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +57 -0
  320. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +2 -0
  321. package/dist-types/ts3.4/runtimeConfig.d.ts +2 -0
  322. package/dist-types/ts3.4/runtimeConfig.native.d.ts +2 -0
  323. package/package.json +23 -23
@@ -1,6 +1,6 @@
1
1
  import { __assign, __awaiter, __generator, __read } from "tslib";
2
2
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
3
- import { expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, } from "@aws-sdk/smithy-client";
3
+ import { expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, expectUnion as __expectUnion, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, } from "@aws-sdk/smithy-client";
4
4
  import { v4 as generateIdempotencyToken } from "uuid";
5
5
  export var serializeAws_restJson1AssociateApprovedOriginCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
6
6
  var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
@@ -376,6 +376,41 @@ export var serializeAws_restJson1CreateContactFlowCommand = function (input, con
376
376
  }
377
377
  });
378
378
  }); };
379
+ export var serializeAws_restJson1CreateContactFlowModuleCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
380
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
381
+ var _c;
382
+ return __generator(this, function (_d) {
383
+ switch (_d.label) {
384
+ case 0: return [4, context.endpoint()];
385
+ case 1:
386
+ _a = _d.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
387
+ headers = {
388
+ "content-type": "application/json",
389
+ };
390
+ resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/contact-flow-modules/{InstanceId}";
391
+ if (input.InstanceId !== undefined) {
392
+ labelValue = input.InstanceId;
393
+ if (labelValue.length <= 0) {
394
+ throw new Error("Empty value provided for input HTTP label: InstanceId.");
395
+ }
396
+ resolvedPath = resolvedPath.replace("{InstanceId}", __extendedEncodeURIComponent(labelValue));
397
+ }
398
+ else {
399
+ throw new Error("No value provided for input HTTP label: InstanceId.");
400
+ }
401
+ body = JSON.stringify(__assign(__assign(__assign(__assign({ ClientToken: (_c = input.ClientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }, (input.Content !== undefined && input.Content !== null && { Content: input.Content })), (input.Description !== undefined && input.Description !== null && { Description: input.Description })), (input.Name !== undefined && input.Name !== null && { Name: input.Name })), (input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) })));
402
+ return [2, new __HttpRequest({
403
+ protocol: protocol,
404
+ hostname: hostname,
405
+ port: port,
406
+ method: "PUT",
407
+ headers: headers,
408
+ path: resolvedPath,
409
+ body: body,
410
+ })];
411
+ }
412
+ });
413
+ }); };
379
414
  export var serializeAws_restJson1CreateHoursOfOperationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
380
415
  var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
381
416
  return __generator(this, function (_c) {
@@ -596,6 +631,42 @@ export var serializeAws_restJson1CreateRoutingProfileCommand = function (input,
596
631
  }
597
632
  });
598
633
  }); };
634
+ export var serializeAws_restJson1CreateSecurityProfileCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
635
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
636
+ return __generator(this, function (_c) {
637
+ switch (_c.label) {
638
+ case 0: return [4, context.endpoint()];
639
+ case 1:
640
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
641
+ headers = {
642
+ "content-type": "application/json",
643
+ };
644
+ resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/security-profiles/{InstanceId}";
645
+ if (input.InstanceId !== undefined) {
646
+ labelValue = input.InstanceId;
647
+ if (labelValue.length <= 0) {
648
+ throw new Error("Empty value provided for input HTTP label: InstanceId.");
649
+ }
650
+ resolvedPath = resolvedPath.replace("{InstanceId}", __extendedEncodeURIComponent(labelValue));
651
+ }
652
+ else {
653
+ throw new Error("No value provided for input HTTP label: InstanceId.");
654
+ }
655
+ body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.Description !== undefined && input.Description !== null && { Description: input.Description })), (input.Permissions !== undefined &&
656
+ input.Permissions !== null && { Permissions: serializeAws_restJson1PermissionsList(input.Permissions, context) })), (input.SecurityProfileName !== undefined &&
657
+ input.SecurityProfileName !== null && { SecurityProfileName: input.SecurityProfileName })), (input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) })));
658
+ return [2, new __HttpRequest({
659
+ protocol: protocol,
660
+ hostname: hostname,
661
+ port: port,
662
+ method: "PUT",
663
+ headers: headers,
664
+ path: resolvedPath,
665
+ body: body,
666
+ })];
667
+ }
668
+ });
669
+ }); };
599
670
  export var serializeAws_restJson1CreateUseCaseCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
600
671
  var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
601
672
  return __generator(this, function (_c) {
@@ -719,6 +790,90 @@ export var serializeAws_restJson1CreateUserHierarchyGroupCommand = function (inp
719
790
  }
720
791
  });
721
792
  }); };
793
+ export var serializeAws_restJson1DeleteContactFlowCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
794
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
795
+ return __generator(this, function (_c) {
796
+ switch (_c.label) {
797
+ case 0: return [4, context.endpoint()];
798
+ case 1:
799
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
800
+ headers = {};
801
+ resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
802
+ "/contact-flows/{InstanceId}/{ContactFlowId}";
803
+ if (input.InstanceId !== undefined) {
804
+ labelValue = input.InstanceId;
805
+ if (labelValue.length <= 0) {
806
+ throw new Error("Empty value provided for input HTTP label: InstanceId.");
807
+ }
808
+ resolvedPath = resolvedPath.replace("{InstanceId}", __extendedEncodeURIComponent(labelValue));
809
+ }
810
+ else {
811
+ throw new Error("No value provided for input HTTP label: InstanceId.");
812
+ }
813
+ if (input.ContactFlowId !== undefined) {
814
+ labelValue = input.ContactFlowId;
815
+ if (labelValue.length <= 0) {
816
+ throw new Error("Empty value provided for input HTTP label: ContactFlowId.");
817
+ }
818
+ resolvedPath = resolvedPath.replace("{ContactFlowId}", __extendedEncodeURIComponent(labelValue));
819
+ }
820
+ else {
821
+ throw new Error("No value provided for input HTTP label: ContactFlowId.");
822
+ }
823
+ return [2, new __HttpRequest({
824
+ protocol: protocol,
825
+ hostname: hostname,
826
+ port: port,
827
+ method: "DELETE",
828
+ headers: headers,
829
+ path: resolvedPath,
830
+ body: body,
831
+ })];
832
+ }
833
+ });
834
+ }); };
835
+ export var serializeAws_restJson1DeleteContactFlowModuleCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
836
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
837
+ return __generator(this, function (_c) {
838
+ switch (_c.label) {
839
+ case 0: return [4, context.endpoint()];
840
+ case 1:
841
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
842
+ headers = {};
843
+ resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
844
+ "/contact-flow-modules/{InstanceId}/{ContactFlowModuleId}";
845
+ if (input.InstanceId !== undefined) {
846
+ labelValue = input.InstanceId;
847
+ if (labelValue.length <= 0) {
848
+ throw new Error("Empty value provided for input HTTP label: InstanceId.");
849
+ }
850
+ resolvedPath = resolvedPath.replace("{InstanceId}", __extendedEncodeURIComponent(labelValue));
851
+ }
852
+ else {
853
+ throw new Error("No value provided for input HTTP label: InstanceId.");
854
+ }
855
+ if (input.ContactFlowModuleId !== undefined) {
856
+ labelValue = input.ContactFlowModuleId;
857
+ if (labelValue.length <= 0) {
858
+ throw new Error("Empty value provided for input HTTP label: ContactFlowModuleId.");
859
+ }
860
+ resolvedPath = resolvedPath.replace("{ContactFlowModuleId}", __extendedEncodeURIComponent(labelValue));
861
+ }
862
+ else {
863
+ throw new Error("No value provided for input HTTP label: ContactFlowModuleId.");
864
+ }
865
+ return [2, new __HttpRequest({
866
+ protocol: protocol,
867
+ hostname: hostname,
868
+ port: port,
869
+ method: "DELETE",
870
+ headers: headers,
871
+ path: resolvedPath,
872
+ body: body,
873
+ })];
874
+ }
875
+ });
876
+ }); };
722
877
  export var serializeAws_restJson1DeleteHoursOfOperationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
723
878
  var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
724
879
  return __generator(this, function (_c) {
@@ -876,6 +1031,48 @@ export var serializeAws_restJson1DeleteQuickConnectCommand = function (input, co
876
1031
  }
877
1032
  });
878
1033
  }); };
1034
+ export var serializeAws_restJson1DeleteSecurityProfileCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
1035
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
1036
+ return __generator(this, function (_c) {
1037
+ switch (_c.label) {
1038
+ case 0: return [4, context.endpoint()];
1039
+ case 1:
1040
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
1041
+ headers = {};
1042
+ resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
1043
+ "/security-profiles/{InstanceId}/{SecurityProfileId}";
1044
+ if (input.InstanceId !== undefined) {
1045
+ labelValue = input.InstanceId;
1046
+ if (labelValue.length <= 0) {
1047
+ throw new Error("Empty value provided for input HTTP label: InstanceId.");
1048
+ }
1049
+ resolvedPath = resolvedPath.replace("{InstanceId}", __extendedEncodeURIComponent(labelValue));
1050
+ }
1051
+ else {
1052
+ throw new Error("No value provided for input HTTP label: InstanceId.");
1053
+ }
1054
+ if (input.SecurityProfileId !== undefined) {
1055
+ labelValue = input.SecurityProfileId;
1056
+ if (labelValue.length <= 0) {
1057
+ throw new Error("Empty value provided for input HTTP label: SecurityProfileId.");
1058
+ }
1059
+ resolvedPath = resolvedPath.replace("{SecurityProfileId}", __extendedEncodeURIComponent(labelValue));
1060
+ }
1061
+ else {
1062
+ throw new Error("No value provided for input HTTP label: SecurityProfileId.");
1063
+ }
1064
+ return [2, new __HttpRequest({
1065
+ protocol: protocol,
1066
+ hostname: hostname,
1067
+ port: port,
1068
+ method: "DELETE",
1069
+ headers: headers,
1070
+ path: resolvedPath,
1071
+ body: body,
1072
+ })];
1073
+ }
1074
+ });
1075
+ }); };
879
1076
  export var serializeAws_restJson1DeleteUseCaseCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
880
1077
  var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, labelValue, body;
881
1078
  return __generator(this, function (_c) {
@@ -1053,6 +1250,47 @@ export var serializeAws_restJson1DescribeAgentStatusCommand = function (input, c
1053
1250
  }
1054
1251
  });
1055
1252
  }); };
1253
+ export var serializeAws_restJson1DescribeContactCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
1254
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
1255
+ return __generator(this, function (_c) {
1256
+ switch (_c.label) {
1257
+ case 0: return [4, context.endpoint()];
1258
+ case 1:
1259
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
1260
+ headers = {};
1261
+ resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/contacts/{InstanceId}/{ContactId}";
1262
+ if (input.InstanceId !== undefined) {
1263
+ labelValue = input.InstanceId;
1264
+ if (labelValue.length <= 0) {
1265
+ throw new Error("Empty value provided for input HTTP label: InstanceId.");
1266
+ }
1267
+ resolvedPath = resolvedPath.replace("{InstanceId}", __extendedEncodeURIComponent(labelValue));
1268
+ }
1269
+ else {
1270
+ throw new Error("No value provided for input HTTP label: InstanceId.");
1271
+ }
1272
+ if (input.ContactId !== undefined) {
1273
+ labelValue = input.ContactId;
1274
+ if (labelValue.length <= 0) {
1275
+ throw new Error("Empty value provided for input HTTP label: ContactId.");
1276
+ }
1277
+ resolvedPath = resolvedPath.replace("{ContactId}", __extendedEncodeURIComponent(labelValue));
1278
+ }
1279
+ else {
1280
+ throw new Error("No value provided for input HTTP label: ContactId.");
1281
+ }
1282
+ return [2, new __HttpRequest({
1283
+ protocol: protocol,
1284
+ hostname: hostname,
1285
+ port: port,
1286
+ method: "GET",
1287
+ headers: headers,
1288
+ path: resolvedPath,
1289
+ body: body,
1290
+ })];
1291
+ }
1292
+ });
1293
+ }); };
1056
1294
  export var serializeAws_restJson1DescribeContactFlowCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
1057
1295
  var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
1058
1296
  return __generator(this, function (_c) {
@@ -1095,6 +1333,48 @@ export var serializeAws_restJson1DescribeContactFlowCommand = function (input, c
1095
1333
  }
1096
1334
  });
1097
1335
  }); };
1336
+ export var serializeAws_restJson1DescribeContactFlowModuleCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
1337
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
1338
+ return __generator(this, function (_c) {
1339
+ switch (_c.label) {
1340
+ case 0: return [4, context.endpoint()];
1341
+ case 1:
1342
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
1343
+ headers = {};
1344
+ resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
1345
+ "/contact-flow-modules/{InstanceId}/{ContactFlowModuleId}";
1346
+ if (input.InstanceId !== undefined) {
1347
+ labelValue = input.InstanceId;
1348
+ if (labelValue.length <= 0) {
1349
+ throw new Error("Empty value provided for input HTTP label: InstanceId.");
1350
+ }
1351
+ resolvedPath = resolvedPath.replace("{InstanceId}", __extendedEncodeURIComponent(labelValue));
1352
+ }
1353
+ else {
1354
+ throw new Error("No value provided for input HTTP label: InstanceId.");
1355
+ }
1356
+ if (input.ContactFlowModuleId !== undefined) {
1357
+ labelValue = input.ContactFlowModuleId;
1358
+ if (labelValue.length <= 0) {
1359
+ throw new Error("Empty value provided for input HTTP label: ContactFlowModuleId.");
1360
+ }
1361
+ resolvedPath = resolvedPath.replace("{ContactFlowModuleId}", __extendedEncodeURIComponent(labelValue));
1362
+ }
1363
+ else {
1364
+ throw new Error("No value provided for input HTTP label: ContactFlowModuleId.");
1365
+ }
1366
+ return [2, new __HttpRequest({
1367
+ protocol: protocol,
1368
+ hostname: hostname,
1369
+ port: port,
1370
+ method: "GET",
1371
+ headers: headers,
1372
+ path: resolvedPath,
1373
+ body: body,
1374
+ })];
1375
+ }
1376
+ });
1377
+ }); };
1098
1378
  export var serializeAws_restJson1DescribeHoursOfOperationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
1099
1379
  var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
1100
1380
  return __generator(this, function (_c) {
@@ -1379,7 +1659,7 @@ export var serializeAws_restJson1DescribeRoutingProfileCommand = function (input
1379
1659
  }
1380
1660
  });
1381
1661
  }); };
1382
- export var serializeAws_restJson1DescribeUserCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
1662
+ export var serializeAws_restJson1DescribeSecurityProfileCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
1383
1663
  var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
1384
1664
  return __generator(this, function (_c) {
1385
1665
  switch (_c.label) {
@@ -1387,16 +1667,17 @@ export var serializeAws_restJson1DescribeUserCommand = function (input, context)
1387
1667
  case 1:
1388
1668
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
1389
1669
  headers = {};
1390
- resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/users/{InstanceId}/{UserId}";
1391
- if (input.UserId !== undefined) {
1392
- labelValue = input.UserId;
1670
+ resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
1671
+ "/security-profiles/{InstanceId}/{SecurityProfileId}";
1672
+ if (input.SecurityProfileId !== undefined) {
1673
+ labelValue = input.SecurityProfileId;
1393
1674
  if (labelValue.length <= 0) {
1394
- throw new Error("Empty value provided for input HTTP label: UserId.");
1675
+ throw new Error("Empty value provided for input HTTP label: SecurityProfileId.");
1395
1676
  }
1396
- resolvedPath = resolvedPath.replace("{UserId}", __extendedEncodeURIComponent(labelValue));
1677
+ resolvedPath = resolvedPath.replace("{SecurityProfileId}", __extendedEncodeURIComponent(labelValue));
1397
1678
  }
1398
1679
  else {
1399
- throw new Error("No value provided for input HTTP label: UserId.");
1680
+ throw new Error("No value provided for input HTTP label: SecurityProfileId.");
1400
1681
  }
1401
1682
  if (input.InstanceId !== undefined) {
1402
1683
  labelValue = input.InstanceId;
@@ -1420,7 +1701,7 @@ export var serializeAws_restJson1DescribeUserCommand = function (input, context)
1420
1701
  }
1421
1702
  });
1422
1703
  }); };
1423
- export var serializeAws_restJson1DescribeUserHierarchyGroupCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
1704
+ export var serializeAws_restJson1DescribeUserCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
1424
1705
  var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
1425
1706
  return __generator(this, function (_c) {
1426
1707
  switch (_c.label) {
@@ -1428,9 +1709,50 @@ export var serializeAws_restJson1DescribeUserHierarchyGroupCommand = function (i
1428
1709
  case 1:
1429
1710
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
1430
1711
  headers = {};
1431
- resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
1432
- "/user-hierarchy-groups/{InstanceId}/{HierarchyGroupId}";
1433
- if (input.HierarchyGroupId !== undefined) {
1712
+ resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/users/{InstanceId}/{UserId}";
1713
+ if (input.UserId !== undefined) {
1714
+ labelValue = input.UserId;
1715
+ if (labelValue.length <= 0) {
1716
+ throw new Error("Empty value provided for input HTTP label: UserId.");
1717
+ }
1718
+ resolvedPath = resolvedPath.replace("{UserId}", __extendedEncodeURIComponent(labelValue));
1719
+ }
1720
+ else {
1721
+ throw new Error("No value provided for input HTTP label: UserId.");
1722
+ }
1723
+ if (input.InstanceId !== undefined) {
1724
+ labelValue = input.InstanceId;
1725
+ if (labelValue.length <= 0) {
1726
+ throw new Error("Empty value provided for input HTTP label: InstanceId.");
1727
+ }
1728
+ resolvedPath = resolvedPath.replace("{InstanceId}", __extendedEncodeURIComponent(labelValue));
1729
+ }
1730
+ else {
1731
+ throw new Error("No value provided for input HTTP label: InstanceId.");
1732
+ }
1733
+ return [2, new __HttpRequest({
1734
+ protocol: protocol,
1735
+ hostname: hostname,
1736
+ port: port,
1737
+ method: "GET",
1738
+ headers: headers,
1739
+ path: resolvedPath,
1740
+ body: body,
1741
+ })];
1742
+ }
1743
+ });
1744
+ }); };
1745
+ export var serializeAws_restJson1DescribeUserHierarchyGroupCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
1746
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
1747
+ return __generator(this, function (_c) {
1748
+ switch (_c.label) {
1749
+ case 0: return [4, context.endpoint()];
1750
+ case 1:
1751
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
1752
+ headers = {};
1753
+ resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
1754
+ "/user-hierarchy-groups/{InstanceId}/{HierarchyGroupId}";
1755
+ if (input.HierarchyGroupId !== undefined) {
1434
1756
  labelValue = input.HierarchyGroupId;
1435
1757
  if (labelValue.length <= 0) {
1436
1758
  throw new Error("Empty value provided for input HTTP label: HierarchyGroupId.");
@@ -2064,6 +2386,40 @@ export var serializeAws_restJson1ListBotsCommand = function (input, context) { r
2064
2386
  }
2065
2387
  });
2066
2388
  }); };
2389
+ export var serializeAws_restJson1ListContactFlowModulesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
2390
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
2391
+ return __generator(this, function (_c) {
2392
+ switch (_c.label) {
2393
+ case 0: return [4, context.endpoint()];
2394
+ case 1:
2395
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
2396
+ headers = {};
2397
+ resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
2398
+ "/contact-flow-modules-summary/{InstanceId}";
2399
+ if (input.InstanceId !== undefined) {
2400
+ labelValue = input.InstanceId;
2401
+ if (labelValue.length <= 0) {
2402
+ throw new Error("Empty value provided for input HTTP label: InstanceId.");
2403
+ }
2404
+ resolvedPath = resolvedPath.replace("{InstanceId}", __extendedEncodeURIComponent(labelValue));
2405
+ }
2406
+ else {
2407
+ throw new Error("No value provided for input HTTP label: InstanceId.");
2408
+ }
2409
+ query = __assign(__assign(__assign({}, (input.NextToken !== undefined && { nextToken: input.NextToken })), (input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() })), (input.ContactFlowModuleState !== undefined && { state: input.ContactFlowModuleState }));
2410
+ return [2, new __HttpRequest({
2411
+ protocol: protocol,
2412
+ hostname: hostname,
2413
+ port: port,
2414
+ method: "GET",
2415
+ headers: headers,
2416
+ path: resolvedPath,
2417
+ query: query,
2418
+ body: body,
2419
+ })];
2420
+ }
2421
+ });
2422
+ }); };
2067
2423
  export var serializeAws_restJson1ListContactFlowsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
2068
2424
  var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
2069
2425
  return __generator(this, function (_c) {
@@ -2099,6 +2455,52 @@ export var serializeAws_restJson1ListContactFlowsCommand = function (input, cont
2099
2455
  }
2100
2456
  });
2101
2457
  }); };
2458
+ export var serializeAws_restJson1ListContactReferencesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
2459
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, query, body;
2460
+ return __generator(this, function (_c) {
2461
+ switch (_c.label) {
2462
+ case 0: return [4, context.endpoint()];
2463
+ case 1:
2464
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
2465
+ headers = {};
2466
+ resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
2467
+ "/contact/references/{InstanceId}/{ContactId}";
2468
+ if (input.InstanceId !== undefined) {
2469
+ labelValue = input.InstanceId;
2470
+ if (labelValue.length <= 0) {
2471
+ throw new Error("Empty value provided for input HTTP label: InstanceId.");
2472
+ }
2473
+ resolvedPath = resolvedPath.replace("{InstanceId}", __extendedEncodeURIComponent(labelValue));
2474
+ }
2475
+ else {
2476
+ throw new Error("No value provided for input HTTP label: InstanceId.");
2477
+ }
2478
+ if (input.ContactId !== undefined) {
2479
+ labelValue = input.ContactId;
2480
+ if (labelValue.length <= 0) {
2481
+ throw new Error("Empty value provided for input HTTP label: ContactId.");
2482
+ }
2483
+ resolvedPath = resolvedPath.replace("{ContactId}", __extendedEncodeURIComponent(labelValue));
2484
+ }
2485
+ else {
2486
+ throw new Error("No value provided for input HTTP label: ContactId.");
2487
+ }
2488
+ query = __assign(__assign({}, (input.ReferenceTypes !== undefined && {
2489
+ referenceTypes: (input.ReferenceTypes || []).map(function (_entry) { return _entry; }),
2490
+ })), (input.NextToken !== undefined && { nextToken: input.NextToken }));
2491
+ return [2, new __HttpRequest({
2492
+ protocol: protocol,
2493
+ hostname: hostname,
2494
+ port: port,
2495
+ method: "GET",
2496
+ headers: headers,
2497
+ path: resolvedPath,
2498
+ query: query,
2499
+ body: body,
2500
+ })];
2501
+ }
2502
+ });
2503
+ }); };
2102
2504
  export var serializeAws_restJson1ListHoursOfOperationsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
2103
2505
  var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
2104
2506
  return __generator(this, function (_c) {
@@ -2613,6 +3015,50 @@ export var serializeAws_restJson1ListSecurityKeysCommand = function (input, cont
2613
3015
  }
2614
3016
  });
2615
3017
  }); };
3018
+ export var serializeAws_restJson1ListSecurityProfilePermissionsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
3019
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, query, body;
3020
+ return __generator(this, function (_c) {
3021
+ switch (_c.label) {
3022
+ case 0: return [4, context.endpoint()];
3023
+ case 1:
3024
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
3025
+ headers = {};
3026
+ resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
3027
+ "/security-profiles-permissions/{InstanceId}/{SecurityProfileId}";
3028
+ if (input.SecurityProfileId !== undefined) {
3029
+ labelValue = input.SecurityProfileId;
3030
+ if (labelValue.length <= 0) {
3031
+ throw new Error("Empty value provided for input HTTP label: SecurityProfileId.");
3032
+ }
3033
+ resolvedPath = resolvedPath.replace("{SecurityProfileId}", __extendedEncodeURIComponent(labelValue));
3034
+ }
3035
+ else {
3036
+ throw new Error("No value provided for input HTTP label: SecurityProfileId.");
3037
+ }
3038
+ if (input.InstanceId !== undefined) {
3039
+ labelValue = input.InstanceId;
3040
+ if (labelValue.length <= 0) {
3041
+ throw new Error("Empty value provided for input HTTP label: InstanceId.");
3042
+ }
3043
+ resolvedPath = resolvedPath.replace("{InstanceId}", __extendedEncodeURIComponent(labelValue));
3044
+ }
3045
+ else {
3046
+ throw new Error("No value provided for input HTTP label: InstanceId.");
3047
+ }
3048
+ query = __assign(__assign({}, (input.NextToken !== undefined && { nextToken: input.NextToken })), (input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() }));
3049
+ return [2, new __HttpRequest({
3050
+ protocol: protocol,
3051
+ hostname: hostname,
3052
+ port: port,
3053
+ method: "GET",
3054
+ headers: headers,
3055
+ path: resolvedPath,
3056
+ query: query,
3057
+ body: body,
3058
+ })];
3059
+ }
3060
+ });
3061
+ }); };
2616
3062
  export var serializeAws_restJson1ListSecurityProfilesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
2617
3063
  var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
2618
3064
  return __generator(this, function (_c) {
@@ -2873,6 +3319,34 @@ export var serializeAws_restJson1StartContactRecordingCommand = function (input,
2873
3319
  }
2874
3320
  });
2875
3321
  }); };
3322
+ export var serializeAws_restJson1StartContactStreamingCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
3323
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
3324
+ var _c;
3325
+ return __generator(this, function (_d) {
3326
+ switch (_d.label) {
3327
+ case 0: return [4, context.endpoint()];
3328
+ case 1:
3329
+ _a = _d.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
3330
+ headers = {
3331
+ "content-type": "application/json",
3332
+ };
3333
+ resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/contact/start-streaming";
3334
+ body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.ChatStreamingConfiguration !== undefined &&
3335
+ input.ChatStreamingConfiguration !== null && {
3336
+ ChatStreamingConfiguration: serializeAws_restJson1ChatStreamingConfiguration(input.ChatStreamingConfiguration, context),
3337
+ })), { ClientToken: (_c = input.ClientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }), (input.ContactId !== undefined && input.ContactId !== null && { ContactId: input.ContactId })), (input.InstanceId !== undefined && input.InstanceId !== null && { InstanceId: input.InstanceId })));
3338
+ return [2, new __HttpRequest({
3339
+ protocol: protocol,
3340
+ hostname: hostname,
3341
+ port: port,
3342
+ method: "POST",
3343
+ headers: headers,
3344
+ path: resolvedPath,
3345
+ body: body,
3346
+ })];
3347
+ }
3348
+ });
3349
+ }); };
2876
3350
  export var serializeAws_restJson1StartOutboundVoiceContactCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
2877
3351
  var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
2878
3352
  var _c;
@@ -2916,10 +3390,11 @@ export var serializeAws_restJson1StartTaskContactCommand = function (input, cont
2916
3390
  "content-type": "application/json",
2917
3391
  };
2918
3392
  resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/contact/task";
2919
- body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.Attributes !== undefined &&
3393
+ body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.Attributes !== undefined &&
2920
3394
  input.Attributes !== null && { Attributes: serializeAws_restJson1Attributes(input.Attributes, context) })), { ClientToken: (_c = input.ClientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }), (input.ContactFlowId !== undefined && input.ContactFlowId !== null && { ContactFlowId: input.ContactFlowId })), (input.Description !== undefined && input.Description !== null && { Description: input.Description })), (input.InstanceId !== undefined && input.InstanceId !== null && { InstanceId: input.InstanceId })), (input.Name !== undefined && input.Name !== null && { Name: input.Name })), (input.PreviousContactId !== undefined &&
2921
3395
  input.PreviousContactId !== null && { PreviousContactId: input.PreviousContactId })), (input.References !== undefined &&
2922
- input.References !== null && { References: serializeAws_restJson1ContactReferences(input.References, context) })));
3396
+ input.References !== null && { References: serializeAws_restJson1ContactReferences(input.References, context) })), (input.ScheduledTime !== undefined &&
3397
+ input.ScheduledTime !== null && { ScheduledTime: Math.round(input.ScheduledTime.getTime() / 1000) })));
2923
3398
  return [2, new __HttpRequest({
2924
3399
  protocol: protocol,
2925
3400
  hostname: hostname,
@@ -2981,6 +3456,30 @@ export var serializeAws_restJson1StopContactRecordingCommand = function (input,
2981
3456
  }
2982
3457
  });
2983
3458
  }); };
3459
+ export var serializeAws_restJson1StopContactStreamingCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
3460
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
3461
+ return __generator(this, function (_c) {
3462
+ switch (_c.label) {
3463
+ case 0: return [4, context.endpoint()];
3464
+ case 1:
3465
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
3466
+ headers = {
3467
+ "content-type": "application/json",
3468
+ };
3469
+ resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/contact/stop-streaming";
3470
+ body = JSON.stringify(__assign(__assign(__assign({}, (input.ContactId !== undefined && input.ContactId !== null && { ContactId: input.ContactId })), (input.InstanceId !== undefined && input.InstanceId !== null && { InstanceId: input.InstanceId })), (input.StreamingId !== undefined && input.StreamingId !== null && { StreamingId: input.StreamingId })));
3471
+ return [2, new __HttpRequest({
3472
+ protocol: protocol,
3473
+ hostname: hostname,
3474
+ port: port,
3475
+ method: "POST",
3476
+ headers: headers,
3477
+ path: resolvedPath,
3478
+ body: body,
3479
+ })];
3480
+ }
3481
+ });
3482
+ }); };
2984
3483
  export var serializeAws_restJson1SuspendContactRecordingCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
2985
3484
  var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
2986
3485
  return __generator(this, function (_c) {
@@ -3119,6 +3618,51 @@ export var serializeAws_restJson1UpdateAgentStatusCommand = function (input, con
3119
3618
  }
3120
3619
  });
3121
3620
  }); };
3621
+ export var serializeAws_restJson1UpdateContactCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
3622
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
3623
+ return __generator(this, function (_c) {
3624
+ switch (_c.label) {
3625
+ case 0: return [4, context.endpoint()];
3626
+ case 1:
3627
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
3628
+ headers = {
3629
+ "content-type": "application/json",
3630
+ };
3631
+ resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/contacts/{InstanceId}/{ContactId}";
3632
+ if (input.InstanceId !== undefined) {
3633
+ labelValue = input.InstanceId;
3634
+ if (labelValue.length <= 0) {
3635
+ throw new Error("Empty value provided for input HTTP label: InstanceId.");
3636
+ }
3637
+ resolvedPath = resolvedPath.replace("{InstanceId}", __extendedEncodeURIComponent(labelValue));
3638
+ }
3639
+ else {
3640
+ throw new Error("No value provided for input HTTP label: InstanceId.");
3641
+ }
3642
+ if (input.ContactId !== undefined) {
3643
+ labelValue = input.ContactId;
3644
+ if (labelValue.length <= 0) {
3645
+ throw new Error("Empty value provided for input HTTP label: ContactId.");
3646
+ }
3647
+ resolvedPath = resolvedPath.replace("{ContactId}", __extendedEncodeURIComponent(labelValue));
3648
+ }
3649
+ else {
3650
+ throw new Error("No value provided for input HTTP label: ContactId.");
3651
+ }
3652
+ body = JSON.stringify(__assign(__assign(__assign({}, (input.Description !== undefined && input.Description !== null && { Description: input.Description })), (input.Name !== undefined && input.Name !== null && { Name: input.Name })), (input.References !== undefined &&
3653
+ input.References !== null && { References: serializeAws_restJson1ContactReferences(input.References, context) })));
3654
+ return [2, new __HttpRequest({
3655
+ protocol: protocol,
3656
+ hostname: hostname,
3657
+ port: port,
3658
+ method: "POST",
3659
+ headers: headers,
3660
+ path: resolvedPath,
3661
+ body: body,
3662
+ })];
3663
+ }
3664
+ });
3665
+ }); };
3122
3666
  export var serializeAws_restJson1UpdateContactAttributesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
3123
3667
  var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
3124
3668
  return __generator(this, function (_c) {
@@ -3190,7 +3734,7 @@ export var serializeAws_restJson1UpdateContactFlowContentCommand = function (inp
3190
3734
  }
3191
3735
  });
3192
3736
  }); };
3193
- export var serializeAws_restJson1UpdateContactFlowNameCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
3737
+ export var serializeAws_restJson1UpdateContactFlowMetadataCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
3194
3738
  var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
3195
3739
  return __generator(this, function (_c) {
3196
3740
  switch (_c.label) {
@@ -3201,7 +3745,7 @@ export var serializeAws_restJson1UpdateContactFlowNameCommand = function (input,
3201
3745
  "content-type": "application/json",
3202
3746
  };
3203
3747
  resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
3204
- "/contact-flows/{InstanceId}/{ContactFlowId}/name";
3748
+ "/contact-flows/{InstanceId}/{ContactFlowId}/metadata";
3205
3749
  if (input.InstanceId !== undefined) {
3206
3750
  labelValue = input.InstanceId;
3207
3751
  if (labelValue.length <= 0) {
@@ -3222,7 +3766,8 @@ export var serializeAws_restJson1UpdateContactFlowNameCommand = function (input,
3222
3766
  else {
3223
3767
  throw new Error("No value provided for input HTTP label: ContactFlowId.");
3224
3768
  }
3225
- body = JSON.stringify(__assign(__assign({}, (input.Description !== undefined && input.Description !== null && { Description: input.Description })), (input.Name !== undefined && input.Name !== null && { Name: input.Name })));
3769
+ body = JSON.stringify(__assign(__assign(__assign({}, (input.ContactFlowState !== undefined &&
3770
+ input.ContactFlowState !== null && { ContactFlowState: input.ContactFlowState })), (input.Description !== undefined && input.Description !== null && { Description: input.Description })), (input.Name !== undefined && input.Name !== null && { Name: input.Name })));
3226
3771
  return [2, new __HttpRequest({
3227
3772
  protocol: protocol,
3228
3773
  hostname: hostname,
@@ -3235,7 +3780,7 @@ export var serializeAws_restJson1UpdateContactFlowNameCommand = function (input,
3235
3780
  }
3236
3781
  });
3237
3782
  }); };
3238
- export var serializeAws_restJson1UpdateHoursOfOperationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
3783
+ export var serializeAws_restJson1UpdateContactFlowModuleContentCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
3239
3784
  var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
3240
3785
  return __generator(this, function (_c) {
3241
3786
  switch (_c.label) {
@@ -3246,7 +3791,7 @@ export var serializeAws_restJson1UpdateHoursOfOperationCommand = function (input
3246
3791
  "content-type": "application/json",
3247
3792
  };
3248
3793
  resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
3249
- "/hours-of-operations/{InstanceId}/{HoursOfOperationId}";
3794
+ "/contact-flow-modules/{InstanceId}/{ContactFlowModuleId}/content";
3250
3795
  if (input.InstanceId !== undefined) {
3251
3796
  labelValue = input.InstanceId;
3252
3797
  if (labelValue.length <= 0) {
@@ -3257,18 +3802,17 @@ export var serializeAws_restJson1UpdateHoursOfOperationCommand = function (input
3257
3802
  else {
3258
3803
  throw new Error("No value provided for input HTTP label: InstanceId.");
3259
3804
  }
3260
- if (input.HoursOfOperationId !== undefined) {
3261
- labelValue = input.HoursOfOperationId;
3805
+ if (input.ContactFlowModuleId !== undefined) {
3806
+ labelValue = input.ContactFlowModuleId;
3262
3807
  if (labelValue.length <= 0) {
3263
- throw new Error("Empty value provided for input HTTP label: HoursOfOperationId.");
3808
+ throw new Error("Empty value provided for input HTTP label: ContactFlowModuleId.");
3264
3809
  }
3265
- resolvedPath = resolvedPath.replace("{HoursOfOperationId}", __extendedEncodeURIComponent(labelValue));
3810
+ resolvedPath = resolvedPath.replace("{ContactFlowModuleId}", __extendedEncodeURIComponent(labelValue));
3266
3811
  }
3267
3812
  else {
3268
- throw new Error("No value provided for input HTTP label: HoursOfOperationId.");
3813
+ throw new Error("No value provided for input HTTP label: ContactFlowModuleId.");
3269
3814
  }
3270
- body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.Config !== undefined &&
3271
- input.Config !== null && { Config: serializeAws_restJson1HoursOfOperationConfigList(input.Config, context) })), (input.Description !== undefined && input.Description !== null && { Description: input.Description })), (input.Name !== undefined && input.Name !== null && { Name: input.Name })), (input.TimeZone !== undefined && input.TimeZone !== null && { TimeZone: input.TimeZone })));
3815
+ body = JSON.stringify(__assign({}, (input.Content !== undefined && input.Content !== null && { Content: input.Content })));
3272
3816
  return [2, new __HttpRequest({
3273
3817
  protocol: protocol,
3274
3818
  hostname: hostname,
@@ -3281,7 +3825,7 @@ export var serializeAws_restJson1UpdateHoursOfOperationCommand = function (input
3281
3825
  }
3282
3826
  });
3283
3827
  }); };
3284
- export var serializeAws_restJson1UpdateInstanceAttributeCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
3828
+ export var serializeAws_restJson1UpdateContactFlowModuleMetadataCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
3285
3829
  var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
3286
3830
  return __generator(this, function (_c) {
3287
3831
  switch (_c.label) {
@@ -3292,7 +3836,7 @@ export var serializeAws_restJson1UpdateInstanceAttributeCommand = function (inpu
3292
3836
  "content-type": "application/json",
3293
3837
  };
3294
3838
  resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
3295
- "/instance/{InstanceId}/attribute/{AttributeType}";
3839
+ "/contact-flow-modules/{InstanceId}/{ContactFlowModuleId}/metadata";
3296
3840
  if (input.InstanceId !== undefined) {
3297
3841
  labelValue = input.InstanceId;
3298
3842
  if (labelValue.length <= 0) {
@@ -3303,17 +3847,17 @@ export var serializeAws_restJson1UpdateInstanceAttributeCommand = function (inpu
3303
3847
  else {
3304
3848
  throw new Error("No value provided for input HTTP label: InstanceId.");
3305
3849
  }
3306
- if (input.AttributeType !== undefined) {
3307
- labelValue = input.AttributeType;
3850
+ if (input.ContactFlowModuleId !== undefined) {
3851
+ labelValue = input.ContactFlowModuleId;
3308
3852
  if (labelValue.length <= 0) {
3309
- throw new Error("Empty value provided for input HTTP label: AttributeType.");
3853
+ throw new Error("Empty value provided for input HTTP label: ContactFlowModuleId.");
3310
3854
  }
3311
- resolvedPath = resolvedPath.replace("{AttributeType}", __extendedEncodeURIComponent(labelValue));
3855
+ resolvedPath = resolvedPath.replace("{ContactFlowModuleId}", __extendedEncodeURIComponent(labelValue));
3312
3856
  }
3313
3857
  else {
3314
- throw new Error("No value provided for input HTTP label: AttributeType.");
3858
+ throw new Error("No value provided for input HTTP label: ContactFlowModuleId.");
3315
3859
  }
3316
- body = JSON.stringify(__assign({}, (input.Value !== undefined && input.Value !== null && { Value: input.Value })));
3860
+ body = JSON.stringify(__assign(__assign(__assign({}, (input.Description !== undefined && input.Description !== null && { Description: input.Description })), (input.Name !== undefined && input.Name !== null && { Name: input.Name })), (input.State !== undefined && input.State !== null && { State: input.State })));
3317
3861
  return [2, new __HttpRequest({
3318
3862
  protocol: protocol,
3319
3863
  hostname: hostname,
@@ -3326,8 +3870,8 @@ export var serializeAws_restJson1UpdateInstanceAttributeCommand = function (inpu
3326
3870
  }
3327
3871
  });
3328
3872
  }); };
3329
- export var serializeAws_restJson1UpdateInstanceStorageConfigCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
3330
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, query, body;
3873
+ export var serializeAws_restJson1UpdateContactFlowNameCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
3874
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
3331
3875
  return __generator(this, function (_c) {
3332
3876
  switch (_c.label) {
3333
3877
  case 0: return [4, context.endpoint()];
@@ -3337,7 +3881,168 @@ export var serializeAws_restJson1UpdateInstanceStorageConfigCommand = function (
3337
3881
  "content-type": "application/json",
3338
3882
  };
3339
3883
  resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
3340
- "/instance/{InstanceId}/storage-config/{AssociationId}";
3884
+ "/contact-flows/{InstanceId}/{ContactFlowId}/name";
3885
+ if (input.InstanceId !== undefined) {
3886
+ labelValue = input.InstanceId;
3887
+ if (labelValue.length <= 0) {
3888
+ throw new Error("Empty value provided for input HTTP label: InstanceId.");
3889
+ }
3890
+ resolvedPath = resolvedPath.replace("{InstanceId}", __extendedEncodeURIComponent(labelValue));
3891
+ }
3892
+ else {
3893
+ throw new Error("No value provided for input HTTP label: InstanceId.");
3894
+ }
3895
+ if (input.ContactFlowId !== undefined) {
3896
+ labelValue = input.ContactFlowId;
3897
+ if (labelValue.length <= 0) {
3898
+ throw new Error("Empty value provided for input HTTP label: ContactFlowId.");
3899
+ }
3900
+ resolvedPath = resolvedPath.replace("{ContactFlowId}", __extendedEncodeURIComponent(labelValue));
3901
+ }
3902
+ else {
3903
+ throw new Error("No value provided for input HTTP label: ContactFlowId.");
3904
+ }
3905
+ body = JSON.stringify(__assign(__assign({}, (input.Description !== undefined && input.Description !== null && { Description: input.Description })), (input.Name !== undefined && input.Name !== null && { Name: input.Name })));
3906
+ return [2, new __HttpRequest({
3907
+ protocol: protocol,
3908
+ hostname: hostname,
3909
+ port: port,
3910
+ method: "POST",
3911
+ headers: headers,
3912
+ path: resolvedPath,
3913
+ body: body,
3914
+ })];
3915
+ }
3916
+ });
3917
+ }); };
3918
+ export var serializeAws_restJson1UpdateContactScheduleCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
3919
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
3920
+ return __generator(this, function (_c) {
3921
+ switch (_c.label) {
3922
+ case 0: return [4, context.endpoint()];
3923
+ case 1:
3924
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
3925
+ headers = {
3926
+ "content-type": "application/json",
3927
+ };
3928
+ resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/contact/schedule";
3929
+ body = JSON.stringify(__assign(__assign(__assign({}, (input.ContactId !== undefined && input.ContactId !== null && { ContactId: input.ContactId })), (input.InstanceId !== undefined && input.InstanceId !== null && { InstanceId: input.InstanceId })), (input.ScheduledTime !== undefined &&
3930
+ input.ScheduledTime !== null && { ScheduledTime: Math.round(input.ScheduledTime.getTime() / 1000) })));
3931
+ return [2, new __HttpRequest({
3932
+ protocol: protocol,
3933
+ hostname: hostname,
3934
+ port: port,
3935
+ method: "POST",
3936
+ headers: headers,
3937
+ path: resolvedPath,
3938
+ body: body,
3939
+ })];
3940
+ }
3941
+ });
3942
+ }); };
3943
+ export var serializeAws_restJson1UpdateHoursOfOperationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
3944
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
3945
+ return __generator(this, function (_c) {
3946
+ switch (_c.label) {
3947
+ case 0: return [4, context.endpoint()];
3948
+ case 1:
3949
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
3950
+ headers = {
3951
+ "content-type": "application/json",
3952
+ };
3953
+ resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
3954
+ "/hours-of-operations/{InstanceId}/{HoursOfOperationId}";
3955
+ if (input.InstanceId !== undefined) {
3956
+ labelValue = input.InstanceId;
3957
+ if (labelValue.length <= 0) {
3958
+ throw new Error("Empty value provided for input HTTP label: InstanceId.");
3959
+ }
3960
+ resolvedPath = resolvedPath.replace("{InstanceId}", __extendedEncodeURIComponent(labelValue));
3961
+ }
3962
+ else {
3963
+ throw new Error("No value provided for input HTTP label: InstanceId.");
3964
+ }
3965
+ if (input.HoursOfOperationId !== undefined) {
3966
+ labelValue = input.HoursOfOperationId;
3967
+ if (labelValue.length <= 0) {
3968
+ throw new Error("Empty value provided for input HTTP label: HoursOfOperationId.");
3969
+ }
3970
+ resolvedPath = resolvedPath.replace("{HoursOfOperationId}", __extendedEncodeURIComponent(labelValue));
3971
+ }
3972
+ else {
3973
+ throw new Error("No value provided for input HTTP label: HoursOfOperationId.");
3974
+ }
3975
+ body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.Config !== undefined &&
3976
+ input.Config !== null && { Config: serializeAws_restJson1HoursOfOperationConfigList(input.Config, context) })), (input.Description !== undefined && input.Description !== null && { Description: input.Description })), (input.Name !== undefined && input.Name !== null && { Name: input.Name })), (input.TimeZone !== undefined && input.TimeZone !== null && { TimeZone: input.TimeZone })));
3977
+ return [2, new __HttpRequest({
3978
+ protocol: protocol,
3979
+ hostname: hostname,
3980
+ port: port,
3981
+ method: "POST",
3982
+ headers: headers,
3983
+ path: resolvedPath,
3984
+ body: body,
3985
+ })];
3986
+ }
3987
+ });
3988
+ }); };
3989
+ export var serializeAws_restJson1UpdateInstanceAttributeCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
3990
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
3991
+ return __generator(this, function (_c) {
3992
+ switch (_c.label) {
3993
+ case 0: return [4, context.endpoint()];
3994
+ case 1:
3995
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
3996
+ headers = {
3997
+ "content-type": "application/json",
3998
+ };
3999
+ resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
4000
+ "/instance/{InstanceId}/attribute/{AttributeType}";
4001
+ if (input.InstanceId !== undefined) {
4002
+ labelValue = input.InstanceId;
4003
+ if (labelValue.length <= 0) {
4004
+ throw new Error("Empty value provided for input HTTP label: InstanceId.");
4005
+ }
4006
+ resolvedPath = resolvedPath.replace("{InstanceId}", __extendedEncodeURIComponent(labelValue));
4007
+ }
4008
+ else {
4009
+ throw new Error("No value provided for input HTTP label: InstanceId.");
4010
+ }
4011
+ if (input.AttributeType !== undefined) {
4012
+ labelValue = input.AttributeType;
4013
+ if (labelValue.length <= 0) {
4014
+ throw new Error("Empty value provided for input HTTP label: AttributeType.");
4015
+ }
4016
+ resolvedPath = resolvedPath.replace("{AttributeType}", __extendedEncodeURIComponent(labelValue));
4017
+ }
4018
+ else {
4019
+ throw new Error("No value provided for input HTTP label: AttributeType.");
4020
+ }
4021
+ body = JSON.stringify(__assign({}, (input.Value !== undefined && input.Value !== null && { Value: input.Value })));
4022
+ return [2, new __HttpRequest({
4023
+ protocol: protocol,
4024
+ hostname: hostname,
4025
+ port: port,
4026
+ method: "POST",
4027
+ headers: headers,
4028
+ path: resolvedPath,
4029
+ body: body,
4030
+ })];
4031
+ }
4032
+ });
4033
+ }); };
4034
+ export var serializeAws_restJson1UpdateInstanceStorageConfigCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
4035
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, query, body;
4036
+ return __generator(this, function (_c) {
4037
+ switch (_c.label) {
4038
+ case 0: return [4, context.endpoint()];
4039
+ case 1:
4040
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
4041
+ headers = {
4042
+ "content-type": "application/json",
4043
+ };
4044
+ resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
4045
+ "/instance/{InstanceId}/storage-config/{AssociationId}";
3341
4046
  if (input.InstanceId !== undefined) {
3342
4047
  labelValue = input.InstanceId;
3343
4048
  if (labelValue.length <= 0) {
@@ -3883,6 +4588,52 @@ export var serializeAws_restJson1UpdateRoutingProfileQueuesCommand = function (i
3883
4588
  }
3884
4589
  });
3885
4590
  }); };
4591
+ export var serializeAws_restJson1UpdateSecurityProfileCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
4592
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
4593
+ return __generator(this, function (_c) {
4594
+ switch (_c.label) {
4595
+ case 0: return [4, context.endpoint()];
4596
+ case 1:
4597
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
4598
+ headers = {
4599
+ "content-type": "application/json",
4600
+ };
4601
+ resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
4602
+ "/security-profiles/{InstanceId}/{SecurityProfileId}";
4603
+ if (input.SecurityProfileId !== undefined) {
4604
+ labelValue = input.SecurityProfileId;
4605
+ if (labelValue.length <= 0) {
4606
+ throw new Error("Empty value provided for input HTTP label: SecurityProfileId.");
4607
+ }
4608
+ resolvedPath = resolvedPath.replace("{SecurityProfileId}", __extendedEncodeURIComponent(labelValue));
4609
+ }
4610
+ else {
4611
+ throw new Error("No value provided for input HTTP label: SecurityProfileId.");
4612
+ }
4613
+ if (input.InstanceId !== undefined) {
4614
+ labelValue = input.InstanceId;
4615
+ if (labelValue.length <= 0) {
4616
+ throw new Error("Empty value provided for input HTTP label: InstanceId.");
4617
+ }
4618
+ resolvedPath = resolvedPath.replace("{InstanceId}", __extendedEncodeURIComponent(labelValue));
4619
+ }
4620
+ else {
4621
+ throw new Error("No value provided for input HTTP label: InstanceId.");
4622
+ }
4623
+ body = JSON.stringify(__assign(__assign({}, (input.Description !== undefined && input.Description !== null && { Description: input.Description })), (input.Permissions !== undefined &&
4624
+ input.Permissions !== null && { Permissions: serializeAws_restJson1PermissionsList(input.Permissions, context) })));
4625
+ return [2, new __HttpRequest({
4626
+ protocol: protocol,
4627
+ hostname: hostname,
4628
+ port: port,
4629
+ method: "POST",
4630
+ headers: headers,
4631
+ path: resolvedPath,
4632
+ body: body,
4633
+ })];
4634
+ }
4635
+ });
4636
+ }); };
3886
4637
  export var serializeAws_restJson1UpdateUserHierarchyCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
3887
4638
  var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
3888
4639
  return __generator(this, function (_c) {
@@ -5245,107 +5996,245 @@ var deserializeAws_restJson1CreateContactFlowCommandError = function (output, co
5245
5996
  }
5246
5997
  });
5247
5998
  }); };
5248
- export var deserializeAws_restJson1CreateHoursOfOperationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
5999
+ export var deserializeAws_restJson1CreateContactFlowModuleCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
5249
6000
  var contents, data, _a, _b;
5250
6001
  return __generator(this, function (_c) {
5251
6002
  switch (_c.label) {
5252
6003
  case 0:
5253
6004
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5254
- return [2, deserializeAws_restJson1CreateHoursOfOperationCommandError(output, context)];
6005
+ return [2, deserializeAws_restJson1CreateContactFlowModuleCommandError(output, context)];
5255
6006
  }
5256
6007
  contents = {
5257
6008
  $metadata: deserializeMetadata(output),
5258
- HoursOfOperationArn: undefined,
5259
- HoursOfOperationId: undefined,
6009
+ Arn: undefined,
6010
+ Id: undefined,
5260
6011
  };
5261
6012
  _a = __expectNonNull;
5262
6013
  _b = __expectObject;
5263
6014
  return [4, parseBody(output.body, context)];
5264
6015
  case 1:
5265
6016
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
5266
- if (data.HoursOfOperationArn !== undefined && data.HoursOfOperationArn !== null) {
5267
- contents.HoursOfOperationArn = __expectString(data.HoursOfOperationArn);
6017
+ if (data.Arn !== undefined && data.Arn !== null) {
6018
+ contents.Arn = __expectString(data.Arn);
5268
6019
  }
5269
- if (data.HoursOfOperationId !== undefined && data.HoursOfOperationId !== null) {
5270
- contents.HoursOfOperationId = __expectString(data.HoursOfOperationId);
6020
+ if (data.Id !== undefined && data.Id !== null) {
6021
+ contents.Id = __expectString(data.Id);
5271
6022
  }
5272
6023
  return [2, Promise.resolve(contents)];
5273
6024
  }
5274
6025
  });
5275
6026
  }); };
5276
- var deserializeAws_restJson1CreateHoursOfOperationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
5277
- var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, _j, parsedBody, message;
5278
- var _k;
5279
- return __generator(this, function (_l) {
5280
- switch (_l.label) {
6027
+ var deserializeAws_restJson1CreateContactFlowModuleCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
6028
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, parsedBody, message;
6029
+ var _o;
6030
+ return __generator(this, function (_p) {
6031
+ switch (_p.label) {
5281
6032
  case 0:
5282
6033
  _a = [__assign({}, output)];
5283
- _k = {};
6034
+ _o = {};
5284
6035
  return [4, parseBody(output.body, context)];
5285
6036
  case 1:
5286
- parsedOutput = __assign.apply(void 0, _a.concat([(_k.body = _l.sent(), _k)]));
6037
+ parsedOutput = __assign.apply(void 0, _a.concat([(_o.body = _p.sent(), _o)]));
5287
6038
  errorCode = "UnknownError";
5288
6039
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5289
6040
  _b = errorCode;
5290
6041
  switch (_b) {
5291
- case "DuplicateResourceException": return [3, 2];
5292
- case "com.amazonaws.connect#DuplicateResourceException": return [3, 2];
5293
- case "InternalServiceException": return [3, 4];
5294
- case "com.amazonaws.connect#InternalServiceException": return [3, 4];
5295
- case "InvalidParameterException": return [3, 6];
5296
- case "com.amazonaws.connect#InvalidParameterException": return [3, 6];
5297
- case "InvalidRequestException": return [3, 8];
5298
- case "com.amazonaws.connect#InvalidRequestException": return [3, 8];
5299
- case "LimitExceededException": return [3, 10];
5300
- case "com.amazonaws.connect#LimitExceededException": return [3, 10];
5301
- case "ResourceNotFoundException": return [3, 12];
5302
- case "com.amazonaws.connect#ResourceNotFoundException": return [3, 12];
5303
- case "ThrottlingException": return [3, 14];
5304
- case "com.amazonaws.connect#ThrottlingException": return [3, 14];
5305
- }
5306
- return [3, 16];
6042
+ case "AccessDeniedException": return [3, 2];
6043
+ case "com.amazonaws.connect#AccessDeniedException": return [3, 2];
6044
+ case "DuplicateResourceException": return [3, 4];
6045
+ case "com.amazonaws.connect#DuplicateResourceException": return [3, 4];
6046
+ case "IdempotencyException": return [3, 6];
6047
+ case "com.amazonaws.connect#IdempotencyException": return [3, 6];
6048
+ case "InternalServiceException": return [3, 8];
6049
+ case "com.amazonaws.connect#InternalServiceException": return [3, 8];
6050
+ case "InvalidContactFlowModuleException": return [3, 10];
6051
+ case "com.amazonaws.connect#InvalidContactFlowModuleException": return [3, 10];
6052
+ case "InvalidParameterException": return [3, 12];
6053
+ case "com.amazonaws.connect#InvalidParameterException": return [3, 12];
6054
+ case "InvalidRequestException": return [3, 14];
6055
+ case "com.amazonaws.connect#InvalidRequestException": return [3, 14];
6056
+ case "LimitExceededException": return [3, 16];
6057
+ case "com.amazonaws.connect#LimitExceededException": return [3, 16];
6058
+ case "ResourceNotFoundException": return [3, 18];
6059
+ case "com.amazonaws.connect#ResourceNotFoundException": return [3, 18];
6060
+ case "ThrottlingException": return [3, 20];
6061
+ case "com.amazonaws.connect#ThrottlingException": return [3, 20];
6062
+ }
6063
+ return [3, 22];
5307
6064
  case 2:
5308
6065
  _c = [{}];
5309
- return [4, deserializeAws_restJson1DuplicateResourceExceptionResponse(parsedOutput, context)];
6066
+ return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
5310
6067
  case 3:
5311
- response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
5312
- return [3, 17];
6068
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
6069
+ return [3, 23];
5313
6070
  case 4:
5314
6071
  _d = [{}];
5315
- return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
6072
+ return [4, deserializeAws_restJson1DuplicateResourceExceptionResponse(parsedOutput, context)];
5316
6073
  case 5:
5317
- response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
5318
- return [3, 17];
6074
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
6075
+ return [3, 23];
5319
6076
  case 6:
5320
6077
  _e = [{}];
5321
- return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
6078
+ return [4, deserializeAws_restJson1IdempotencyExceptionResponse(parsedOutput, context)];
5322
6079
  case 7:
5323
- response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
5324
- return [3, 17];
6080
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
6081
+ return [3, 23];
5325
6082
  case 8:
5326
6083
  _f = [{}];
5327
- return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
6084
+ return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
5328
6085
  case 9:
5329
- response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
5330
- return [3, 17];
6086
+ response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
6087
+ return [3, 23];
5331
6088
  case 10:
5332
6089
  _g = [{}];
5333
- return [4, deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)];
6090
+ return [4, deserializeAws_restJson1InvalidContactFlowModuleExceptionResponse(parsedOutput, context)];
5334
6091
  case 11:
5335
- response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
5336
- return [3, 17];
6092
+ response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
6093
+ return [3, 23];
5337
6094
  case 12:
5338
6095
  _h = [{}];
5339
- return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
6096
+ return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
5340
6097
  case 13:
5341
- response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
5342
- return [3, 17];
6098
+ response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
6099
+ return [3, 23];
5343
6100
  case 14:
5344
6101
  _j = [{}];
5345
- return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
6102
+ return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
5346
6103
  case 15:
5347
- response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
5348
- return [3, 17];
6104
+ response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
6105
+ return [3, 23];
6106
+ case 16:
6107
+ _k = [{}];
6108
+ return [4, deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)];
6109
+ case 17:
6110
+ response = __assign.apply(void 0, [__assign.apply(void 0, _k.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
6111
+ return [3, 23];
6112
+ case 18:
6113
+ _l = [{}];
6114
+ return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
6115
+ case 19:
6116
+ response = __assign.apply(void 0, [__assign.apply(void 0, _l.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
6117
+ return [3, 23];
6118
+ case 20:
6119
+ _m = [{}];
6120
+ return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
6121
+ case 21:
6122
+ response = __assign.apply(void 0, [__assign.apply(void 0, _m.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
6123
+ return [3, 23];
6124
+ case 22:
6125
+ parsedBody = parsedOutput.body;
6126
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
6127
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
6128
+ _p.label = 23;
6129
+ case 23:
6130
+ message = response.message || response.Message || errorCode;
6131
+ response.message = message;
6132
+ delete response.Message;
6133
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
6134
+ }
6135
+ });
6136
+ }); };
6137
+ export var deserializeAws_restJson1CreateHoursOfOperationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
6138
+ var contents, data, _a, _b;
6139
+ return __generator(this, function (_c) {
6140
+ switch (_c.label) {
6141
+ case 0:
6142
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
6143
+ return [2, deserializeAws_restJson1CreateHoursOfOperationCommandError(output, context)];
6144
+ }
6145
+ contents = {
6146
+ $metadata: deserializeMetadata(output),
6147
+ HoursOfOperationArn: undefined,
6148
+ HoursOfOperationId: undefined,
6149
+ };
6150
+ _a = __expectNonNull;
6151
+ _b = __expectObject;
6152
+ return [4, parseBody(output.body, context)];
6153
+ case 1:
6154
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
6155
+ if (data.HoursOfOperationArn !== undefined && data.HoursOfOperationArn !== null) {
6156
+ contents.HoursOfOperationArn = __expectString(data.HoursOfOperationArn);
6157
+ }
6158
+ if (data.HoursOfOperationId !== undefined && data.HoursOfOperationId !== null) {
6159
+ contents.HoursOfOperationId = __expectString(data.HoursOfOperationId);
6160
+ }
6161
+ return [2, Promise.resolve(contents)];
6162
+ }
6163
+ });
6164
+ }); };
6165
+ var deserializeAws_restJson1CreateHoursOfOperationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
6166
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, _j, parsedBody, message;
6167
+ var _k;
6168
+ return __generator(this, function (_l) {
6169
+ switch (_l.label) {
6170
+ case 0:
6171
+ _a = [__assign({}, output)];
6172
+ _k = {};
6173
+ return [4, parseBody(output.body, context)];
6174
+ case 1:
6175
+ parsedOutput = __assign.apply(void 0, _a.concat([(_k.body = _l.sent(), _k)]));
6176
+ errorCode = "UnknownError";
6177
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6178
+ _b = errorCode;
6179
+ switch (_b) {
6180
+ case "DuplicateResourceException": return [3, 2];
6181
+ case "com.amazonaws.connect#DuplicateResourceException": return [3, 2];
6182
+ case "InternalServiceException": return [3, 4];
6183
+ case "com.amazonaws.connect#InternalServiceException": return [3, 4];
6184
+ case "InvalidParameterException": return [3, 6];
6185
+ case "com.amazonaws.connect#InvalidParameterException": return [3, 6];
6186
+ case "InvalidRequestException": return [3, 8];
6187
+ case "com.amazonaws.connect#InvalidRequestException": return [3, 8];
6188
+ case "LimitExceededException": return [3, 10];
6189
+ case "com.amazonaws.connect#LimitExceededException": return [3, 10];
6190
+ case "ResourceNotFoundException": return [3, 12];
6191
+ case "com.amazonaws.connect#ResourceNotFoundException": return [3, 12];
6192
+ case "ThrottlingException": return [3, 14];
6193
+ case "com.amazonaws.connect#ThrottlingException": return [3, 14];
6194
+ }
6195
+ return [3, 16];
6196
+ case 2:
6197
+ _c = [{}];
6198
+ return [4, deserializeAws_restJson1DuplicateResourceExceptionResponse(parsedOutput, context)];
6199
+ case 3:
6200
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
6201
+ return [3, 17];
6202
+ case 4:
6203
+ _d = [{}];
6204
+ return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
6205
+ case 5:
6206
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
6207
+ return [3, 17];
6208
+ case 6:
6209
+ _e = [{}];
6210
+ return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
6211
+ case 7:
6212
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
6213
+ return [3, 17];
6214
+ case 8:
6215
+ _f = [{}];
6216
+ return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
6217
+ case 9:
6218
+ response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
6219
+ return [3, 17];
6220
+ case 10:
6221
+ _g = [{}];
6222
+ return [4, deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)];
6223
+ case 11:
6224
+ response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
6225
+ return [3, 17];
6226
+ case 12:
6227
+ _h = [{}];
6228
+ return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
6229
+ case 13:
6230
+ response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
6231
+ return [3, 17];
6232
+ case 14:
6233
+ _j = [{}];
6234
+ return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
6235
+ case 15:
6236
+ response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
6237
+ return [3, 17];
5349
6238
  case 16:
5350
6239
  parsedBody = parsedOutput.body;
5351
6240
  errorCode = parsedBody.code || parsedBody.Code || errorCode;
@@ -5897,6 +6786,120 @@ var deserializeAws_restJson1CreateRoutingProfileCommandError = function (output,
5897
6786
  }
5898
6787
  });
5899
6788
  }); };
6789
+ export var deserializeAws_restJson1CreateSecurityProfileCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
6790
+ var contents, data, _a, _b;
6791
+ return __generator(this, function (_c) {
6792
+ switch (_c.label) {
6793
+ case 0:
6794
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
6795
+ return [2, deserializeAws_restJson1CreateSecurityProfileCommandError(output, context)];
6796
+ }
6797
+ contents = {
6798
+ $metadata: deserializeMetadata(output),
6799
+ SecurityProfileArn: undefined,
6800
+ SecurityProfileId: undefined,
6801
+ };
6802
+ _a = __expectNonNull;
6803
+ _b = __expectObject;
6804
+ return [4, parseBody(output.body, context)];
6805
+ case 1:
6806
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
6807
+ if (data.SecurityProfileArn !== undefined && data.SecurityProfileArn !== null) {
6808
+ contents.SecurityProfileArn = __expectString(data.SecurityProfileArn);
6809
+ }
6810
+ if (data.SecurityProfileId !== undefined && data.SecurityProfileId !== null) {
6811
+ contents.SecurityProfileId = __expectString(data.SecurityProfileId);
6812
+ }
6813
+ return [2, Promise.resolve(contents)];
6814
+ }
6815
+ });
6816
+ }); };
6817
+ var deserializeAws_restJson1CreateSecurityProfileCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
6818
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, _j, parsedBody, message;
6819
+ var _k;
6820
+ return __generator(this, function (_l) {
6821
+ switch (_l.label) {
6822
+ case 0:
6823
+ _a = [__assign({}, output)];
6824
+ _k = {};
6825
+ return [4, parseBody(output.body, context)];
6826
+ case 1:
6827
+ parsedOutput = __assign.apply(void 0, _a.concat([(_k.body = _l.sent(), _k)]));
6828
+ errorCode = "UnknownError";
6829
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6830
+ _b = errorCode;
6831
+ switch (_b) {
6832
+ case "DuplicateResourceException": return [3, 2];
6833
+ case "com.amazonaws.connect#DuplicateResourceException": return [3, 2];
6834
+ case "InternalServiceException": return [3, 4];
6835
+ case "com.amazonaws.connect#InternalServiceException": return [3, 4];
6836
+ case "InvalidParameterException": return [3, 6];
6837
+ case "com.amazonaws.connect#InvalidParameterException": return [3, 6];
6838
+ case "InvalidRequestException": return [3, 8];
6839
+ case "com.amazonaws.connect#InvalidRequestException": return [3, 8];
6840
+ case "LimitExceededException": return [3, 10];
6841
+ case "com.amazonaws.connect#LimitExceededException": return [3, 10];
6842
+ case "ResourceNotFoundException": return [3, 12];
6843
+ case "com.amazonaws.connect#ResourceNotFoundException": return [3, 12];
6844
+ case "ThrottlingException": return [3, 14];
6845
+ case "com.amazonaws.connect#ThrottlingException": return [3, 14];
6846
+ }
6847
+ return [3, 16];
6848
+ case 2:
6849
+ _c = [{}];
6850
+ return [4, deserializeAws_restJson1DuplicateResourceExceptionResponse(parsedOutput, context)];
6851
+ case 3:
6852
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
6853
+ return [3, 17];
6854
+ case 4:
6855
+ _d = [{}];
6856
+ return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
6857
+ case 5:
6858
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
6859
+ return [3, 17];
6860
+ case 6:
6861
+ _e = [{}];
6862
+ return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
6863
+ case 7:
6864
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
6865
+ return [3, 17];
6866
+ case 8:
6867
+ _f = [{}];
6868
+ return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
6869
+ case 9:
6870
+ response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
6871
+ return [3, 17];
6872
+ case 10:
6873
+ _g = [{}];
6874
+ return [4, deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)];
6875
+ case 11:
6876
+ response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
6877
+ return [3, 17];
6878
+ case 12:
6879
+ _h = [{}];
6880
+ return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
6881
+ case 13:
6882
+ response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
6883
+ return [3, 17];
6884
+ case 14:
6885
+ _j = [{}];
6886
+ return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
6887
+ case 15:
6888
+ response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
6889
+ return [3, 17];
6890
+ case 16:
6891
+ parsedBody = parsedOutput.body;
6892
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
6893
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
6894
+ _l.label = 17;
6895
+ case 17:
6896
+ message = response.message || response.Message || errorCode;
6897
+ response.message = message;
6898
+ delete response.Message;
6899
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
6900
+ }
6901
+ });
6902
+ }); };
5900
6903
  export var deserializeAws_restJson1CreateUseCaseCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
5901
6904
  var contents, data, _a, _b;
5902
6905
  return __generator(this, function (_c) {
@@ -6223,13 +7226,13 @@ var deserializeAws_restJson1CreateUserHierarchyGroupCommandError = function (out
6223
7226
  }
6224
7227
  });
6225
7228
  }); };
6226
- export var deserializeAws_restJson1DeleteHoursOfOperationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
7229
+ export var deserializeAws_restJson1DeleteContactFlowCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
6227
7230
  var contents;
6228
7231
  return __generator(this, function (_a) {
6229
7232
  switch (_a.label) {
6230
7233
  case 0:
6231
7234
  if (output.statusCode !== 200 && output.statusCode >= 300) {
6232
- return [2, deserializeAws_restJson1DeleteHoursOfOperationCommandError(output, context)];
7235
+ return [2, deserializeAws_restJson1DeleteContactFlowCommandError(output, context)];
6233
7236
  }
6234
7237
  contents = {
6235
7238
  $metadata: deserializeMetadata(output),
@@ -6241,38 +7244,230 @@ export var deserializeAws_restJson1DeleteHoursOfOperationCommand = function (out
6241
7244
  }
6242
7245
  });
6243
7246
  }); };
6244
- var deserializeAws_restJson1DeleteHoursOfOperationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
6245
- var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
6246
- var _h;
6247
- return __generator(this, function (_j) {
6248
- switch (_j.label) {
7247
+ var deserializeAws_restJson1DeleteContactFlowCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
7248
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, parsedBody, message;
7249
+ var _j;
7250
+ return __generator(this, function (_k) {
7251
+ switch (_k.label) {
6249
7252
  case 0:
6250
7253
  _a = [__assign({}, output)];
6251
- _h = {};
7254
+ _j = {};
6252
7255
  return [4, parseBody(output.body, context)];
6253
7256
  case 1:
6254
- parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
7257
+ parsedOutput = __assign.apply(void 0, _a.concat([(_j.body = _k.sent(), _j)]));
6255
7258
  errorCode = "UnknownError";
6256
7259
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6257
7260
  _b = errorCode;
6258
7261
  switch (_b) {
6259
- case "InternalServiceException": return [3, 2];
6260
- case "com.amazonaws.connect#InternalServiceException": return [3, 2];
6261
- case "InvalidParameterException": return [3, 4];
6262
- case "com.amazonaws.connect#InvalidParameterException": return [3, 4];
6263
- case "InvalidRequestException": return [3, 6];
6264
- case "com.amazonaws.connect#InvalidRequestException": return [3, 6];
6265
- case "ResourceNotFoundException": return [3, 8];
6266
- case "com.amazonaws.connect#ResourceNotFoundException": return [3, 8];
6267
- case "ThrottlingException": return [3, 10];
6268
- case "com.amazonaws.connect#ThrottlingException": return [3, 10];
6269
- }
6270
- return [3, 12];
6271
- case 2:
6272
- _c = [{}];
6273
- return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
6274
- case 3:
6275
- response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
7262
+ case "AccessDeniedException": return [3, 2];
7263
+ case "com.amazonaws.connect#AccessDeniedException": return [3, 2];
7264
+ case "InternalServiceException": return [3, 4];
7265
+ case "com.amazonaws.connect#InternalServiceException": return [3, 4];
7266
+ case "InvalidParameterException": return [3, 6];
7267
+ case "com.amazonaws.connect#InvalidParameterException": return [3, 6];
7268
+ case "InvalidRequestException": return [3, 8];
7269
+ case "com.amazonaws.connect#InvalidRequestException": return [3, 8];
7270
+ case "ResourceNotFoundException": return [3, 10];
7271
+ case "com.amazonaws.connect#ResourceNotFoundException": return [3, 10];
7272
+ case "ThrottlingException": return [3, 12];
7273
+ case "com.amazonaws.connect#ThrottlingException": return [3, 12];
7274
+ }
7275
+ return [3, 14];
7276
+ case 2:
7277
+ _c = [{}];
7278
+ return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
7279
+ case 3:
7280
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
7281
+ return [3, 15];
7282
+ case 4:
7283
+ _d = [{}];
7284
+ return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
7285
+ case 5:
7286
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
7287
+ return [3, 15];
7288
+ case 6:
7289
+ _e = [{}];
7290
+ return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
7291
+ case 7:
7292
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
7293
+ return [3, 15];
7294
+ case 8:
7295
+ _f = [{}];
7296
+ return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
7297
+ case 9:
7298
+ response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
7299
+ return [3, 15];
7300
+ case 10:
7301
+ _g = [{}];
7302
+ return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
7303
+ case 11:
7304
+ response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
7305
+ return [3, 15];
7306
+ case 12:
7307
+ _h = [{}];
7308
+ return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
7309
+ case 13:
7310
+ response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
7311
+ return [3, 15];
7312
+ case 14:
7313
+ parsedBody = parsedOutput.body;
7314
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
7315
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
7316
+ _k.label = 15;
7317
+ case 15:
7318
+ message = response.message || response.Message || errorCode;
7319
+ response.message = message;
7320
+ delete response.Message;
7321
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
7322
+ }
7323
+ });
7324
+ }); };
7325
+ export var deserializeAws_restJson1DeleteContactFlowModuleCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
7326
+ var contents;
7327
+ return __generator(this, function (_a) {
7328
+ switch (_a.label) {
7329
+ case 0:
7330
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
7331
+ return [2, deserializeAws_restJson1DeleteContactFlowModuleCommandError(output, context)];
7332
+ }
7333
+ contents = {
7334
+ $metadata: deserializeMetadata(output),
7335
+ };
7336
+ return [4, collectBody(output.body, context)];
7337
+ case 1:
7338
+ _a.sent();
7339
+ return [2, Promise.resolve(contents)];
7340
+ }
7341
+ });
7342
+ }); };
7343
+ var deserializeAws_restJson1DeleteContactFlowModuleCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
7344
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, parsedBody, message;
7345
+ var _j;
7346
+ return __generator(this, function (_k) {
7347
+ switch (_k.label) {
7348
+ case 0:
7349
+ _a = [__assign({}, output)];
7350
+ _j = {};
7351
+ return [4, parseBody(output.body, context)];
7352
+ case 1:
7353
+ parsedOutput = __assign.apply(void 0, _a.concat([(_j.body = _k.sent(), _j)]));
7354
+ errorCode = "UnknownError";
7355
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
7356
+ _b = errorCode;
7357
+ switch (_b) {
7358
+ case "AccessDeniedException": return [3, 2];
7359
+ case "com.amazonaws.connect#AccessDeniedException": return [3, 2];
7360
+ case "InternalServiceException": return [3, 4];
7361
+ case "com.amazonaws.connect#InternalServiceException": return [3, 4];
7362
+ case "InvalidParameterException": return [3, 6];
7363
+ case "com.amazonaws.connect#InvalidParameterException": return [3, 6];
7364
+ case "InvalidRequestException": return [3, 8];
7365
+ case "com.amazonaws.connect#InvalidRequestException": return [3, 8];
7366
+ case "ResourceNotFoundException": return [3, 10];
7367
+ case "com.amazonaws.connect#ResourceNotFoundException": return [3, 10];
7368
+ case "ThrottlingException": return [3, 12];
7369
+ case "com.amazonaws.connect#ThrottlingException": return [3, 12];
7370
+ }
7371
+ return [3, 14];
7372
+ case 2:
7373
+ _c = [{}];
7374
+ return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
7375
+ case 3:
7376
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
7377
+ return [3, 15];
7378
+ case 4:
7379
+ _d = [{}];
7380
+ return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
7381
+ case 5:
7382
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
7383
+ return [3, 15];
7384
+ case 6:
7385
+ _e = [{}];
7386
+ return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
7387
+ case 7:
7388
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
7389
+ return [3, 15];
7390
+ case 8:
7391
+ _f = [{}];
7392
+ return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
7393
+ case 9:
7394
+ response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
7395
+ return [3, 15];
7396
+ case 10:
7397
+ _g = [{}];
7398
+ return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
7399
+ case 11:
7400
+ response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
7401
+ return [3, 15];
7402
+ case 12:
7403
+ _h = [{}];
7404
+ return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
7405
+ case 13:
7406
+ response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
7407
+ return [3, 15];
7408
+ case 14:
7409
+ parsedBody = parsedOutput.body;
7410
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
7411
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
7412
+ _k.label = 15;
7413
+ case 15:
7414
+ message = response.message || response.Message || errorCode;
7415
+ response.message = message;
7416
+ delete response.Message;
7417
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
7418
+ }
7419
+ });
7420
+ }); };
7421
+ export var deserializeAws_restJson1DeleteHoursOfOperationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
7422
+ var contents;
7423
+ return __generator(this, function (_a) {
7424
+ switch (_a.label) {
7425
+ case 0:
7426
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
7427
+ return [2, deserializeAws_restJson1DeleteHoursOfOperationCommandError(output, context)];
7428
+ }
7429
+ contents = {
7430
+ $metadata: deserializeMetadata(output),
7431
+ };
7432
+ return [4, collectBody(output.body, context)];
7433
+ case 1:
7434
+ _a.sent();
7435
+ return [2, Promise.resolve(contents)];
7436
+ }
7437
+ });
7438
+ }); };
7439
+ var deserializeAws_restJson1DeleteHoursOfOperationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
7440
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
7441
+ var _h;
7442
+ return __generator(this, function (_j) {
7443
+ switch (_j.label) {
7444
+ case 0:
7445
+ _a = [__assign({}, output)];
7446
+ _h = {};
7447
+ return [4, parseBody(output.body, context)];
7448
+ case 1:
7449
+ parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
7450
+ errorCode = "UnknownError";
7451
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
7452
+ _b = errorCode;
7453
+ switch (_b) {
7454
+ case "InternalServiceException": return [3, 2];
7455
+ case "com.amazonaws.connect#InternalServiceException": return [3, 2];
7456
+ case "InvalidParameterException": return [3, 4];
7457
+ case "com.amazonaws.connect#InvalidParameterException": return [3, 4];
7458
+ case "InvalidRequestException": return [3, 6];
7459
+ case "com.amazonaws.connect#InvalidRequestException": return [3, 6];
7460
+ case "ResourceNotFoundException": return [3, 8];
7461
+ case "com.amazonaws.connect#ResourceNotFoundException": return [3, 8];
7462
+ case "ThrottlingException": return [3, 10];
7463
+ case "com.amazonaws.connect#ThrottlingException": return [3, 10];
7464
+ }
7465
+ return [3, 12];
7466
+ case 2:
7467
+ _c = [{}];
7468
+ return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
7469
+ case 3:
7470
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
6276
7471
  return [3, 13];
6277
7472
  case 4:
6278
7473
  _d = [{}];
@@ -6551,13 +7746,13 @@ var deserializeAws_restJson1DeleteQuickConnectCommandError = function (output, c
6551
7746
  }
6552
7747
  });
6553
7748
  }); };
6554
- export var deserializeAws_restJson1DeleteUseCaseCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
7749
+ export var deserializeAws_restJson1DeleteSecurityProfileCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
6555
7750
  var contents;
6556
7751
  return __generator(this, function (_a) {
6557
7752
  switch (_a.label) {
6558
7753
  case 0:
6559
7754
  if (output.statusCode !== 200 && output.statusCode >= 300) {
6560
- return [2, deserializeAws_restJson1DeleteUseCaseCommandError(output, context)];
7755
+ return [2, deserializeAws_restJson1DeleteSecurityProfileCommandError(output, context)];
6561
7756
  }
6562
7757
  contents = {
6563
7758
  $metadata: deserializeMetadata(output),
@@ -6569,55 +7764,159 @@ export var deserializeAws_restJson1DeleteUseCaseCommand = function (output, cont
6569
7764
  }
6570
7765
  });
6571
7766
  }); };
6572
- var deserializeAws_restJson1DeleteUseCaseCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
6573
- var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
6574
- var _g;
6575
- return __generator(this, function (_h) {
6576
- switch (_h.label) {
7767
+ var deserializeAws_restJson1DeleteSecurityProfileCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
7768
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, _j, parsedBody, message;
7769
+ var _k;
7770
+ return __generator(this, function (_l) {
7771
+ switch (_l.label) {
6577
7772
  case 0:
6578
7773
  _a = [__assign({}, output)];
6579
- _g = {};
7774
+ _k = {};
6580
7775
  return [4, parseBody(output.body, context)];
6581
7776
  case 1:
6582
- parsedOutput = __assign.apply(void 0, _a.concat([(_g.body = _h.sent(), _g)]));
7777
+ parsedOutput = __assign.apply(void 0, _a.concat([(_k.body = _l.sent(), _k)]));
6583
7778
  errorCode = "UnknownError";
6584
7779
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6585
7780
  _b = errorCode;
6586
7781
  switch (_b) {
6587
- case "InternalServiceException": return [3, 2];
6588
- case "com.amazonaws.connect#InternalServiceException": return [3, 2];
6589
- case "InvalidRequestException": return [3, 4];
6590
- case "com.amazonaws.connect#InvalidRequestException": return [3, 4];
6591
- case "ResourceNotFoundException": return [3, 6];
6592
- case "com.amazonaws.connect#ResourceNotFoundException": return [3, 6];
6593
- case "ThrottlingException": return [3, 8];
6594
- case "com.amazonaws.connect#ThrottlingException": return [3, 8];
7782
+ case "AccessDeniedException": return [3, 2];
7783
+ case "com.amazonaws.connect#AccessDeniedException": return [3, 2];
7784
+ case "InternalServiceException": return [3, 4];
7785
+ case "com.amazonaws.connect#InternalServiceException": return [3, 4];
7786
+ case "InvalidParameterException": return [3, 6];
7787
+ case "com.amazonaws.connect#InvalidParameterException": return [3, 6];
7788
+ case "InvalidRequestException": return [3, 8];
7789
+ case "com.amazonaws.connect#InvalidRequestException": return [3, 8];
7790
+ case "ResourceInUseException": return [3, 10];
7791
+ case "com.amazonaws.connect#ResourceInUseException": return [3, 10];
7792
+ case "ResourceNotFoundException": return [3, 12];
7793
+ case "com.amazonaws.connect#ResourceNotFoundException": return [3, 12];
7794
+ case "ThrottlingException": return [3, 14];
7795
+ case "com.amazonaws.connect#ThrottlingException": return [3, 14];
6595
7796
  }
6596
- return [3, 10];
7797
+ return [3, 16];
6597
7798
  case 2:
6598
7799
  _c = [{}];
6599
- return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
7800
+ return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
6600
7801
  case 3:
6601
- response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
6602
- return [3, 11];
7802
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
7803
+ return [3, 17];
6603
7804
  case 4:
6604
7805
  _d = [{}];
6605
- return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
7806
+ return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
6606
7807
  case 5:
6607
- response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
6608
- return [3, 11];
7808
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
7809
+ return [3, 17];
6609
7810
  case 6:
6610
7811
  _e = [{}];
6611
- return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
7812
+ return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
6612
7813
  case 7:
6613
- response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
6614
- return [3, 11];
7814
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
7815
+ return [3, 17];
6615
7816
  case 8:
6616
7817
  _f = [{}];
6617
- return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
7818
+ return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
6618
7819
  case 9:
6619
- response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
6620
- return [3, 11];
7820
+ response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
7821
+ return [3, 17];
7822
+ case 10:
7823
+ _g = [{}];
7824
+ return [4, deserializeAws_restJson1ResourceInUseExceptionResponse(parsedOutput, context)];
7825
+ case 11:
7826
+ response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
7827
+ return [3, 17];
7828
+ case 12:
7829
+ _h = [{}];
7830
+ return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
7831
+ case 13:
7832
+ response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
7833
+ return [3, 17];
7834
+ case 14:
7835
+ _j = [{}];
7836
+ return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
7837
+ case 15:
7838
+ response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
7839
+ return [3, 17];
7840
+ case 16:
7841
+ parsedBody = parsedOutput.body;
7842
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
7843
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
7844
+ _l.label = 17;
7845
+ case 17:
7846
+ message = response.message || response.Message || errorCode;
7847
+ response.message = message;
7848
+ delete response.Message;
7849
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
7850
+ }
7851
+ });
7852
+ }); };
7853
+ export var deserializeAws_restJson1DeleteUseCaseCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
7854
+ var contents;
7855
+ return __generator(this, function (_a) {
7856
+ switch (_a.label) {
7857
+ case 0:
7858
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
7859
+ return [2, deserializeAws_restJson1DeleteUseCaseCommandError(output, context)];
7860
+ }
7861
+ contents = {
7862
+ $metadata: deserializeMetadata(output),
7863
+ };
7864
+ return [4, collectBody(output.body, context)];
7865
+ case 1:
7866
+ _a.sent();
7867
+ return [2, Promise.resolve(contents)];
7868
+ }
7869
+ });
7870
+ }); };
7871
+ var deserializeAws_restJson1DeleteUseCaseCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
7872
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
7873
+ var _g;
7874
+ return __generator(this, function (_h) {
7875
+ switch (_h.label) {
7876
+ case 0:
7877
+ _a = [__assign({}, output)];
7878
+ _g = {};
7879
+ return [4, parseBody(output.body, context)];
7880
+ case 1:
7881
+ parsedOutput = __assign.apply(void 0, _a.concat([(_g.body = _h.sent(), _g)]));
7882
+ errorCode = "UnknownError";
7883
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
7884
+ _b = errorCode;
7885
+ switch (_b) {
7886
+ case "InternalServiceException": return [3, 2];
7887
+ case "com.amazonaws.connect#InternalServiceException": return [3, 2];
7888
+ case "InvalidRequestException": return [3, 4];
7889
+ case "com.amazonaws.connect#InvalidRequestException": return [3, 4];
7890
+ case "ResourceNotFoundException": return [3, 6];
7891
+ case "com.amazonaws.connect#ResourceNotFoundException": return [3, 6];
7892
+ case "ThrottlingException": return [3, 8];
7893
+ case "com.amazonaws.connect#ThrottlingException": return [3, 8];
7894
+ }
7895
+ return [3, 10];
7896
+ case 2:
7897
+ _c = [{}];
7898
+ return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
7899
+ case 3:
7900
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
7901
+ return [3, 11];
7902
+ case 4:
7903
+ _d = [{}];
7904
+ return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
7905
+ case 5:
7906
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
7907
+ return [3, 11];
7908
+ case 6:
7909
+ _e = [{}];
7910
+ return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
7911
+ case 7:
7912
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
7913
+ return [3, 11];
7914
+ case 8:
7915
+ _f = [{}];
7916
+ return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
7917
+ case 9:
7918
+ response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
7919
+ return [3, 11];
6621
7920
  case 10:
6622
7921
  parsedBody = parsedOutput.body;
6623
7922
  errorCode = parsedBody.code || parsedBody.Code || errorCode;
@@ -6909,6 +8208,100 @@ var deserializeAws_restJson1DescribeAgentStatusCommandError = function (output,
6909
8208
  }
6910
8209
  });
6911
8210
  }); };
8211
+ export var deserializeAws_restJson1DescribeContactCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
8212
+ var contents, data, _a, _b;
8213
+ return __generator(this, function (_c) {
8214
+ switch (_c.label) {
8215
+ case 0:
8216
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
8217
+ return [2, deserializeAws_restJson1DescribeContactCommandError(output, context)];
8218
+ }
8219
+ contents = {
8220
+ $metadata: deserializeMetadata(output),
8221
+ Contact: undefined,
8222
+ };
8223
+ _a = __expectNonNull;
8224
+ _b = __expectObject;
8225
+ return [4, parseBody(output.body, context)];
8226
+ case 1:
8227
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
8228
+ if (data.Contact !== undefined && data.Contact !== null) {
8229
+ contents.Contact = deserializeAws_restJson1Contact(data.Contact, context);
8230
+ }
8231
+ return [2, Promise.resolve(contents)];
8232
+ }
8233
+ });
8234
+ }); };
8235
+ var deserializeAws_restJson1DescribeContactCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
8236
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
8237
+ var _h;
8238
+ return __generator(this, function (_j) {
8239
+ switch (_j.label) {
8240
+ case 0:
8241
+ _a = [__assign({}, output)];
8242
+ _h = {};
8243
+ return [4, parseBody(output.body, context)];
8244
+ case 1:
8245
+ parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
8246
+ errorCode = "UnknownError";
8247
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
8248
+ _b = errorCode;
8249
+ switch (_b) {
8250
+ case "InternalServiceException": return [3, 2];
8251
+ case "com.amazonaws.connect#InternalServiceException": return [3, 2];
8252
+ case "InvalidParameterException": return [3, 4];
8253
+ case "com.amazonaws.connect#InvalidParameterException": return [3, 4];
8254
+ case "InvalidRequestException": return [3, 6];
8255
+ case "com.amazonaws.connect#InvalidRequestException": return [3, 6];
8256
+ case "ResourceNotFoundException": return [3, 8];
8257
+ case "com.amazonaws.connect#ResourceNotFoundException": return [3, 8];
8258
+ case "ThrottlingException": return [3, 10];
8259
+ case "com.amazonaws.connect#ThrottlingException": return [3, 10];
8260
+ }
8261
+ return [3, 12];
8262
+ case 2:
8263
+ _c = [{}];
8264
+ return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
8265
+ case 3:
8266
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
8267
+ return [3, 13];
8268
+ case 4:
8269
+ _d = [{}];
8270
+ return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
8271
+ case 5:
8272
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
8273
+ return [3, 13];
8274
+ case 6:
8275
+ _e = [{}];
8276
+ return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
8277
+ case 7:
8278
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
8279
+ return [3, 13];
8280
+ case 8:
8281
+ _f = [{}];
8282
+ return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
8283
+ case 9:
8284
+ response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
8285
+ return [3, 13];
8286
+ case 10:
8287
+ _g = [{}];
8288
+ return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
8289
+ case 11:
8290
+ response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
8291
+ return [3, 13];
8292
+ case 12:
8293
+ parsedBody = parsedOutput.body;
8294
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
8295
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
8296
+ _j.label = 13;
8297
+ case 13:
8298
+ message = response.message || response.Message || errorCode;
8299
+ response.message = message;
8300
+ delete response.Message;
8301
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
8302
+ }
8303
+ });
8304
+ }); };
6912
8305
  export var deserializeAws_restJson1DescribeContactFlowCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
6913
8306
  var contents, data, _a, _b;
6914
8307
  return __generator(this, function (_c) {
@@ -7011,88 +8404,190 @@ var deserializeAws_restJson1DescribeContactFlowCommandError = function (output,
7011
8404
  }
7012
8405
  });
7013
8406
  }); };
7014
- export var deserializeAws_restJson1DescribeHoursOfOperationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
8407
+ export var deserializeAws_restJson1DescribeContactFlowModuleCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
7015
8408
  var contents, data, _a, _b;
7016
8409
  return __generator(this, function (_c) {
7017
8410
  switch (_c.label) {
7018
8411
  case 0:
7019
8412
  if (output.statusCode !== 200 && output.statusCode >= 300) {
7020
- return [2, deserializeAws_restJson1DescribeHoursOfOperationCommandError(output, context)];
8413
+ return [2, deserializeAws_restJson1DescribeContactFlowModuleCommandError(output, context)];
7021
8414
  }
7022
8415
  contents = {
7023
8416
  $metadata: deserializeMetadata(output),
7024
- HoursOfOperation: undefined,
8417
+ ContactFlowModule: undefined,
7025
8418
  };
7026
8419
  _a = __expectNonNull;
7027
8420
  _b = __expectObject;
7028
8421
  return [4, parseBody(output.body, context)];
7029
8422
  case 1:
7030
8423
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
7031
- if (data.HoursOfOperation !== undefined && data.HoursOfOperation !== null) {
7032
- contents.HoursOfOperation = deserializeAws_restJson1HoursOfOperation(data.HoursOfOperation, context);
8424
+ if (data.ContactFlowModule !== undefined && data.ContactFlowModule !== null) {
8425
+ contents.ContactFlowModule = deserializeAws_restJson1ContactFlowModule(data.ContactFlowModule, context);
7033
8426
  }
7034
8427
  return [2, Promise.resolve(contents)];
7035
8428
  }
7036
8429
  });
7037
8430
  }); };
7038
- var deserializeAws_restJson1DescribeHoursOfOperationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
7039
- var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
7040
- var _h;
7041
- return __generator(this, function (_j) {
7042
- switch (_j.label) {
8431
+ var deserializeAws_restJson1DescribeContactFlowModuleCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
8432
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, parsedBody, message;
8433
+ var _j;
8434
+ return __generator(this, function (_k) {
8435
+ switch (_k.label) {
7043
8436
  case 0:
7044
8437
  _a = [__assign({}, output)];
7045
- _h = {};
8438
+ _j = {};
7046
8439
  return [4, parseBody(output.body, context)];
7047
8440
  case 1:
7048
- parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
8441
+ parsedOutput = __assign.apply(void 0, _a.concat([(_j.body = _k.sent(), _j)]));
7049
8442
  errorCode = "UnknownError";
7050
8443
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
7051
8444
  _b = errorCode;
7052
8445
  switch (_b) {
7053
- case "InternalServiceException": return [3, 2];
7054
- case "com.amazonaws.connect#InternalServiceException": return [3, 2];
7055
- case "InvalidParameterException": return [3, 4];
7056
- case "com.amazonaws.connect#InvalidParameterException": return [3, 4];
7057
- case "InvalidRequestException": return [3, 6];
7058
- case "com.amazonaws.connect#InvalidRequestException": return [3, 6];
7059
- case "ResourceNotFoundException": return [3, 8];
7060
- case "com.amazonaws.connect#ResourceNotFoundException": return [3, 8];
7061
- case "ThrottlingException": return [3, 10];
7062
- case "com.amazonaws.connect#ThrottlingException": return [3, 10];
8446
+ case "AccessDeniedException": return [3, 2];
8447
+ case "com.amazonaws.connect#AccessDeniedException": return [3, 2];
8448
+ case "InternalServiceException": return [3, 4];
8449
+ case "com.amazonaws.connect#InternalServiceException": return [3, 4];
8450
+ case "InvalidParameterException": return [3, 6];
8451
+ case "com.amazonaws.connect#InvalidParameterException": return [3, 6];
8452
+ case "InvalidRequestException": return [3, 8];
8453
+ case "com.amazonaws.connect#InvalidRequestException": return [3, 8];
8454
+ case "ResourceNotFoundException": return [3, 10];
8455
+ case "com.amazonaws.connect#ResourceNotFoundException": return [3, 10];
8456
+ case "ThrottlingException": return [3, 12];
8457
+ case "com.amazonaws.connect#ThrottlingException": return [3, 12];
7063
8458
  }
7064
- return [3, 12];
8459
+ return [3, 14];
7065
8460
  case 2:
7066
8461
  _c = [{}];
7067
- return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
8462
+ return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
7068
8463
  case 3:
7069
- response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
7070
- return [3, 13];
8464
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
8465
+ return [3, 15];
7071
8466
  case 4:
7072
8467
  _d = [{}];
7073
- return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
8468
+ return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
7074
8469
  case 5:
7075
- response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
7076
- return [3, 13];
8470
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
8471
+ return [3, 15];
7077
8472
  case 6:
7078
8473
  _e = [{}];
7079
- return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
8474
+ return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
7080
8475
  case 7:
7081
- response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
7082
- return [3, 13];
8476
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
8477
+ return [3, 15];
7083
8478
  case 8:
7084
8479
  _f = [{}];
7085
- return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
8480
+ return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
7086
8481
  case 9:
7087
- response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
7088
- return [3, 13];
8482
+ response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
8483
+ return [3, 15];
7089
8484
  case 10:
7090
8485
  _g = [{}];
7091
- return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
8486
+ return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
7092
8487
  case 11:
7093
- response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
7094
- return [3, 13];
7095
- case 12:
8488
+ response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
8489
+ return [3, 15];
8490
+ case 12:
8491
+ _h = [{}];
8492
+ return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
8493
+ case 13:
8494
+ response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
8495
+ return [3, 15];
8496
+ case 14:
8497
+ parsedBody = parsedOutput.body;
8498
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
8499
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
8500
+ _k.label = 15;
8501
+ case 15:
8502
+ message = response.message || response.Message || errorCode;
8503
+ response.message = message;
8504
+ delete response.Message;
8505
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
8506
+ }
8507
+ });
8508
+ }); };
8509
+ export var deserializeAws_restJson1DescribeHoursOfOperationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
8510
+ var contents, data, _a, _b;
8511
+ return __generator(this, function (_c) {
8512
+ switch (_c.label) {
8513
+ case 0:
8514
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
8515
+ return [2, deserializeAws_restJson1DescribeHoursOfOperationCommandError(output, context)];
8516
+ }
8517
+ contents = {
8518
+ $metadata: deserializeMetadata(output),
8519
+ HoursOfOperation: undefined,
8520
+ };
8521
+ _a = __expectNonNull;
8522
+ _b = __expectObject;
8523
+ return [4, parseBody(output.body, context)];
8524
+ case 1:
8525
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
8526
+ if (data.HoursOfOperation !== undefined && data.HoursOfOperation !== null) {
8527
+ contents.HoursOfOperation = deserializeAws_restJson1HoursOfOperation(data.HoursOfOperation, context);
8528
+ }
8529
+ return [2, Promise.resolve(contents)];
8530
+ }
8531
+ });
8532
+ }); };
8533
+ var deserializeAws_restJson1DescribeHoursOfOperationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
8534
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
8535
+ var _h;
8536
+ return __generator(this, function (_j) {
8537
+ switch (_j.label) {
8538
+ case 0:
8539
+ _a = [__assign({}, output)];
8540
+ _h = {};
8541
+ return [4, parseBody(output.body, context)];
8542
+ case 1:
8543
+ parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
8544
+ errorCode = "UnknownError";
8545
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
8546
+ _b = errorCode;
8547
+ switch (_b) {
8548
+ case "InternalServiceException": return [3, 2];
8549
+ case "com.amazonaws.connect#InternalServiceException": return [3, 2];
8550
+ case "InvalidParameterException": return [3, 4];
8551
+ case "com.amazonaws.connect#InvalidParameterException": return [3, 4];
8552
+ case "InvalidRequestException": return [3, 6];
8553
+ case "com.amazonaws.connect#InvalidRequestException": return [3, 6];
8554
+ case "ResourceNotFoundException": return [3, 8];
8555
+ case "com.amazonaws.connect#ResourceNotFoundException": return [3, 8];
8556
+ case "ThrottlingException": return [3, 10];
8557
+ case "com.amazonaws.connect#ThrottlingException": return [3, 10];
8558
+ }
8559
+ return [3, 12];
8560
+ case 2:
8561
+ _c = [{}];
8562
+ return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
8563
+ case 3:
8564
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
8565
+ return [3, 13];
8566
+ case 4:
8567
+ _d = [{}];
8568
+ return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
8569
+ case 5:
8570
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
8571
+ return [3, 13];
8572
+ case 6:
8573
+ _e = [{}];
8574
+ return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
8575
+ case 7:
8576
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
8577
+ return [3, 13];
8578
+ case 8:
8579
+ _f = [{}];
8580
+ return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
8581
+ case 9:
8582
+ response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
8583
+ return [3, 13];
8584
+ case 10:
8585
+ _g = [{}];
8586
+ return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
8587
+ case 11:
8588
+ response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
8589
+ return [3, 13];
8590
+ case 12:
7096
8591
  parsedBody = parsedOutput.body;
7097
8592
  errorCode = parsedBody.code || parsedBody.Code || errorCode;
7098
8593
  response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
@@ -7653,6 +9148,100 @@ var deserializeAws_restJson1DescribeRoutingProfileCommandError = function (outpu
7653
9148
  }
7654
9149
  });
7655
9150
  }); };
9151
+ export var deserializeAws_restJson1DescribeSecurityProfileCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
9152
+ var contents, data, _a, _b;
9153
+ return __generator(this, function (_c) {
9154
+ switch (_c.label) {
9155
+ case 0:
9156
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
9157
+ return [2, deserializeAws_restJson1DescribeSecurityProfileCommandError(output, context)];
9158
+ }
9159
+ contents = {
9160
+ $metadata: deserializeMetadata(output),
9161
+ SecurityProfile: undefined,
9162
+ };
9163
+ _a = __expectNonNull;
9164
+ _b = __expectObject;
9165
+ return [4, parseBody(output.body, context)];
9166
+ case 1:
9167
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
9168
+ if (data.SecurityProfile !== undefined && data.SecurityProfile !== null) {
9169
+ contents.SecurityProfile = deserializeAws_restJson1SecurityProfile(data.SecurityProfile, context);
9170
+ }
9171
+ return [2, Promise.resolve(contents)];
9172
+ }
9173
+ });
9174
+ }); };
9175
+ var deserializeAws_restJson1DescribeSecurityProfileCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
9176
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
9177
+ var _h;
9178
+ return __generator(this, function (_j) {
9179
+ switch (_j.label) {
9180
+ case 0:
9181
+ _a = [__assign({}, output)];
9182
+ _h = {};
9183
+ return [4, parseBody(output.body, context)];
9184
+ case 1:
9185
+ parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
9186
+ errorCode = "UnknownError";
9187
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
9188
+ _b = errorCode;
9189
+ switch (_b) {
9190
+ case "InternalServiceException": return [3, 2];
9191
+ case "com.amazonaws.connect#InternalServiceException": return [3, 2];
9192
+ case "InvalidParameterException": return [3, 4];
9193
+ case "com.amazonaws.connect#InvalidParameterException": return [3, 4];
9194
+ case "InvalidRequestException": return [3, 6];
9195
+ case "com.amazonaws.connect#InvalidRequestException": return [3, 6];
9196
+ case "ResourceNotFoundException": return [3, 8];
9197
+ case "com.amazonaws.connect#ResourceNotFoundException": return [3, 8];
9198
+ case "ThrottlingException": return [3, 10];
9199
+ case "com.amazonaws.connect#ThrottlingException": return [3, 10];
9200
+ }
9201
+ return [3, 12];
9202
+ case 2:
9203
+ _c = [{}];
9204
+ return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
9205
+ case 3:
9206
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
9207
+ return [3, 13];
9208
+ case 4:
9209
+ _d = [{}];
9210
+ return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
9211
+ case 5:
9212
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
9213
+ return [3, 13];
9214
+ case 6:
9215
+ _e = [{}];
9216
+ return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
9217
+ case 7:
9218
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
9219
+ return [3, 13];
9220
+ case 8:
9221
+ _f = [{}];
9222
+ return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
9223
+ case 9:
9224
+ response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
9225
+ return [3, 13];
9226
+ case 10:
9227
+ _g = [{}];
9228
+ return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
9229
+ case 11:
9230
+ response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
9231
+ return [3, 13];
9232
+ case 12:
9233
+ parsedBody = parsedOutput.body;
9234
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
9235
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
9236
+ _j.label = 13;
9237
+ case 13:
9238
+ message = response.message || response.Message || errorCode;
9239
+ response.message = message;
9240
+ delete response.Message;
9241
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
9242
+ }
9243
+ });
9244
+ }); };
7656
9245
  export var deserializeAws_restJson1DescribeUserCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
7657
9246
  var contents, data, _a, _b;
7658
9247
  return __generator(this, function (_c) {
@@ -9297,17 +10886,17 @@ var deserializeAws_restJson1ListBotsCommandError = function (output, context) {
9297
10886
  }
9298
10887
  });
9299
10888
  }); };
9300
- export var deserializeAws_restJson1ListContactFlowsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
10889
+ export var deserializeAws_restJson1ListContactFlowModulesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
9301
10890
  var contents, data, _a, _b;
9302
10891
  return __generator(this, function (_c) {
9303
10892
  switch (_c.label) {
9304
10893
  case 0:
9305
10894
  if (output.statusCode !== 200 && output.statusCode >= 300) {
9306
- return [2, deserializeAws_restJson1ListContactFlowsCommandError(output, context)];
10895
+ return [2, deserializeAws_restJson1ListContactFlowModulesCommandError(output, context)];
9307
10896
  }
9308
10897
  contents = {
9309
10898
  $metadata: deserializeMetadata(output),
9310
- ContactFlowSummaryList: undefined,
10899
+ ContactFlowModulesSummaryList: undefined,
9311
10900
  NextToken: undefined,
9312
10901
  };
9313
10902
  _a = __expectNonNull;
@@ -9315,8 +10904,8 @@ export var deserializeAws_restJson1ListContactFlowsCommand = function (output, c
9315
10904
  return [4, parseBody(output.body, context)];
9316
10905
  case 1:
9317
10906
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
9318
- if (data.ContactFlowSummaryList !== undefined && data.ContactFlowSummaryList !== null) {
9319
- contents.ContactFlowSummaryList = deserializeAws_restJson1ContactFlowSummaryList(data.ContactFlowSummaryList, context);
10907
+ if (data.ContactFlowModulesSummaryList !== undefined && data.ContactFlowModulesSummaryList !== null) {
10908
+ contents.ContactFlowModulesSummaryList = deserializeAws_restJson1ContactFlowModulesSummaryList(data.ContactFlowModulesSummaryList, context);
9320
10909
  }
9321
10910
  if (data.NextToken !== undefined && data.NextToken !== null) {
9322
10911
  contents.NextToken = __expectString(data.NextToken);
@@ -9325,60 +10914,264 @@ export var deserializeAws_restJson1ListContactFlowsCommand = function (output, c
9325
10914
  }
9326
10915
  });
9327
10916
  }); };
9328
- var deserializeAws_restJson1ListContactFlowsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
9329
- var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
9330
- var _h;
9331
- return __generator(this, function (_j) {
9332
- switch (_j.label) {
10917
+ var deserializeAws_restJson1ListContactFlowModulesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
10918
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, parsedBody, message;
10919
+ var _j;
10920
+ return __generator(this, function (_k) {
10921
+ switch (_k.label) {
9333
10922
  case 0:
9334
10923
  _a = [__assign({}, output)];
9335
- _h = {};
10924
+ _j = {};
9336
10925
  return [4, parseBody(output.body, context)];
9337
10926
  case 1:
9338
- parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
10927
+ parsedOutput = __assign.apply(void 0, _a.concat([(_j.body = _k.sent(), _j)]));
9339
10928
  errorCode = "UnknownError";
9340
10929
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
9341
10930
  _b = errorCode;
9342
10931
  switch (_b) {
9343
- case "InternalServiceException": return [3, 2];
9344
- case "com.amazonaws.connect#InternalServiceException": return [3, 2];
9345
- case "InvalidParameterException": return [3, 4];
9346
- case "com.amazonaws.connect#InvalidParameterException": return [3, 4];
9347
- case "InvalidRequestException": return [3, 6];
9348
- case "com.amazonaws.connect#InvalidRequestException": return [3, 6];
9349
- case "ResourceNotFoundException": return [3, 8];
9350
- case "com.amazonaws.connect#ResourceNotFoundException": return [3, 8];
9351
- case "ThrottlingException": return [3, 10];
9352
- case "com.amazonaws.connect#ThrottlingException": return [3, 10];
10932
+ case "AccessDeniedException": return [3, 2];
10933
+ case "com.amazonaws.connect#AccessDeniedException": return [3, 2];
10934
+ case "InternalServiceException": return [3, 4];
10935
+ case "com.amazonaws.connect#InternalServiceException": return [3, 4];
10936
+ case "InvalidParameterException": return [3, 6];
10937
+ case "com.amazonaws.connect#InvalidParameterException": return [3, 6];
10938
+ case "InvalidRequestException": return [3, 8];
10939
+ case "com.amazonaws.connect#InvalidRequestException": return [3, 8];
10940
+ case "ResourceNotFoundException": return [3, 10];
10941
+ case "com.amazonaws.connect#ResourceNotFoundException": return [3, 10];
10942
+ case "ThrottlingException": return [3, 12];
10943
+ case "com.amazonaws.connect#ThrottlingException": return [3, 12];
9353
10944
  }
9354
- return [3, 12];
10945
+ return [3, 14];
9355
10946
  case 2:
9356
10947
  _c = [{}];
9357
- return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
10948
+ return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
9358
10949
  case 3:
9359
- response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
9360
- return [3, 13];
10950
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
10951
+ return [3, 15];
9361
10952
  case 4:
9362
10953
  _d = [{}];
9363
- return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
10954
+ return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
9364
10955
  case 5:
9365
- response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
9366
- return [3, 13];
10956
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
10957
+ return [3, 15];
9367
10958
  case 6:
9368
10959
  _e = [{}];
9369
- return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
10960
+ return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
9370
10961
  case 7:
9371
- response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
9372
- return [3, 13];
10962
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
10963
+ return [3, 15];
9373
10964
  case 8:
9374
10965
  _f = [{}];
9375
- return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
10966
+ return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
9376
10967
  case 9:
9377
- response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
9378
- return [3, 13];
10968
+ response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
10969
+ return [3, 15];
9379
10970
  case 10:
9380
10971
  _g = [{}];
9381
- return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
10972
+ return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
10973
+ case 11:
10974
+ response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
10975
+ return [3, 15];
10976
+ case 12:
10977
+ _h = [{}];
10978
+ return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
10979
+ case 13:
10980
+ response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
10981
+ return [3, 15];
10982
+ case 14:
10983
+ parsedBody = parsedOutput.body;
10984
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
10985
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
10986
+ _k.label = 15;
10987
+ case 15:
10988
+ message = response.message || response.Message || errorCode;
10989
+ response.message = message;
10990
+ delete response.Message;
10991
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
10992
+ }
10993
+ });
10994
+ }); };
10995
+ export var deserializeAws_restJson1ListContactFlowsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
10996
+ var contents, data, _a, _b;
10997
+ return __generator(this, function (_c) {
10998
+ switch (_c.label) {
10999
+ case 0:
11000
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
11001
+ return [2, deserializeAws_restJson1ListContactFlowsCommandError(output, context)];
11002
+ }
11003
+ contents = {
11004
+ $metadata: deserializeMetadata(output),
11005
+ ContactFlowSummaryList: undefined,
11006
+ NextToken: undefined,
11007
+ };
11008
+ _a = __expectNonNull;
11009
+ _b = __expectObject;
11010
+ return [4, parseBody(output.body, context)];
11011
+ case 1:
11012
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
11013
+ if (data.ContactFlowSummaryList !== undefined && data.ContactFlowSummaryList !== null) {
11014
+ contents.ContactFlowSummaryList = deserializeAws_restJson1ContactFlowSummaryList(data.ContactFlowSummaryList, context);
11015
+ }
11016
+ if (data.NextToken !== undefined && data.NextToken !== null) {
11017
+ contents.NextToken = __expectString(data.NextToken);
11018
+ }
11019
+ return [2, Promise.resolve(contents)];
11020
+ }
11021
+ });
11022
+ }); };
11023
+ var deserializeAws_restJson1ListContactFlowsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
11024
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
11025
+ var _h;
11026
+ return __generator(this, function (_j) {
11027
+ switch (_j.label) {
11028
+ case 0:
11029
+ _a = [__assign({}, output)];
11030
+ _h = {};
11031
+ return [4, parseBody(output.body, context)];
11032
+ case 1:
11033
+ parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
11034
+ errorCode = "UnknownError";
11035
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
11036
+ _b = errorCode;
11037
+ switch (_b) {
11038
+ case "InternalServiceException": return [3, 2];
11039
+ case "com.amazonaws.connect#InternalServiceException": return [3, 2];
11040
+ case "InvalidParameterException": return [3, 4];
11041
+ case "com.amazonaws.connect#InvalidParameterException": return [3, 4];
11042
+ case "InvalidRequestException": return [3, 6];
11043
+ case "com.amazonaws.connect#InvalidRequestException": return [3, 6];
11044
+ case "ResourceNotFoundException": return [3, 8];
11045
+ case "com.amazonaws.connect#ResourceNotFoundException": return [3, 8];
11046
+ case "ThrottlingException": return [3, 10];
11047
+ case "com.amazonaws.connect#ThrottlingException": return [3, 10];
11048
+ }
11049
+ return [3, 12];
11050
+ case 2:
11051
+ _c = [{}];
11052
+ return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
11053
+ case 3:
11054
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
11055
+ return [3, 13];
11056
+ case 4:
11057
+ _d = [{}];
11058
+ return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
11059
+ case 5:
11060
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
11061
+ return [3, 13];
11062
+ case 6:
11063
+ _e = [{}];
11064
+ return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
11065
+ case 7:
11066
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
11067
+ return [3, 13];
11068
+ case 8:
11069
+ _f = [{}];
11070
+ return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
11071
+ case 9:
11072
+ response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
11073
+ return [3, 13];
11074
+ case 10:
11075
+ _g = [{}];
11076
+ return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
11077
+ case 11:
11078
+ response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
11079
+ return [3, 13];
11080
+ case 12:
11081
+ parsedBody = parsedOutput.body;
11082
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
11083
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
11084
+ _j.label = 13;
11085
+ case 13:
11086
+ message = response.message || response.Message || errorCode;
11087
+ response.message = message;
11088
+ delete response.Message;
11089
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
11090
+ }
11091
+ });
11092
+ }); };
11093
+ export var deserializeAws_restJson1ListContactReferencesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
11094
+ var contents, data, _a, _b;
11095
+ return __generator(this, function (_c) {
11096
+ switch (_c.label) {
11097
+ case 0:
11098
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
11099
+ return [2, deserializeAws_restJson1ListContactReferencesCommandError(output, context)];
11100
+ }
11101
+ contents = {
11102
+ $metadata: deserializeMetadata(output),
11103
+ NextToken: undefined,
11104
+ ReferenceSummaryList: undefined,
11105
+ };
11106
+ _a = __expectNonNull;
11107
+ _b = __expectObject;
11108
+ return [4, parseBody(output.body, context)];
11109
+ case 1:
11110
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
11111
+ if (data.NextToken !== undefined && data.NextToken !== null) {
11112
+ contents.NextToken = __expectString(data.NextToken);
11113
+ }
11114
+ if (data.ReferenceSummaryList !== undefined && data.ReferenceSummaryList !== null) {
11115
+ contents.ReferenceSummaryList = deserializeAws_restJson1ReferenceSummaryList(data.ReferenceSummaryList, context);
11116
+ }
11117
+ return [2, Promise.resolve(contents)];
11118
+ }
11119
+ });
11120
+ }); };
11121
+ var deserializeAws_restJson1ListContactReferencesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
11122
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
11123
+ var _h;
11124
+ return __generator(this, function (_j) {
11125
+ switch (_j.label) {
11126
+ case 0:
11127
+ _a = [__assign({}, output)];
11128
+ _h = {};
11129
+ return [4, parseBody(output.body, context)];
11130
+ case 1:
11131
+ parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
11132
+ errorCode = "UnknownError";
11133
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
11134
+ _b = errorCode;
11135
+ switch (_b) {
11136
+ case "InternalServiceException": return [3, 2];
11137
+ case "com.amazonaws.connect#InternalServiceException": return [3, 2];
11138
+ case "InvalidParameterException": return [3, 4];
11139
+ case "com.amazonaws.connect#InvalidParameterException": return [3, 4];
11140
+ case "InvalidRequestException": return [3, 6];
11141
+ case "com.amazonaws.connect#InvalidRequestException": return [3, 6];
11142
+ case "ResourceNotFoundException": return [3, 8];
11143
+ case "com.amazonaws.connect#ResourceNotFoundException": return [3, 8];
11144
+ case "ThrottlingException": return [3, 10];
11145
+ case "com.amazonaws.connect#ThrottlingException": return [3, 10];
11146
+ }
11147
+ return [3, 12];
11148
+ case 2:
11149
+ _c = [{}];
11150
+ return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
11151
+ case 3:
11152
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
11153
+ return [3, 13];
11154
+ case 4:
11155
+ _d = [{}];
11156
+ return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
11157
+ case 5:
11158
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
11159
+ return [3, 13];
11160
+ case 6:
11161
+ _e = [{}];
11162
+ return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
11163
+ case 7:
11164
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
11165
+ return [3, 13];
11166
+ case 8:
11167
+ _f = [{}];
11168
+ return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
11169
+ case 9:
11170
+ response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
11171
+ return [3, 13];
11172
+ case 10:
11173
+ _g = [{}];
11174
+ return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
9382
11175
  case 11:
9383
11176
  response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
9384
11177
  return [3, 13];
@@ -10833,18 +12626,18 @@ var deserializeAws_restJson1ListSecurityKeysCommandError = function (output, con
10833
12626
  }
10834
12627
  });
10835
12628
  }); };
10836
- export var deserializeAws_restJson1ListSecurityProfilesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
12629
+ export var deserializeAws_restJson1ListSecurityProfilePermissionsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
10837
12630
  var contents, data, _a, _b;
10838
12631
  return __generator(this, function (_c) {
10839
12632
  switch (_c.label) {
10840
12633
  case 0:
10841
12634
  if (output.statusCode !== 200 && output.statusCode >= 300) {
10842
- return [2, deserializeAws_restJson1ListSecurityProfilesCommandError(output, context)];
12635
+ return [2, deserializeAws_restJson1ListSecurityProfilePermissionsCommandError(output, context)];
10843
12636
  }
10844
12637
  contents = {
10845
12638
  $metadata: deserializeMetadata(output),
10846
12639
  NextToken: undefined,
10847
- SecurityProfileSummaryList: undefined,
12640
+ Permissions: undefined,
10848
12641
  };
10849
12642
  _a = __expectNonNull;
10850
12643
  _b = __expectObject;
@@ -10854,14 +12647,14 @@ export var deserializeAws_restJson1ListSecurityProfilesCommand = function (outpu
10854
12647
  if (data.NextToken !== undefined && data.NextToken !== null) {
10855
12648
  contents.NextToken = __expectString(data.NextToken);
10856
12649
  }
10857
- if (data.SecurityProfileSummaryList !== undefined && data.SecurityProfileSummaryList !== null) {
10858
- contents.SecurityProfileSummaryList = deserializeAws_restJson1SecurityProfileSummaryList(data.SecurityProfileSummaryList, context);
12650
+ if (data.Permissions !== undefined && data.Permissions !== null) {
12651
+ contents.Permissions = deserializeAws_restJson1PermissionsList(data.Permissions, context);
10859
12652
  }
10860
12653
  return [2, Promise.resolve(contents)];
10861
12654
  }
10862
12655
  });
10863
12656
  }); };
10864
- var deserializeAws_restJson1ListSecurityProfilesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
12657
+ var deserializeAws_restJson1ListSecurityProfilePermissionsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
10865
12658
  var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
10866
12659
  var _h;
10867
12660
  return __generator(this, function (_j) {
@@ -10931,31 +12724,35 @@ var deserializeAws_restJson1ListSecurityProfilesCommandError = function (output,
10931
12724
  }
10932
12725
  });
10933
12726
  }); };
10934
- export var deserializeAws_restJson1ListTagsForResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
12727
+ export var deserializeAws_restJson1ListSecurityProfilesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
10935
12728
  var contents, data, _a, _b;
10936
12729
  return __generator(this, function (_c) {
10937
12730
  switch (_c.label) {
10938
12731
  case 0:
10939
12732
  if (output.statusCode !== 200 && output.statusCode >= 300) {
10940
- return [2, deserializeAws_restJson1ListTagsForResourceCommandError(output, context)];
12733
+ return [2, deserializeAws_restJson1ListSecurityProfilesCommandError(output, context)];
10941
12734
  }
10942
12735
  contents = {
10943
12736
  $metadata: deserializeMetadata(output),
10944
- tags: undefined,
12737
+ NextToken: undefined,
12738
+ SecurityProfileSummaryList: undefined,
10945
12739
  };
10946
12740
  _a = __expectNonNull;
10947
12741
  _b = __expectObject;
10948
12742
  return [4, parseBody(output.body, context)];
10949
12743
  case 1:
10950
12744
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
10951
- if (data.tags !== undefined && data.tags !== null) {
10952
- contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
12745
+ if (data.NextToken !== undefined && data.NextToken !== null) {
12746
+ contents.NextToken = __expectString(data.NextToken);
12747
+ }
12748
+ if (data.SecurityProfileSummaryList !== undefined && data.SecurityProfileSummaryList !== null) {
12749
+ contents.SecurityProfileSummaryList = deserializeAws_restJson1SecurityProfileSummaryList(data.SecurityProfileSummaryList, context);
10953
12750
  }
10954
12751
  return [2, Promise.resolve(contents)];
10955
12752
  }
10956
12753
  });
10957
12754
  }); };
10958
- var deserializeAws_restJson1ListTagsForResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
12755
+ var deserializeAws_restJson1ListSecurityProfilesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
10959
12756
  var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
10960
12757
  var _h;
10961
12758
  return __generator(this, function (_j) {
@@ -11025,61 +12822,155 @@ var deserializeAws_restJson1ListTagsForResourceCommandError = function (output,
11025
12822
  }
11026
12823
  });
11027
12824
  }); };
11028
- export var deserializeAws_restJson1ListUseCasesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
12825
+ export var deserializeAws_restJson1ListTagsForResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
11029
12826
  var contents, data, _a, _b;
11030
12827
  return __generator(this, function (_c) {
11031
12828
  switch (_c.label) {
11032
12829
  case 0:
11033
12830
  if (output.statusCode !== 200 && output.statusCode >= 300) {
11034
- return [2, deserializeAws_restJson1ListUseCasesCommandError(output, context)];
12831
+ return [2, deserializeAws_restJson1ListTagsForResourceCommandError(output, context)];
11035
12832
  }
11036
12833
  contents = {
11037
12834
  $metadata: deserializeMetadata(output),
11038
- NextToken: undefined,
11039
- UseCaseSummaryList: undefined,
12835
+ tags: undefined,
11040
12836
  };
11041
12837
  _a = __expectNonNull;
11042
12838
  _b = __expectObject;
11043
12839
  return [4, parseBody(output.body, context)];
11044
12840
  case 1:
11045
12841
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
11046
- if (data.NextToken !== undefined && data.NextToken !== null) {
11047
- contents.NextToken = __expectString(data.NextToken);
11048
- }
11049
- if (data.UseCaseSummaryList !== undefined && data.UseCaseSummaryList !== null) {
11050
- contents.UseCaseSummaryList = deserializeAws_restJson1UseCaseSummaryList(data.UseCaseSummaryList, context);
12842
+ if (data.tags !== undefined && data.tags !== null) {
12843
+ contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
11051
12844
  }
11052
12845
  return [2, Promise.resolve(contents)];
11053
12846
  }
11054
12847
  });
11055
12848
  }); };
11056
- var deserializeAws_restJson1ListUseCasesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
11057
- var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
11058
- var _g;
11059
- return __generator(this, function (_h) {
11060
- switch (_h.label) {
12849
+ var deserializeAws_restJson1ListTagsForResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
12850
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
12851
+ var _h;
12852
+ return __generator(this, function (_j) {
12853
+ switch (_j.label) {
11061
12854
  case 0:
11062
12855
  _a = [__assign({}, output)];
11063
- _g = {};
12856
+ _h = {};
11064
12857
  return [4, parseBody(output.body, context)];
11065
12858
  case 1:
11066
- parsedOutput = __assign.apply(void 0, _a.concat([(_g.body = _h.sent(), _g)]));
12859
+ parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
11067
12860
  errorCode = "UnknownError";
11068
12861
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
11069
12862
  _b = errorCode;
11070
12863
  switch (_b) {
11071
12864
  case "InternalServiceException": return [3, 2];
11072
12865
  case "com.amazonaws.connect#InternalServiceException": return [3, 2];
11073
- case "InvalidRequestException": return [3, 4];
11074
- case "com.amazonaws.connect#InvalidRequestException": return [3, 4];
11075
- case "ResourceNotFoundException": return [3, 6];
11076
- case "com.amazonaws.connect#ResourceNotFoundException": return [3, 6];
11077
- case "ThrottlingException": return [3, 8];
11078
- case "com.amazonaws.connect#ThrottlingException": return [3, 8];
11079
- }
11080
- return [3, 10];
11081
- case 2:
11082
- _c = [{}];
12866
+ case "InvalidParameterException": return [3, 4];
12867
+ case "com.amazonaws.connect#InvalidParameterException": return [3, 4];
12868
+ case "InvalidRequestException": return [3, 6];
12869
+ case "com.amazonaws.connect#InvalidRequestException": return [3, 6];
12870
+ case "ResourceNotFoundException": return [3, 8];
12871
+ case "com.amazonaws.connect#ResourceNotFoundException": return [3, 8];
12872
+ case "ThrottlingException": return [3, 10];
12873
+ case "com.amazonaws.connect#ThrottlingException": return [3, 10];
12874
+ }
12875
+ return [3, 12];
12876
+ case 2:
12877
+ _c = [{}];
12878
+ return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
12879
+ case 3:
12880
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
12881
+ return [3, 13];
12882
+ case 4:
12883
+ _d = [{}];
12884
+ return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
12885
+ case 5:
12886
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
12887
+ return [3, 13];
12888
+ case 6:
12889
+ _e = [{}];
12890
+ return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
12891
+ case 7:
12892
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
12893
+ return [3, 13];
12894
+ case 8:
12895
+ _f = [{}];
12896
+ return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
12897
+ case 9:
12898
+ response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
12899
+ return [3, 13];
12900
+ case 10:
12901
+ _g = [{}];
12902
+ return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
12903
+ case 11:
12904
+ response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
12905
+ return [3, 13];
12906
+ case 12:
12907
+ parsedBody = parsedOutput.body;
12908
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
12909
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
12910
+ _j.label = 13;
12911
+ case 13:
12912
+ message = response.message || response.Message || errorCode;
12913
+ response.message = message;
12914
+ delete response.Message;
12915
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
12916
+ }
12917
+ });
12918
+ }); };
12919
+ export var deserializeAws_restJson1ListUseCasesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
12920
+ var contents, data, _a, _b;
12921
+ return __generator(this, function (_c) {
12922
+ switch (_c.label) {
12923
+ case 0:
12924
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
12925
+ return [2, deserializeAws_restJson1ListUseCasesCommandError(output, context)];
12926
+ }
12927
+ contents = {
12928
+ $metadata: deserializeMetadata(output),
12929
+ NextToken: undefined,
12930
+ UseCaseSummaryList: undefined,
12931
+ };
12932
+ _a = __expectNonNull;
12933
+ _b = __expectObject;
12934
+ return [4, parseBody(output.body, context)];
12935
+ case 1:
12936
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
12937
+ if (data.NextToken !== undefined && data.NextToken !== null) {
12938
+ contents.NextToken = __expectString(data.NextToken);
12939
+ }
12940
+ if (data.UseCaseSummaryList !== undefined && data.UseCaseSummaryList !== null) {
12941
+ contents.UseCaseSummaryList = deserializeAws_restJson1UseCaseSummaryList(data.UseCaseSummaryList, context);
12942
+ }
12943
+ return [2, Promise.resolve(contents)];
12944
+ }
12945
+ });
12946
+ }); };
12947
+ var deserializeAws_restJson1ListUseCasesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
12948
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
12949
+ var _g;
12950
+ return __generator(this, function (_h) {
12951
+ switch (_h.label) {
12952
+ case 0:
12953
+ _a = [__assign({}, output)];
12954
+ _g = {};
12955
+ return [4, parseBody(output.body, context)];
12956
+ case 1:
12957
+ parsedOutput = __assign.apply(void 0, _a.concat([(_g.body = _h.sent(), _g)]));
12958
+ errorCode = "UnknownError";
12959
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
12960
+ _b = errorCode;
12961
+ switch (_b) {
12962
+ case "InternalServiceException": return [3, 2];
12963
+ case "com.amazonaws.connect#InternalServiceException": return [3, 2];
12964
+ case "InvalidRequestException": return [3, 4];
12965
+ case "com.amazonaws.connect#InvalidRequestException": return [3, 4];
12966
+ case "ResourceNotFoundException": return [3, 6];
12967
+ case "com.amazonaws.connect#ResourceNotFoundException": return [3, 6];
12968
+ case "ThrottlingException": return [3, 8];
12969
+ case "com.amazonaws.connect#ThrottlingException": return [3, 8];
12970
+ }
12971
+ return [3, 10];
12972
+ case 2:
12973
+ _c = [{}];
11083
12974
  return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
11084
12975
  case 3:
11085
12976
  response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
@@ -11565,6 +13456,100 @@ var deserializeAws_restJson1StartContactRecordingCommandError = function (output
11565
13456
  }
11566
13457
  });
11567
13458
  }); };
13459
+ export var deserializeAws_restJson1StartContactStreamingCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
13460
+ var contents, data, _a, _b;
13461
+ return __generator(this, function (_c) {
13462
+ switch (_c.label) {
13463
+ case 0:
13464
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
13465
+ return [2, deserializeAws_restJson1StartContactStreamingCommandError(output, context)];
13466
+ }
13467
+ contents = {
13468
+ $metadata: deserializeMetadata(output),
13469
+ StreamingId: undefined,
13470
+ };
13471
+ _a = __expectNonNull;
13472
+ _b = __expectObject;
13473
+ return [4, parseBody(output.body, context)];
13474
+ case 1:
13475
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
13476
+ if (data.StreamingId !== undefined && data.StreamingId !== null) {
13477
+ contents.StreamingId = __expectString(data.StreamingId);
13478
+ }
13479
+ return [2, Promise.resolve(contents)];
13480
+ }
13481
+ });
13482
+ }); };
13483
+ var deserializeAws_restJson1StartContactStreamingCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
13484
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
13485
+ var _h;
13486
+ return __generator(this, function (_j) {
13487
+ switch (_j.label) {
13488
+ case 0:
13489
+ _a = [__assign({}, output)];
13490
+ _h = {};
13491
+ return [4, parseBody(output.body, context)];
13492
+ case 1:
13493
+ parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
13494
+ errorCode = "UnknownError";
13495
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
13496
+ _b = errorCode;
13497
+ switch (_b) {
13498
+ case "InternalServiceException": return [3, 2];
13499
+ case "com.amazonaws.connect#InternalServiceException": return [3, 2];
13500
+ case "InvalidParameterException": return [3, 4];
13501
+ case "com.amazonaws.connect#InvalidParameterException": return [3, 4];
13502
+ case "InvalidRequestException": return [3, 6];
13503
+ case "com.amazonaws.connect#InvalidRequestException": return [3, 6];
13504
+ case "LimitExceededException": return [3, 8];
13505
+ case "com.amazonaws.connect#LimitExceededException": return [3, 8];
13506
+ case "ResourceNotFoundException": return [3, 10];
13507
+ case "com.amazonaws.connect#ResourceNotFoundException": return [3, 10];
13508
+ }
13509
+ return [3, 12];
13510
+ case 2:
13511
+ _c = [{}];
13512
+ return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
13513
+ case 3:
13514
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
13515
+ return [3, 13];
13516
+ case 4:
13517
+ _d = [{}];
13518
+ return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
13519
+ case 5:
13520
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
13521
+ return [3, 13];
13522
+ case 6:
13523
+ _e = [{}];
13524
+ return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
13525
+ case 7:
13526
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
13527
+ return [3, 13];
13528
+ case 8:
13529
+ _f = [{}];
13530
+ return [4, deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)];
13531
+ case 9:
13532
+ response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
13533
+ return [3, 13];
13534
+ case 10:
13535
+ _g = [{}];
13536
+ return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
13537
+ case 11:
13538
+ response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
13539
+ return [3, 13];
13540
+ case 12:
13541
+ parsedBody = parsedOutput.body;
13542
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
13543
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
13544
+ _j.label = 13;
13545
+ case 13:
13546
+ message = response.message || response.Message || errorCode;
13547
+ response.message = message;
13548
+ delete response.Message;
13549
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
13550
+ }
13551
+ });
13552
+ }); };
11568
13553
  export var deserializeAws_restJson1StartOutboundVoiceContactCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
11569
13554
  var contents, data, _a, _b;
11570
13555
  return __generator(this, function (_c) {
@@ -11937,13 +13922,13 @@ var deserializeAws_restJson1StopContactRecordingCommandError = function (output,
11937
13922
  }
11938
13923
  });
11939
13924
  }); };
11940
- export var deserializeAws_restJson1SuspendContactRecordingCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
13925
+ export var deserializeAws_restJson1StopContactStreamingCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
11941
13926
  var contents;
11942
13927
  return __generator(this, function (_a) {
11943
13928
  switch (_a.label) {
11944
13929
  case 0:
11945
13930
  if (output.statusCode !== 200 && output.statusCode >= 300) {
11946
- return [2, deserializeAws_restJson1SuspendContactRecordingCommandError(output, context)];
13931
+ return [2, deserializeAws_restJson1StopContactStreamingCommandError(output, context)];
11947
13932
  }
11948
13933
  contents = {
11949
13934
  $metadata: deserializeMetadata(output),
@@ -11955,53 +13940,61 @@ export var deserializeAws_restJson1SuspendContactRecordingCommand = function (ou
11955
13940
  }
11956
13941
  });
11957
13942
  }); };
11958
- var deserializeAws_restJson1SuspendContactRecordingCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
11959
- var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, parsedBody, message;
11960
- var _f;
11961
- return __generator(this, function (_g) {
11962
- switch (_g.label) {
13943
+ var deserializeAws_restJson1StopContactStreamingCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
13944
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
13945
+ var _g;
13946
+ return __generator(this, function (_h) {
13947
+ switch (_h.label) {
11963
13948
  case 0:
11964
13949
  _a = [__assign({}, output)];
11965
- _f = {};
13950
+ _g = {};
11966
13951
  return [4, parseBody(output.body, context)];
11967
13952
  case 1:
11968
- parsedOutput = __assign.apply(void 0, _a.concat([(_f.body = _g.sent(), _f)]));
13953
+ parsedOutput = __assign.apply(void 0, _a.concat([(_g.body = _h.sent(), _g)]));
11969
13954
  errorCode = "UnknownError";
11970
13955
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
11971
13956
  _b = errorCode;
11972
13957
  switch (_b) {
11973
13958
  case "InternalServiceException": return [3, 2];
11974
13959
  case "com.amazonaws.connect#InternalServiceException": return [3, 2];
11975
- case "InvalidRequestException": return [3, 4];
11976
- case "com.amazonaws.connect#InvalidRequestException": return [3, 4];
11977
- case "ResourceNotFoundException": return [3, 6];
11978
- case "com.amazonaws.connect#ResourceNotFoundException": return [3, 6];
13960
+ case "InvalidParameterException": return [3, 4];
13961
+ case "com.amazonaws.connect#InvalidParameterException": return [3, 4];
13962
+ case "InvalidRequestException": return [3, 6];
13963
+ case "com.amazonaws.connect#InvalidRequestException": return [3, 6];
13964
+ case "ResourceNotFoundException": return [3, 8];
13965
+ case "com.amazonaws.connect#ResourceNotFoundException": return [3, 8];
11979
13966
  }
11980
- return [3, 8];
13967
+ return [3, 10];
11981
13968
  case 2:
11982
13969
  _c = [{}];
11983
13970
  return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
11984
13971
  case 3:
11985
- response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
11986
- return [3, 9];
13972
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
13973
+ return [3, 11];
11987
13974
  case 4:
11988
13975
  _d = [{}];
11989
- return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
13976
+ return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
11990
13977
  case 5:
11991
- response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
11992
- return [3, 9];
13978
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
13979
+ return [3, 11];
11993
13980
  case 6:
11994
13981
  _e = [{}];
11995
- return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
13982
+ return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
11996
13983
  case 7:
11997
- response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
11998
- return [3, 9];
13984
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
13985
+ return [3, 11];
11999
13986
  case 8:
13987
+ _f = [{}];
13988
+ return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
13989
+ case 9:
13990
+ response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
13991
+ return [3, 11];
13992
+ case 10:
12000
13993
  parsedBody = parsedOutput.body;
12001
13994
  errorCode = parsedBody.code || parsedBody.Code || errorCode;
12002
13995
  response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
12003
- _g.label = 9;
12004
- case 9:
13996
+ _h.label = 11;
13997
+ case 11:
12005
13998
  message = response.message || response.Message || errorCode;
12006
13999
  response.message = message;
12007
14000
  delete response.Message;
@@ -12009,13 +14002,13 @@ var deserializeAws_restJson1SuspendContactRecordingCommandError = function (outp
12009
14002
  }
12010
14003
  });
12011
14004
  }); };
12012
- export var deserializeAws_restJson1TagResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
14005
+ export var deserializeAws_restJson1SuspendContactRecordingCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
12013
14006
  var contents;
12014
14007
  return __generator(this, function (_a) {
12015
14008
  switch (_a.label) {
12016
14009
  case 0:
12017
14010
  if (output.statusCode !== 200 && output.statusCode >= 300) {
12018
- return [2, deserializeAws_restJson1TagResourceCommandError(output, context)];
14011
+ return [2, deserializeAws_restJson1SuspendContactRecordingCommandError(output, context)];
12019
14012
  }
12020
14013
  contents = {
12021
14014
  $metadata: deserializeMetadata(output),
@@ -12027,9 +14020,81 @@ export var deserializeAws_restJson1TagResourceCommand = function (output, contex
12027
14020
  }
12028
14021
  });
12029
14022
  }); };
12030
- var deserializeAws_restJson1TagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
12031
- var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
12032
- var _h;
14023
+ var deserializeAws_restJson1SuspendContactRecordingCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
14024
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, parsedBody, message;
14025
+ var _f;
14026
+ return __generator(this, function (_g) {
14027
+ switch (_g.label) {
14028
+ case 0:
14029
+ _a = [__assign({}, output)];
14030
+ _f = {};
14031
+ return [4, parseBody(output.body, context)];
14032
+ case 1:
14033
+ parsedOutput = __assign.apply(void 0, _a.concat([(_f.body = _g.sent(), _f)]));
14034
+ errorCode = "UnknownError";
14035
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
14036
+ _b = errorCode;
14037
+ switch (_b) {
14038
+ case "InternalServiceException": return [3, 2];
14039
+ case "com.amazonaws.connect#InternalServiceException": return [3, 2];
14040
+ case "InvalidRequestException": return [3, 4];
14041
+ case "com.amazonaws.connect#InvalidRequestException": return [3, 4];
14042
+ case "ResourceNotFoundException": return [3, 6];
14043
+ case "com.amazonaws.connect#ResourceNotFoundException": return [3, 6];
14044
+ }
14045
+ return [3, 8];
14046
+ case 2:
14047
+ _c = [{}];
14048
+ return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
14049
+ case 3:
14050
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
14051
+ return [3, 9];
14052
+ case 4:
14053
+ _d = [{}];
14054
+ return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
14055
+ case 5:
14056
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
14057
+ return [3, 9];
14058
+ case 6:
14059
+ _e = [{}];
14060
+ return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
14061
+ case 7:
14062
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
14063
+ return [3, 9];
14064
+ case 8:
14065
+ parsedBody = parsedOutput.body;
14066
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
14067
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
14068
+ _g.label = 9;
14069
+ case 9:
14070
+ message = response.message || response.Message || errorCode;
14071
+ response.message = message;
14072
+ delete response.Message;
14073
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
14074
+ }
14075
+ });
14076
+ }); };
14077
+ export var deserializeAws_restJson1TagResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
14078
+ var contents;
14079
+ return __generator(this, function (_a) {
14080
+ switch (_a.label) {
14081
+ case 0:
14082
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
14083
+ return [2, deserializeAws_restJson1TagResourceCommandError(output, context)];
14084
+ }
14085
+ contents = {
14086
+ $metadata: deserializeMetadata(output),
14087
+ };
14088
+ return [4, collectBody(output.body, context)];
14089
+ case 1:
14090
+ _a.sent();
14091
+ return [2, Promise.resolve(contents)];
14092
+ }
14093
+ });
14094
+ }); };
14095
+ var deserializeAws_restJson1TagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
14096
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
14097
+ var _h;
12033
14098
  return __generator(this, function (_j) {
12034
14099
  switch (_j.label) {
12035
14100
  case 0:
@@ -12289,6 +14354,94 @@ var deserializeAws_restJson1UpdateAgentStatusCommandError = function (output, co
12289
14354
  }
12290
14355
  });
12291
14356
  }); };
14357
+ export var deserializeAws_restJson1UpdateContactCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
14358
+ var contents;
14359
+ return __generator(this, function (_a) {
14360
+ switch (_a.label) {
14361
+ case 0:
14362
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
14363
+ return [2, deserializeAws_restJson1UpdateContactCommandError(output, context)];
14364
+ }
14365
+ contents = {
14366
+ $metadata: deserializeMetadata(output),
14367
+ };
14368
+ return [4, collectBody(output.body, context)];
14369
+ case 1:
14370
+ _a.sent();
14371
+ return [2, Promise.resolve(contents)];
14372
+ }
14373
+ });
14374
+ }); };
14375
+ var deserializeAws_restJson1UpdateContactCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
14376
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
14377
+ var _h;
14378
+ return __generator(this, function (_j) {
14379
+ switch (_j.label) {
14380
+ case 0:
14381
+ _a = [__assign({}, output)];
14382
+ _h = {};
14383
+ return [4, parseBody(output.body, context)];
14384
+ case 1:
14385
+ parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
14386
+ errorCode = "UnknownError";
14387
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
14388
+ _b = errorCode;
14389
+ switch (_b) {
14390
+ case "InternalServiceException": return [3, 2];
14391
+ case "com.amazonaws.connect#InternalServiceException": return [3, 2];
14392
+ case "InvalidParameterException": return [3, 4];
14393
+ case "com.amazonaws.connect#InvalidParameterException": return [3, 4];
14394
+ case "InvalidRequestException": return [3, 6];
14395
+ case "com.amazonaws.connect#InvalidRequestException": return [3, 6];
14396
+ case "ResourceNotFoundException": return [3, 8];
14397
+ case "com.amazonaws.connect#ResourceNotFoundException": return [3, 8];
14398
+ case "ThrottlingException": return [3, 10];
14399
+ case "com.amazonaws.connect#ThrottlingException": return [3, 10];
14400
+ }
14401
+ return [3, 12];
14402
+ case 2:
14403
+ _c = [{}];
14404
+ return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
14405
+ case 3:
14406
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
14407
+ return [3, 13];
14408
+ case 4:
14409
+ _d = [{}];
14410
+ return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
14411
+ case 5:
14412
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
14413
+ return [3, 13];
14414
+ case 6:
14415
+ _e = [{}];
14416
+ return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
14417
+ case 7:
14418
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
14419
+ return [3, 13];
14420
+ case 8:
14421
+ _f = [{}];
14422
+ return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
14423
+ case 9:
14424
+ response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
14425
+ return [3, 13];
14426
+ case 10:
14427
+ _g = [{}];
14428
+ return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
14429
+ case 11:
14430
+ response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
14431
+ return [3, 13];
14432
+ case 12:
14433
+ parsedBody = parsedOutput.body;
14434
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
14435
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
14436
+ _j.label = 13;
14437
+ case 13:
14438
+ message = response.message || response.Message || errorCode;
14439
+ response.message = message;
14440
+ delete response.Message;
14441
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
14442
+ }
14443
+ });
14444
+ }); };
12292
14445
  export var deserializeAws_restJson1UpdateContactAttributesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
12293
14446
  var contents;
12294
14447
  return __generator(this, function (_a) {
@@ -12465,13 +14618,405 @@ var deserializeAws_restJson1UpdateContactFlowContentCommandError = function (out
12465
14618
  }
12466
14619
  });
12467
14620
  }); };
12468
- export var deserializeAws_restJson1UpdateContactFlowNameCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
14621
+ export var deserializeAws_restJson1UpdateContactFlowMetadataCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
14622
+ var contents;
14623
+ return __generator(this, function (_a) {
14624
+ switch (_a.label) {
14625
+ case 0:
14626
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
14627
+ return [2, deserializeAws_restJson1UpdateContactFlowMetadataCommandError(output, context)];
14628
+ }
14629
+ contents = {
14630
+ $metadata: deserializeMetadata(output),
14631
+ };
14632
+ return [4, collectBody(output.body, context)];
14633
+ case 1:
14634
+ _a.sent();
14635
+ return [2, Promise.resolve(contents)];
14636
+ }
14637
+ });
14638
+ }); };
14639
+ var deserializeAws_restJson1UpdateContactFlowMetadataCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
14640
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, parsedBody, message;
14641
+ var _j;
14642
+ return __generator(this, function (_k) {
14643
+ switch (_k.label) {
14644
+ case 0:
14645
+ _a = [__assign({}, output)];
14646
+ _j = {};
14647
+ return [4, parseBody(output.body, context)];
14648
+ case 1:
14649
+ parsedOutput = __assign.apply(void 0, _a.concat([(_j.body = _k.sent(), _j)]));
14650
+ errorCode = "UnknownError";
14651
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
14652
+ _b = errorCode;
14653
+ switch (_b) {
14654
+ case "DuplicateResourceException": return [3, 2];
14655
+ case "com.amazonaws.connect#DuplicateResourceException": return [3, 2];
14656
+ case "InternalServiceException": return [3, 4];
14657
+ case "com.amazonaws.connect#InternalServiceException": return [3, 4];
14658
+ case "InvalidParameterException": return [3, 6];
14659
+ case "com.amazonaws.connect#InvalidParameterException": return [3, 6];
14660
+ case "InvalidRequestException": return [3, 8];
14661
+ case "com.amazonaws.connect#InvalidRequestException": return [3, 8];
14662
+ case "ResourceNotFoundException": return [3, 10];
14663
+ case "com.amazonaws.connect#ResourceNotFoundException": return [3, 10];
14664
+ case "ThrottlingException": return [3, 12];
14665
+ case "com.amazonaws.connect#ThrottlingException": return [3, 12];
14666
+ }
14667
+ return [3, 14];
14668
+ case 2:
14669
+ _c = [{}];
14670
+ return [4, deserializeAws_restJson1DuplicateResourceExceptionResponse(parsedOutput, context)];
14671
+ case 3:
14672
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
14673
+ return [3, 15];
14674
+ case 4:
14675
+ _d = [{}];
14676
+ return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
14677
+ case 5:
14678
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
14679
+ return [3, 15];
14680
+ case 6:
14681
+ _e = [{}];
14682
+ return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
14683
+ case 7:
14684
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
14685
+ return [3, 15];
14686
+ case 8:
14687
+ _f = [{}];
14688
+ return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
14689
+ case 9:
14690
+ response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
14691
+ return [3, 15];
14692
+ case 10:
14693
+ _g = [{}];
14694
+ return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
14695
+ case 11:
14696
+ response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
14697
+ return [3, 15];
14698
+ case 12:
14699
+ _h = [{}];
14700
+ return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
14701
+ case 13:
14702
+ response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
14703
+ return [3, 15];
14704
+ case 14:
14705
+ parsedBody = parsedOutput.body;
14706
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
14707
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
14708
+ _k.label = 15;
14709
+ case 15:
14710
+ message = response.message || response.Message || errorCode;
14711
+ response.message = message;
14712
+ delete response.Message;
14713
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
14714
+ }
14715
+ });
14716
+ }); };
14717
+ export var deserializeAws_restJson1UpdateContactFlowModuleContentCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
14718
+ var contents;
14719
+ return __generator(this, function (_a) {
14720
+ switch (_a.label) {
14721
+ case 0:
14722
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
14723
+ return [2, deserializeAws_restJson1UpdateContactFlowModuleContentCommandError(output, context)];
14724
+ }
14725
+ contents = {
14726
+ $metadata: deserializeMetadata(output),
14727
+ };
14728
+ return [4, collectBody(output.body, context)];
14729
+ case 1:
14730
+ _a.sent();
14731
+ return [2, Promise.resolve(contents)];
14732
+ }
14733
+ });
14734
+ }); };
14735
+ var deserializeAws_restJson1UpdateContactFlowModuleContentCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
14736
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, parsedBody, message;
14737
+ var _j;
14738
+ return __generator(this, function (_k) {
14739
+ switch (_k.label) {
14740
+ case 0:
14741
+ _a = [__assign({}, output)];
14742
+ _j = {};
14743
+ return [4, parseBody(output.body, context)];
14744
+ case 1:
14745
+ parsedOutput = __assign.apply(void 0, _a.concat([(_j.body = _k.sent(), _j)]));
14746
+ errorCode = "UnknownError";
14747
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
14748
+ _b = errorCode;
14749
+ switch (_b) {
14750
+ case "AccessDeniedException": return [3, 2];
14751
+ case "com.amazonaws.connect#AccessDeniedException": return [3, 2];
14752
+ case "InternalServiceException": return [3, 4];
14753
+ case "com.amazonaws.connect#InternalServiceException": return [3, 4];
14754
+ case "InvalidContactFlowModuleException": return [3, 6];
14755
+ case "com.amazonaws.connect#InvalidContactFlowModuleException": return [3, 6];
14756
+ case "InvalidRequestException": return [3, 8];
14757
+ case "com.amazonaws.connect#InvalidRequestException": return [3, 8];
14758
+ case "ResourceNotFoundException": return [3, 10];
14759
+ case "com.amazonaws.connect#ResourceNotFoundException": return [3, 10];
14760
+ case "ThrottlingException": return [3, 12];
14761
+ case "com.amazonaws.connect#ThrottlingException": return [3, 12];
14762
+ }
14763
+ return [3, 14];
14764
+ case 2:
14765
+ _c = [{}];
14766
+ return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
14767
+ case 3:
14768
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
14769
+ return [3, 15];
14770
+ case 4:
14771
+ _d = [{}];
14772
+ return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
14773
+ case 5:
14774
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
14775
+ return [3, 15];
14776
+ case 6:
14777
+ _e = [{}];
14778
+ return [4, deserializeAws_restJson1InvalidContactFlowModuleExceptionResponse(parsedOutput, context)];
14779
+ case 7:
14780
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
14781
+ return [3, 15];
14782
+ case 8:
14783
+ _f = [{}];
14784
+ return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
14785
+ case 9:
14786
+ response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
14787
+ return [3, 15];
14788
+ case 10:
14789
+ _g = [{}];
14790
+ return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
14791
+ case 11:
14792
+ response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
14793
+ return [3, 15];
14794
+ case 12:
14795
+ _h = [{}];
14796
+ return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
14797
+ case 13:
14798
+ response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
14799
+ return [3, 15];
14800
+ case 14:
14801
+ parsedBody = parsedOutput.body;
14802
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
14803
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
14804
+ _k.label = 15;
14805
+ case 15:
14806
+ message = response.message || response.Message || errorCode;
14807
+ response.message = message;
14808
+ delete response.Message;
14809
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
14810
+ }
14811
+ });
14812
+ }); };
14813
+ export var deserializeAws_restJson1UpdateContactFlowModuleMetadataCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
14814
+ var contents;
14815
+ return __generator(this, function (_a) {
14816
+ switch (_a.label) {
14817
+ case 0:
14818
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
14819
+ return [2, deserializeAws_restJson1UpdateContactFlowModuleMetadataCommandError(output, context)];
14820
+ }
14821
+ contents = {
14822
+ $metadata: deserializeMetadata(output),
14823
+ };
14824
+ return [4, collectBody(output.body, context)];
14825
+ case 1:
14826
+ _a.sent();
14827
+ return [2, Promise.resolve(contents)];
14828
+ }
14829
+ });
14830
+ }); };
14831
+ var deserializeAws_restJson1UpdateContactFlowModuleMetadataCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
14832
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, _j, parsedBody, message;
14833
+ var _k;
14834
+ return __generator(this, function (_l) {
14835
+ switch (_l.label) {
14836
+ case 0:
14837
+ _a = [__assign({}, output)];
14838
+ _k = {};
14839
+ return [4, parseBody(output.body, context)];
14840
+ case 1:
14841
+ parsedOutput = __assign.apply(void 0, _a.concat([(_k.body = _l.sent(), _k)]));
14842
+ errorCode = "UnknownError";
14843
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
14844
+ _b = errorCode;
14845
+ switch (_b) {
14846
+ case "AccessDeniedException": return [3, 2];
14847
+ case "com.amazonaws.connect#AccessDeniedException": return [3, 2];
14848
+ case "DuplicateResourceException": return [3, 4];
14849
+ case "com.amazonaws.connect#DuplicateResourceException": return [3, 4];
14850
+ case "InternalServiceException": return [3, 6];
14851
+ case "com.amazonaws.connect#InternalServiceException": return [3, 6];
14852
+ case "InvalidParameterException": return [3, 8];
14853
+ case "com.amazonaws.connect#InvalidParameterException": return [3, 8];
14854
+ case "InvalidRequestException": return [3, 10];
14855
+ case "com.amazonaws.connect#InvalidRequestException": return [3, 10];
14856
+ case "ResourceNotFoundException": return [3, 12];
14857
+ case "com.amazonaws.connect#ResourceNotFoundException": return [3, 12];
14858
+ case "ThrottlingException": return [3, 14];
14859
+ case "com.amazonaws.connect#ThrottlingException": return [3, 14];
14860
+ }
14861
+ return [3, 16];
14862
+ case 2:
14863
+ _c = [{}];
14864
+ return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
14865
+ case 3:
14866
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
14867
+ return [3, 17];
14868
+ case 4:
14869
+ _d = [{}];
14870
+ return [4, deserializeAws_restJson1DuplicateResourceExceptionResponse(parsedOutput, context)];
14871
+ case 5:
14872
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
14873
+ return [3, 17];
14874
+ case 6:
14875
+ _e = [{}];
14876
+ return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
14877
+ case 7:
14878
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
14879
+ return [3, 17];
14880
+ case 8:
14881
+ _f = [{}];
14882
+ return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
14883
+ case 9:
14884
+ response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
14885
+ return [3, 17];
14886
+ case 10:
14887
+ _g = [{}];
14888
+ return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
14889
+ case 11:
14890
+ response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
14891
+ return [3, 17];
14892
+ case 12:
14893
+ _h = [{}];
14894
+ return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
14895
+ case 13:
14896
+ response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
14897
+ return [3, 17];
14898
+ case 14:
14899
+ _j = [{}];
14900
+ return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
14901
+ case 15:
14902
+ response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
14903
+ return [3, 17];
14904
+ case 16:
14905
+ parsedBody = parsedOutput.body;
14906
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
14907
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
14908
+ _l.label = 17;
14909
+ case 17:
14910
+ message = response.message || response.Message || errorCode;
14911
+ response.message = message;
14912
+ delete response.Message;
14913
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
14914
+ }
14915
+ });
14916
+ }); };
14917
+ export var deserializeAws_restJson1UpdateContactFlowNameCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
14918
+ var contents;
14919
+ return __generator(this, function (_a) {
14920
+ switch (_a.label) {
14921
+ case 0:
14922
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
14923
+ return [2, deserializeAws_restJson1UpdateContactFlowNameCommandError(output, context)];
14924
+ }
14925
+ contents = {
14926
+ $metadata: deserializeMetadata(output),
14927
+ };
14928
+ return [4, collectBody(output.body, context)];
14929
+ case 1:
14930
+ _a.sent();
14931
+ return [2, Promise.resolve(contents)];
14932
+ }
14933
+ });
14934
+ }); };
14935
+ var deserializeAws_restJson1UpdateContactFlowNameCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
14936
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, parsedBody, message;
14937
+ var _j;
14938
+ return __generator(this, function (_k) {
14939
+ switch (_k.label) {
14940
+ case 0:
14941
+ _a = [__assign({}, output)];
14942
+ _j = {};
14943
+ return [4, parseBody(output.body, context)];
14944
+ case 1:
14945
+ parsedOutput = __assign.apply(void 0, _a.concat([(_j.body = _k.sent(), _j)]));
14946
+ errorCode = "UnknownError";
14947
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
14948
+ _b = errorCode;
14949
+ switch (_b) {
14950
+ case "DuplicateResourceException": return [3, 2];
14951
+ case "com.amazonaws.connect#DuplicateResourceException": return [3, 2];
14952
+ case "InternalServiceException": return [3, 4];
14953
+ case "com.amazonaws.connect#InternalServiceException": return [3, 4];
14954
+ case "InvalidParameterException": return [3, 6];
14955
+ case "com.amazonaws.connect#InvalidParameterException": return [3, 6];
14956
+ case "InvalidRequestException": return [3, 8];
14957
+ case "com.amazonaws.connect#InvalidRequestException": return [3, 8];
14958
+ case "ResourceNotFoundException": return [3, 10];
14959
+ case "com.amazonaws.connect#ResourceNotFoundException": return [3, 10];
14960
+ case "ThrottlingException": return [3, 12];
14961
+ case "com.amazonaws.connect#ThrottlingException": return [3, 12];
14962
+ }
14963
+ return [3, 14];
14964
+ case 2:
14965
+ _c = [{}];
14966
+ return [4, deserializeAws_restJson1DuplicateResourceExceptionResponse(parsedOutput, context)];
14967
+ case 3:
14968
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
14969
+ return [3, 15];
14970
+ case 4:
14971
+ _d = [{}];
14972
+ return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
14973
+ case 5:
14974
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
14975
+ return [3, 15];
14976
+ case 6:
14977
+ _e = [{}];
14978
+ return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
14979
+ case 7:
14980
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
14981
+ return [3, 15];
14982
+ case 8:
14983
+ _f = [{}];
14984
+ return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
14985
+ case 9:
14986
+ response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
14987
+ return [3, 15];
14988
+ case 10:
14989
+ _g = [{}];
14990
+ return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
14991
+ case 11:
14992
+ response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
14993
+ return [3, 15];
14994
+ case 12:
14995
+ _h = [{}];
14996
+ return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
14997
+ case 13:
14998
+ response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
14999
+ return [3, 15];
15000
+ case 14:
15001
+ parsedBody = parsedOutput.body;
15002
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
15003
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
15004
+ _k.label = 15;
15005
+ case 15:
15006
+ message = response.message || response.Message || errorCode;
15007
+ response.message = message;
15008
+ delete response.Message;
15009
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
15010
+ }
15011
+ });
15012
+ }); };
15013
+ export var deserializeAws_restJson1UpdateContactScheduleCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
12469
15014
  var contents;
12470
15015
  return __generator(this, function (_a) {
12471
15016
  switch (_a.label) {
12472
15017
  case 0:
12473
15018
  if (output.statusCode !== 200 && output.statusCode >= 300) {
12474
- return [2, deserializeAws_restJson1UpdateContactFlowNameCommandError(output, context)];
15019
+ return [2, deserializeAws_restJson1UpdateContactScheduleCommandError(output, context)];
12475
15020
  }
12476
15021
  contents = {
12477
15022
  $metadata: deserializeMetadata(output),
@@ -12483,7 +15028,7 @@ export var deserializeAws_restJson1UpdateContactFlowNameCommand = function (outp
12483
15028
  }
12484
15029
  });
12485
15030
  }); };
12486
- var deserializeAws_restJson1UpdateContactFlowNameCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
15031
+ var deserializeAws_restJson1UpdateContactScheduleCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
12487
15032
  var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, parsedBody, message;
12488
15033
  var _j;
12489
15034
  return __generator(this, function (_k) {
@@ -12498,14 +15043,14 @@ var deserializeAws_restJson1UpdateContactFlowNameCommandError = function (output
12498
15043
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
12499
15044
  _b = errorCode;
12500
15045
  switch (_b) {
12501
- case "DuplicateResourceException": return [3, 2];
12502
- case "com.amazonaws.connect#DuplicateResourceException": return [3, 2];
12503
- case "InternalServiceException": return [3, 4];
12504
- case "com.amazonaws.connect#InternalServiceException": return [3, 4];
12505
- case "InvalidParameterException": return [3, 6];
12506
- case "com.amazonaws.connect#InvalidParameterException": return [3, 6];
12507
- case "InvalidRequestException": return [3, 8];
12508
- case "com.amazonaws.connect#InvalidRequestException": return [3, 8];
15046
+ case "InternalServiceException": return [3, 2];
15047
+ case "com.amazonaws.connect#InternalServiceException": return [3, 2];
15048
+ case "InvalidParameterException": return [3, 4];
15049
+ case "com.amazonaws.connect#InvalidParameterException": return [3, 4];
15050
+ case "InvalidRequestException": return [3, 6];
15051
+ case "com.amazonaws.connect#InvalidRequestException": return [3, 6];
15052
+ case "LimitExceededException": return [3, 8];
15053
+ case "com.amazonaws.connect#LimitExceededException": return [3, 8];
12509
15054
  case "ResourceNotFoundException": return [3, 10];
12510
15055
  case "com.amazonaws.connect#ResourceNotFoundException": return [3, 10];
12511
15056
  case "ThrottlingException": return [3, 12];
@@ -12514,25 +15059,25 @@ var deserializeAws_restJson1UpdateContactFlowNameCommandError = function (output
12514
15059
  return [3, 14];
12515
15060
  case 2:
12516
15061
  _c = [{}];
12517
- return [4, deserializeAws_restJson1DuplicateResourceExceptionResponse(parsedOutput, context)];
15062
+ return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
12518
15063
  case 3:
12519
15064
  response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
12520
15065
  return [3, 15];
12521
15066
  case 4:
12522
15067
  _d = [{}];
12523
- return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
15068
+ return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
12524
15069
  case 5:
12525
15070
  response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
12526
15071
  return [3, 15];
12527
15072
  case 6:
12528
15073
  _e = [{}];
12529
- return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
15074
+ return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
12530
15075
  case 7:
12531
15076
  response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
12532
15077
  return [3, 15];
12533
15078
  case 8:
12534
15079
  _f = [{}];
12535
- return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
15080
+ return [4, deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)];
12536
15081
  case 9:
12537
15082
  response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
12538
15083
  return [3, 15];
@@ -13817,6 +16362,94 @@ var deserializeAws_restJson1UpdateRoutingProfileQueuesCommandError = function (o
13817
16362
  }
13818
16363
  });
13819
16364
  }); };
16365
+ export var deserializeAws_restJson1UpdateSecurityProfileCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
16366
+ var contents;
16367
+ return __generator(this, function (_a) {
16368
+ switch (_a.label) {
16369
+ case 0:
16370
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
16371
+ return [2, deserializeAws_restJson1UpdateSecurityProfileCommandError(output, context)];
16372
+ }
16373
+ contents = {
16374
+ $metadata: deserializeMetadata(output),
16375
+ };
16376
+ return [4, collectBody(output.body, context)];
16377
+ case 1:
16378
+ _a.sent();
16379
+ return [2, Promise.resolve(contents)];
16380
+ }
16381
+ });
16382
+ }); };
16383
+ var deserializeAws_restJson1UpdateSecurityProfileCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
16384
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
16385
+ var _h;
16386
+ return __generator(this, function (_j) {
16387
+ switch (_j.label) {
16388
+ case 0:
16389
+ _a = [__assign({}, output)];
16390
+ _h = {};
16391
+ return [4, parseBody(output.body, context)];
16392
+ case 1:
16393
+ parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
16394
+ errorCode = "UnknownError";
16395
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
16396
+ _b = errorCode;
16397
+ switch (_b) {
16398
+ case "InternalServiceException": return [3, 2];
16399
+ case "com.amazonaws.connect#InternalServiceException": return [3, 2];
16400
+ case "InvalidParameterException": return [3, 4];
16401
+ case "com.amazonaws.connect#InvalidParameterException": return [3, 4];
16402
+ case "InvalidRequestException": return [3, 6];
16403
+ case "com.amazonaws.connect#InvalidRequestException": return [3, 6];
16404
+ case "ResourceNotFoundException": return [3, 8];
16405
+ case "com.amazonaws.connect#ResourceNotFoundException": return [3, 8];
16406
+ case "ThrottlingException": return [3, 10];
16407
+ case "com.amazonaws.connect#ThrottlingException": return [3, 10];
16408
+ }
16409
+ return [3, 12];
16410
+ case 2:
16411
+ _c = [{}];
16412
+ return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
16413
+ case 3:
16414
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
16415
+ return [3, 13];
16416
+ case 4:
16417
+ _d = [{}];
16418
+ return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
16419
+ case 5:
16420
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
16421
+ return [3, 13];
16422
+ case 6:
16423
+ _e = [{}];
16424
+ return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
16425
+ case 7:
16426
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
16427
+ return [3, 13];
16428
+ case 8:
16429
+ _f = [{}];
16430
+ return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
16431
+ case 9:
16432
+ response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
16433
+ return [3, 13];
16434
+ case 10:
16435
+ _g = [{}];
16436
+ return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
16437
+ case 11:
16438
+ response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
16439
+ return [3, 13];
16440
+ case 12:
16441
+ parsedBody = parsedOutput.body;
16442
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
16443
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
16444
+ _j.label = 13;
16445
+ case 13:
16446
+ message = response.message || response.Message || errorCode;
16447
+ response.message = message;
16448
+ delete response.Message;
16449
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
16450
+ }
16451
+ });
16452
+ }); };
13820
16453
  export var deserializeAws_restJson1UpdateUserHierarchyCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
13821
16454
  var contents;
13822
16455
  return __generator(this, function (_a) {
@@ -14449,6 +17082,22 @@ var deserializeAws_restJson1UpdateUserSecurityProfilesCommandError = function (o
14449
17082
  }
14450
17083
  });
14451
17084
  }); };
17085
+ var deserializeAws_restJson1AccessDeniedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
17086
+ var contents, data;
17087
+ return __generator(this, function (_a) {
17088
+ contents = {
17089
+ name: "AccessDeniedException",
17090
+ $fault: "client",
17091
+ $metadata: deserializeMetadata(parsedOutput),
17092
+ Message: undefined,
17093
+ };
17094
+ data = parsedOutput.body;
17095
+ if (data.Message !== undefined && data.Message !== null) {
17096
+ contents.Message = __expectString(data.Message);
17097
+ }
17098
+ return [2, contents];
17099
+ });
17100
+ }); };
14452
17101
  var deserializeAws_restJson1ContactFlowNotPublishedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
14453
17102
  var contents, data;
14454
17103
  return __generator(this, function (_a) {
@@ -14513,6 +17162,22 @@ var deserializeAws_restJson1DuplicateResourceExceptionResponse = function (parse
14513
17162
  return [2, contents];
14514
17163
  });
14515
17164
  }); };
17165
+ var deserializeAws_restJson1IdempotencyExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
17166
+ var contents, data;
17167
+ return __generator(this, function (_a) {
17168
+ contents = {
17169
+ name: "IdempotencyException",
17170
+ $fault: "client",
17171
+ $metadata: deserializeMetadata(parsedOutput),
17172
+ Message: undefined,
17173
+ };
17174
+ data = parsedOutput.body;
17175
+ if (data.Message !== undefined && data.Message !== null) {
17176
+ contents.Message = __expectString(data.Message);
17177
+ }
17178
+ return [2, contents];
17179
+ });
17180
+ }); };
14516
17181
  var deserializeAws_restJson1InternalServiceExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
14517
17182
  var contents, data;
14518
17183
  return __generator(this, function (_a) {
@@ -14545,6 +17210,22 @@ var deserializeAws_restJson1InvalidContactFlowExceptionResponse = function (pars
14545
17210
  return [2, contents];
14546
17211
  });
14547
17212
  }); };
17213
+ var deserializeAws_restJson1InvalidContactFlowModuleExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
17214
+ var contents, data;
17215
+ return __generator(this, function (_a) {
17216
+ contents = {
17217
+ name: "InvalidContactFlowModuleException",
17218
+ $fault: "client",
17219
+ $metadata: deserializeMetadata(parsedOutput),
17220
+ Problems: undefined,
17221
+ };
17222
+ data = parsedOutput.body;
17223
+ if (data.Problems !== undefined && data.Problems !== null) {
17224
+ contents.Problems = deserializeAws_restJson1Problems(data.Problems, context);
17225
+ }
17226
+ return [2, contents];
17227
+ });
17228
+ }); };
14548
17229
  var deserializeAws_restJson1InvalidParameterExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
14549
17230
  var contents, data;
14550
17231
  return __generator(this, function (_a) {
@@ -14743,6 +17424,10 @@ var serializeAws_restJson1Channels = function (input, context) {
14743
17424
  var serializeAws_restJson1ChatMessage = function (input, context) {
14744
17425
  return __assign(__assign({}, (input.Content !== undefined && input.Content !== null && { Content: input.Content })), (input.ContentType !== undefined && input.ContentType !== null && { ContentType: input.ContentType }));
14745
17426
  };
17427
+ var serializeAws_restJson1ChatStreamingConfiguration = function (input, context) {
17428
+ return __assign({}, (input.StreamingEndpointArn !== undefined &&
17429
+ input.StreamingEndpointArn !== null && { StreamingEndpointArn: input.StreamingEndpointArn }));
17430
+ };
14746
17431
  var serializeAws_restJson1ContactReferences = function (input, context) {
14747
17432
  return Object.entries(input).reduce(function (acc, _a) {
14748
17433
  var _b;
@@ -14886,6 +17571,16 @@ var serializeAws_restJson1OutboundCallerConfig = function (input, context) {
14886
17571
  var serializeAws_restJson1ParticipantDetails = function (input, context) {
14887
17572
  return __assign({}, (input.DisplayName !== undefined && input.DisplayName !== null && { DisplayName: input.DisplayName }));
14888
17573
  };
17574
+ var serializeAws_restJson1PermissionsList = function (input, context) {
17575
+ return input
17576
+ .filter(function (e) { return e != null; })
17577
+ .map(function (entry) {
17578
+ if (entry === null) {
17579
+ return null;
17580
+ }
17581
+ return entry;
17582
+ });
17583
+ };
14889
17584
  var serializeAws_restJson1PhoneNumberQuickConnectConfig = function (input, context) {
14890
17585
  return __assign({}, (input.PhoneNumber !== undefined && input.PhoneNumber !== null && { PhoneNumber: input.PhoneNumber }));
14891
17586
  };
@@ -15002,6 +17697,14 @@ var serializeAws_restJson1VoiceRecordingConfiguration = function (input, context
15002
17697
  return __assign({}, (input.VoiceRecordingTrack !== undefined &&
15003
17698
  input.VoiceRecordingTrack !== null && { VoiceRecordingTrack: input.VoiceRecordingTrack }));
15004
17699
  };
17700
+ var deserializeAws_restJson1AgentInfo = function (output, context) {
17701
+ return {
17702
+ ConnectedToAgentTimestamp: output.ConnectedToAgentTimestamp !== undefined && output.ConnectedToAgentTimestamp !== null
17703
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ConnectedToAgentTimestamp)))
17704
+ : undefined,
17705
+ Id: __expectString(output.Id),
17706
+ };
17707
+ };
15005
17708
  var deserializeAws_restJson1AgentStatus = function (output, context) {
15006
17709
  return {
15007
17710
  AgentStatusARN: __expectString(output.AgentStatusARN),
@@ -15034,6 +17737,13 @@ var deserializeAws_restJson1AgentStatusSummaryList = function (output, context)
15034
17737
  return deserializeAws_restJson1AgentStatusSummary(entry, context);
15035
17738
  });
15036
17739
  };
17740
+ var deserializeAws_restJson1AttachmentReference = function (output, context) {
17741
+ return {
17742
+ Name: __expectString(output.Name),
17743
+ Status: __expectString(output.Status),
17744
+ Value: __expectString(output.Value),
17745
+ };
17746
+ };
15037
17747
  var deserializeAws_restJson1Attribute = function (output, context) {
15038
17748
  return {
15039
17749
  AttributeType: __expectString(output.AttributeType),
@@ -15060,6 +17770,36 @@ var deserializeAws_restJson1AttributesList = function (output, context) {
15060
17770
  return deserializeAws_restJson1Attribute(entry, context);
15061
17771
  });
15062
17772
  };
17773
+ var deserializeAws_restJson1Contact = function (output, context) {
17774
+ return {
17775
+ AgentInfo: output.AgentInfo !== undefined && output.AgentInfo !== null
17776
+ ? deserializeAws_restJson1AgentInfo(output.AgentInfo, context)
17777
+ : undefined,
17778
+ Arn: __expectString(output.Arn),
17779
+ Channel: __expectString(output.Channel),
17780
+ Description: __expectString(output.Description),
17781
+ DisconnectTimestamp: output.DisconnectTimestamp !== undefined && output.DisconnectTimestamp !== null
17782
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DisconnectTimestamp)))
17783
+ : undefined,
17784
+ Id: __expectString(output.Id),
17785
+ InitialContactId: __expectString(output.InitialContactId),
17786
+ InitiationMethod: __expectString(output.InitiationMethod),
17787
+ InitiationTimestamp: output.InitiationTimestamp !== undefined && output.InitiationTimestamp !== null
17788
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.InitiationTimestamp)))
17789
+ : undefined,
17790
+ LastUpdateTimestamp: output.LastUpdateTimestamp !== undefined && output.LastUpdateTimestamp !== null
17791
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdateTimestamp)))
17792
+ : undefined,
17793
+ Name: __expectString(output.Name),
17794
+ PreviousContactId: __expectString(output.PreviousContactId),
17795
+ QueueInfo: output.QueueInfo !== undefined && output.QueueInfo !== null
17796
+ ? deserializeAws_restJson1QueueInfo(output.QueueInfo, context)
17797
+ : undefined,
17798
+ ScheduledTimestamp: output.ScheduledTimestamp !== undefined && output.ScheduledTimestamp !== null
17799
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ScheduledTimestamp)))
17800
+ : undefined,
17801
+ };
17802
+ };
15063
17803
  var deserializeAws_restJson1ContactFlow = function (output, context) {
15064
17804
  return {
15065
17805
  Arn: __expectString(output.Arn),
@@ -15067,15 +17807,49 @@ var deserializeAws_restJson1ContactFlow = function (output, context) {
15067
17807
  Description: __expectString(output.Description),
15068
17808
  Id: __expectString(output.Id),
15069
17809
  Name: __expectString(output.Name),
17810
+ State: __expectString(output.State),
15070
17811
  Tags: output.Tags !== undefined && output.Tags !== null
15071
17812
  ? deserializeAws_restJson1TagMap(output.Tags, context)
15072
17813
  : undefined,
15073
17814
  Type: __expectString(output.Type),
15074
17815
  };
15075
17816
  };
17817
+ var deserializeAws_restJson1ContactFlowModule = function (output, context) {
17818
+ return {
17819
+ Arn: __expectString(output.Arn),
17820
+ Content: __expectString(output.Content),
17821
+ Description: __expectString(output.Description),
17822
+ Id: __expectString(output.Id),
17823
+ Name: __expectString(output.Name),
17824
+ State: __expectString(output.State),
17825
+ Status: __expectString(output.Status),
17826
+ Tags: output.Tags !== undefined && output.Tags !== null
17827
+ ? deserializeAws_restJson1TagMap(output.Tags, context)
17828
+ : undefined,
17829
+ };
17830
+ };
17831
+ var deserializeAws_restJson1ContactFlowModulesSummaryList = function (output, context) {
17832
+ return (output || [])
17833
+ .filter(function (e) { return e != null; })
17834
+ .map(function (entry) {
17835
+ if (entry === null) {
17836
+ return null;
17837
+ }
17838
+ return deserializeAws_restJson1ContactFlowModuleSummary(entry, context);
17839
+ });
17840
+ };
17841
+ var deserializeAws_restJson1ContactFlowModuleSummary = function (output, context) {
17842
+ return {
17843
+ Arn: __expectString(output.Arn),
17844
+ Id: __expectString(output.Id),
17845
+ Name: __expectString(output.Name),
17846
+ State: __expectString(output.State),
17847
+ };
17848
+ };
15076
17849
  var deserializeAws_restJson1ContactFlowSummary = function (output, context) {
15077
17850
  return {
15078
17851
  Arn: __expectString(output.Arn),
17852
+ ContactFlowState: __expectString(output.ContactFlowState),
15079
17853
  ContactFlowType: __expectString(output.ContactFlowType),
15080
17854
  Id: __expectString(output.Id),
15081
17855
  Name: __expectString(output.Name),
@@ -15542,6 +18316,16 @@ var deserializeAws_restJson1OutboundCallerConfig = function (output, context) {
15542
18316
  OutboundFlowId: __expectString(output.OutboundFlowId),
15543
18317
  };
15544
18318
  };
18319
+ var deserializeAws_restJson1PermissionsList = function (output, context) {
18320
+ return (output || [])
18321
+ .filter(function (e) { return e != null; })
18322
+ .map(function (entry) {
18323
+ if (entry === null) {
18324
+ return null;
18325
+ }
18326
+ return __expectString(entry);
18327
+ });
18328
+ };
15545
18329
  var deserializeAws_restJson1PhoneNumberQuickConnectConfig = function (output, context) {
15546
18330
  return {
15547
18331
  PhoneNumber: __expectString(output.PhoneNumber),
@@ -15615,6 +18399,14 @@ var deserializeAws_restJson1Queue = function (output, context) {
15615
18399
  : undefined,
15616
18400
  };
15617
18401
  };
18402
+ var deserializeAws_restJson1QueueInfo = function (output, context) {
18403
+ return {
18404
+ EnqueueTimestamp: output.EnqueueTimestamp !== undefined && output.EnqueueTimestamp !== null
18405
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EnqueueTimestamp)))
18406
+ : undefined,
18407
+ Id: __expectString(output.Id),
18408
+ };
18409
+ };
15618
18410
  var deserializeAws_restJson1QueueQuickConnectConfig = function (output, context) {
15619
18411
  return {
15620
18412
  ContactFlowId: __expectString(output.ContactFlowId),
@@ -15691,6 +18483,29 @@ var deserializeAws_restJson1QuickConnectSummaryList = function (output, context)
15691
18483
  return deserializeAws_restJson1QuickConnectSummary(entry, context);
15692
18484
  });
15693
18485
  };
18486
+ var deserializeAws_restJson1ReferenceSummary = function (output, context) {
18487
+ if (output.Attachment !== undefined && output.Attachment !== null) {
18488
+ return {
18489
+ Attachment: deserializeAws_restJson1AttachmentReference(output.Attachment, context),
18490
+ };
18491
+ }
18492
+ if (output.Url !== undefined && output.Url !== null) {
18493
+ return {
18494
+ Url: deserializeAws_restJson1UrlReference(output.Url, context),
18495
+ };
18496
+ }
18497
+ return { $unknown: Object.entries(output)[0] };
18498
+ };
18499
+ var deserializeAws_restJson1ReferenceSummaryList = function (output, context) {
18500
+ return (output || [])
18501
+ .filter(function (e) { return e != null; })
18502
+ .map(function (entry) {
18503
+ if (entry === null) {
18504
+ return null;
18505
+ }
18506
+ return deserializeAws_restJson1ReferenceSummary(__expectUnion(entry), context);
18507
+ });
18508
+ };
15694
18509
  var deserializeAws_restJson1RoutingProfile = function (output, context) {
15695
18510
  return {
15696
18511
  DefaultOutboundQueueId: __expectString(output.DefaultOutboundQueueId),
@@ -15772,6 +18587,18 @@ var deserializeAws_restJson1SecurityKeysList = function (output, context) {
15772
18587
  return deserializeAws_restJson1SecurityKey(entry, context);
15773
18588
  });
15774
18589
  };
18590
+ var deserializeAws_restJson1SecurityProfile = function (output, context) {
18591
+ return {
18592
+ Arn: __expectString(output.Arn),
18593
+ Description: __expectString(output.Description),
18594
+ Id: __expectString(output.Id),
18595
+ OrganizationResourceId: __expectString(output.OrganizationResourceId),
18596
+ SecurityProfileName: __expectString(output.SecurityProfileName),
18597
+ Tags: output.Tags !== undefined && output.Tags !== null
18598
+ ? deserializeAws_restJson1TagMap(output.Tags, context)
18599
+ : undefined,
18600
+ };
18601
+ };
15775
18602
  var deserializeAws_restJson1SecurityProfileIds = function (output, context) {
15776
18603
  return (output || [])
15777
18604
  .filter(function (e) { return e != null; })
@@ -15815,6 +18642,12 @@ var deserializeAws_restJson1Threshold = function (output, context) {
15815
18642
  ThresholdValue: __limitedParseDouble(output.ThresholdValue),
15816
18643
  };
15817
18644
  };
18645
+ var deserializeAws_restJson1UrlReference = function (output, context) {
18646
+ return {
18647
+ Name: __expectString(output.Name),
18648
+ Value: __expectString(output.Value),
18649
+ };
18650
+ };
15818
18651
  var deserializeAws_restJson1UseCase = function (output, context) {
15819
18652
  return {
15820
18653
  UseCaseArn: __expectString(output.UseCaseArn),