@aws-sdk/client-chime-sdk-voice 3.297.0 → 3.299.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 (220) hide show
  1. package/README.md +152 -0
  2. package/dist-cjs/ChimeSDKVoice.js +285 -0
  3. package/dist-cjs/commands/BatchDeletePhoneNumberCommand.js +1 -1
  4. package/dist-cjs/commands/CreateSipMediaApplicationCallCommand.js +1 -1
  5. package/dist-cjs/commands/CreateSipRuleCommand.js +2 -3
  6. package/dist-cjs/commands/CreateVoiceConnectorCommand.js +2 -3
  7. package/dist-cjs/commands/CreateVoiceConnectorGroupCommand.js +2 -3
  8. package/dist-cjs/commands/CreateVoiceProfileCommand.js +46 -0
  9. package/dist-cjs/commands/CreateVoiceProfileDomainCommand.js +46 -0
  10. package/dist-cjs/commands/DeletePhoneNumberCommand.js +1 -1
  11. package/dist-cjs/commands/DeleteProxySessionCommand.js +2 -3
  12. package/dist-cjs/commands/DeleteSipMediaApplicationCommand.js +2 -3
  13. package/dist-cjs/commands/DeleteSipRuleCommand.js +2 -3
  14. package/dist-cjs/commands/DeleteVoiceConnectorCommand.js +2 -3
  15. package/dist-cjs/commands/DeleteVoiceConnectorEmergencyCallingConfigurationCommand.js +2 -3
  16. package/dist-cjs/commands/DeleteVoiceConnectorGroupCommand.js +2 -3
  17. package/dist-cjs/commands/DeleteVoiceConnectorOriginationCommand.js +2 -3
  18. package/dist-cjs/commands/DeleteVoiceConnectorProxyCommand.js +2 -3
  19. package/dist-cjs/commands/DeleteVoiceConnectorStreamingConfigurationCommand.js +2 -3
  20. package/dist-cjs/commands/DeleteVoiceConnectorTerminationCommand.js +2 -3
  21. package/dist-cjs/commands/DeleteVoiceConnectorTerminationCredentialsCommand.js +1 -1
  22. package/dist-cjs/commands/DeleteVoiceProfileCommand.js +45 -0
  23. package/dist-cjs/commands/DeleteVoiceProfileDomainCommand.js +45 -0
  24. package/dist-cjs/commands/GetGlobalSettingsCommand.js +2 -3
  25. package/dist-cjs/commands/GetPhoneNumberOrderCommand.js +1 -1
  26. package/dist-cjs/commands/GetPhoneNumberSettingsCommand.js +1 -1
  27. package/dist-cjs/commands/GetProxySessionCommand.js +1 -1
  28. package/dist-cjs/commands/GetSipMediaApplicationAlexaSkillConfigurationCommand.js +1 -1
  29. package/dist-cjs/commands/GetSipMediaApplicationCommand.js +1 -1
  30. package/dist-cjs/commands/GetSipMediaApplicationLoggingConfigurationCommand.js +2 -3
  31. package/dist-cjs/commands/GetSipRuleCommand.js +2 -3
  32. package/dist-cjs/commands/GetSpeakerSearchTaskCommand.js +45 -0
  33. package/dist-cjs/commands/GetVoiceConnectorCommand.js +2 -3
  34. package/dist-cjs/commands/GetVoiceConnectorEmergencyCallingConfigurationCommand.js +1 -1
  35. package/dist-cjs/commands/GetVoiceConnectorGroupCommand.js +2 -3
  36. package/dist-cjs/commands/GetVoiceConnectorLoggingConfigurationCommand.js +2 -3
  37. package/dist-cjs/commands/GetVoiceConnectorOriginationCommand.js +2 -3
  38. package/dist-cjs/commands/GetVoiceConnectorProxyCommand.js +1 -1
  39. package/dist-cjs/commands/GetVoiceConnectorStreamingConfigurationCommand.js +1 -1
  40. package/dist-cjs/commands/GetVoiceConnectorTerminationCommand.js +1 -1
  41. package/dist-cjs/commands/GetVoiceConnectorTerminationHealthCommand.js +2 -3
  42. package/dist-cjs/commands/GetVoiceProfileCommand.js +46 -0
  43. package/dist-cjs/commands/GetVoiceProfileDomainCommand.js +46 -0
  44. package/dist-cjs/commands/GetVoiceToneAnalysisTaskCommand.js +45 -0
  45. package/dist-cjs/commands/ListAvailableVoiceConnectorRegionsCommand.js +2 -3
  46. package/dist-cjs/commands/ListPhoneNumberOrdersCommand.js +1 -1
  47. package/dist-cjs/commands/ListPhoneNumbersCommand.js +1 -1
  48. package/dist-cjs/commands/ListProxySessionsCommand.js +1 -1
  49. package/dist-cjs/commands/ListSipMediaApplicationsCommand.js +1 -1
  50. package/dist-cjs/commands/ListSipRulesCommand.js +2 -3
  51. package/dist-cjs/commands/ListSupportedPhoneNumberCountriesCommand.js +2 -3
  52. package/dist-cjs/commands/ListTagsForResourceCommand.js +46 -0
  53. package/dist-cjs/commands/ListVoiceConnectorGroupsCommand.js +2 -3
  54. package/dist-cjs/commands/ListVoiceConnectorTerminationCredentialsCommand.js +1 -1
  55. package/dist-cjs/commands/ListVoiceConnectorsCommand.js +2 -3
  56. package/dist-cjs/commands/ListVoiceProfileDomainsCommand.js +46 -0
  57. package/dist-cjs/commands/ListVoiceProfilesCommand.js +46 -0
  58. package/dist-cjs/commands/PutSipMediaApplicationLoggingConfigurationCommand.js +2 -3
  59. package/dist-cjs/commands/PutVoiceConnectorLoggingConfigurationCommand.js +2 -3
  60. package/dist-cjs/commands/PutVoiceConnectorOriginationCommand.js +2 -3
  61. package/dist-cjs/commands/PutVoiceConnectorTerminationCredentialsCommand.js +1 -1
  62. package/dist-cjs/commands/SearchAvailablePhoneNumbersCommand.js +1 -1
  63. package/dist-cjs/commands/StartSpeakerSearchTaskCommand.js +45 -0
  64. package/dist-cjs/commands/StartVoiceToneAnalysisTaskCommand.js +45 -0
  65. package/dist-cjs/commands/StopSpeakerSearchTaskCommand.js +45 -0
  66. package/dist-cjs/commands/StopVoiceToneAnalysisTaskCommand.js +45 -0
  67. package/dist-cjs/commands/TagResourceCommand.js +46 -0
  68. package/dist-cjs/commands/UntagResourceCommand.js +46 -0
  69. package/dist-cjs/commands/UpdateGlobalSettingsCommand.js +2 -3
  70. package/dist-cjs/commands/UpdatePhoneNumberSettingsCommand.js +1 -1
  71. package/dist-cjs/commands/UpdateProxySessionCommand.js +1 -1
  72. package/dist-cjs/commands/UpdateSipMediaApplicationCallCommand.js +1 -1
  73. package/dist-cjs/commands/UpdateSipRuleCommand.js +2 -3
  74. package/dist-cjs/commands/UpdateVoiceConnectorCommand.js +2 -3
  75. package/dist-cjs/commands/UpdateVoiceConnectorGroupCommand.js +2 -3
  76. package/dist-cjs/commands/UpdateVoiceProfileCommand.js +46 -0
  77. package/dist-cjs/commands/UpdateVoiceProfileDomainCommand.js +46 -0
  78. package/dist-cjs/commands/index.js +19 -0
  79. package/dist-cjs/models/models_0.js +127 -321
  80. package/dist-cjs/pagination/ListVoiceProfileDomainsPaginator.js +29 -0
  81. package/dist-cjs/pagination/ListVoiceProfilesPaginator.js +29 -0
  82. package/dist-cjs/pagination/index.js +2 -0
  83. package/dist-cjs/protocols/Aws_restJson1.js +2085 -342
  84. package/dist-es/ChimeSDKVoice.js +285 -0
  85. package/dist-es/commands/BatchDeletePhoneNumberCommand.js +2 -2
  86. package/dist-es/commands/CreateSipMediaApplicationCallCommand.js +2 -2
  87. package/dist-es/commands/CreateSipRuleCommand.js +2 -3
  88. package/dist-es/commands/CreateVoiceConnectorCommand.js +2 -3
  89. package/dist-es/commands/CreateVoiceConnectorGroupCommand.js +2 -3
  90. package/dist-es/commands/CreateVoiceProfileCommand.js +42 -0
  91. package/dist-es/commands/CreateVoiceProfileDomainCommand.js +42 -0
  92. package/dist-es/commands/DeletePhoneNumberCommand.js +1 -1
  93. package/dist-es/commands/DeleteProxySessionCommand.js +2 -3
  94. package/dist-es/commands/DeleteSipMediaApplicationCommand.js +2 -3
  95. package/dist-es/commands/DeleteSipRuleCommand.js +2 -3
  96. package/dist-es/commands/DeleteVoiceConnectorCommand.js +2 -3
  97. package/dist-es/commands/DeleteVoiceConnectorEmergencyCallingConfigurationCommand.js +2 -3
  98. package/dist-es/commands/DeleteVoiceConnectorGroupCommand.js +2 -3
  99. package/dist-es/commands/DeleteVoiceConnectorOriginationCommand.js +2 -3
  100. package/dist-es/commands/DeleteVoiceConnectorProxyCommand.js +2 -3
  101. package/dist-es/commands/DeleteVoiceConnectorStreamingConfigurationCommand.js +2 -3
  102. package/dist-es/commands/DeleteVoiceConnectorTerminationCommand.js +2 -3
  103. package/dist-es/commands/DeleteVoiceConnectorTerminationCredentialsCommand.js +1 -1
  104. package/dist-es/commands/DeleteVoiceProfileCommand.js +41 -0
  105. package/dist-es/commands/DeleteVoiceProfileDomainCommand.js +41 -0
  106. package/dist-es/commands/GetGlobalSettingsCommand.js +2 -3
  107. package/dist-es/commands/GetPhoneNumberOrderCommand.js +2 -2
  108. package/dist-es/commands/GetPhoneNumberSettingsCommand.js +1 -1
  109. package/dist-es/commands/GetProxySessionCommand.js +2 -2
  110. package/dist-es/commands/GetSipMediaApplicationAlexaSkillConfigurationCommand.js +2 -2
  111. package/dist-es/commands/GetSipMediaApplicationCommand.js +2 -2
  112. package/dist-es/commands/GetSipMediaApplicationLoggingConfigurationCommand.js +2 -3
  113. package/dist-es/commands/GetSipRuleCommand.js +2 -3
  114. package/dist-es/commands/GetSpeakerSearchTaskCommand.js +41 -0
  115. package/dist-es/commands/GetVoiceConnectorCommand.js +2 -3
  116. package/dist-es/commands/GetVoiceConnectorEmergencyCallingConfigurationCommand.js +2 -2
  117. package/dist-es/commands/GetVoiceConnectorGroupCommand.js +2 -3
  118. package/dist-es/commands/GetVoiceConnectorLoggingConfigurationCommand.js +2 -3
  119. package/dist-es/commands/GetVoiceConnectorOriginationCommand.js +2 -3
  120. package/dist-es/commands/GetVoiceConnectorProxyCommand.js +2 -2
  121. package/dist-es/commands/GetVoiceConnectorStreamingConfigurationCommand.js +2 -2
  122. package/dist-es/commands/GetVoiceConnectorTerminationCommand.js +2 -2
  123. package/dist-es/commands/GetVoiceConnectorTerminationHealthCommand.js +2 -3
  124. package/dist-es/commands/GetVoiceProfileCommand.js +42 -0
  125. package/dist-es/commands/GetVoiceProfileDomainCommand.js +42 -0
  126. package/dist-es/commands/GetVoiceToneAnalysisTaskCommand.js +41 -0
  127. package/dist-es/commands/ListAvailableVoiceConnectorRegionsCommand.js +2 -3
  128. package/dist-es/commands/ListPhoneNumberOrdersCommand.js +2 -2
  129. package/dist-es/commands/ListPhoneNumbersCommand.js +2 -2
  130. package/dist-es/commands/ListProxySessionsCommand.js +2 -2
  131. package/dist-es/commands/ListSipMediaApplicationsCommand.js +2 -2
  132. package/dist-es/commands/ListSipRulesCommand.js +2 -3
  133. package/dist-es/commands/ListSupportedPhoneNumberCountriesCommand.js +2 -3
  134. package/dist-es/commands/ListTagsForResourceCommand.js +42 -0
  135. package/dist-es/commands/ListVoiceConnectorGroupsCommand.js +2 -3
  136. package/dist-es/commands/ListVoiceConnectorTerminationCredentialsCommand.js +2 -2
  137. package/dist-es/commands/ListVoiceConnectorsCommand.js +2 -3
  138. package/dist-es/commands/ListVoiceProfileDomainsCommand.js +42 -0
  139. package/dist-es/commands/ListVoiceProfilesCommand.js +42 -0
  140. package/dist-es/commands/PutSipMediaApplicationLoggingConfigurationCommand.js +2 -3
  141. package/dist-es/commands/PutVoiceConnectorLoggingConfigurationCommand.js +2 -3
  142. package/dist-es/commands/PutVoiceConnectorOriginationCommand.js +2 -3
  143. package/dist-es/commands/PutVoiceConnectorTerminationCredentialsCommand.js +1 -1
  144. package/dist-es/commands/SearchAvailablePhoneNumbersCommand.js +2 -2
  145. package/dist-es/commands/StartSpeakerSearchTaskCommand.js +41 -0
  146. package/dist-es/commands/StartVoiceToneAnalysisTaskCommand.js +41 -0
  147. package/dist-es/commands/StopSpeakerSearchTaskCommand.js +41 -0
  148. package/dist-es/commands/StopVoiceToneAnalysisTaskCommand.js +41 -0
  149. package/dist-es/commands/TagResourceCommand.js +42 -0
  150. package/dist-es/commands/UntagResourceCommand.js +42 -0
  151. package/dist-es/commands/UpdateGlobalSettingsCommand.js +2 -3
  152. package/dist-es/commands/UpdatePhoneNumberSettingsCommand.js +1 -1
  153. package/dist-es/commands/UpdateProxySessionCommand.js +2 -2
  154. package/dist-es/commands/UpdateSipMediaApplicationCallCommand.js +2 -2
  155. package/dist-es/commands/UpdateSipRuleCommand.js +2 -3
  156. package/dist-es/commands/UpdateVoiceConnectorCommand.js +2 -3
  157. package/dist-es/commands/UpdateVoiceConnectorGroupCommand.js +2 -3
  158. package/dist-es/commands/UpdateVoiceProfileCommand.js +42 -0
  159. package/dist-es/commands/UpdateVoiceProfileDomainCommand.js +42 -0
  160. package/dist-es/commands/index.js +19 -0
  161. package/dist-es/models/models_0.js +101 -228
  162. package/dist-es/pagination/ListVoiceProfileDomainsPaginator.js +25 -0
  163. package/dist-es/pagination/ListVoiceProfilesPaginator.js +25 -0
  164. package/dist-es/pagination/index.js +2 -0
  165. package/dist-es/protocols/Aws_restJson1.js +1982 -278
  166. package/dist-types/ChimeSDKVoice.d.ts +133 -0
  167. package/dist-types/ChimeSDKVoiceClient.d.ts +21 -2
  168. package/dist-types/commands/CreateVoiceProfileCommand.d.ts +39 -0
  169. package/dist-types/commands/CreateVoiceProfileDomainCommand.d.ts +39 -0
  170. package/dist-types/commands/DeleteVoiceProfileCommand.d.ts +39 -0
  171. package/dist-types/commands/DeleteVoiceProfileDomainCommand.d.ts +39 -0
  172. package/dist-types/commands/GetSpeakerSearchTaskCommand.d.ts +39 -0
  173. package/dist-types/commands/GetVoiceProfileCommand.d.ts +39 -0
  174. package/dist-types/commands/GetVoiceProfileDomainCommand.d.ts +39 -0
  175. package/dist-types/commands/GetVoiceToneAnalysisTaskCommand.d.ts +39 -0
  176. package/dist-types/commands/ListTagsForResourceCommand.d.ts +39 -0
  177. package/dist-types/commands/ListVoiceProfileDomainsCommand.d.ts +39 -0
  178. package/dist-types/commands/ListVoiceProfilesCommand.d.ts +39 -0
  179. package/dist-types/commands/StartSpeakerSearchTaskCommand.d.ts +39 -0
  180. package/dist-types/commands/StartVoiceToneAnalysisTaskCommand.d.ts +39 -0
  181. package/dist-types/commands/StopSpeakerSearchTaskCommand.d.ts +39 -0
  182. package/dist-types/commands/StopVoiceToneAnalysisTaskCommand.d.ts +39 -0
  183. package/dist-types/commands/TagResourceCommand.d.ts +39 -0
  184. package/dist-types/commands/UntagResourceCommand.d.ts +39 -0
  185. package/dist-types/commands/UpdateVoiceProfileCommand.d.ts +39 -0
  186. package/dist-types/commands/UpdateVoiceProfileDomainCommand.d.ts +39 -0
  187. package/dist-types/commands/index.d.ts +19 -0
  188. package/dist-types/models/models_0.d.ts +384 -294
  189. package/dist-types/pagination/ListVoiceProfileDomainsPaginator.d.ts +7 -0
  190. package/dist-types/pagination/ListVoiceProfilesPaginator.d.ts +7 -0
  191. package/dist-types/pagination/index.d.ts +2 -0
  192. package/dist-types/protocols/Aws_restJson1.d.ts +57 -0
  193. package/dist-types/ts3.4/ChimeSDKVoice.d.ts +323 -0
  194. package/dist-types/ts3.4/ChimeSDKVoiceClient.d.ts +114 -0
  195. package/dist-types/ts3.4/commands/CreateVoiceProfileCommand.d.ts +38 -0
  196. package/dist-types/ts3.4/commands/CreateVoiceProfileDomainCommand.d.ts +41 -0
  197. package/dist-types/ts3.4/commands/DeleteVoiceProfileCommand.d.ts +33 -0
  198. package/dist-types/ts3.4/commands/DeleteVoiceProfileDomainCommand.d.ts +37 -0
  199. package/dist-types/ts3.4/commands/GetSpeakerSearchTaskCommand.d.ts +41 -0
  200. package/dist-types/ts3.4/commands/GetVoiceProfileCommand.d.ts +37 -0
  201. package/dist-types/ts3.4/commands/GetVoiceProfileDomainCommand.d.ts +41 -0
  202. package/dist-types/ts3.4/commands/GetVoiceToneAnalysisTaskCommand.d.ts +41 -0
  203. package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +38 -0
  204. package/dist-types/ts3.4/commands/ListVoiceProfileDomainsCommand.d.ts +41 -0
  205. package/dist-types/ts3.4/commands/ListVoiceProfilesCommand.d.ts +38 -0
  206. package/dist-types/ts3.4/commands/StartSpeakerSearchTaskCommand.d.ts +41 -0
  207. package/dist-types/ts3.4/commands/StartVoiceToneAnalysisTaskCommand.d.ts +41 -0
  208. package/dist-types/ts3.4/commands/StopSpeakerSearchTaskCommand.d.ts +36 -0
  209. package/dist-types/ts3.4/commands/StopVoiceToneAnalysisTaskCommand.d.ts +37 -0
  210. package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +32 -0
  211. package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +32 -0
  212. package/dist-types/ts3.4/commands/UpdateVoiceProfileCommand.d.ts +38 -0
  213. package/dist-types/ts3.4/commands/UpdateVoiceProfileDomainCommand.d.ts +41 -0
  214. package/dist-types/ts3.4/commands/index.d.ts +19 -0
  215. package/dist-types/ts3.4/models/models_0.d.ts +260 -245
  216. package/dist-types/ts3.4/pagination/ListVoiceProfileDomainsPaginator.d.ts +11 -0
  217. package/dist-types/ts3.4/pagination/ListVoiceProfilesPaginator.d.ts +11 -0
  218. package/dist-types/ts3.4/pagination/index.d.ts +2 -0
  219. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +228 -0
  220. package/package.json +11 -10
@@ -1,7 +1,7 @@
1
1
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
- import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map as __map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
2
+ import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseFloat32 as __limitedParseFloat32, map as __map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
3
3
  import { ChimeSDKVoiceServiceException as __BaseException } from "../models/ChimeSDKVoiceServiceException";
4
- import { AccessDeniedException, BadRequestException, ConflictException, ForbiddenException, NotFoundException, ResourceLimitExceededException, ServiceFailureException, ServiceUnavailableException, ThrottledClientException, UnauthorizedClientException, } from "../models/models_0";
4
+ import { AccessDeniedException, BadRequestException, ConflictException, ForbiddenException, GoneException, NotFoundException, ResourceLimitExceededException, ServiceFailureException, ServiceUnavailableException, ThrottledClientException, UnauthorizedClientException, UnprocessableEntityException, } from "../models/models_0";
5
5
  export const serializeAws_restJson1AssociatePhoneNumbersWithVoiceConnectorCommand = async (input, context) => {
6
6
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
7
7
  const headers = {
@@ -290,6 +290,52 @@ export const serializeAws_restJson1CreateVoiceConnectorGroupCommand = async (inp
290
290
  body,
291
291
  });
292
292
  };
293
+ export const serializeAws_restJson1CreateVoiceProfileCommand = async (input, context) => {
294
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
295
+ const headers = {
296
+ "content-type": "application/json",
297
+ };
298
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-profiles";
299
+ let body;
300
+ body = JSON.stringify({
301
+ ...(input.SpeakerSearchTaskId != null && { SpeakerSearchTaskId: input.SpeakerSearchTaskId }),
302
+ });
303
+ return new __HttpRequest({
304
+ protocol,
305
+ hostname,
306
+ port,
307
+ method: "POST",
308
+ headers,
309
+ path: resolvedPath,
310
+ body,
311
+ });
312
+ };
313
+ export const serializeAws_restJson1CreateVoiceProfileDomainCommand = async (input, context) => {
314
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
315
+ const headers = {
316
+ "content-type": "application/json",
317
+ };
318
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-profile-domains";
319
+ let body;
320
+ body = JSON.stringify({
321
+ ...(input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken }),
322
+ ...(input.Description != null && { Description: input.Description }),
323
+ ...(input.Name != null && { Name: input.Name }),
324
+ ...(input.ServerSideEncryptionConfiguration != null && {
325
+ ServerSideEncryptionConfiguration: serializeAws_restJson1ServerSideEncryptionConfiguration(input.ServerSideEncryptionConfiguration, context),
326
+ }),
327
+ ...(input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
328
+ });
329
+ return new __HttpRequest({
330
+ protocol,
331
+ hostname,
332
+ port,
333
+ method: "POST",
334
+ headers,
335
+ path: resolvedPath,
336
+ body,
337
+ });
338
+ };
293
339
  export const serializeAws_restJson1DeletePhoneNumberCommand = async (input, context) => {
294
340
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
295
341
  const headers = {};
@@ -501,6 +547,39 @@ export const serializeAws_restJson1DeleteVoiceConnectorTerminationCredentialsCom
501
547
  body,
502
548
  });
503
549
  };
550
+ export const serializeAws_restJson1DeleteVoiceProfileCommand = async (input, context) => {
551
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
552
+ const headers = {};
553
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-profiles/{VoiceProfileId}";
554
+ resolvedPath = __resolvedPath(resolvedPath, input, "VoiceProfileId", () => input.VoiceProfileId, "{VoiceProfileId}", false);
555
+ let body;
556
+ return new __HttpRequest({
557
+ protocol,
558
+ hostname,
559
+ port,
560
+ method: "DELETE",
561
+ headers,
562
+ path: resolvedPath,
563
+ body,
564
+ });
565
+ };
566
+ export const serializeAws_restJson1DeleteVoiceProfileDomainCommand = async (input, context) => {
567
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
568
+ const headers = {};
569
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
570
+ "/voice-profile-domains/{VoiceProfileDomainId}";
571
+ resolvedPath = __resolvedPath(resolvedPath, input, "VoiceProfileDomainId", () => input.VoiceProfileDomainId, "{VoiceProfileDomainId}", false);
572
+ let body;
573
+ return new __HttpRequest({
574
+ protocol,
575
+ hostname,
576
+ port,
577
+ method: "DELETE",
578
+ headers,
579
+ path: resolvedPath,
580
+ body,
581
+ });
582
+ };
504
583
  export const serializeAws_restJson1DisassociatePhoneNumbersFromVoiceConnectorCommand = async (input, context) => {
505
584
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
506
585
  const headers = {
@@ -709,6 +788,24 @@ export const serializeAws_restJson1GetSipRuleCommand = async (input, context) =>
709
788
  body,
710
789
  });
711
790
  };
791
+ export const serializeAws_restJson1GetSpeakerSearchTaskCommand = async (input, context) => {
792
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
793
+ const headers = {};
794
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
795
+ "/voice-connectors/{VoiceConnectorId}/speaker-search-tasks/{SpeakerSearchTaskId}";
796
+ resolvedPath = __resolvedPath(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false);
797
+ resolvedPath = __resolvedPath(resolvedPath, input, "SpeakerSearchTaskId", () => input.SpeakerSearchTaskId, "{SpeakerSearchTaskId}", false);
798
+ let body;
799
+ return new __HttpRequest({
800
+ protocol,
801
+ hostname,
802
+ port,
803
+ method: "GET",
804
+ headers,
805
+ path: resolvedPath,
806
+ body,
807
+ });
808
+ };
712
809
  export const serializeAws_restJson1GetVoiceConnectorCommand = async (input, context) => {
713
810
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
714
811
  const headers = {};
@@ -861,6 +958,61 @@ export const serializeAws_restJson1GetVoiceConnectorTerminationHealthCommand = a
861
958
  body,
862
959
  });
863
960
  };
961
+ export const serializeAws_restJson1GetVoiceProfileCommand = async (input, context) => {
962
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
963
+ const headers = {};
964
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-profiles/{VoiceProfileId}";
965
+ resolvedPath = __resolvedPath(resolvedPath, input, "VoiceProfileId", () => input.VoiceProfileId, "{VoiceProfileId}", false);
966
+ let body;
967
+ return new __HttpRequest({
968
+ protocol,
969
+ hostname,
970
+ port,
971
+ method: "GET",
972
+ headers,
973
+ path: resolvedPath,
974
+ body,
975
+ });
976
+ };
977
+ export const serializeAws_restJson1GetVoiceProfileDomainCommand = async (input, context) => {
978
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
979
+ const headers = {};
980
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
981
+ "/voice-profile-domains/{VoiceProfileDomainId}";
982
+ resolvedPath = __resolvedPath(resolvedPath, input, "VoiceProfileDomainId", () => input.VoiceProfileDomainId, "{VoiceProfileDomainId}", false);
983
+ let body;
984
+ return new __HttpRequest({
985
+ protocol,
986
+ hostname,
987
+ port,
988
+ method: "GET",
989
+ headers,
990
+ path: resolvedPath,
991
+ body,
992
+ });
993
+ };
994
+ export const serializeAws_restJson1GetVoiceToneAnalysisTaskCommand = async (input, context) => {
995
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
996
+ const headers = {};
997
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
998
+ "/voice-connectors/{VoiceConnectorId}/voice-tone-analysis-tasks/{VoiceToneAnalysisTaskId}";
999
+ resolvedPath = __resolvedPath(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false);
1000
+ resolvedPath = __resolvedPath(resolvedPath, input, "VoiceToneAnalysisTaskId", () => input.VoiceToneAnalysisTaskId, "{VoiceToneAnalysisTaskId}", false);
1001
+ const query = map({
1002
+ isCaller: [__expectNonNull(input.IsCaller, `IsCaller`) != null, () => input.IsCaller.toString()],
1003
+ });
1004
+ let body;
1005
+ return new __HttpRequest({
1006
+ protocol,
1007
+ hostname,
1008
+ port,
1009
+ method: "GET",
1010
+ headers,
1011
+ path: resolvedPath,
1012
+ query,
1013
+ body,
1014
+ });
1015
+ };
864
1016
  export const serializeAws_restJson1ListAvailableVoiceConnectorRegionsCommand = async (input, context) => {
865
1017
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
866
1018
  const headers = {
@@ -1006,6 +1158,25 @@ export const serializeAws_restJson1ListSupportedPhoneNumberCountriesCommand = as
1006
1158
  body,
1007
1159
  });
1008
1160
  };
1161
+ export const serializeAws_restJson1ListTagsForResourceCommand = async (input, context) => {
1162
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1163
+ const headers = {};
1164
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags";
1165
+ const query = map({
1166
+ arn: [, __expectNonNull(input.ResourceARN, `ResourceARN`)],
1167
+ });
1168
+ let body;
1169
+ return new __HttpRequest({
1170
+ protocol,
1171
+ hostname,
1172
+ port,
1173
+ method: "GET",
1174
+ headers,
1175
+ path: resolvedPath,
1176
+ query,
1177
+ body,
1178
+ });
1179
+ };
1009
1180
  export const serializeAws_restJson1ListVoiceConnectorGroupsCommand = async (input, context) => {
1010
1181
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1011
1182
  const headers = {};
@@ -1063,6 +1234,47 @@ export const serializeAws_restJson1ListVoiceConnectorTerminationCredentialsComma
1063
1234
  body,
1064
1235
  });
1065
1236
  };
1237
+ export const serializeAws_restJson1ListVoiceProfileDomainsCommand = async (input, context) => {
1238
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1239
+ const headers = {};
1240
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-profile-domains";
1241
+ const query = map({
1242
+ "next-token": [, input.NextToken],
1243
+ "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
1244
+ });
1245
+ let body;
1246
+ return new __HttpRequest({
1247
+ protocol,
1248
+ hostname,
1249
+ port,
1250
+ method: "GET",
1251
+ headers,
1252
+ path: resolvedPath,
1253
+ query,
1254
+ body,
1255
+ });
1256
+ };
1257
+ export const serializeAws_restJson1ListVoiceProfilesCommand = async (input, context) => {
1258
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1259
+ const headers = {};
1260
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-profiles";
1261
+ const query = map({
1262
+ "voice-profile-domain-id": [, __expectNonNull(input.VoiceProfileDomainId, `VoiceProfileDomainId`)],
1263
+ "next-token": [, input.NextToken],
1264
+ "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
1265
+ });
1266
+ let body;
1267
+ return new __HttpRequest({
1268
+ protocol,
1269
+ hostname,
1270
+ port,
1271
+ method: "GET",
1272
+ headers,
1273
+ path: resolvedPath,
1274
+ query,
1275
+ body,
1276
+ });
1277
+ };
1066
1278
  export const serializeAws_restJson1PutSipMediaApplicationAlexaSkillConfigurationCommand = async (input, context) => {
1067
1279
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1068
1280
  const headers = {
@@ -1329,39 +1541,43 @@ export const serializeAws_restJson1SearchAvailablePhoneNumbersCommand = async (i
1329
1541
  body,
1330
1542
  });
1331
1543
  };
1332
- export const serializeAws_restJson1UpdateGlobalSettingsCommand = async (input, context) => {
1544
+ export const serializeAws_restJson1StartSpeakerSearchTaskCommand = async (input, context) => {
1333
1545
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1334
1546
  const headers = {
1335
1547
  "content-type": "application/json",
1336
1548
  };
1337
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/settings";
1549
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1550
+ "/voice-connectors/{VoiceConnectorId}/speaker-search-tasks";
1551
+ resolvedPath = __resolvedPath(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false);
1338
1552
  let body;
1339
1553
  body = JSON.stringify({
1340
- ...(input.VoiceConnector != null && {
1341
- VoiceConnector: serializeAws_restJson1VoiceConnectorSettings(input.VoiceConnector, context),
1342
- }),
1554
+ ...(input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken }),
1555
+ ...(input.TransactionId != null && { TransactionId: input.TransactionId }),
1556
+ ...(input.VoiceProfileDomainId != null && { VoiceProfileDomainId: input.VoiceProfileDomainId }),
1343
1557
  });
1344
1558
  return new __HttpRequest({
1345
1559
  protocol,
1346
1560
  hostname,
1347
1561
  port,
1348
- method: "PUT",
1562
+ method: "POST",
1349
1563
  headers,
1350
1564
  path: resolvedPath,
1351
1565
  body,
1352
1566
  });
1353
1567
  };
1354
- export const serializeAws_restJson1UpdatePhoneNumberCommand = async (input, context) => {
1568
+ export const serializeAws_restJson1StartVoiceToneAnalysisTaskCommand = async (input, context) => {
1355
1569
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1356
1570
  const headers = {
1357
1571
  "content-type": "application/json",
1358
1572
  };
1359
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/phone-numbers/{PhoneNumberId}";
1360
- resolvedPath = __resolvedPath(resolvedPath, input, "PhoneNumberId", () => input.PhoneNumberId, "{PhoneNumberId}", false);
1573
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1574
+ "/voice-connectors/{VoiceConnectorId}/voice-tone-analysis-tasks";
1575
+ resolvedPath = __resolvedPath(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false);
1361
1576
  let body;
1362
1577
  body = JSON.stringify({
1363
- ...(input.CallingName != null && { CallingName: input.CallingName }),
1364
- ...(input.ProductType != null && { ProductType: input.ProductType }),
1578
+ ...(input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken }),
1579
+ ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }),
1580
+ ...(input.TransactionId != null && { TransactionId: input.TransactionId }),
1365
1581
  });
1366
1582
  return new __HttpRequest({
1367
1583
  protocol,
@@ -1373,42 +1589,39 @@ export const serializeAws_restJson1UpdatePhoneNumberCommand = async (input, cont
1373
1589
  body,
1374
1590
  });
1375
1591
  };
1376
- export const serializeAws_restJson1UpdatePhoneNumberSettingsCommand = async (input, context) => {
1592
+ export const serializeAws_restJson1StopSpeakerSearchTaskCommand = async (input, context) => {
1377
1593
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1378
- const headers = {
1379
- "content-type": "application/json",
1380
- };
1381
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/settings/phone-number";
1382
- let body;
1383
- body = JSON.stringify({
1384
- ...(input.CallingName != null && { CallingName: input.CallingName }),
1594
+ const headers = {};
1595
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1596
+ "/voice-connectors/{VoiceConnectorId}/speaker-search-tasks/{SpeakerSearchTaskId}";
1597
+ resolvedPath = __resolvedPath(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false);
1598
+ resolvedPath = __resolvedPath(resolvedPath, input, "SpeakerSearchTaskId", () => input.SpeakerSearchTaskId, "{SpeakerSearchTaskId}", false);
1599
+ const query = map({
1600
+ operation: [, "stop"],
1385
1601
  });
1602
+ let body;
1386
1603
  return new __HttpRequest({
1387
1604
  protocol,
1388
1605
  hostname,
1389
1606
  port,
1390
- method: "PUT",
1607
+ method: "POST",
1391
1608
  headers,
1392
1609
  path: resolvedPath,
1610
+ query,
1393
1611
  body,
1394
1612
  });
1395
1613
  };
1396
- export const serializeAws_restJson1UpdateProxySessionCommand = async (input, context) => {
1614
+ export const serializeAws_restJson1StopVoiceToneAnalysisTaskCommand = async (input, context) => {
1397
1615
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1398
- const headers = {
1399
- "content-type": "application/json",
1400
- };
1616
+ const headers = {};
1401
1617
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1402
- "/voice-connectors/{VoiceConnectorId}/proxy-sessions/{ProxySessionId}";
1618
+ "/voice-connectors/{VoiceConnectorId}/voice-tone-analysis-tasks/{VoiceToneAnalysisTaskId}";
1403
1619
  resolvedPath = __resolvedPath(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false);
1404
- resolvedPath = __resolvedPath(resolvedPath, input, "ProxySessionId", () => input.ProxySessionId, "{ProxySessionId}", false);
1405
- let body;
1406
- body = JSON.stringify({
1407
- ...(input.Capabilities != null && {
1408
- Capabilities: serializeAws_restJson1CapabilityList(input.Capabilities, context),
1409
- }),
1410
- ...(input.ExpiryMinutes != null && { ExpiryMinutes: input.ExpiryMinutes }),
1620
+ resolvedPath = __resolvedPath(resolvedPath, input, "VoiceToneAnalysisTaskId", () => input.VoiceToneAnalysisTaskId, "{VoiceToneAnalysisTaskId}", false);
1621
+ const query = map({
1622
+ operation: [, "stop"],
1411
1623
  });
1624
+ let body;
1412
1625
  return new __HttpRequest({
1413
1626
  protocol,
1414
1627
  hostname,
@@ -1416,48 +1629,48 @@ export const serializeAws_restJson1UpdateProxySessionCommand = async (input, con
1416
1629
  method: "POST",
1417
1630
  headers,
1418
1631
  path: resolvedPath,
1632
+ query,
1419
1633
  body,
1420
1634
  });
1421
1635
  };
1422
- export const serializeAws_restJson1UpdateSipMediaApplicationCommand = async (input, context) => {
1636
+ export const serializeAws_restJson1TagResourceCommand = async (input, context) => {
1423
1637
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1424
1638
  const headers = {
1425
1639
  "content-type": "application/json",
1426
1640
  };
1427
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1428
- "/sip-media-applications/{SipMediaApplicationId}";
1429
- resolvedPath = __resolvedPath(resolvedPath, input, "SipMediaApplicationId", () => input.SipMediaApplicationId, "{SipMediaApplicationId}", false);
1641
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags";
1642
+ const query = map({
1643
+ operation: [, "tag-resource"],
1644
+ });
1430
1645
  let body;
1431
1646
  body = JSON.stringify({
1432
- ...(input.Endpoints != null && {
1433
- Endpoints: serializeAws_restJson1SipMediaApplicationEndpointList(input.Endpoints, context),
1434
- }),
1435
- ...(input.Name != null && { Name: input.Name }),
1647
+ ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
1648
+ ...(input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
1436
1649
  });
1437
1650
  return new __HttpRequest({
1438
1651
  protocol,
1439
1652
  hostname,
1440
1653
  port,
1441
- method: "PUT",
1654
+ method: "POST",
1442
1655
  headers,
1443
1656
  path: resolvedPath,
1657
+ query,
1444
1658
  body,
1445
1659
  });
1446
1660
  };
1447
- export const serializeAws_restJson1UpdateSipMediaApplicationCallCommand = async (input, context) => {
1661
+ export const serializeAws_restJson1UntagResourceCommand = async (input, context) => {
1448
1662
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1449
1663
  const headers = {
1450
1664
  "content-type": "application/json",
1451
1665
  };
1452
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1453
- "/sip-media-applications/{SipMediaApplicationId}/calls/{TransactionId}";
1454
- resolvedPath = __resolvedPath(resolvedPath, input, "SipMediaApplicationId", () => input.SipMediaApplicationId, "{SipMediaApplicationId}", false);
1455
- resolvedPath = __resolvedPath(resolvedPath, input, "TransactionId", () => input.TransactionId, "{TransactionId}", false);
1666
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags";
1667
+ const query = map({
1668
+ operation: [, "untag-resource"],
1669
+ });
1456
1670
  let body;
1457
1671
  body = JSON.stringify({
1458
- ...(input.Arguments != null && {
1459
- Arguments: serializeAws_restJson1SMAUpdateCallArgumentsMap(input.Arguments, context),
1460
- }),
1672
+ ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
1673
+ ...(input.TagKeys != null && { TagKeys: serializeAws_restJson1TagKeyList(input.TagKeys, context) }),
1461
1674
  });
1462
1675
  return new __HttpRequest({
1463
1676
  protocol,
@@ -1466,22 +1679,163 @@ export const serializeAws_restJson1UpdateSipMediaApplicationCallCommand = async
1466
1679
  method: "POST",
1467
1680
  headers,
1468
1681
  path: resolvedPath,
1682
+ query,
1469
1683
  body,
1470
1684
  });
1471
1685
  };
1472
- export const serializeAws_restJson1UpdateSipRuleCommand = async (input, context) => {
1686
+ export const serializeAws_restJson1UpdateGlobalSettingsCommand = async (input, context) => {
1473
1687
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1474
1688
  const headers = {
1475
1689
  "content-type": "application/json",
1476
1690
  };
1477
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sip-rules/{SipRuleId}";
1478
- resolvedPath = __resolvedPath(resolvedPath, input, "SipRuleId", () => input.SipRuleId, "{SipRuleId}", false);
1691
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/settings";
1479
1692
  let body;
1480
1693
  body = JSON.stringify({
1481
- ...(input.Disabled != null && { Disabled: input.Disabled }),
1482
- ...(input.Name != null && { Name: input.Name }),
1483
- ...(input.TargetApplications != null && {
1484
- TargetApplications: serializeAws_restJson1SipRuleTargetApplicationList(input.TargetApplications, context),
1694
+ ...(input.VoiceConnector != null && {
1695
+ VoiceConnector: serializeAws_restJson1VoiceConnectorSettings(input.VoiceConnector, context),
1696
+ }),
1697
+ });
1698
+ return new __HttpRequest({
1699
+ protocol,
1700
+ hostname,
1701
+ port,
1702
+ method: "PUT",
1703
+ headers,
1704
+ path: resolvedPath,
1705
+ body,
1706
+ });
1707
+ };
1708
+ export const serializeAws_restJson1UpdatePhoneNumberCommand = async (input, context) => {
1709
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1710
+ const headers = {
1711
+ "content-type": "application/json",
1712
+ };
1713
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/phone-numbers/{PhoneNumberId}";
1714
+ resolvedPath = __resolvedPath(resolvedPath, input, "PhoneNumberId", () => input.PhoneNumberId, "{PhoneNumberId}", false);
1715
+ let body;
1716
+ body = JSON.stringify({
1717
+ ...(input.CallingName != null && { CallingName: input.CallingName }),
1718
+ ...(input.ProductType != null && { ProductType: input.ProductType }),
1719
+ });
1720
+ return new __HttpRequest({
1721
+ protocol,
1722
+ hostname,
1723
+ port,
1724
+ method: "POST",
1725
+ headers,
1726
+ path: resolvedPath,
1727
+ body,
1728
+ });
1729
+ };
1730
+ export const serializeAws_restJson1UpdatePhoneNumberSettingsCommand = async (input, context) => {
1731
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1732
+ const headers = {
1733
+ "content-type": "application/json",
1734
+ };
1735
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/settings/phone-number";
1736
+ let body;
1737
+ body = JSON.stringify({
1738
+ ...(input.CallingName != null && { CallingName: input.CallingName }),
1739
+ });
1740
+ return new __HttpRequest({
1741
+ protocol,
1742
+ hostname,
1743
+ port,
1744
+ method: "PUT",
1745
+ headers,
1746
+ path: resolvedPath,
1747
+ body,
1748
+ });
1749
+ };
1750
+ export const serializeAws_restJson1UpdateProxySessionCommand = async (input, context) => {
1751
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1752
+ const headers = {
1753
+ "content-type": "application/json",
1754
+ };
1755
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1756
+ "/voice-connectors/{VoiceConnectorId}/proxy-sessions/{ProxySessionId}";
1757
+ resolvedPath = __resolvedPath(resolvedPath, input, "VoiceConnectorId", () => input.VoiceConnectorId, "{VoiceConnectorId}", false);
1758
+ resolvedPath = __resolvedPath(resolvedPath, input, "ProxySessionId", () => input.ProxySessionId, "{ProxySessionId}", false);
1759
+ let body;
1760
+ body = JSON.stringify({
1761
+ ...(input.Capabilities != null && {
1762
+ Capabilities: serializeAws_restJson1CapabilityList(input.Capabilities, context),
1763
+ }),
1764
+ ...(input.ExpiryMinutes != null && { ExpiryMinutes: input.ExpiryMinutes }),
1765
+ });
1766
+ return new __HttpRequest({
1767
+ protocol,
1768
+ hostname,
1769
+ port,
1770
+ method: "POST",
1771
+ headers,
1772
+ path: resolvedPath,
1773
+ body,
1774
+ });
1775
+ };
1776
+ export const serializeAws_restJson1UpdateSipMediaApplicationCommand = async (input, context) => {
1777
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1778
+ const headers = {
1779
+ "content-type": "application/json",
1780
+ };
1781
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1782
+ "/sip-media-applications/{SipMediaApplicationId}";
1783
+ resolvedPath = __resolvedPath(resolvedPath, input, "SipMediaApplicationId", () => input.SipMediaApplicationId, "{SipMediaApplicationId}", false);
1784
+ let body;
1785
+ body = JSON.stringify({
1786
+ ...(input.Endpoints != null && {
1787
+ Endpoints: serializeAws_restJson1SipMediaApplicationEndpointList(input.Endpoints, context),
1788
+ }),
1789
+ ...(input.Name != null && { Name: input.Name }),
1790
+ });
1791
+ return new __HttpRequest({
1792
+ protocol,
1793
+ hostname,
1794
+ port,
1795
+ method: "PUT",
1796
+ headers,
1797
+ path: resolvedPath,
1798
+ body,
1799
+ });
1800
+ };
1801
+ export const serializeAws_restJson1UpdateSipMediaApplicationCallCommand = async (input, context) => {
1802
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1803
+ const headers = {
1804
+ "content-type": "application/json",
1805
+ };
1806
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1807
+ "/sip-media-applications/{SipMediaApplicationId}/calls/{TransactionId}";
1808
+ resolvedPath = __resolvedPath(resolvedPath, input, "SipMediaApplicationId", () => input.SipMediaApplicationId, "{SipMediaApplicationId}", false);
1809
+ resolvedPath = __resolvedPath(resolvedPath, input, "TransactionId", () => input.TransactionId, "{TransactionId}", false);
1810
+ let body;
1811
+ body = JSON.stringify({
1812
+ ...(input.Arguments != null && {
1813
+ Arguments: serializeAws_restJson1SMAUpdateCallArgumentsMap(input.Arguments, context),
1814
+ }),
1815
+ });
1816
+ return new __HttpRequest({
1817
+ protocol,
1818
+ hostname,
1819
+ port,
1820
+ method: "POST",
1821
+ headers,
1822
+ path: resolvedPath,
1823
+ body,
1824
+ });
1825
+ };
1826
+ export const serializeAws_restJson1UpdateSipRuleCommand = async (input, context) => {
1827
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1828
+ const headers = {
1829
+ "content-type": "application/json",
1830
+ };
1831
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sip-rules/{SipRuleId}";
1832
+ resolvedPath = __resolvedPath(resolvedPath, input, "SipRuleId", () => input.SipRuleId, "{SipRuleId}", false);
1833
+ let body;
1834
+ body = JSON.stringify({
1835
+ ...(input.Disabled != null && { Disabled: input.Disabled }),
1836
+ ...(input.Name != null && { Name: input.Name }),
1837
+ ...(input.TargetApplications != null && {
1838
+ TargetApplications: serializeAws_restJson1SipRuleTargetApplicationList(input.TargetApplications, context),
1485
1839
  }),
1486
1840
  });
1487
1841
  return new __HttpRequest({
@@ -1541,6 +1895,50 @@ export const serializeAws_restJson1UpdateVoiceConnectorGroupCommand = async (inp
1541
1895
  body,
1542
1896
  });
1543
1897
  };
1898
+ export const serializeAws_restJson1UpdateVoiceProfileCommand = async (input, context) => {
1899
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1900
+ const headers = {
1901
+ "content-type": "application/json",
1902
+ };
1903
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-profiles/{VoiceProfileId}";
1904
+ resolvedPath = __resolvedPath(resolvedPath, input, "VoiceProfileId", () => input.VoiceProfileId, "{VoiceProfileId}", false);
1905
+ let body;
1906
+ body = JSON.stringify({
1907
+ ...(input.SpeakerSearchTaskId != null && { SpeakerSearchTaskId: input.SpeakerSearchTaskId }),
1908
+ });
1909
+ return new __HttpRequest({
1910
+ protocol,
1911
+ hostname,
1912
+ port,
1913
+ method: "PUT",
1914
+ headers,
1915
+ path: resolvedPath,
1916
+ body,
1917
+ });
1918
+ };
1919
+ export const serializeAws_restJson1UpdateVoiceProfileDomainCommand = async (input, context) => {
1920
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1921
+ const headers = {
1922
+ "content-type": "application/json",
1923
+ };
1924
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1925
+ "/voice-profile-domains/{VoiceProfileDomainId}";
1926
+ resolvedPath = __resolvedPath(resolvedPath, input, "VoiceProfileDomainId", () => input.VoiceProfileDomainId, "{VoiceProfileDomainId}", false);
1927
+ let body;
1928
+ body = JSON.stringify({
1929
+ ...(input.Description != null && { Description: input.Description }),
1930
+ ...(input.Name != null && { Name: input.Name }),
1931
+ });
1932
+ return new __HttpRequest({
1933
+ protocol,
1934
+ hostname,
1935
+ port,
1936
+ method: "PUT",
1937
+ headers,
1938
+ path: resolvedPath,
1939
+ body,
1940
+ });
1941
+ };
1544
1942
  export const serializeAws_restJson1ValidateE911AddressCommand = async (input, context) => {
1545
1943
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1546
1944
  const headers = {
@@ -2158,32 +2556,47 @@ const deserializeAws_restJson1CreateVoiceConnectorGroupCommandError = async (out
2158
2556
  });
2159
2557
  }
2160
2558
  };
2161
- export const deserializeAws_restJson1DeletePhoneNumberCommand = async (output, context) => {
2162
- if (output.statusCode !== 204 && output.statusCode >= 300) {
2163
- return deserializeAws_restJson1DeletePhoneNumberCommandError(output, context);
2559
+ export const deserializeAws_restJson1CreateVoiceProfileCommand = async (output, context) => {
2560
+ if (output.statusCode !== 201 && output.statusCode >= 300) {
2561
+ return deserializeAws_restJson1CreateVoiceProfileCommandError(output, context);
2164
2562
  }
2165
2563
  const contents = map({
2166
2564
  $metadata: deserializeMetadata(output),
2167
2565
  });
2168
- await collectBody(output.body, context);
2566
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2567
+ if (data.VoiceProfile != null) {
2568
+ contents.VoiceProfile = deserializeAws_restJson1VoiceProfile(data.VoiceProfile, context);
2569
+ }
2169
2570
  return contents;
2170
2571
  };
2171
- const deserializeAws_restJson1DeletePhoneNumberCommandError = async (output, context) => {
2572
+ const deserializeAws_restJson1CreateVoiceProfileCommandError = async (output, context) => {
2172
2573
  const parsedOutput = {
2173
2574
  ...output,
2174
2575
  body: await parseErrorBody(output.body, context),
2175
2576
  };
2176
2577
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2177
2578
  switch (errorCode) {
2579
+ case "AccessDeniedException":
2580
+ case "com.amazonaws.chimesdkvoice#AccessDeniedException":
2581
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
2178
2582
  case "BadRequestException":
2179
2583
  case "com.amazonaws.chimesdkvoice#BadRequestException":
2180
2584
  throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
2585
+ case "ConflictException":
2586
+ case "com.amazonaws.chimesdkvoice#ConflictException":
2587
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
2181
2588
  case "ForbiddenException":
2182
2589
  case "com.amazonaws.chimesdkvoice#ForbiddenException":
2183
2590
  throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
2591
+ case "GoneException":
2592
+ case "com.amazonaws.chimesdkvoice#GoneException":
2593
+ throw await deserializeAws_restJson1GoneExceptionResponse(parsedOutput, context);
2184
2594
  case "NotFoundException":
2185
2595
  case "com.amazonaws.chimesdkvoice#NotFoundException":
2186
2596
  throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
2597
+ case "ResourceLimitExceededException":
2598
+ case "com.amazonaws.chimesdkvoice#ResourceLimitExceededException":
2599
+ throw await deserializeAws_restJson1ResourceLimitExceededExceptionResponse(parsedOutput, context);
2187
2600
  case "ServiceFailureException":
2188
2601
  case "com.amazonaws.chimesdkvoice#ServiceFailureException":
2189
2602
  throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
@@ -2206,32 +2619,41 @@ const deserializeAws_restJson1DeletePhoneNumberCommandError = async (output, con
2206
2619
  });
2207
2620
  }
2208
2621
  };
2209
- export const deserializeAws_restJson1DeleteProxySessionCommand = async (output, context) => {
2210
- if (output.statusCode !== 204 && output.statusCode >= 300) {
2211
- return deserializeAws_restJson1DeleteProxySessionCommandError(output, context);
2622
+ export const deserializeAws_restJson1CreateVoiceProfileDomainCommand = async (output, context) => {
2623
+ if (output.statusCode !== 201 && output.statusCode >= 300) {
2624
+ return deserializeAws_restJson1CreateVoiceProfileDomainCommandError(output, context);
2212
2625
  }
2213
2626
  const contents = map({
2214
2627
  $metadata: deserializeMetadata(output),
2215
2628
  });
2216
- await collectBody(output.body, context);
2629
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2630
+ if (data.VoiceProfileDomain != null) {
2631
+ contents.VoiceProfileDomain = deserializeAws_restJson1VoiceProfileDomain(data.VoiceProfileDomain, context);
2632
+ }
2217
2633
  return contents;
2218
2634
  };
2219
- const deserializeAws_restJson1DeleteProxySessionCommandError = async (output, context) => {
2635
+ const deserializeAws_restJson1CreateVoiceProfileDomainCommandError = async (output, context) => {
2220
2636
  const parsedOutput = {
2221
2637
  ...output,
2222
2638
  body: await parseErrorBody(output.body, context),
2223
2639
  };
2224
2640
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2225
2641
  switch (errorCode) {
2642
+ case "AccessDeniedException":
2643
+ case "com.amazonaws.chimesdkvoice#AccessDeniedException":
2644
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
2226
2645
  case "BadRequestException":
2227
2646
  case "com.amazonaws.chimesdkvoice#BadRequestException":
2228
2647
  throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
2648
+ case "ConflictException":
2649
+ case "com.amazonaws.chimesdkvoice#ConflictException":
2650
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
2229
2651
  case "ForbiddenException":
2230
2652
  case "com.amazonaws.chimesdkvoice#ForbiddenException":
2231
2653
  throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
2232
- case "NotFoundException":
2233
- case "com.amazonaws.chimesdkvoice#NotFoundException":
2234
- throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
2654
+ case "ResourceLimitExceededException":
2655
+ case "com.amazonaws.chimesdkvoice#ResourceLimitExceededException":
2656
+ throw await deserializeAws_restJson1ResourceLimitExceededExceptionResponse(parsedOutput, context);
2235
2657
  case "ServiceFailureException":
2236
2658
  case "com.amazonaws.chimesdkvoice#ServiceFailureException":
2237
2659
  throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
@@ -2254,9 +2676,9 @@ const deserializeAws_restJson1DeleteProxySessionCommandError = async (output, co
2254
2676
  });
2255
2677
  }
2256
2678
  };
2257
- export const deserializeAws_restJson1DeleteSipMediaApplicationCommand = async (output, context) => {
2679
+ export const deserializeAws_restJson1DeletePhoneNumberCommand = async (output, context) => {
2258
2680
  if (output.statusCode !== 204 && output.statusCode >= 300) {
2259
- return deserializeAws_restJson1DeleteSipMediaApplicationCommandError(output, context);
2681
+ return deserializeAws_restJson1DeletePhoneNumberCommandError(output, context);
2260
2682
  }
2261
2683
  const contents = map({
2262
2684
  $metadata: deserializeMetadata(output),
@@ -2264,7 +2686,7 @@ export const deserializeAws_restJson1DeleteSipMediaApplicationCommand = async (o
2264
2686
  await collectBody(output.body, context);
2265
2687
  return contents;
2266
2688
  };
2267
- const deserializeAws_restJson1DeleteSipMediaApplicationCommandError = async (output, context) => {
2689
+ const deserializeAws_restJson1DeletePhoneNumberCommandError = async (output, context) => {
2268
2690
  const parsedOutput = {
2269
2691
  ...output,
2270
2692
  body: await parseErrorBody(output.body, context),
@@ -2274,9 +2696,6 @@ const deserializeAws_restJson1DeleteSipMediaApplicationCommandError = async (out
2274
2696
  case "BadRequestException":
2275
2697
  case "com.amazonaws.chimesdkvoice#BadRequestException":
2276
2698
  throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
2277
- case "ConflictException":
2278
- case "com.amazonaws.chimesdkvoice#ConflictException":
2279
- throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
2280
2699
  case "ForbiddenException":
2281
2700
  case "com.amazonaws.chimesdkvoice#ForbiddenException":
2282
2701
  throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
@@ -2305,9 +2724,9 @@ const deserializeAws_restJson1DeleteSipMediaApplicationCommandError = async (out
2305
2724
  });
2306
2725
  }
2307
2726
  };
2308
- export const deserializeAws_restJson1DeleteSipRuleCommand = async (output, context) => {
2727
+ export const deserializeAws_restJson1DeleteProxySessionCommand = async (output, context) => {
2309
2728
  if (output.statusCode !== 204 && output.statusCode >= 300) {
2310
- return deserializeAws_restJson1DeleteSipRuleCommandError(output, context);
2729
+ return deserializeAws_restJson1DeleteProxySessionCommandError(output, context);
2311
2730
  }
2312
2731
  const contents = map({
2313
2732
  $metadata: deserializeMetadata(output),
@@ -2315,7 +2734,7 @@ export const deserializeAws_restJson1DeleteSipRuleCommand = async (output, conte
2315
2734
  await collectBody(output.body, context);
2316
2735
  return contents;
2317
2736
  };
2318
- const deserializeAws_restJson1DeleteSipRuleCommandError = async (output, context) => {
2737
+ const deserializeAws_restJson1DeleteProxySessionCommandError = async (output, context) => {
2319
2738
  const parsedOutput = {
2320
2739
  ...output,
2321
2740
  body: await parseErrorBody(output.body, context),
@@ -2325,9 +2744,6 @@ const deserializeAws_restJson1DeleteSipRuleCommandError = async (output, context
2325
2744
  case "BadRequestException":
2326
2745
  case "com.amazonaws.chimesdkvoice#BadRequestException":
2327
2746
  throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
2328
- case "ConflictException":
2329
- case "com.amazonaws.chimesdkvoice#ConflictException":
2330
- throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
2331
2747
  case "ForbiddenException":
2332
2748
  case "com.amazonaws.chimesdkvoice#ForbiddenException":
2333
2749
  throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
@@ -2356,9 +2772,9 @@ const deserializeAws_restJson1DeleteSipRuleCommandError = async (output, context
2356
2772
  });
2357
2773
  }
2358
2774
  };
2359
- export const deserializeAws_restJson1DeleteVoiceConnectorCommand = async (output, context) => {
2775
+ export const deserializeAws_restJson1DeleteSipMediaApplicationCommand = async (output, context) => {
2360
2776
  if (output.statusCode !== 204 && output.statusCode >= 300) {
2361
- return deserializeAws_restJson1DeleteVoiceConnectorCommandError(output, context);
2777
+ return deserializeAws_restJson1DeleteSipMediaApplicationCommandError(output, context);
2362
2778
  }
2363
2779
  const contents = map({
2364
2780
  $metadata: deserializeMetadata(output),
@@ -2366,7 +2782,7 @@ export const deserializeAws_restJson1DeleteVoiceConnectorCommand = async (output
2366
2782
  await collectBody(output.body, context);
2367
2783
  return contents;
2368
2784
  };
2369
- const deserializeAws_restJson1DeleteVoiceConnectorCommandError = async (output, context) => {
2785
+ const deserializeAws_restJson1DeleteSipMediaApplicationCommandError = async (output, context) => {
2370
2786
  const parsedOutput = {
2371
2787
  ...output,
2372
2788
  body: await parseErrorBody(output.body, context),
@@ -2407,9 +2823,9 @@ const deserializeAws_restJson1DeleteVoiceConnectorCommandError = async (output,
2407
2823
  });
2408
2824
  }
2409
2825
  };
2410
- export const deserializeAws_restJson1DeleteVoiceConnectorEmergencyCallingConfigurationCommand = async (output, context) => {
2826
+ export const deserializeAws_restJson1DeleteSipRuleCommand = async (output, context) => {
2411
2827
  if (output.statusCode !== 204 && output.statusCode >= 300) {
2412
- return deserializeAws_restJson1DeleteVoiceConnectorEmergencyCallingConfigurationCommandError(output, context);
2828
+ return deserializeAws_restJson1DeleteSipRuleCommandError(output, context);
2413
2829
  }
2414
2830
  const contents = map({
2415
2831
  $metadata: deserializeMetadata(output),
@@ -2417,7 +2833,7 @@ export const deserializeAws_restJson1DeleteVoiceConnectorEmergencyCallingConfigu
2417
2833
  await collectBody(output.body, context);
2418
2834
  return contents;
2419
2835
  };
2420
- const deserializeAws_restJson1DeleteVoiceConnectorEmergencyCallingConfigurationCommandError = async (output, context) => {
2836
+ const deserializeAws_restJson1DeleteSipRuleCommandError = async (output, context) => {
2421
2837
  const parsedOutput = {
2422
2838
  ...output,
2423
2839
  body: await parseErrorBody(output.body, context),
@@ -2427,6 +2843,9 @@ const deserializeAws_restJson1DeleteVoiceConnectorEmergencyCallingConfigurationC
2427
2843
  case "BadRequestException":
2428
2844
  case "com.amazonaws.chimesdkvoice#BadRequestException":
2429
2845
  throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
2846
+ case "ConflictException":
2847
+ case "com.amazonaws.chimesdkvoice#ConflictException":
2848
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
2430
2849
  case "ForbiddenException":
2431
2850
  case "com.amazonaws.chimesdkvoice#ForbiddenException":
2432
2851
  throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
@@ -2455,9 +2874,9 @@ const deserializeAws_restJson1DeleteVoiceConnectorEmergencyCallingConfigurationC
2455
2874
  });
2456
2875
  }
2457
2876
  };
2458
- export const deserializeAws_restJson1DeleteVoiceConnectorGroupCommand = async (output, context) => {
2877
+ export const deserializeAws_restJson1DeleteVoiceConnectorCommand = async (output, context) => {
2459
2878
  if (output.statusCode !== 204 && output.statusCode >= 300) {
2460
- return deserializeAws_restJson1DeleteVoiceConnectorGroupCommandError(output, context);
2879
+ return deserializeAws_restJson1DeleteVoiceConnectorCommandError(output, context);
2461
2880
  }
2462
2881
  const contents = map({
2463
2882
  $metadata: deserializeMetadata(output),
@@ -2465,7 +2884,106 @@ export const deserializeAws_restJson1DeleteVoiceConnectorGroupCommand = async (o
2465
2884
  await collectBody(output.body, context);
2466
2885
  return contents;
2467
2886
  };
2468
- const deserializeAws_restJson1DeleteVoiceConnectorGroupCommandError = async (output, context) => {
2887
+ const deserializeAws_restJson1DeleteVoiceConnectorCommandError = async (output, context) => {
2888
+ const parsedOutput = {
2889
+ ...output,
2890
+ body: await parseErrorBody(output.body, context),
2891
+ };
2892
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2893
+ switch (errorCode) {
2894
+ case "BadRequestException":
2895
+ case "com.amazonaws.chimesdkvoice#BadRequestException":
2896
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
2897
+ case "ConflictException":
2898
+ case "com.amazonaws.chimesdkvoice#ConflictException":
2899
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
2900
+ case "ForbiddenException":
2901
+ case "com.amazonaws.chimesdkvoice#ForbiddenException":
2902
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
2903
+ case "NotFoundException":
2904
+ case "com.amazonaws.chimesdkvoice#NotFoundException":
2905
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
2906
+ case "ServiceFailureException":
2907
+ case "com.amazonaws.chimesdkvoice#ServiceFailureException":
2908
+ throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
2909
+ case "ServiceUnavailableException":
2910
+ case "com.amazonaws.chimesdkvoice#ServiceUnavailableException":
2911
+ throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
2912
+ case "ThrottledClientException":
2913
+ case "com.amazonaws.chimesdkvoice#ThrottledClientException":
2914
+ throw await deserializeAws_restJson1ThrottledClientExceptionResponse(parsedOutput, context);
2915
+ case "UnauthorizedClientException":
2916
+ case "com.amazonaws.chimesdkvoice#UnauthorizedClientException":
2917
+ throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
2918
+ default:
2919
+ const parsedBody = parsedOutput.body;
2920
+ throwDefaultError({
2921
+ output,
2922
+ parsedBody,
2923
+ exceptionCtor: __BaseException,
2924
+ errorCode,
2925
+ });
2926
+ }
2927
+ };
2928
+ export const deserializeAws_restJson1DeleteVoiceConnectorEmergencyCallingConfigurationCommand = async (output, context) => {
2929
+ if (output.statusCode !== 204 && output.statusCode >= 300) {
2930
+ return deserializeAws_restJson1DeleteVoiceConnectorEmergencyCallingConfigurationCommandError(output, context);
2931
+ }
2932
+ const contents = map({
2933
+ $metadata: deserializeMetadata(output),
2934
+ });
2935
+ await collectBody(output.body, context);
2936
+ return contents;
2937
+ };
2938
+ const deserializeAws_restJson1DeleteVoiceConnectorEmergencyCallingConfigurationCommandError = async (output, context) => {
2939
+ const parsedOutput = {
2940
+ ...output,
2941
+ body: await parseErrorBody(output.body, context),
2942
+ };
2943
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2944
+ switch (errorCode) {
2945
+ case "BadRequestException":
2946
+ case "com.amazonaws.chimesdkvoice#BadRequestException":
2947
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
2948
+ case "ForbiddenException":
2949
+ case "com.amazonaws.chimesdkvoice#ForbiddenException":
2950
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
2951
+ case "NotFoundException":
2952
+ case "com.amazonaws.chimesdkvoice#NotFoundException":
2953
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
2954
+ case "ServiceFailureException":
2955
+ case "com.amazonaws.chimesdkvoice#ServiceFailureException":
2956
+ throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
2957
+ case "ServiceUnavailableException":
2958
+ case "com.amazonaws.chimesdkvoice#ServiceUnavailableException":
2959
+ throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
2960
+ case "ThrottledClientException":
2961
+ case "com.amazonaws.chimesdkvoice#ThrottledClientException":
2962
+ throw await deserializeAws_restJson1ThrottledClientExceptionResponse(parsedOutput, context);
2963
+ case "UnauthorizedClientException":
2964
+ case "com.amazonaws.chimesdkvoice#UnauthorizedClientException":
2965
+ throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
2966
+ default:
2967
+ const parsedBody = parsedOutput.body;
2968
+ throwDefaultError({
2969
+ output,
2970
+ parsedBody,
2971
+ exceptionCtor: __BaseException,
2972
+ errorCode,
2973
+ });
2974
+ }
2975
+ };
2976
+ export const deserializeAws_restJson1DeleteVoiceConnectorGroupCommand = async (output, context) => {
2977
+ if (output.statusCode !== 204 && output.statusCode >= 300) {
2978
+ return deserializeAws_restJson1DeleteVoiceConnectorGroupCommandError(output, context);
2979
+ }
2980
+ const contents = map({
2981
+ $metadata: deserializeMetadata(output),
2982
+ });
2983
+ await collectBody(output.body, context);
2984
+ return contents;
2985
+ };
2986
+ const deserializeAws_restJson1DeleteVoiceConnectorGroupCommandError = async (output, context) => {
2469
2987
  const parsedOutput = {
2470
2988
  ...output,
2471
2989
  body: await parseErrorBody(output.body, context),
@@ -2746,6 +3264,114 @@ const deserializeAws_restJson1DeleteVoiceConnectorTerminationCredentialsCommandE
2746
3264
  });
2747
3265
  }
2748
3266
  };
3267
+ export const deserializeAws_restJson1DeleteVoiceProfileCommand = async (output, context) => {
3268
+ if (output.statusCode !== 204 && output.statusCode >= 300) {
3269
+ return deserializeAws_restJson1DeleteVoiceProfileCommandError(output, context);
3270
+ }
3271
+ const contents = map({
3272
+ $metadata: deserializeMetadata(output),
3273
+ });
3274
+ await collectBody(output.body, context);
3275
+ return contents;
3276
+ };
3277
+ const deserializeAws_restJson1DeleteVoiceProfileCommandError = async (output, context) => {
3278
+ const parsedOutput = {
3279
+ ...output,
3280
+ body: await parseErrorBody(output.body, context),
3281
+ };
3282
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3283
+ switch (errorCode) {
3284
+ case "AccessDeniedException":
3285
+ case "com.amazonaws.chimesdkvoice#AccessDeniedException":
3286
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
3287
+ case "BadRequestException":
3288
+ case "com.amazonaws.chimesdkvoice#BadRequestException":
3289
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
3290
+ case "ConflictException":
3291
+ case "com.amazonaws.chimesdkvoice#ConflictException":
3292
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
3293
+ case "ForbiddenException":
3294
+ case "com.amazonaws.chimesdkvoice#ForbiddenException":
3295
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
3296
+ case "NotFoundException":
3297
+ case "com.amazonaws.chimesdkvoice#NotFoundException":
3298
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
3299
+ case "ServiceFailureException":
3300
+ case "com.amazonaws.chimesdkvoice#ServiceFailureException":
3301
+ throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
3302
+ case "ServiceUnavailableException":
3303
+ case "com.amazonaws.chimesdkvoice#ServiceUnavailableException":
3304
+ throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
3305
+ case "ThrottledClientException":
3306
+ case "com.amazonaws.chimesdkvoice#ThrottledClientException":
3307
+ throw await deserializeAws_restJson1ThrottledClientExceptionResponse(parsedOutput, context);
3308
+ case "UnauthorizedClientException":
3309
+ case "com.amazonaws.chimesdkvoice#UnauthorizedClientException":
3310
+ throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
3311
+ default:
3312
+ const parsedBody = parsedOutput.body;
3313
+ throwDefaultError({
3314
+ output,
3315
+ parsedBody,
3316
+ exceptionCtor: __BaseException,
3317
+ errorCode,
3318
+ });
3319
+ }
3320
+ };
3321
+ export const deserializeAws_restJson1DeleteVoiceProfileDomainCommand = async (output, context) => {
3322
+ if (output.statusCode !== 204 && output.statusCode >= 300) {
3323
+ return deserializeAws_restJson1DeleteVoiceProfileDomainCommandError(output, context);
3324
+ }
3325
+ const contents = map({
3326
+ $metadata: deserializeMetadata(output),
3327
+ });
3328
+ await collectBody(output.body, context);
3329
+ return contents;
3330
+ };
3331
+ const deserializeAws_restJson1DeleteVoiceProfileDomainCommandError = async (output, context) => {
3332
+ const parsedOutput = {
3333
+ ...output,
3334
+ body: await parseErrorBody(output.body, context),
3335
+ };
3336
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3337
+ switch (errorCode) {
3338
+ case "AccessDeniedException":
3339
+ case "com.amazonaws.chimesdkvoice#AccessDeniedException":
3340
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
3341
+ case "BadRequestException":
3342
+ case "com.amazonaws.chimesdkvoice#BadRequestException":
3343
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
3344
+ case "ConflictException":
3345
+ case "com.amazonaws.chimesdkvoice#ConflictException":
3346
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
3347
+ case "ForbiddenException":
3348
+ case "com.amazonaws.chimesdkvoice#ForbiddenException":
3349
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
3350
+ case "NotFoundException":
3351
+ case "com.amazonaws.chimesdkvoice#NotFoundException":
3352
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
3353
+ case "ServiceFailureException":
3354
+ case "com.amazonaws.chimesdkvoice#ServiceFailureException":
3355
+ throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
3356
+ case "ServiceUnavailableException":
3357
+ case "com.amazonaws.chimesdkvoice#ServiceUnavailableException":
3358
+ throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
3359
+ case "ThrottledClientException":
3360
+ case "com.amazonaws.chimesdkvoice#ThrottledClientException":
3361
+ throw await deserializeAws_restJson1ThrottledClientExceptionResponse(parsedOutput, context);
3362
+ case "UnauthorizedClientException":
3363
+ case "com.amazonaws.chimesdkvoice#UnauthorizedClientException":
3364
+ throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
3365
+ default:
3366
+ const parsedBody = parsedOutput.body;
3367
+ throwDefaultError({
3368
+ output,
3369
+ parsedBody,
3370
+ exceptionCtor: __BaseException,
3371
+ errorCode,
3372
+ });
3373
+ }
3374
+ };
2749
3375
  export const deserializeAws_restJson1DisassociatePhoneNumbersFromVoiceConnectorCommand = async (output, context) => {
2750
3376
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2751
3377
  return deserializeAws_restJson1DisassociatePhoneNumbersFromVoiceConnectorCommandError(output, context);
@@ -3305,6 +3931,63 @@ const deserializeAws_restJson1GetSipRuleCommandError = async (output, context) =
3305
3931
  });
3306
3932
  }
3307
3933
  };
3934
+ export const deserializeAws_restJson1GetSpeakerSearchTaskCommand = async (output, context) => {
3935
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
3936
+ return deserializeAws_restJson1GetSpeakerSearchTaskCommandError(output, context);
3937
+ }
3938
+ const contents = map({
3939
+ $metadata: deserializeMetadata(output),
3940
+ });
3941
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3942
+ if (data.SpeakerSearchTask != null) {
3943
+ contents.SpeakerSearchTask = deserializeAws_restJson1SpeakerSearchTask(data.SpeakerSearchTask, context);
3944
+ }
3945
+ return contents;
3946
+ };
3947
+ const deserializeAws_restJson1GetSpeakerSearchTaskCommandError = async (output, context) => {
3948
+ const parsedOutput = {
3949
+ ...output,
3950
+ body: await parseErrorBody(output.body, context),
3951
+ };
3952
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3953
+ switch (errorCode) {
3954
+ case "AccessDeniedException":
3955
+ case "com.amazonaws.chimesdkvoice#AccessDeniedException":
3956
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
3957
+ case "BadRequestException":
3958
+ case "com.amazonaws.chimesdkvoice#BadRequestException":
3959
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
3960
+ case "ConflictException":
3961
+ case "com.amazonaws.chimesdkvoice#ConflictException":
3962
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
3963
+ case "ForbiddenException":
3964
+ case "com.amazonaws.chimesdkvoice#ForbiddenException":
3965
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
3966
+ case "NotFoundException":
3967
+ case "com.amazonaws.chimesdkvoice#NotFoundException":
3968
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
3969
+ case "ServiceFailureException":
3970
+ case "com.amazonaws.chimesdkvoice#ServiceFailureException":
3971
+ throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
3972
+ case "ServiceUnavailableException":
3973
+ case "com.amazonaws.chimesdkvoice#ServiceUnavailableException":
3974
+ throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
3975
+ case "ThrottledClientException":
3976
+ case "com.amazonaws.chimesdkvoice#ThrottledClientException":
3977
+ throw await deserializeAws_restJson1ThrottledClientExceptionResponse(parsedOutput, context);
3978
+ case "UnauthorizedClientException":
3979
+ case "com.amazonaws.chimesdkvoice#UnauthorizedClientException":
3980
+ throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
3981
+ default:
3982
+ const parsedBody = parsedOutput.body;
3983
+ throwDefaultError({
3984
+ output,
3985
+ parsedBody,
3986
+ exceptionCtor: __BaseException,
3987
+ errorCode,
3988
+ });
3989
+ }
3990
+ };
3308
3991
  export const deserializeAws_restJson1GetVoiceConnectorCommand = async (output, context) => {
3309
3992
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3310
3993
  return deserializeAws_restJson1GetVoiceConnectorCommandError(output, context);
@@ -3764,32 +4447,38 @@ const deserializeAws_restJson1GetVoiceConnectorTerminationHealthCommandError = a
3764
4447
  });
3765
4448
  }
3766
4449
  };
3767
- export const deserializeAws_restJson1ListAvailableVoiceConnectorRegionsCommand = async (output, context) => {
4450
+ export const deserializeAws_restJson1GetVoiceProfileCommand = async (output, context) => {
3768
4451
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3769
- return deserializeAws_restJson1ListAvailableVoiceConnectorRegionsCommandError(output, context);
4452
+ return deserializeAws_restJson1GetVoiceProfileCommandError(output, context);
3770
4453
  }
3771
4454
  const contents = map({
3772
4455
  $metadata: deserializeMetadata(output),
3773
4456
  });
3774
4457
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3775
- if (data.VoiceConnectorRegions != null) {
3776
- contents.VoiceConnectorRegions = deserializeAws_restJson1VoiceConnectorAwsRegionList(data.VoiceConnectorRegions, context);
4458
+ if (data.VoiceProfile != null) {
4459
+ contents.VoiceProfile = deserializeAws_restJson1VoiceProfile(data.VoiceProfile, context);
3777
4460
  }
3778
4461
  return contents;
3779
4462
  };
3780
- const deserializeAws_restJson1ListAvailableVoiceConnectorRegionsCommandError = async (output, context) => {
4463
+ const deserializeAws_restJson1GetVoiceProfileCommandError = async (output, context) => {
3781
4464
  const parsedOutput = {
3782
4465
  ...output,
3783
4466
  body: await parseErrorBody(output.body, context),
3784
4467
  };
3785
4468
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3786
4469
  switch (errorCode) {
4470
+ case "AccessDeniedException":
4471
+ case "com.amazonaws.chimesdkvoice#AccessDeniedException":
4472
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
3787
4473
  case "BadRequestException":
3788
4474
  case "com.amazonaws.chimesdkvoice#BadRequestException":
3789
4475
  throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
3790
4476
  case "ForbiddenException":
3791
4477
  case "com.amazonaws.chimesdkvoice#ForbiddenException":
3792
4478
  throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
4479
+ case "NotFoundException":
4480
+ case "com.amazonaws.chimesdkvoice#NotFoundException":
4481
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
3793
4482
  case "ServiceFailureException":
3794
4483
  case "com.amazonaws.chimesdkvoice#ServiceFailureException":
3795
4484
  throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
@@ -3812,35 +4501,38 @@ const deserializeAws_restJson1ListAvailableVoiceConnectorRegionsCommandError = a
3812
4501
  });
3813
4502
  }
3814
4503
  };
3815
- export const deserializeAws_restJson1ListPhoneNumberOrdersCommand = async (output, context) => {
4504
+ export const deserializeAws_restJson1GetVoiceProfileDomainCommand = async (output, context) => {
3816
4505
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3817
- return deserializeAws_restJson1ListPhoneNumberOrdersCommandError(output, context);
4506
+ return deserializeAws_restJson1GetVoiceProfileDomainCommandError(output, context);
3818
4507
  }
3819
4508
  const contents = map({
3820
4509
  $metadata: deserializeMetadata(output),
3821
4510
  });
3822
4511
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3823
- if (data.NextToken != null) {
3824
- contents.NextToken = __expectString(data.NextToken);
3825
- }
3826
- if (data.PhoneNumberOrders != null) {
3827
- contents.PhoneNumberOrders = deserializeAws_restJson1PhoneNumberOrderList(data.PhoneNumberOrders, context);
4512
+ if (data.VoiceProfileDomain != null) {
4513
+ contents.VoiceProfileDomain = deserializeAws_restJson1VoiceProfileDomain(data.VoiceProfileDomain, context);
3828
4514
  }
3829
4515
  return contents;
3830
4516
  };
3831
- const deserializeAws_restJson1ListPhoneNumberOrdersCommandError = async (output, context) => {
4517
+ const deserializeAws_restJson1GetVoiceProfileDomainCommandError = async (output, context) => {
3832
4518
  const parsedOutput = {
3833
4519
  ...output,
3834
4520
  body: await parseErrorBody(output.body, context),
3835
4521
  };
3836
4522
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3837
4523
  switch (errorCode) {
4524
+ case "AccessDeniedException":
4525
+ case "com.amazonaws.chimesdkvoice#AccessDeniedException":
4526
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
3838
4527
  case "BadRequestException":
3839
4528
  case "com.amazonaws.chimesdkvoice#BadRequestException":
3840
4529
  throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
3841
4530
  case "ForbiddenException":
3842
4531
  case "com.amazonaws.chimesdkvoice#ForbiddenException":
3843
4532
  throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
4533
+ case "NotFoundException":
4534
+ case "com.amazonaws.chimesdkvoice#NotFoundException":
4535
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
3844
4536
  case "ServiceFailureException":
3845
4537
  case "com.amazonaws.chimesdkvoice#ServiceFailureException":
3846
4538
  throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
@@ -3863,32 +4555,35 @@ const deserializeAws_restJson1ListPhoneNumberOrdersCommandError = async (output,
3863
4555
  });
3864
4556
  }
3865
4557
  };
3866
- export const deserializeAws_restJson1ListPhoneNumbersCommand = async (output, context) => {
4558
+ export const deserializeAws_restJson1GetVoiceToneAnalysisTaskCommand = async (output, context) => {
3867
4559
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3868
- return deserializeAws_restJson1ListPhoneNumbersCommandError(output, context);
4560
+ return deserializeAws_restJson1GetVoiceToneAnalysisTaskCommandError(output, context);
3869
4561
  }
3870
4562
  const contents = map({
3871
4563
  $metadata: deserializeMetadata(output),
3872
4564
  });
3873
4565
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3874
- if (data.NextToken != null) {
3875
- contents.NextToken = __expectString(data.NextToken);
3876
- }
3877
- if (data.PhoneNumbers != null) {
3878
- contents.PhoneNumbers = deserializeAws_restJson1PhoneNumberList(data.PhoneNumbers, context);
4566
+ if (data.VoiceToneAnalysisTask != null) {
4567
+ contents.VoiceToneAnalysisTask = deserializeAws_restJson1VoiceToneAnalysisTask(data.VoiceToneAnalysisTask, context);
3879
4568
  }
3880
4569
  return contents;
3881
4570
  };
3882
- const deserializeAws_restJson1ListPhoneNumbersCommandError = async (output, context) => {
4571
+ const deserializeAws_restJson1GetVoiceToneAnalysisTaskCommandError = async (output, context) => {
3883
4572
  const parsedOutput = {
3884
4573
  ...output,
3885
4574
  body: await parseErrorBody(output.body, context),
3886
4575
  };
3887
4576
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3888
4577
  switch (errorCode) {
4578
+ case "AccessDeniedException":
4579
+ case "com.amazonaws.chimesdkvoice#AccessDeniedException":
4580
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
3889
4581
  case "BadRequestException":
3890
4582
  case "com.amazonaws.chimesdkvoice#BadRequestException":
3891
4583
  throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
4584
+ case "ConflictException":
4585
+ case "com.amazonaws.chimesdkvoice#ConflictException":
4586
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
3892
4587
  case "ForbiddenException":
3893
4588
  case "com.amazonaws.chimesdkvoice#ForbiddenException":
3894
4589
  throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
@@ -3917,23 +4612,20 @@ const deserializeAws_restJson1ListPhoneNumbersCommandError = async (output, cont
3917
4612
  });
3918
4613
  }
3919
4614
  };
3920
- export const deserializeAws_restJson1ListProxySessionsCommand = async (output, context) => {
4615
+ export const deserializeAws_restJson1ListAvailableVoiceConnectorRegionsCommand = async (output, context) => {
3921
4616
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3922
- return deserializeAws_restJson1ListProxySessionsCommandError(output, context);
4617
+ return deserializeAws_restJson1ListAvailableVoiceConnectorRegionsCommandError(output, context);
3923
4618
  }
3924
4619
  const contents = map({
3925
4620
  $metadata: deserializeMetadata(output),
3926
4621
  });
3927
4622
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3928
- if (data.NextToken != null) {
3929
- contents.NextToken = __expectString(data.NextToken);
3930
- }
3931
- if (data.ProxySessions != null) {
3932
- contents.ProxySessions = deserializeAws_restJson1ProxySessions(data.ProxySessions, context);
4623
+ if (data.VoiceConnectorRegions != null) {
4624
+ contents.VoiceConnectorRegions = deserializeAws_restJson1VoiceConnectorAwsRegionList(data.VoiceConnectorRegions, context);
3933
4625
  }
3934
4626
  return contents;
3935
4627
  };
3936
- const deserializeAws_restJson1ListProxySessionsCommandError = async (output, context) => {
4628
+ const deserializeAws_restJson1ListAvailableVoiceConnectorRegionsCommandError = async (output, context) => {
3937
4629
  const parsedOutput = {
3938
4630
  ...output,
3939
4631
  body: await parseErrorBody(output.body, context),
@@ -3946,9 +4638,6 @@ const deserializeAws_restJson1ListProxySessionsCommandError = async (output, con
3946
4638
  case "ForbiddenException":
3947
4639
  case "com.amazonaws.chimesdkvoice#ForbiddenException":
3948
4640
  throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
3949
- case "NotFoundException":
3950
- case "com.amazonaws.chimesdkvoice#NotFoundException":
3951
- throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
3952
4641
  case "ServiceFailureException":
3953
4642
  case "com.amazonaws.chimesdkvoice#ServiceFailureException":
3954
4643
  throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
@@ -3971,9 +4660,9 @@ const deserializeAws_restJson1ListProxySessionsCommandError = async (output, con
3971
4660
  });
3972
4661
  }
3973
4662
  };
3974
- export const deserializeAws_restJson1ListSipMediaApplicationsCommand = async (output, context) => {
4663
+ export const deserializeAws_restJson1ListPhoneNumberOrdersCommand = async (output, context) => {
3975
4664
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3976
- return deserializeAws_restJson1ListSipMediaApplicationsCommandError(output, context);
4665
+ return deserializeAws_restJson1ListPhoneNumberOrdersCommandError(output, context);
3977
4666
  }
3978
4667
  const contents = map({
3979
4668
  $metadata: deserializeMetadata(output),
@@ -3982,12 +4671,12 @@ export const deserializeAws_restJson1ListSipMediaApplicationsCommand = async (ou
3982
4671
  if (data.NextToken != null) {
3983
4672
  contents.NextToken = __expectString(data.NextToken);
3984
4673
  }
3985
- if (data.SipMediaApplications != null) {
3986
- contents.SipMediaApplications = deserializeAws_restJson1SipMediaApplicationList(data.SipMediaApplications, context);
4674
+ if (data.PhoneNumberOrders != null) {
4675
+ contents.PhoneNumberOrders = deserializeAws_restJson1PhoneNumberOrderList(data.PhoneNumberOrders, context);
3987
4676
  }
3988
4677
  return contents;
3989
4678
  };
3990
- const deserializeAws_restJson1ListSipMediaApplicationsCommandError = async (output, context) => {
4679
+ const deserializeAws_restJson1ListPhoneNumberOrdersCommandError = async (output, context) => {
3991
4680
  const parsedOutput = {
3992
4681
  ...output,
3993
4682
  body: await parseErrorBody(output.body, context),
@@ -4022,9 +4711,9 @@ const deserializeAws_restJson1ListSipMediaApplicationsCommandError = async (outp
4022
4711
  });
4023
4712
  }
4024
4713
  };
4025
- export const deserializeAws_restJson1ListSipRulesCommand = async (output, context) => {
4714
+ export const deserializeAws_restJson1ListPhoneNumbersCommand = async (output, context) => {
4026
4715
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4027
- return deserializeAws_restJson1ListSipRulesCommandError(output, context);
4716
+ return deserializeAws_restJson1ListPhoneNumbersCommandError(output, context);
4028
4717
  }
4029
4718
  const contents = map({
4030
4719
  $metadata: deserializeMetadata(output),
@@ -4033,12 +4722,12 @@ export const deserializeAws_restJson1ListSipRulesCommand = async (output, contex
4033
4722
  if (data.NextToken != null) {
4034
4723
  contents.NextToken = __expectString(data.NextToken);
4035
4724
  }
4036
- if (data.SipRules != null) {
4037
- contents.SipRules = deserializeAws_restJson1SipRuleList(data.SipRules, context);
4725
+ if (data.PhoneNumbers != null) {
4726
+ contents.PhoneNumbers = deserializeAws_restJson1PhoneNumberList(data.PhoneNumbers, context);
4038
4727
  }
4039
4728
  return contents;
4040
4729
  };
4041
- const deserializeAws_restJson1ListSipRulesCommandError = async (output, context) => {
4730
+ const deserializeAws_restJson1ListPhoneNumbersCommandError = async (output, context) => {
4042
4731
  const parsedOutput = {
4043
4732
  ...output,
4044
4733
  body: await parseErrorBody(output.body, context),
@@ -4051,6 +4740,9 @@ const deserializeAws_restJson1ListSipRulesCommandError = async (output, context)
4051
4740
  case "ForbiddenException":
4052
4741
  case "com.amazonaws.chimesdkvoice#ForbiddenException":
4053
4742
  throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
4743
+ case "NotFoundException":
4744
+ case "com.amazonaws.chimesdkvoice#NotFoundException":
4745
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
4054
4746
  case "ServiceFailureException":
4055
4747
  case "com.amazonaws.chimesdkvoice#ServiceFailureException":
4056
4748
  throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
@@ -4073,35 +4765,38 @@ const deserializeAws_restJson1ListSipRulesCommandError = async (output, context)
4073
4765
  });
4074
4766
  }
4075
4767
  };
4076
- export const deserializeAws_restJson1ListSupportedPhoneNumberCountriesCommand = async (output, context) => {
4768
+ export const deserializeAws_restJson1ListProxySessionsCommand = async (output, context) => {
4077
4769
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4078
- return deserializeAws_restJson1ListSupportedPhoneNumberCountriesCommandError(output, context);
4770
+ return deserializeAws_restJson1ListProxySessionsCommandError(output, context);
4079
4771
  }
4080
4772
  const contents = map({
4081
4773
  $metadata: deserializeMetadata(output),
4082
4774
  });
4083
4775
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4084
- if (data.PhoneNumberCountries != null) {
4085
- contents.PhoneNumberCountries = deserializeAws_restJson1PhoneNumberCountriesList(data.PhoneNumberCountries, context);
4776
+ if (data.NextToken != null) {
4777
+ contents.NextToken = __expectString(data.NextToken);
4778
+ }
4779
+ if (data.ProxySessions != null) {
4780
+ contents.ProxySessions = deserializeAws_restJson1ProxySessions(data.ProxySessions, context);
4086
4781
  }
4087
4782
  return contents;
4088
4783
  };
4089
- const deserializeAws_restJson1ListSupportedPhoneNumberCountriesCommandError = async (output, context) => {
4784
+ const deserializeAws_restJson1ListProxySessionsCommandError = async (output, context) => {
4090
4785
  const parsedOutput = {
4091
4786
  ...output,
4092
4787
  body: await parseErrorBody(output.body, context),
4093
4788
  };
4094
4789
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4095
4790
  switch (errorCode) {
4096
- case "AccessDeniedException":
4097
- case "com.amazonaws.chimesdkvoice#AccessDeniedException":
4098
- throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
4099
4791
  case "BadRequestException":
4100
4792
  case "com.amazonaws.chimesdkvoice#BadRequestException":
4101
4793
  throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
4102
4794
  case "ForbiddenException":
4103
4795
  case "com.amazonaws.chimesdkvoice#ForbiddenException":
4104
4796
  throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
4797
+ case "NotFoundException":
4798
+ case "com.amazonaws.chimesdkvoice#NotFoundException":
4799
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
4105
4800
  case "ServiceFailureException":
4106
4801
  case "com.amazonaws.chimesdkvoice#ServiceFailureException":
4107
4802
  throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
@@ -4124,9 +4819,9 @@ const deserializeAws_restJson1ListSupportedPhoneNumberCountriesCommandError = as
4124
4819
  });
4125
4820
  }
4126
4821
  };
4127
- export const deserializeAws_restJson1ListVoiceConnectorGroupsCommand = async (output, context) => {
4822
+ export const deserializeAws_restJson1ListSipMediaApplicationsCommand = async (output, context) => {
4128
4823
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4129
- return deserializeAws_restJson1ListVoiceConnectorGroupsCommandError(output, context);
4824
+ return deserializeAws_restJson1ListSipMediaApplicationsCommandError(output, context);
4130
4825
  }
4131
4826
  const contents = map({
4132
4827
  $metadata: deserializeMetadata(output),
@@ -4135,12 +4830,12 @@ export const deserializeAws_restJson1ListVoiceConnectorGroupsCommand = async (ou
4135
4830
  if (data.NextToken != null) {
4136
4831
  contents.NextToken = __expectString(data.NextToken);
4137
4832
  }
4138
- if (data.VoiceConnectorGroups != null) {
4139
- contents.VoiceConnectorGroups = deserializeAws_restJson1VoiceConnectorGroupList(data.VoiceConnectorGroups, context);
4833
+ if (data.SipMediaApplications != null) {
4834
+ contents.SipMediaApplications = deserializeAws_restJson1SipMediaApplicationList(data.SipMediaApplications, context);
4140
4835
  }
4141
4836
  return contents;
4142
4837
  };
4143
- const deserializeAws_restJson1ListVoiceConnectorGroupsCommandError = async (output, context) => {
4838
+ const deserializeAws_restJson1ListSipMediaApplicationsCommandError = async (output, context) => {
4144
4839
  const parsedOutput = {
4145
4840
  ...output,
4146
4841
  body: await parseErrorBody(output.body, context),
@@ -4175,9 +4870,9 @@ const deserializeAws_restJson1ListVoiceConnectorGroupsCommandError = async (outp
4175
4870
  });
4176
4871
  }
4177
4872
  };
4178
- export const deserializeAws_restJson1ListVoiceConnectorsCommand = async (output, context) => {
4873
+ export const deserializeAws_restJson1ListSipRulesCommand = async (output, context) => {
4179
4874
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4180
- return deserializeAws_restJson1ListVoiceConnectorsCommandError(output, context);
4875
+ return deserializeAws_restJson1ListSipRulesCommandError(output, context);
4181
4876
  }
4182
4877
  const contents = map({
4183
4878
  $metadata: deserializeMetadata(output),
@@ -4186,12 +4881,12 @@ export const deserializeAws_restJson1ListVoiceConnectorsCommand = async (output,
4186
4881
  if (data.NextToken != null) {
4187
4882
  contents.NextToken = __expectString(data.NextToken);
4188
4883
  }
4189
- if (data.VoiceConnectors != null) {
4190
- contents.VoiceConnectors = deserializeAws_restJson1VoiceConnectorList(data.VoiceConnectors, context);
4884
+ if (data.SipRules != null) {
4885
+ contents.SipRules = deserializeAws_restJson1SipRuleList(data.SipRules, context);
4191
4886
  }
4192
4887
  return contents;
4193
4888
  };
4194
- const deserializeAws_restJson1ListVoiceConnectorsCommandError = async (output, context) => {
4889
+ const deserializeAws_restJson1ListSipRulesCommandError = async (output, context) => {
4195
4890
  const parsedOutput = {
4196
4891
  ...output,
4197
4892
  body: await parseErrorBody(output.body, context),
@@ -4226,35 +4921,35 @@ const deserializeAws_restJson1ListVoiceConnectorsCommandError = async (output, c
4226
4921
  });
4227
4922
  }
4228
4923
  };
4229
- export const deserializeAws_restJson1ListVoiceConnectorTerminationCredentialsCommand = async (output, context) => {
4924
+ export const deserializeAws_restJson1ListSupportedPhoneNumberCountriesCommand = async (output, context) => {
4230
4925
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4231
- return deserializeAws_restJson1ListVoiceConnectorTerminationCredentialsCommandError(output, context);
4926
+ return deserializeAws_restJson1ListSupportedPhoneNumberCountriesCommandError(output, context);
4232
4927
  }
4233
4928
  const contents = map({
4234
4929
  $metadata: deserializeMetadata(output),
4235
4930
  });
4236
4931
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4237
- if (data.Usernames != null) {
4238
- contents.Usernames = deserializeAws_restJson1SensitiveStringList(data.Usernames, context);
4932
+ if (data.PhoneNumberCountries != null) {
4933
+ contents.PhoneNumberCountries = deserializeAws_restJson1PhoneNumberCountriesList(data.PhoneNumberCountries, context);
4239
4934
  }
4240
4935
  return contents;
4241
4936
  };
4242
- const deserializeAws_restJson1ListVoiceConnectorTerminationCredentialsCommandError = async (output, context) => {
4937
+ const deserializeAws_restJson1ListSupportedPhoneNumberCountriesCommandError = async (output, context) => {
4243
4938
  const parsedOutput = {
4244
4939
  ...output,
4245
4940
  body: await parseErrorBody(output.body, context),
4246
4941
  };
4247
4942
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4248
4943
  switch (errorCode) {
4944
+ case "AccessDeniedException":
4945
+ case "com.amazonaws.chimesdkvoice#AccessDeniedException":
4946
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
4249
4947
  case "BadRequestException":
4250
4948
  case "com.amazonaws.chimesdkvoice#BadRequestException":
4251
4949
  throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
4252
4950
  case "ForbiddenException":
4253
4951
  case "com.amazonaws.chimesdkvoice#ForbiddenException":
4254
4952
  throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
4255
- case "NotFoundException":
4256
- case "com.amazonaws.chimesdkvoice#NotFoundException":
4257
- throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
4258
4953
  case "ServiceFailureException":
4259
4954
  case "com.amazonaws.chimesdkvoice#ServiceFailureException":
4260
4955
  throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
@@ -4277,21 +4972,20 @@ const deserializeAws_restJson1ListVoiceConnectorTerminationCredentialsCommandErr
4277
4972
  });
4278
4973
  }
4279
4974
  };
4280
- export const deserializeAws_restJson1PutSipMediaApplicationAlexaSkillConfigurationCommand = async (output, context) => {
4975
+ export const deserializeAws_restJson1ListTagsForResourceCommand = async (output, context) => {
4281
4976
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4282
- return deserializeAws_restJson1PutSipMediaApplicationAlexaSkillConfigurationCommandError(output, context);
4977
+ return deserializeAws_restJson1ListTagsForResourceCommandError(output, context);
4283
4978
  }
4284
4979
  const contents = map({
4285
4980
  $metadata: deserializeMetadata(output),
4286
4981
  });
4287
4982
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4288
- if (data.SipMediaApplicationAlexaSkillConfiguration != null) {
4289
- contents.SipMediaApplicationAlexaSkillConfiguration =
4290
- deserializeAws_restJson1SipMediaApplicationAlexaSkillConfiguration(data.SipMediaApplicationAlexaSkillConfiguration, context);
4983
+ if (data.Tags != null) {
4984
+ contents.Tags = deserializeAws_restJson1TagList(data.Tags, context);
4291
4985
  }
4292
4986
  return contents;
4293
4987
  };
4294
- const deserializeAws_restJson1PutSipMediaApplicationAlexaSkillConfigurationCommandError = async (output, context) => {
4988
+ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
4295
4989
  const parsedOutput = {
4296
4990
  ...output,
4297
4991
  body: await parseErrorBody(output.body, context),
@@ -4313,9 +5007,6 @@ const deserializeAws_restJson1PutSipMediaApplicationAlexaSkillConfigurationComma
4313
5007
  case "ServiceUnavailableException":
4314
5008
  case "com.amazonaws.chimesdkvoice#ServiceUnavailableException":
4315
5009
  throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
4316
- case "ThrottledClientException":
4317
- case "com.amazonaws.chimesdkvoice#ThrottledClientException":
4318
- throw await deserializeAws_restJson1ThrottledClientExceptionResponse(parsedOutput, context);
4319
5010
  case "UnauthorizedClientException":
4320
5011
  case "com.amazonaws.chimesdkvoice#UnauthorizedClientException":
4321
5012
  throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
@@ -4329,20 +5020,23 @@ const deserializeAws_restJson1PutSipMediaApplicationAlexaSkillConfigurationComma
4329
5020
  });
4330
5021
  }
4331
5022
  };
4332
- export const deserializeAws_restJson1PutSipMediaApplicationLoggingConfigurationCommand = async (output, context) => {
5023
+ export const deserializeAws_restJson1ListVoiceConnectorGroupsCommand = async (output, context) => {
4333
5024
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4334
- return deserializeAws_restJson1PutSipMediaApplicationLoggingConfigurationCommandError(output, context);
5025
+ return deserializeAws_restJson1ListVoiceConnectorGroupsCommandError(output, context);
4335
5026
  }
4336
5027
  const contents = map({
4337
5028
  $metadata: deserializeMetadata(output),
4338
5029
  });
4339
5030
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4340
- if (data.SipMediaApplicationLoggingConfiguration != null) {
4341
- contents.SipMediaApplicationLoggingConfiguration = deserializeAws_restJson1SipMediaApplicationLoggingConfiguration(data.SipMediaApplicationLoggingConfiguration, context);
5031
+ if (data.NextToken != null) {
5032
+ contents.NextToken = __expectString(data.NextToken);
5033
+ }
5034
+ if (data.VoiceConnectorGroups != null) {
5035
+ contents.VoiceConnectorGroups = deserializeAws_restJson1VoiceConnectorGroupList(data.VoiceConnectorGroups, context);
4342
5036
  }
4343
5037
  return contents;
4344
5038
  };
4345
- const deserializeAws_restJson1PutSipMediaApplicationLoggingConfigurationCommandError = async (output, context) => {
5039
+ const deserializeAws_restJson1ListVoiceConnectorGroupsCommandError = async (output, context) => {
4346
5040
  const parsedOutput = {
4347
5041
  ...output,
4348
5042
  body: await parseErrorBody(output.body, context),
@@ -4355,9 +5049,6 @@ const deserializeAws_restJson1PutSipMediaApplicationLoggingConfigurationCommandE
4355
5049
  case "ForbiddenException":
4356
5050
  case "com.amazonaws.chimesdkvoice#ForbiddenException":
4357
5051
  throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
4358
- case "NotFoundException":
4359
- case "com.amazonaws.chimesdkvoice#NotFoundException":
4360
- throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
4361
5052
  case "ServiceFailureException":
4362
5053
  case "com.amazonaws.chimesdkvoice#ServiceFailureException":
4363
5054
  throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
@@ -4380,20 +5071,23 @@ const deserializeAws_restJson1PutSipMediaApplicationLoggingConfigurationCommandE
4380
5071
  });
4381
5072
  }
4382
5073
  };
4383
- export const deserializeAws_restJson1PutVoiceConnectorEmergencyCallingConfigurationCommand = async (output, context) => {
5074
+ export const deserializeAws_restJson1ListVoiceConnectorsCommand = async (output, context) => {
4384
5075
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4385
- return deserializeAws_restJson1PutVoiceConnectorEmergencyCallingConfigurationCommandError(output, context);
5076
+ return deserializeAws_restJson1ListVoiceConnectorsCommandError(output, context);
4386
5077
  }
4387
5078
  const contents = map({
4388
5079
  $metadata: deserializeMetadata(output),
4389
5080
  });
4390
5081
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4391
- if (data.EmergencyCallingConfiguration != null) {
4392
- contents.EmergencyCallingConfiguration = deserializeAws_restJson1EmergencyCallingConfiguration(data.EmergencyCallingConfiguration, context);
5082
+ if (data.NextToken != null) {
5083
+ contents.NextToken = __expectString(data.NextToken);
5084
+ }
5085
+ if (data.VoiceConnectors != null) {
5086
+ contents.VoiceConnectors = deserializeAws_restJson1VoiceConnectorList(data.VoiceConnectors, context);
4393
5087
  }
4394
5088
  return contents;
4395
5089
  };
4396
- const deserializeAws_restJson1PutVoiceConnectorEmergencyCallingConfigurationCommandError = async (output, context) => {
5090
+ const deserializeAws_restJson1ListVoiceConnectorsCommandError = async (output, context) => {
4397
5091
  const parsedOutput = {
4398
5092
  ...output,
4399
5093
  body: await parseErrorBody(output.body, context),
@@ -4406,9 +5100,6 @@ const deserializeAws_restJson1PutVoiceConnectorEmergencyCallingConfigurationComm
4406
5100
  case "ForbiddenException":
4407
5101
  case "com.amazonaws.chimesdkvoice#ForbiddenException":
4408
5102
  throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
4409
- case "NotFoundException":
4410
- case "com.amazonaws.chimesdkvoice#NotFoundException":
4411
- throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
4412
5103
  case "ServiceFailureException":
4413
5104
  case "com.amazonaws.chimesdkvoice#ServiceFailureException":
4414
5105
  throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
@@ -4431,20 +5122,20 @@ const deserializeAws_restJson1PutVoiceConnectorEmergencyCallingConfigurationComm
4431
5122
  });
4432
5123
  }
4433
5124
  };
4434
- export const deserializeAws_restJson1PutVoiceConnectorLoggingConfigurationCommand = async (output, context) => {
5125
+ export const deserializeAws_restJson1ListVoiceConnectorTerminationCredentialsCommand = async (output, context) => {
4435
5126
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4436
- return deserializeAws_restJson1PutVoiceConnectorLoggingConfigurationCommandError(output, context);
5127
+ return deserializeAws_restJson1ListVoiceConnectorTerminationCredentialsCommandError(output, context);
4437
5128
  }
4438
5129
  const contents = map({
4439
5130
  $metadata: deserializeMetadata(output),
4440
5131
  });
4441
5132
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4442
- if (data.LoggingConfiguration != null) {
4443
- contents.LoggingConfiguration = deserializeAws_restJson1LoggingConfiguration(data.LoggingConfiguration, context);
5133
+ if (data.Usernames != null) {
5134
+ contents.Usernames = deserializeAws_restJson1SensitiveStringList(data.Usernames, context);
4444
5135
  }
4445
5136
  return contents;
4446
5137
  };
4447
- const deserializeAws_restJson1PutVoiceConnectorLoggingConfigurationCommandError = async (output, context) => {
5138
+ const deserializeAws_restJson1ListVoiceConnectorTerminationCredentialsCommandError = async (output, context) => {
4448
5139
  const parsedOutput = {
4449
5140
  ...output,
4450
5141
  body: await parseErrorBody(output.body, context),
@@ -4482,20 +5173,23 @@ const deserializeAws_restJson1PutVoiceConnectorLoggingConfigurationCommandError
4482
5173
  });
4483
5174
  }
4484
5175
  };
4485
- export const deserializeAws_restJson1PutVoiceConnectorOriginationCommand = async (output, context) => {
5176
+ export const deserializeAws_restJson1ListVoiceProfileDomainsCommand = async (output, context) => {
4486
5177
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4487
- return deserializeAws_restJson1PutVoiceConnectorOriginationCommandError(output, context);
5178
+ return deserializeAws_restJson1ListVoiceProfileDomainsCommandError(output, context);
4488
5179
  }
4489
5180
  const contents = map({
4490
5181
  $metadata: deserializeMetadata(output),
4491
5182
  });
4492
5183
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4493
- if (data.Origination != null) {
4494
- contents.Origination = deserializeAws_restJson1Origination(data.Origination, context);
5184
+ if (data.NextToken != null) {
5185
+ contents.NextToken = __expectString(data.NextToken);
5186
+ }
5187
+ if (data.VoiceProfileDomains != null) {
5188
+ contents.VoiceProfileDomains = deserializeAws_restJson1VoiceProfileDomainSummaryList(data.VoiceProfileDomains, context);
4495
5189
  }
4496
5190
  return contents;
4497
5191
  };
4498
- const deserializeAws_restJson1PutVoiceConnectorOriginationCommandError = async (output, context) => {
5192
+ const deserializeAws_restJson1ListVoiceProfileDomainsCommandError = async (output, context) => {
4499
5193
  const parsedOutput = {
4500
5194
  ...output,
4501
5195
  body: await parseErrorBody(output.body, context),
@@ -4533,29 +5227,29 @@ const deserializeAws_restJson1PutVoiceConnectorOriginationCommandError = async (
4533
5227
  });
4534
5228
  }
4535
5229
  };
4536
- export const deserializeAws_restJson1PutVoiceConnectorProxyCommand = async (output, context) => {
5230
+ export const deserializeAws_restJson1ListVoiceProfilesCommand = async (output, context) => {
4537
5231
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4538
- return deserializeAws_restJson1PutVoiceConnectorProxyCommandError(output, context);
5232
+ return deserializeAws_restJson1ListVoiceProfilesCommandError(output, context);
4539
5233
  }
4540
5234
  const contents = map({
4541
5235
  $metadata: deserializeMetadata(output),
4542
5236
  });
4543
5237
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4544
- if (data.Proxy != null) {
4545
- contents.Proxy = deserializeAws_restJson1Proxy(data.Proxy, context);
5238
+ if (data.NextToken != null) {
5239
+ contents.NextToken = __expectString(data.NextToken);
5240
+ }
5241
+ if (data.VoiceProfiles != null) {
5242
+ contents.VoiceProfiles = deserializeAws_restJson1VoiceProfileSummaryList(data.VoiceProfiles, context);
4546
5243
  }
4547
5244
  return contents;
4548
5245
  };
4549
- const deserializeAws_restJson1PutVoiceConnectorProxyCommandError = async (output, context) => {
5246
+ const deserializeAws_restJson1ListVoiceProfilesCommandError = async (output, context) => {
4550
5247
  const parsedOutput = {
4551
5248
  ...output,
4552
5249
  body: await parseErrorBody(output.body, context),
4553
5250
  };
4554
5251
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4555
5252
  switch (errorCode) {
4556
- case "AccessDeniedException":
4557
- case "com.amazonaws.chimesdkvoice#AccessDeniedException":
4558
- throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
4559
5253
  case "BadRequestException":
4560
5254
  case "com.amazonaws.chimesdkvoice#BadRequestException":
4561
5255
  throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
@@ -4587,20 +5281,21 @@ const deserializeAws_restJson1PutVoiceConnectorProxyCommandError = async (output
4587
5281
  });
4588
5282
  }
4589
5283
  };
4590
- export const deserializeAws_restJson1PutVoiceConnectorStreamingConfigurationCommand = async (output, context) => {
5284
+ export const deserializeAws_restJson1PutSipMediaApplicationAlexaSkillConfigurationCommand = async (output, context) => {
4591
5285
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4592
- return deserializeAws_restJson1PutVoiceConnectorStreamingConfigurationCommandError(output, context);
5286
+ return deserializeAws_restJson1PutSipMediaApplicationAlexaSkillConfigurationCommandError(output, context);
4593
5287
  }
4594
5288
  const contents = map({
4595
5289
  $metadata: deserializeMetadata(output),
4596
5290
  });
4597
5291
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4598
- if (data.StreamingConfiguration != null) {
4599
- contents.StreamingConfiguration = deserializeAws_restJson1StreamingConfiguration(data.StreamingConfiguration, context);
5292
+ if (data.SipMediaApplicationAlexaSkillConfiguration != null) {
5293
+ contents.SipMediaApplicationAlexaSkillConfiguration =
5294
+ deserializeAws_restJson1SipMediaApplicationAlexaSkillConfiguration(data.SipMediaApplicationAlexaSkillConfiguration, context);
4600
5295
  }
4601
5296
  return contents;
4602
5297
  };
4603
- const deserializeAws_restJson1PutVoiceConnectorStreamingConfigurationCommandError = async (output, context) => {
5298
+ const deserializeAws_restJson1PutSipMediaApplicationAlexaSkillConfigurationCommandError = async (output, context) => {
4604
5299
  const parsedOutput = {
4605
5300
  ...output,
4606
5301
  body: await parseErrorBody(output.body, context),
@@ -4638,29 +5333,26 @@ const deserializeAws_restJson1PutVoiceConnectorStreamingConfigurationCommandErro
4638
5333
  });
4639
5334
  }
4640
5335
  };
4641
- export const deserializeAws_restJson1PutVoiceConnectorTerminationCommand = async (output, context) => {
5336
+ export const deserializeAws_restJson1PutSipMediaApplicationLoggingConfigurationCommand = async (output, context) => {
4642
5337
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4643
- return deserializeAws_restJson1PutVoiceConnectorTerminationCommandError(output, context);
5338
+ return deserializeAws_restJson1PutSipMediaApplicationLoggingConfigurationCommandError(output, context);
4644
5339
  }
4645
5340
  const contents = map({
4646
5341
  $metadata: deserializeMetadata(output),
4647
5342
  });
4648
5343
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4649
- if (data.Termination != null) {
4650
- contents.Termination = deserializeAws_restJson1Termination(data.Termination, context);
5344
+ if (data.SipMediaApplicationLoggingConfiguration != null) {
5345
+ contents.SipMediaApplicationLoggingConfiguration = deserializeAws_restJson1SipMediaApplicationLoggingConfiguration(data.SipMediaApplicationLoggingConfiguration, context);
4651
5346
  }
4652
5347
  return contents;
4653
5348
  };
4654
- const deserializeAws_restJson1PutVoiceConnectorTerminationCommandError = async (output, context) => {
5349
+ const deserializeAws_restJson1PutSipMediaApplicationLoggingConfigurationCommandError = async (output, context) => {
4655
5350
  const parsedOutput = {
4656
5351
  ...output,
4657
5352
  body: await parseErrorBody(output.body, context),
4658
5353
  };
4659
5354
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4660
5355
  switch (errorCode) {
4661
- case "AccessDeniedException":
4662
- case "com.amazonaws.chimesdkvoice#AccessDeniedException":
4663
- throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
4664
5356
  case "BadRequestException":
4665
5357
  case "com.amazonaws.chimesdkvoice#BadRequestException":
4666
5358
  throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
@@ -4692,17 +5384,20 @@ const deserializeAws_restJson1PutVoiceConnectorTerminationCommandError = async (
4692
5384
  });
4693
5385
  }
4694
5386
  };
4695
- export const deserializeAws_restJson1PutVoiceConnectorTerminationCredentialsCommand = async (output, context) => {
4696
- if (output.statusCode !== 204 && output.statusCode >= 300) {
4697
- return deserializeAws_restJson1PutVoiceConnectorTerminationCredentialsCommandError(output, context);
5387
+ export const deserializeAws_restJson1PutVoiceConnectorEmergencyCallingConfigurationCommand = async (output, context) => {
5388
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
5389
+ return deserializeAws_restJson1PutVoiceConnectorEmergencyCallingConfigurationCommandError(output, context);
4698
5390
  }
4699
5391
  const contents = map({
4700
5392
  $metadata: deserializeMetadata(output),
4701
5393
  });
4702
- await collectBody(output.body, context);
5394
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
5395
+ if (data.EmergencyCallingConfiguration != null) {
5396
+ contents.EmergencyCallingConfiguration = deserializeAws_restJson1EmergencyCallingConfiguration(data.EmergencyCallingConfiguration, context);
5397
+ }
4703
5398
  return contents;
4704
5399
  };
4705
- const deserializeAws_restJson1PutVoiceConnectorTerminationCredentialsCommandError = async (output, context) => {
5400
+ const deserializeAws_restJson1PutVoiceConnectorEmergencyCallingConfigurationCommandError = async (output, context) => {
4706
5401
  const parsedOutput = {
4707
5402
  ...output,
4708
5403
  body: await parseErrorBody(output.body, context),
@@ -4740,20 +5435,20 @@ const deserializeAws_restJson1PutVoiceConnectorTerminationCredentialsCommandErro
4740
5435
  });
4741
5436
  }
4742
5437
  };
4743
- export const deserializeAws_restJson1RestorePhoneNumberCommand = async (output, context) => {
5438
+ export const deserializeAws_restJson1PutVoiceConnectorLoggingConfigurationCommand = async (output, context) => {
4744
5439
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4745
- return deserializeAws_restJson1RestorePhoneNumberCommandError(output, context);
5440
+ return deserializeAws_restJson1PutVoiceConnectorLoggingConfigurationCommandError(output, context);
4746
5441
  }
4747
5442
  const contents = map({
4748
5443
  $metadata: deserializeMetadata(output),
4749
5444
  });
4750
5445
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4751
- if (data.PhoneNumber != null) {
4752
- contents.PhoneNumber = deserializeAws_restJson1PhoneNumber(data.PhoneNumber, context);
5446
+ if (data.LoggingConfiguration != null) {
5447
+ contents.LoggingConfiguration = deserializeAws_restJson1LoggingConfiguration(data.LoggingConfiguration, context);
4753
5448
  }
4754
5449
  return contents;
4755
5450
  };
4756
- const deserializeAws_restJson1RestorePhoneNumberCommandError = async (output, context) => {
5451
+ const deserializeAws_restJson1PutVoiceConnectorLoggingConfigurationCommandError = async (output, context) => {
4757
5452
  const parsedOutput = {
4758
5453
  ...output,
4759
5454
  body: await parseErrorBody(output.body, context),
@@ -4769,9 +5464,6 @@ const deserializeAws_restJson1RestorePhoneNumberCommandError = async (output, co
4769
5464
  case "NotFoundException":
4770
5465
  case "com.amazonaws.chimesdkvoice#NotFoundException":
4771
5466
  throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
4772
- case "ResourceLimitExceededException":
4773
- case "com.amazonaws.chimesdkvoice#ResourceLimitExceededException":
4774
- throw await deserializeAws_restJson1ResourceLimitExceededExceptionResponse(parsedOutput, context);
4775
5467
  case "ServiceFailureException":
4776
5468
  case "com.amazonaws.chimesdkvoice#ServiceFailureException":
4777
5469
  throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
@@ -4794,23 +5486,572 @@ const deserializeAws_restJson1RestorePhoneNumberCommandError = async (output, co
4794
5486
  });
4795
5487
  }
4796
5488
  };
4797
- export const deserializeAws_restJson1SearchAvailablePhoneNumbersCommand = async (output, context) => {
5489
+ export const deserializeAws_restJson1PutVoiceConnectorOriginationCommand = async (output, context) => {
4798
5490
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4799
- return deserializeAws_restJson1SearchAvailablePhoneNumbersCommandError(output, context);
5491
+ return deserializeAws_restJson1PutVoiceConnectorOriginationCommandError(output, context);
4800
5492
  }
4801
5493
  const contents = map({
4802
5494
  $metadata: deserializeMetadata(output),
4803
5495
  });
4804
5496
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4805
- if (data.E164PhoneNumbers != null) {
5497
+ if (data.Origination != null) {
5498
+ contents.Origination = deserializeAws_restJson1Origination(data.Origination, context);
5499
+ }
5500
+ return contents;
5501
+ };
5502
+ const deserializeAws_restJson1PutVoiceConnectorOriginationCommandError = async (output, context) => {
5503
+ const parsedOutput = {
5504
+ ...output,
5505
+ body: await parseErrorBody(output.body, context),
5506
+ };
5507
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5508
+ switch (errorCode) {
5509
+ case "BadRequestException":
5510
+ case "com.amazonaws.chimesdkvoice#BadRequestException":
5511
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
5512
+ case "ForbiddenException":
5513
+ case "com.amazonaws.chimesdkvoice#ForbiddenException":
5514
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
5515
+ case "NotFoundException":
5516
+ case "com.amazonaws.chimesdkvoice#NotFoundException":
5517
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
5518
+ case "ServiceFailureException":
5519
+ case "com.amazonaws.chimesdkvoice#ServiceFailureException":
5520
+ throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
5521
+ case "ServiceUnavailableException":
5522
+ case "com.amazonaws.chimesdkvoice#ServiceUnavailableException":
5523
+ throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
5524
+ case "ThrottledClientException":
5525
+ case "com.amazonaws.chimesdkvoice#ThrottledClientException":
5526
+ throw await deserializeAws_restJson1ThrottledClientExceptionResponse(parsedOutput, context);
5527
+ case "UnauthorizedClientException":
5528
+ case "com.amazonaws.chimesdkvoice#UnauthorizedClientException":
5529
+ throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
5530
+ default:
5531
+ const parsedBody = parsedOutput.body;
5532
+ throwDefaultError({
5533
+ output,
5534
+ parsedBody,
5535
+ exceptionCtor: __BaseException,
5536
+ errorCode,
5537
+ });
5538
+ }
5539
+ };
5540
+ export const deserializeAws_restJson1PutVoiceConnectorProxyCommand = async (output, context) => {
5541
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
5542
+ return deserializeAws_restJson1PutVoiceConnectorProxyCommandError(output, context);
5543
+ }
5544
+ const contents = map({
5545
+ $metadata: deserializeMetadata(output),
5546
+ });
5547
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
5548
+ if (data.Proxy != null) {
5549
+ contents.Proxy = deserializeAws_restJson1Proxy(data.Proxy, context);
5550
+ }
5551
+ return contents;
5552
+ };
5553
+ const deserializeAws_restJson1PutVoiceConnectorProxyCommandError = async (output, context) => {
5554
+ const parsedOutput = {
5555
+ ...output,
5556
+ body: await parseErrorBody(output.body, context),
5557
+ };
5558
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5559
+ switch (errorCode) {
5560
+ case "AccessDeniedException":
5561
+ case "com.amazonaws.chimesdkvoice#AccessDeniedException":
5562
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
5563
+ case "BadRequestException":
5564
+ case "com.amazonaws.chimesdkvoice#BadRequestException":
5565
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
5566
+ case "ForbiddenException":
5567
+ case "com.amazonaws.chimesdkvoice#ForbiddenException":
5568
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
5569
+ case "NotFoundException":
5570
+ case "com.amazonaws.chimesdkvoice#NotFoundException":
5571
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
5572
+ case "ServiceFailureException":
5573
+ case "com.amazonaws.chimesdkvoice#ServiceFailureException":
5574
+ throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
5575
+ case "ServiceUnavailableException":
5576
+ case "com.amazonaws.chimesdkvoice#ServiceUnavailableException":
5577
+ throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
5578
+ case "ThrottledClientException":
5579
+ case "com.amazonaws.chimesdkvoice#ThrottledClientException":
5580
+ throw await deserializeAws_restJson1ThrottledClientExceptionResponse(parsedOutput, context);
5581
+ case "UnauthorizedClientException":
5582
+ case "com.amazonaws.chimesdkvoice#UnauthorizedClientException":
5583
+ throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
5584
+ default:
5585
+ const parsedBody = parsedOutput.body;
5586
+ throwDefaultError({
5587
+ output,
5588
+ parsedBody,
5589
+ exceptionCtor: __BaseException,
5590
+ errorCode,
5591
+ });
5592
+ }
5593
+ };
5594
+ export const deserializeAws_restJson1PutVoiceConnectorStreamingConfigurationCommand = async (output, context) => {
5595
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
5596
+ return deserializeAws_restJson1PutVoiceConnectorStreamingConfigurationCommandError(output, context);
5597
+ }
5598
+ const contents = map({
5599
+ $metadata: deserializeMetadata(output),
5600
+ });
5601
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
5602
+ if (data.StreamingConfiguration != null) {
5603
+ contents.StreamingConfiguration = deserializeAws_restJson1StreamingConfiguration(data.StreamingConfiguration, context);
5604
+ }
5605
+ return contents;
5606
+ };
5607
+ const deserializeAws_restJson1PutVoiceConnectorStreamingConfigurationCommandError = async (output, context) => {
5608
+ const parsedOutput = {
5609
+ ...output,
5610
+ body: await parseErrorBody(output.body, context),
5611
+ };
5612
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5613
+ switch (errorCode) {
5614
+ case "BadRequestException":
5615
+ case "com.amazonaws.chimesdkvoice#BadRequestException":
5616
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
5617
+ case "ForbiddenException":
5618
+ case "com.amazonaws.chimesdkvoice#ForbiddenException":
5619
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
5620
+ case "NotFoundException":
5621
+ case "com.amazonaws.chimesdkvoice#NotFoundException":
5622
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
5623
+ case "ServiceFailureException":
5624
+ case "com.amazonaws.chimesdkvoice#ServiceFailureException":
5625
+ throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
5626
+ case "ServiceUnavailableException":
5627
+ case "com.amazonaws.chimesdkvoice#ServiceUnavailableException":
5628
+ throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
5629
+ case "ThrottledClientException":
5630
+ case "com.amazonaws.chimesdkvoice#ThrottledClientException":
5631
+ throw await deserializeAws_restJson1ThrottledClientExceptionResponse(parsedOutput, context);
5632
+ case "UnauthorizedClientException":
5633
+ case "com.amazonaws.chimesdkvoice#UnauthorizedClientException":
5634
+ throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
5635
+ default:
5636
+ const parsedBody = parsedOutput.body;
5637
+ throwDefaultError({
5638
+ output,
5639
+ parsedBody,
5640
+ exceptionCtor: __BaseException,
5641
+ errorCode,
5642
+ });
5643
+ }
5644
+ };
5645
+ export const deserializeAws_restJson1PutVoiceConnectorTerminationCommand = async (output, context) => {
5646
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
5647
+ return deserializeAws_restJson1PutVoiceConnectorTerminationCommandError(output, context);
5648
+ }
5649
+ const contents = map({
5650
+ $metadata: deserializeMetadata(output),
5651
+ });
5652
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
5653
+ if (data.Termination != null) {
5654
+ contents.Termination = deserializeAws_restJson1Termination(data.Termination, context);
5655
+ }
5656
+ return contents;
5657
+ };
5658
+ const deserializeAws_restJson1PutVoiceConnectorTerminationCommandError = async (output, context) => {
5659
+ const parsedOutput = {
5660
+ ...output,
5661
+ body: await parseErrorBody(output.body, context),
5662
+ };
5663
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5664
+ switch (errorCode) {
5665
+ case "AccessDeniedException":
5666
+ case "com.amazonaws.chimesdkvoice#AccessDeniedException":
5667
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
5668
+ case "BadRequestException":
5669
+ case "com.amazonaws.chimesdkvoice#BadRequestException":
5670
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
5671
+ case "ForbiddenException":
5672
+ case "com.amazonaws.chimesdkvoice#ForbiddenException":
5673
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
5674
+ case "NotFoundException":
5675
+ case "com.amazonaws.chimesdkvoice#NotFoundException":
5676
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
5677
+ case "ServiceFailureException":
5678
+ case "com.amazonaws.chimesdkvoice#ServiceFailureException":
5679
+ throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
5680
+ case "ServiceUnavailableException":
5681
+ case "com.amazonaws.chimesdkvoice#ServiceUnavailableException":
5682
+ throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
5683
+ case "ThrottledClientException":
5684
+ case "com.amazonaws.chimesdkvoice#ThrottledClientException":
5685
+ throw await deserializeAws_restJson1ThrottledClientExceptionResponse(parsedOutput, context);
5686
+ case "UnauthorizedClientException":
5687
+ case "com.amazonaws.chimesdkvoice#UnauthorizedClientException":
5688
+ throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
5689
+ default:
5690
+ const parsedBody = parsedOutput.body;
5691
+ throwDefaultError({
5692
+ output,
5693
+ parsedBody,
5694
+ exceptionCtor: __BaseException,
5695
+ errorCode,
5696
+ });
5697
+ }
5698
+ };
5699
+ export const deserializeAws_restJson1PutVoiceConnectorTerminationCredentialsCommand = async (output, context) => {
5700
+ if (output.statusCode !== 204 && output.statusCode >= 300) {
5701
+ return deserializeAws_restJson1PutVoiceConnectorTerminationCredentialsCommandError(output, context);
5702
+ }
5703
+ const contents = map({
5704
+ $metadata: deserializeMetadata(output),
5705
+ });
5706
+ await collectBody(output.body, context);
5707
+ return contents;
5708
+ };
5709
+ const deserializeAws_restJson1PutVoiceConnectorTerminationCredentialsCommandError = async (output, context) => {
5710
+ const parsedOutput = {
5711
+ ...output,
5712
+ body: await parseErrorBody(output.body, context),
5713
+ };
5714
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5715
+ switch (errorCode) {
5716
+ case "BadRequestException":
5717
+ case "com.amazonaws.chimesdkvoice#BadRequestException":
5718
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
5719
+ case "ForbiddenException":
5720
+ case "com.amazonaws.chimesdkvoice#ForbiddenException":
5721
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
5722
+ case "NotFoundException":
5723
+ case "com.amazonaws.chimesdkvoice#NotFoundException":
5724
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
5725
+ case "ServiceFailureException":
5726
+ case "com.amazonaws.chimesdkvoice#ServiceFailureException":
5727
+ throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
5728
+ case "ServiceUnavailableException":
5729
+ case "com.amazonaws.chimesdkvoice#ServiceUnavailableException":
5730
+ throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
5731
+ case "ThrottledClientException":
5732
+ case "com.amazonaws.chimesdkvoice#ThrottledClientException":
5733
+ throw await deserializeAws_restJson1ThrottledClientExceptionResponse(parsedOutput, context);
5734
+ case "UnauthorizedClientException":
5735
+ case "com.amazonaws.chimesdkvoice#UnauthorizedClientException":
5736
+ throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
5737
+ default:
5738
+ const parsedBody = parsedOutput.body;
5739
+ throwDefaultError({
5740
+ output,
5741
+ parsedBody,
5742
+ exceptionCtor: __BaseException,
5743
+ errorCode,
5744
+ });
5745
+ }
5746
+ };
5747
+ export const deserializeAws_restJson1RestorePhoneNumberCommand = async (output, context) => {
5748
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
5749
+ return deserializeAws_restJson1RestorePhoneNumberCommandError(output, context);
5750
+ }
5751
+ const contents = map({
5752
+ $metadata: deserializeMetadata(output),
5753
+ });
5754
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
5755
+ if (data.PhoneNumber != null) {
5756
+ contents.PhoneNumber = deserializeAws_restJson1PhoneNumber(data.PhoneNumber, context);
5757
+ }
5758
+ return contents;
5759
+ };
5760
+ const deserializeAws_restJson1RestorePhoneNumberCommandError = async (output, context) => {
5761
+ const parsedOutput = {
5762
+ ...output,
5763
+ body: await parseErrorBody(output.body, context),
5764
+ };
5765
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5766
+ switch (errorCode) {
5767
+ case "BadRequestException":
5768
+ case "com.amazonaws.chimesdkvoice#BadRequestException":
5769
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
5770
+ case "ForbiddenException":
5771
+ case "com.amazonaws.chimesdkvoice#ForbiddenException":
5772
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
5773
+ case "NotFoundException":
5774
+ case "com.amazonaws.chimesdkvoice#NotFoundException":
5775
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
5776
+ case "ResourceLimitExceededException":
5777
+ case "com.amazonaws.chimesdkvoice#ResourceLimitExceededException":
5778
+ throw await deserializeAws_restJson1ResourceLimitExceededExceptionResponse(parsedOutput, context);
5779
+ case "ServiceFailureException":
5780
+ case "com.amazonaws.chimesdkvoice#ServiceFailureException":
5781
+ throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
5782
+ case "ServiceUnavailableException":
5783
+ case "com.amazonaws.chimesdkvoice#ServiceUnavailableException":
5784
+ throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
5785
+ case "ThrottledClientException":
5786
+ case "com.amazonaws.chimesdkvoice#ThrottledClientException":
5787
+ throw await deserializeAws_restJson1ThrottledClientExceptionResponse(parsedOutput, context);
5788
+ case "UnauthorizedClientException":
5789
+ case "com.amazonaws.chimesdkvoice#UnauthorizedClientException":
5790
+ throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
5791
+ default:
5792
+ const parsedBody = parsedOutput.body;
5793
+ throwDefaultError({
5794
+ output,
5795
+ parsedBody,
5796
+ exceptionCtor: __BaseException,
5797
+ errorCode,
5798
+ });
5799
+ }
5800
+ };
5801
+ export const deserializeAws_restJson1SearchAvailablePhoneNumbersCommand = async (output, context) => {
5802
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
5803
+ return deserializeAws_restJson1SearchAvailablePhoneNumbersCommandError(output, context);
5804
+ }
5805
+ const contents = map({
5806
+ $metadata: deserializeMetadata(output),
5807
+ });
5808
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
5809
+ if (data.E164PhoneNumbers != null) {
4806
5810
  contents.E164PhoneNumbers = deserializeAws_restJson1E164PhoneNumberList(data.E164PhoneNumbers, context);
4807
5811
  }
4808
- if (data.NextToken != null) {
4809
- contents.NextToken = __expectString(data.NextToken);
5812
+ if (data.NextToken != null) {
5813
+ contents.NextToken = __expectString(data.NextToken);
5814
+ }
5815
+ return contents;
5816
+ };
5817
+ const deserializeAws_restJson1SearchAvailablePhoneNumbersCommandError = async (output, context) => {
5818
+ const parsedOutput = {
5819
+ ...output,
5820
+ body: await parseErrorBody(output.body, context),
5821
+ };
5822
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5823
+ switch (errorCode) {
5824
+ case "AccessDeniedException":
5825
+ case "com.amazonaws.chimesdkvoice#AccessDeniedException":
5826
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
5827
+ case "BadRequestException":
5828
+ case "com.amazonaws.chimesdkvoice#BadRequestException":
5829
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
5830
+ case "ForbiddenException":
5831
+ case "com.amazonaws.chimesdkvoice#ForbiddenException":
5832
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
5833
+ case "ServiceFailureException":
5834
+ case "com.amazonaws.chimesdkvoice#ServiceFailureException":
5835
+ throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
5836
+ case "ServiceUnavailableException":
5837
+ case "com.amazonaws.chimesdkvoice#ServiceUnavailableException":
5838
+ throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
5839
+ case "ThrottledClientException":
5840
+ case "com.amazonaws.chimesdkvoice#ThrottledClientException":
5841
+ throw await deserializeAws_restJson1ThrottledClientExceptionResponse(parsedOutput, context);
5842
+ case "UnauthorizedClientException":
5843
+ case "com.amazonaws.chimesdkvoice#UnauthorizedClientException":
5844
+ throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
5845
+ default:
5846
+ const parsedBody = parsedOutput.body;
5847
+ throwDefaultError({
5848
+ output,
5849
+ parsedBody,
5850
+ exceptionCtor: __BaseException,
5851
+ errorCode,
5852
+ });
5853
+ }
5854
+ };
5855
+ export const deserializeAws_restJson1StartSpeakerSearchTaskCommand = async (output, context) => {
5856
+ if (output.statusCode !== 201 && output.statusCode >= 300) {
5857
+ return deserializeAws_restJson1StartSpeakerSearchTaskCommandError(output, context);
5858
+ }
5859
+ const contents = map({
5860
+ $metadata: deserializeMetadata(output),
5861
+ });
5862
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
5863
+ if (data.SpeakerSearchTask != null) {
5864
+ contents.SpeakerSearchTask = deserializeAws_restJson1SpeakerSearchTask(data.SpeakerSearchTask, context);
5865
+ }
5866
+ return contents;
5867
+ };
5868
+ const deserializeAws_restJson1StartSpeakerSearchTaskCommandError = async (output, context) => {
5869
+ const parsedOutput = {
5870
+ ...output,
5871
+ body: await parseErrorBody(output.body, context),
5872
+ };
5873
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5874
+ switch (errorCode) {
5875
+ case "AccessDeniedException":
5876
+ case "com.amazonaws.chimesdkvoice#AccessDeniedException":
5877
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
5878
+ case "BadRequestException":
5879
+ case "com.amazonaws.chimesdkvoice#BadRequestException":
5880
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
5881
+ case "ConflictException":
5882
+ case "com.amazonaws.chimesdkvoice#ConflictException":
5883
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
5884
+ case "ForbiddenException":
5885
+ case "com.amazonaws.chimesdkvoice#ForbiddenException":
5886
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
5887
+ case "GoneException":
5888
+ case "com.amazonaws.chimesdkvoice#GoneException":
5889
+ throw await deserializeAws_restJson1GoneExceptionResponse(parsedOutput, context);
5890
+ case "NotFoundException":
5891
+ case "com.amazonaws.chimesdkvoice#NotFoundException":
5892
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
5893
+ case "ResourceLimitExceededException":
5894
+ case "com.amazonaws.chimesdkvoice#ResourceLimitExceededException":
5895
+ throw await deserializeAws_restJson1ResourceLimitExceededExceptionResponse(parsedOutput, context);
5896
+ case "ServiceFailureException":
5897
+ case "com.amazonaws.chimesdkvoice#ServiceFailureException":
5898
+ throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
5899
+ case "ServiceUnavailableException":
5900
+ case "com.amazonaws.chimesdkvoice#ServiceUnavailableException":
5901
+ throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
5902
+ case "ThrottledClientException":
5903
+ case "com.amazonaws.chimesdkvoice#ThrottledClientException":
5904
+ throw await deserializeAws_restJson1ThrottledClientExceptionResponse(parsedOutput, context);
5905
+ case "UnauthorizedClientException":
5906
+ case "com.amazonaws.chimesdkvoice#UnauthorizedClientException":
5907
+ throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
5908
+ case "UnprocessableEntityException":
5909
+ case "com.amazonaws.chimesdkvoice#UnprocessableEntityException":
5910
+ throw await deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context);
5911
+ default:
5912
+ const parsedBody = parsedOutput.body;
5913
+ throwDefaultError({
5914
+ output,
5915
+ parsedBody,
5916
+ exceptionCtor: __BaseException,
5917
+ errorCode,
5918
+ });
5919
+ }
5920
+ };
5921
+ export const deserializeAws_restJson1StartVoiceToneAnalysisTaskCommand = async (output, context) => {
5922
+ if (output.statusCode !== 201 && output.statusCode >= 300) {
5923
+ return deserializeAws_restJson1StartVoiceToneAnalysisTaskCommandError(output, context);
5924
+ }
5925
+ const contents = map({
5926
+ $metadata: deserializeMetadata(output),
5927
+ });
5928
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
5929
+ if (data.VoiceToneAnalysisTask != null) {
5930
+ contents.VoiceToneAnalysisTask = deserializeAws_restJson1VoiceToneAnalysisTask(data.VoiceToneAnalysisTask, context);
5931
+ }
5932
+ return contents;
5933
+ };
5934
+ const deserializeAws_restJson1StartVoiceToneAnalysisTaskCommandError = async (output, context) => {
5935
+ const parsedOutput = {
5936
+ ...output,
5937
+ body: await parseErrorBody(output.body, context),
5938
+ };
5939
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5940
+ switch (errorCode) {
5941
+ case "AccessDeniedException":
5942
+ case "com.amazonaws.chimesdkvoice#AccessDeniedException":
5943
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
5944
+ case "BadRequestException":
5945
+ case "com.amazonaws.chimesdkvoice#BadRequestException":
5946
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
5947
+ case "ConflictException":
5948
+ case "com.amazonaws.chimesdkvoice#ConflictException":
5949
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
5950
+ case "ForbiddenException":
5951
+ case "com.amazonaws.chimesdkvoice#ForbiddenException":
5952
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
5953
+ case "GoneException":
5954
+ case "com.amazonaws.chimesdkvoice#GoneException":
5955
+ throw await deserializeAws_restJson1GoneExceptionResponse(parsedOutput, context);
5956
+ case "NotFoundException":
5957
+ case "com.amazonaws.chimesdkvoice#NotFoundException":
5958
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
5959
+ case "ResourceLimitExceededException":
5960
+ case "com.amazonaws.chimesdkvoice#ResourceLimitExceededException":
5961
+ throw await deserializeAws_restJson1ResourceLimitExceededExceptionResponse(parsedOutput, context);
5962
+ case "ServiceFailureException":
5963
+ case "com.amazonaws.chimesdkvoice#ServiceFailureException":
5964
+ throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
5965
+ case "ServiceUnavailableException":
5966
+ case "com.amazonaws.chimesdkvoice#ServiceUnavailableException":
5967
+ throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
5968
+ case "ThrottledClientException":
5969
+ case "com.amazonaws.chimesdkvoice#ThrottledClientException":
5970
+ throw await deserializeAws_restJson1ThrottledClientExceptionResponse(parsedOutput, context);
5971
+ case "UnauthorizedClientException":
5972
+ case "com.amazonaws.chimesdkvoice#UnauthorizedClientException":
5973
+ throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
5974
+ case "UnprocessableEntityException":
5975
+ case "com.amazonaws.chimesdkvoice#UnprocessableEntityException":
5976
+ throw await deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context);
5977
+ default:
5978
+ const parsedBody = parsedOutput.body;
5979
+ throwDefaultError({
5980
+ output,
5981
+ parsedBody,
5982
+ exceptionCtor: __BaseException,
5983
+ errorCode,
5984
+ });
5985
+ }
5986
+ };
5987
+ export const deserializeAws_restJson1StopSpeakerSearchTaskCommand = async (output, context) => {
5988
+ if (output.statusCode !== 204 && output.statusCode >= 300) {
5989
+ return deserializeAws_restJson1StopSpeakerSearchTaskCommandError(output, context);
4810
5990
  }
5991
+ const contents = map({
5992
+ $metadata: deserializeMetadata(output),
5993
+ });
5994
+ await collectBody(output.body, context);
4811
5995
  return contents;
4812
5996
  };
4813
- const deserializeAws_restJson1SearchAvailablePhoneNumbersCommandError = async (output, context) => {
5997
+ const deserializeAws_restJson1StopSpeakerSearchTaskCommandError = async (output, context) => {
5998
+ const parsedOutput = {
5999
+ ...output,
6000
+ body: await parseErrorBody(output.body, context),
6001
+ };
6002
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6003
+ switch (errorCode) {
6004
+ case "AccessDeniedException":
6005
+ case "com.amazonaws.chimesdkvoice#AccessDeniedException":
6006
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
6007
+ case "BadRequestException":
6008
+ case "com.amazonaws.chimesdkvoice#BadRequestException":
6009
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
6010
+ case "ConflictException":
6011
+ case "com.amazonaws.chimesdkvoice#ConflictException":
6012
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
6013
+ case "ForbiddenException":
6014
+ case "com.amazonaws.chimesdkvoice#ForbiddenException":
6015
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
6016
+ case "NotFoundException":
6017
+ case "com.amazonaws.chimesdkvoice#NotFoundException":
6018
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
6019
+ case "ServiceFailureException":
6020
+ case "com.amazonaws.chimesdkvoice#ServiceFailureException":
6021
+ throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
6022
+ case "ServiceUnavailableException":
6023
+ case "com.amazonaws.chimesdkvoice#ServiceUnavailableException":
6024
+ throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
6025
+ case "ThrottledClientException":
6026
+ case "com.amazonaws.chimesdkvoice#ThrottledClientException":
6027
+ throw await deserializeAws_restJson1ThrottledClientExceptionResponse(parsedOutput, context);
6028
+ case "UnauthorizedClientException":
6029
+ case "com.amazonaws.chimesdkvoice#UnauthorizedClientException":
6030
+ throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
6031
+ case "UnprocessableEntityException":
6032
+ case "com.amazonaws.chimesdkvoice#UnprocessableEntityException":
6033
+ throw await deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context);
6034
+ default:
6035
+ const parsedBody = parsedOutput.body;
6036
+ throwDefaultError({
6037
+ output,
6038
+ parsedBody,
6039
+ exceptionCtor: __BaseException,
6040
+ errorCode,
6041
+ });
6042
+ }
6043
+ };
6044
+ export const deserializeAws_restJson1StopVoiceToneAnalysisTaskCommand = async (output, context) => {
6045
+ if (output.statusCode !== 204 && output.statusCode >= 300) {
6046
+ return deserializeAws_restJson1StopVoiceToneAnalysisTaskCommandError(output, context);
6047
+ }
6048
+ const contents = map({
6049
+ $metadata: deserializeMetadata(output),
6050
+ });
6051
+ await collectBody(output.body, context);
6052
+ return contents;
6053
+ };
6054
+ const deserializeAws_restJson1StopVoiceToneAnalysisTaskCommandError = async (output, context) => {
4814
6055
  const parsedOutput = {
4815
6056
  ...output,
4816
6057
  body: await parseErrorBody(output.body, context),
@@ -4823,9 +6064,15 @@ const deserializeAws_restJson1SearchAvailablePhoneNumbersCommandError = async (o
4823
6064
  case "BadRequestException":
4824
6065
  case "com.amazonaws.chimesdkvoice#BadRequestException":
4825
6066
  throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
6067
+ case "ConflictException":
6068
+ case "com.amazonaws.chimesdkvoice#ConflictException":
6069
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
4826
6070
  case "ForbiddenException":
4827
6071
  case "com.amazonaws.chimesdkvoice#ForbiddenException":
4828
6072
  throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
6073
+ case "NotFoundException":
6074
+ case "com.amazonaws.chimesdkvoice#NotFoundException":
6075
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
4829
6076
  case "ServiceFailureException":
4830
6077
  case "com.amazonaws.chimesdkvoice#ServiceFailureException":
4831
6078
  throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
@@ -4836,6 +6083,102 @@ const deserializeAws_restJson1SearchAvailablePhoneNumbersCommandError = async (o
4836
6083
  case "com.amazonaws.chimesdkvoice#ThrottledClientException":
4837
6084
  throw await deserializeAws_restJson1ThrottledClientExceptionResponse(parsedOutput, context);
4838
6085
  case "UnauthorizedClientException":
6086
+ case "com.amazonaws.chimesdkvoice#UnauthorizedClientException":
6087
+ throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
6088
+ case "UnprocessableEntityException":
6089
+ case "com.amazonaws.chimesdkvoice#UnprocessableEntityException":
6090
+ throw await deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context);
6091
+ default:
6092
+ const parsedBody = parsedOutput.body;
6093
+ throwDefaultError({
6094
+ output,
6095
+ parsedBody,
6096
+ exceptionCtor: __BaseException,
6097
+ errorCode,
6098
+ });
6099
+ }
6100
+ };
6101
+ export const deserializeAws_restJson1TagResourceCommand = async (output, context) => {
6102
+ if (output.statusCode !== 204 && output.statusCode >= 300) {
6103
+ return deserializeAws_restJson1TagResourceCommandError(output, context);
6104
+ }
6105
+ const contents = map({
6106
+ $metadata: deserializeMetadata(output),
6107
+ });
6108
+ await collectBody(output.body, context);
6109
+ return contents;
6110
+ };
6111
+ const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
6112
+ const parsedOutput = {
6113
+ ...output,
6114
+ body: await parseErrorBody(output.body, context),
6115
+ };
6116
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6117
+ switch (errorCode) {
6118
+ case "BadRequestException":
6119
+ case "com.amazonaws.chimesdkvoice#BadRequestException":
6120
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
6121
+ case "ForbiddenException":
6122
+ case "com.amazonaws.chimesdkvoice#ForbiddenException":
6123
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
6124
+ case "NotFoundException":
6125
+ case "com.amazonaws.chimesdkvoice#NotFoundException":
6126
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
6127
+ case "ResourceLimitExceededException":
6128
+ case "com.amazonaws.chimesdkvoice#ResourceLimitExceededException":
6129
+ throw await deserializeAws_restJson1ResourceLimitExceededExceptionResponse(parsedOutput, context);
6130
+ case "ServiceFailureException":
6131
+ case "com.amazonaws.chimesdkvoice#ServiceFailureException":
6132
+ throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
6133
+ case "ServiceUnavailableException":
6134
+ case "com.amazonaws.chimesdkvoice#ServiceUnavailableException":
6135
+ throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
6136
+ case "UnauthorizedClientException":
6137
+ case "com.amazonaws.chimesdkvoice#UnauthorizedClientException":
6138
+ throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
6139
+ default:
6140
+ const parsedBody = parsedOutput.body;
6141
+ throwDefaultError({
6142
+ output,
6143
+ parsedBody,
6144
+ exceptionCtor: __BaseException,
6145
+ errorCode,
6146
+ });
6147
+ }
6148
+ };
6149
+ export const deserializeAws_restJson1UntagResourceCommand = async (output, context) => {
6150
+ if (output.statusCode !== 204 && output.statusCode >= 300) {
6151
+ return deserializeAws_restJson1UntagResourceCommandError(output, context);
6152
+ }
6153
+ const contents = map({
6154
+ $metadata: deserializeMetadata(output),
6155
+ });
6156
+ await collectBody(output.body, context);
6157
+ return contents;
6158
+ };
6159
+ const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
6160
+ const parsedOutput = {
6161
+ ...output,
6162
+ body: await parseErrorBody(output.body, context),
6163
+ };
6164
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6165
+ switch (errorCode) {
6166
+ case "BadRequestException":
6167
+ case "com.amazonaws.chimesdkvoice#BadRequestException":
6168
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
6169
+ case "ForbiddenException":
6170
+ case "com.amazonaws.chimesdkvoice#ForbiddenException":
6171
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
6172
+ case "NotFoundException":
6173
+ case "com.amazonaws.chimesdkvoice#NotFoundException":
6174
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
6175
+ case "ServiceFailureException":
6176
+ case "com.amazonaws.chimesdkvoice#ServiceFailureException":
6177
+ throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
6178
+ case "ServiceUnavailableException":
6179
+ case "com.amazonaws.chimesdkvoice#ServiceUnavailableException":
6180
+ throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
6181
+ case "UnauthorizedClientException":
4839
6182
  case "com.amazonaws.chimesdkvoice#UnauthorizedClientException":
4840
6183
  throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
4841
6184
  default:
@@ -4992,20 +6335,125 @@ const deserializeAws_restJson1UpdatePhoneNumberSettingsCommandError = async (out
4992
6335
  });
4993
6336
  }
4994
6337
  };
4995
- export const deserializeAws_restJson1UpdateProxySessionCommand = async (output, context) => {
4996
- if (output.statusCode !== 201 && output.statusCode >= 300) {
4997
- return deserializeAws_restJson1UpdateProxySessionCommandError(output, context);
6338
+ export const deserializeAws_restJson1UpdateProxySessionCommand = async (output, context) => {
6339
+ if (output.statusCode !== 201 && output.statusCode >= 300) {
6340
+ return deserializeAws_restJson1UpdateProxySessionCommandError(output, context);
6341
+ }
6342
+ const contents = map({
6343
+ $metadata: deserializeMetadata(output),
6344
+ });
6345
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
6346
+ if (data.ProxySession != null) {
6347
+ contents.ProxySession = deserializeAws_restJson1ProxySession(data.ProxySession, context);
6348
+ }
6349
+ return contents;
6350
+ };
6351
+ const deserializeAws_restJson1UpdateProxySessionCommandError = async (output, context) => {
6352
+ const parsedOutput = {
6353
+ ...output,
6354
+ body: await parseErrorBody(output.body, context),
6355
+ };
6356
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6357
+ switch (errorCode) {
6358
+ case "BadRequestException":
6359
+ case "com.amazonaws.chimesdkvoice#BadRequestException":
6360
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
6361
+ case "ForbiddenException":
6362
+ case "com.amazonaws.chimesdkvoice#ForbiddenException":
6363
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
6364
+ case "NotFoundException":
6365
+ case "com.amazonaws.chimesdkvoice#NotFoundException":
6366
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
6367
+ case "ServiceFailureException":
6368
+ case "com.amazonaws.chimesdkvoice#ServiceFailureException":
6369
+ throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
6370
+ case "ServiceUnavailableException":
6371
+ case "com.amazonaws.chimesdkvoice#ServiceUnavailableException":
6372
+ throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
6373
+ case "ThrottledClientException":
6374
+ case "com.amazonaws.chimesdkvoice#ThrottledClientException":
6375
+ throw await deserializeAws_restJson1ThrottledClientExceptionResponse(parsedOutput, context);
6376
+ case "UnauthorizedClientException":
6377
+ case "com.amazonaws.chimesdkvoice#UnauthorizedClientException":
6378
+ throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
6379
+ default:
6380
+ const parsedBody = parsedOutput.body;
6381
+ throwDefaultError({
6382
+ output,
6383
+ parsedBody,
6384
+ exceptionCtor: __BaseException,
6385
+ errorCode,
6386
+ });
6387
+ }
6388
+ };
6389
+ export const deserializeAws_restJson1UpdateSipMediaApplicationCommand = async (output, context) => {
6390
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
6391
+ return deserializeAws_restJson1UpdateSipMediaApplicationCommandError(output, context);
6392
+ }
6393
+ const contents = map({
6394
+ $metadata: deserializeMetadata(output),
6395
+ });
6396
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
6397
+ if (data.SipMediaApplication != null) {
6398
+ contents.SipMediaApplication = deserializeAws_restJson1SipMediaApplication(data.SipMediaApplication, context);
6399
+ }
6400
+ return contents;
6401
+ };
6402
+ const deserializeAws_restJson1UpdateSipMediaApplicationCommandError = async (output, context) => {
6403
+ const parsedOutput = {
6404
+ ...output,
6405
+ body: await parseErrorBody(output.body, context),
6406
+ };
6407
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6408
+ switch (errorCode) {
6409
+ case "BadRequestException":
6410
+ case "com.amazonaws.chimesdkvoice#BadRequestException":
6411
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
6412
+ case "ConflictException":
6413
+ case "com.amazonaws.chimesdkvoice#ConflictException":
6414
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
6415
+ case "ForbiddenException":
6416
+ case "com.amazonaws.chimesdkvoice#ForbiddenException":
6417
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
6418
+ case "NotFoundException":
6419
+ case "com.amazonaws.chimesdkvoice#NotFoundException":
6420
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
6421
+ case "ServiceFailureException":
6422
+ case "com.amazonaws.chimesdkvoice#ServiceFailureException":
6423
+ throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
6424
+ case "ServiceUnavailableException":
6425
+ case "com.amazonaws.chimesdkvoice#ServiceUnavailableException":
6426
+ throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
6427
+ case "ThrottledClientException":
6428
+ case "com.amazonaws.chimesdkvoice#ThrottledClientException":
6429
+ throw await deserializeAws_restJson1ThrottledClientExceptionResponse(parsedOutput, context);
6430
+ case "UnauthorizedClientException":
6431
+ case "com.amazonaws.chimesdkvoice#UnauthorizedClientException":
6432
+ throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
6433
+ default:
6434
+ const parsedBody = parsedOutput.body;
6435
+ throwDefaultError({
6436
+ output,
6437
+ parsedBody,
6438
+ exceptionCtor: __BaseException,
6439
+ errorCode,
6440
+ });
6441
+ }
6442
+ };
6443
+ export const deserializeAws_restJson1UpdateSipMediaApplicationCallCommand = async (output, context) => {
6444
+ if (output.statusCode !== 202 && output.statusCode >= 300) {
6445
+ return deserializeAws_restJson1UpdateSipMediaApplicationCallCommandError(output, context);
4998
6446
  }
4999
6447
  const contents = map({
5000
6448
  $metadata: deserializeMetadata(output),
5001
6449
  });
5002
6450
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
5003
- if (data.ProxySession != null) {
5004
- contents.ProxySession = deserializeAws_restJson1ProxySession(data.ProxySession, context);
6451
+ if (data.SipMediaApplicationCall != null) {
6452
+ contents.SipMediaApplicationCall = deserializeAws_restJson1SipMediaApplicationCall(data.SipMediaApplicationCall, context);
5005
6453
  }
5006
6454
  return contents;
5007
6455
  };
5008
- const deserializeAws_restJson1UpdateProxySessionCommandError = async (output, context) => {
6456
+ const deserializeAws_restJson1UpdateSipMediaApplicationCallCommandError = async (output, context) => {
5009
6457
  const parsedOutput = {
5010
6458
  ...output,
5011
6459
  body: await parseErrorBody(output.body, context),
@@ -5021,6 +6469,9 @@ const deserializeAws_restJson1UpdateProxySessionCommandError = async (output, co
5021
6469
  case "NotFoundException":
5022
6470
  case "com.amazonaws.chimesdkvoice#NotFoundException":
5023
6471
  throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
6472
+ case "ResourceLimitExceededException":
6473
+ case "com.amazonaws.chimesdkvoice#ResourceLimitExceededException":
6474
+ throw await deserializeAws_restJson1ResourceLimitExceededExceptionResponse(parsedOutput, context);
5024
6475
  case "ServiceFailureException":
5025
6476
  case "com.amazonaws.chimesdkvoice#ServiceFailureException":
5026
6477
  throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
@@ -5043,20 +6494,20 @@ const deserializeAws_restJson1UpdateProxySessionCommandError = async (output, co
5043
6494
  });
5044
6495
  }
5045
6496
  };
5046
- export const deserializeAws_restJson1UpdateSipMediaApplicationCommand = async (output, context) => {
5047
- if (output.statusCode !== 200 && output.statusCode >= 300) {
5048
- return deserializeAws_restJson1UpdateSipMediaApplicationCommandError(output, context);
6497
+ export const deserializeAws_restJson1UpdateSipRuleCommand = async (output, context) => {
6498
+ if (output.statusCode !== 202 && output.statusCode >= 300) {
6499
+ return deserializeAws_restJson1UpdateSipRuleCommandError(output, context);
5049
6500
  }
5050
6501
  const contents = map({
5051
6502
  $metadata: deserializeMetadata(output),
5052
6503
  });
5053
6504
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
5054
- if (data.SipMediaApplication != null) {
5055
- contents.SipMediaApplication = deserializeAws_restJson1SipMediaApplication(data.SipMediaApplication, context);
6505
+ if (data.SipRule != null) {
6506
+ contents.SipRule = deserializeAws_restJson1SipRule(data.SipRule, context);
5056
6507
  }
5057
6508
  return contents;
5058
6509
  };
5059
- const deserializeAws_restJson1UpdateSipMediaApplicationCommandError = async (output, context) => {
6510
+ const deserializeAws_restJson1UpdateSipRuleCommandError = async (output, context) => {
5060
6511
  const parsedOutput = {
5061
6512
  ...output,
5062
6513
  body: await parseErrorBody(output.body, context),
@@ -5075,6 +6526,9 @@ const deserializeAws_restJson1UpdateSipMediaApplicationCommandError = async (out
5075
6526
  case "NotFoundException":
5076
6527
  case "com.amazonaws.chimesdkvoice#NotFoundException":
5077
6528
  throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
6529
+ case "ResourceLimitExceededException":
6530
+ case "com.amazonaws.chimesdkvoice#ResourceLimitExceededException":
6531
+ throw await deserializeAws_restJson1ResourceLimitExceededExceptionResponse(parsedOutput, context);
5078
6532
  case "ServiceFailureException":
5079
6533
  case "com.amazonaws.chimesdkvoice#ServiceFailureException":
5080
6534
  throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
@@ -5097,20 +6551,20 @@ const deserializeAws_restJson1UpdateSipMediaApplicationCommandError = async (out
5097
6551
  });
5098
6552
  }
5099
6553
  };
5100
- export const deserializeAws_restJson1UpdateSipMediaApplicationCallCommand = async (output, context) => {
5101
- if (output.statusCode !== 202 && output.statusCode >= 300) {
5102
- return deserializeAws_restJson1UpdateSipMediaApplicationCallCommandError(output, context);
6554
+ export const deserializeAws_restJson1UpdateVoiceConnectorCommand = async (output, context) => {
6555
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
6556
+ return deserializeAws_restJson1UpdateVoiceConnectorCommandError(output, context);
5103
6557
  }
5104
6558
  const contents = map({
5105
6559
  $metadata: deserializeMetadata(output),
5106
6560
  });
5107
6561
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
5108
- if (data.SipMediaApplicationCall != null) {
5109
- contents.SipMediaApplicationCall = deserializeAws_restJson1SipMediaApplicationCall(data.SipMediaApplicationCall, context);
6562
+ if (data.VoiceConnector != null) {
6563
+ contents.VoiceConnector = deserializeAws_restJson1VoiceConnector(data.VoiceConnector, context);
5110
6564
  }
5111
6565
  return contents;
5112
6566
  };
5113
- const deserializeAws_restJson1UpdateSipMediaApplicationCallCommandError = async (output, context) => {
6567
+ const deserializeAws_restJson1UpdateVoiceConnectorCommandError = async (output, context) => {
5114
6568
  const parsedOutput = {
5115
6569
  ...output,
5116
6570
  body: await parseErrorBody(output.body, context),
@@ -5126,9 +6580,6 @@ const deserializeAws_restJson1UpdateSipMediaApplicationCallCommandError = async
5126
6580
  case "NotFoundException":
5127
6581
  case "com.amazonaws.chimesdkvoice#NotFoundException":
5128
6582
  throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
5129
- case "ResourceLimitExceededException":
5130
- case "com.amazonaws.chimesdkvoice#ResourceLimitExceededException":
5131
- throw await deserializeAws_restJson1ResourceLimitExceededExceptionResponse(parsedOutput, context);
5132
6583
  case "ServiceFailureException":
5133
6584
  case "com.amazonaws.chimesdkvoice#ServiceFailureException":
5134
6585
  throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
@@ -5151,20 +6602,20 @@ const deserializeAws_restJson1UpdateSipMediaApplicationCallCommandError = async
5151
6602
  });
5152
6603
  }
5153
6604
  };
5154
- export const deserializeAws_restJson1UpdateSipRuleCommand = async (output, context) => {
6605
+ export const deserializeAws_restJson1UpdateVoiceConnectorGroupCommand = async (output, context) => {
5155
6606
  if (output.statusCode !== 202 && output.statusCode >= 300) {
5156
- return deserializeAws_restJson1UpdateSipRuleCommandError(output, context);
6607
+ return deserializeAws_restJson1UpdateVoiceConnectorGroupCommandError(output, context);
5157
6608
  }
5158
6609
  const contents = map({
5159
6610
  $metadata: deserializeMetadata(output),
5160
6611
  });
5161
6612
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
5162
- if (data.SipRule != null) {
5163
- contents.SipRule = deserializeAws_restJson1SipRule(data.SipRule, context);
6613
+ if (data.VoiceConnectorGroup != null) {
6614
+ contents.VoiceConnectorGroup = deserializeAws_restJson1VoiceConnectorGroup(data.VoiceConnectorGroup, context);
5164
6615
  }
5165
6616
  return contents;
5166
6617
  };
5167
- const deserializeAws_restJson1UpdateSipRuleCommandError = async (output, context) => {
6618
+ const deserializeAws_restJson1UpdateVoiceConnectorGroupCommandError = async (output, context) => {
5168
6619
  const parsedOutput = {
5169
6620
  ...output,
5170
6621
  body: await parseErrorBody(output.body, context),
@@ -5183,9 +6634,6 @@ const deserializeAws_restJson1UpdateSipRuleCommandError = async (output, context
5183
6634
  case "NotFoundException":
5184
6635
  case "com.amazonaws.chimesdkvoice#NotFoundException":
5185
6636
  throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
5186
- case "ResourceLimitExceededException":
5187
- case "com.amazonaws.chimesdkvoice#ResourceLimitExceededException":
5188
- throw await deserializeAws_restJson1ResourceLimitExceededExceptionResponse(parsedOutput, context);
5189
6637
  case "ServiceFailureException":
5190
6638
  case "com.amazonaws.chimesdkvoice#ServiceFailureException":
5191
6639
  throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
@@ -5208,32 +6656,41 @@ const deserializeAws_restJson1UpdateSipRuleCommandError = async (output, context
5208
6656
  });
5209
6657
  }
5210
6658
  };
5211
- export const deserializeAws_restJson1UpdateVoiceConnectorCommand = async (output, context) => {
6659
+ export const deserializeAws_restJson1UpdateVoiceProfileCommand = async (output, context) => {
5212
6660
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5213
- return deserializeAws_restJson1UpdateVoiceConnectorCommandError(output, context);
6661
+ return deserializeAws_restJson1UpdateVoiceProfileCommandError(output, context);
5214
6662
  }
5215
6663
  const contents = map({
5216
6664
  $metadata: deserializeMetadata(output),
5217
6665
  });
5218
6666
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
5219
- if (data.VoiceConnector != null) {
5220
- contents.VoiceConnector = deserializeAws_restJson1VoiceConnector(data.VoiceConnector, context);
6667
+ if (data.VoiceProfile != null) {
6668
+ contents.VoiceProfile = deserializeAws_restJson1VoiceProfile(data.VoiceProfile, context);
5221
6669
  }
5222
6670
  return contents;
5223
6671
  };
5224
- const deserializeAws_restJson1UpdateVoiceConnectorCommandError = async (output, context) => {
6672
+ const deserializeAws_restJson1UpdateVoiceProfileCommandError = async (output, context) => {
5225
6673
  const parsedOutput = {
5226
6674
  ...output,
5227
6675
  body: await parseErrorBody(output.body, context),
5228
6676
  };
5229
6677
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5230
6678
  switch (errorCode) {
6679
+ case "AccessDeniedException":
6680
+ case "com.amazonaws.chimesdkvoice#AccessDeniedException":
6681
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
5231
6682
  case "BadRequestException":
5232
6683
  case "com.amazonaws.chimesdkvoice#BadRequestException":
5233
6684
  throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
6685
+ case "ConflictException":
6686
+ case "com.amazonaws.chimesdkvoice#ConflictException":
6687
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
5234
6688
  case "ForbiddenException":
5235
6689
  case "com.amazonaws.chimesdkvoice#ForbiddenException":
5236
6690
  throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
6691
+ case "GoneException":
6692
+ case "com.amazonaws.chimesdkvoice#GoneException":
6693
+ throw await deserializeAws_restJson1GoneExceptionResponse(parsedOutput, context);
5237
6694
  case "NotFoundException":
5238
6695
  case "com.amazonaws.chimesdkvoice#NotFoundException":
5239
6696
  throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
@@ -5259,32 +6716,32 @@ const deserializeAws_restJson1UpdateVoiceConnectorCommandError = async (output,
5259
6716
  });
5260
6717
  }
5261
6718
  };
5262
- export const deserializeAws_restJson1UpdateVoiceConnectorGroupCommand = async (output, context) => {
5263
- if (output.statusCode !== 202 && output.statusCode >= 300) {
5264
- return deserializeAws_restJson1UpdateVoiceConnectorGroupCommandError(output, context);
6719
+ export const deserializeAws_restJson1UpdateVoiceProfileDomainCommand = async (output, context) => {
6720
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
6721
+ return deserializeAws_restJson1UpdateVoiceProfileDomainCommandError(output, context);
5265
6722
  }
5266
6723
  const contents = map({
5267
6724
  $metadata: deserializeMetadata(output),
5268
6725
  });
5269
6726
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
5270
- if (data.VoiceConnectorGroup != null) {
5271
- contents.VoiceConnectorGroup = deserializeAws_restJson1VoiceConnectorGroup(data.VoiceConnectorGroup, context);
6727
+ if (data.VoiceProfileDomain != null) {
6728
+ contents.VoiceProfileDomain = deserializeAws_restJson1VoiceProfileDomain(data.VoiceProfileDomain, context);
5272
6729
  }
5273
6730
  return contents;
5274
6731
  };
5275
- const deserializeAws_restJson1UpdateVoiceConnectorGroupCommandError = async (output, context) => {
6732
+ const deserializeAws_restJson1UpdateVoiceProfileDomainCommandError = async (output, context) => {
5276
6733
  const parsedOutput = {
5277
6734
  ...output,
5278
6735
  body: await parseErrorBody(output.body, context),
5279
6736
  };
5280
6737
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5281
6738
  switch (errorCode) {
6739
+ case "AccessDeniedException":
6740
+ case "com.amazonaws.chimesdkvoice#AccessDeniedException":
6741
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
5282
6742
  case "BadRequestException":
5283
6743
  case "com.amazonaws.chimesdkvoice#BadRequestException":
5284
6744
  throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
5285
- case "ConflictException":
5286
- case "com.amazonaws.chimesdkvoice#ConflictException":
5287
- throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
5288
6745
  case "ForbiddenException":
5289
6746
  case "com.amazonaws.chimesdkvoice#ForbiddenException":
5290
6747
  throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
@@ -5434,6 +6891,21 @@ const deserializeAws_restJson1ForbiddenExceptionResponse = async (parsedOutput,
5434
6891
  });
5435
6892
  return __decorateServiceException(exception, parsedOutput.body);
5436
6893
  };
6894
+ const deserializeAws_restJson1GoneExceptionResponse = async (parsedOutput, context) => {
6895
+ const contents = map({});
6896
+ const data = parsedOutput.body;
6897
+ if (data.Code != null) {
6898
+ contents.Code = __expectString(data.Code);
6899
+ }
6900
+ if (data.Message != null) {
6901
+ contents.Message = __expectString(data.Message);
6902
+ }
6903
+ const exception = new GoneException({
6904
+ $metadata: deserializeMetadata(parsedOutput),
6905
+ ...contents,
6906
+ });
6907
+ return __decorateServiceException(exception, parsedOutput.body);
6908
+ };
5437
6909
  const deserializeAws_restJson1NotFoundExceptionResponse = async (parsedOutput, context) => {
5438
6910
  const contents = map({});
5439
6911
  const data = parsedOutput.body;
@@ -5524,6 +6996,21 @@ const deserializeAws_restJson1UnauthorizedClientExceptionResponse = async (parse
5524
6996
  });
5525
6997
  return __decorateServiceException(exception, parsedOutput.body);
5526
6998
  };
6999
+ const deserializeAws_restJson1UnprocessableEntityExceptionResponse = async (parsedOutput, context) => {
7000
+ const contents = map({});
7001
+ const data = parsedOutput.body;
7002
+ if (data.Code != null) {
7003
+ contents.Code = __expectString(data.Code);
7004
+ }
7005
+ if (data.Message != null) {
7006
+ contents.Message = __expectString(data.Message);
7007
+ }
7008
+ const exception = new UnprocessableEntityException({
7009
+ $metadata: deserializeMetadata(parsedOutput),
7010
+ ...contents,
7011
+ });
7012
+ return __decorateServiceException(exception, parsedOutput.body);
7013
+ };
5527
7014
  const serializeAws_restJson1AlexaSkillIdList = (input, context) => {
5528
7015
  return input
5529
7016
  .filter((e) => e != null)
@@ -5605,6 +7092,12 @@ const serializeAws_restJson1LoggingConfiguration = (input, context) => {
5605
7092
  ...(input.EnableSIPLogs != null && { EnableSIPLogs: input.EnableSIPLogs }),
5606
7093
  };
5607
7094
  };
7095
+ const serializeAws_restJson1MediaInsightsConfiguration = (input, context) => {
7096
+ return {
7097
+ ...(input.ConfigurationArn != null && { ConfigurationArn: input.ConfigurationArn }),
7098
+ ...(input.Disabled != null && { Disabled: input.Disabled }),
7099
+ };
7100
+ };
5608
7101
  const serializeAws_restJson1NonEmptyStringList = (input, context) => {
5609
7102
  return input
5610
7103
  .filter((e) => e != null)
@@ -5648,6 +7141,11 @@ const serializeAws_restJson1SensitiveStringList = (input, context) => {
5648
7141
  return entry;
5649
7142
  });
5650
7143
  };
7144
+ const serializeAws_restJson1ServerSideEncryptionConfiguration = (input, context) => {
7145
+ return {
7146
+ ...(input.KmsKeyArn != null && { KmsKeyArn: input.KmsKeyArn }),
7147
+ };
7148
+ };
5651
7149
  const serializeAws_restJson1SipHeadersMap = (input, context) => {
5652
7150
  return Object.entries(input).reduce((acc, [key, value]) => {
5653
7151
  if (value === null) {
@@ -5720,6 +7218,9 @@ const serializeAws_restJson1StreamingConfiguration = (input, context) => {
5720
7218
  return {
5721
7219
  ...(input.DataRetentionInHours != null && { DataRetentionInHours: input.DataRetentionInHours }),
5722
7220
  ...(input.Disabled != null && { Disabled: input.Disabled }),
7221
+ ...(input.MediaInsightsConfiguration != null && {
7222
+ MediaInsightsConfiguration: serializeAws_restJson1MediaInsightsConfiguration(input.MediaInsightsConfiguration, context),
7223
+ }),
5723
7224
  ...(input.StreamingNotificationTargets != null && {
5724
7225
  StreamingNotificationTargets: serializeAws_restJson1StreamingNotificationTargetList(input.StreamingNotificationTargets, context),
5725
7226
  }),
@@ -5744,6 +7245,26 @@ const serializeAws_restJson1StringList = (input, context) => {
5744
7245
  return entry;
5745
7246
  });
5746
7247
  };
7248
+ const serializeAws_restJson1Tag = (input, context) => {
7249
+ return {
7250
+ ...(input.Key != null && { Key: input.Key }),
7251
+ ...(input.Value != null && { Value: input.Value }),
7252
+ };
7253
+ };
7254
+ const serializeAws_restJson1TagKeyList = (input, context) => {
7255
+ return input
7256
+ .filter((e) => e != null)
7257
+ .map((entry) => {
7258
+ return entry;
7259
+ });
7260
+ };
7261
+ const serializeAws_restJson1TagList = (input, context) => {
7262
+ return input
7263
+ .filter((e) => e != null)
7264
+ .map((entry) => {
7265
+ return serializeAws_restJson1Tag(entry, context);
7266
+ });
7267
+ };
5747
7268
  const serializeAws_restJson1Termination = (input, context) => {
5748
7269
  return {
5749
7270
  ...(input.CallingRegions != null && {
@@ -5814,6 +7335,13 @@ const deserializeAws_restJson1AlexaSkillIdList = (output, context) => {
5814
7335
  });
5815
7336
  return retVal;
5816
7337
  };
7338
+ const deserializeAws_restJson1CallDetails = (output, context) => {
7339
+ return {
7340
+ IsCaller: __expectBoolean(output.IsCaller),
7341
+ TransactionId: __expectString(output.TransactionId),
7342
+ VoiceConnectorId: __expectString(output.VoiceConnectorId),
7343
+ };
7344
+ };
5817
7345
  const deserializeAws_restJson1CallingRegionList = (output, context) => {
5818
7346
  const retVal = (output || [])
5819
7347
  .filter((e) => e != null)
@@ -5906,6 +7434,12 @@ const deserializeAws_restJson1LoggingConfiguration = (output, context) => {
5906
7434
  EnableSIPLogs: __expectBoolean(output.EnableSIPLogs),
5907
7435
  };
5908
7436
  };
7437
+ const deserializeAws_restJson1MediaInsightsConfiguration = (output, context) => {
7438
+ return {
7439
+ ConfigurationArn: __expectString(output.ConfigurationArn),
7440
+ Disabled: __expectBoolean(output.Disabled),
7441
+ };
7442
+ };
5909
7443
  const deserializeAws_restJson1OrderedPhoneNumber = (output, context) => {
5910
7444
  return {
5911
7445
  E164PhoneNumber: __expectString(output.E164PhoneNumber),
@@ -6168,6 +7702,11 @@ const deserializeAws_restJson1SensitiveStringList = (output, context) => {
6168
7702
  });
6169
7703
  return retVal;
6170
7704
  };
7705
+ const deserializeAws_restJson1ServerSideEncryptionConfiguration = (output, context) => {
7706
+ return {
7707
+ KmsKeyArn: __expectString(output.KmsKeyArn),
7708
+ };
7709
+ };
6171
7710
  const deserializeAws_restJson1SipMediaApplication = (output, context) => {
6172
7711
  return {
6173
7712
  AwsRegion: __expectString(output.AwsRegion),
@@ -6276,10 +7815,56 @@ const deserializeAws_restJson1SipRuleTargetApplicationList = (output, context) =
6276
7815
  });
6277
7816
  return retVal;
6278
7817
  };
7818
+ const deserializeAws_restJson1SpeakerSearchDetails = (output, context) => {
7819
+ return {
7820
+ Results: output.Results != null ? deserializeAws_restJson1SpeakerSearchResultList(output.Results, context) : undefined,
7821
+ VoiceprintGenerationStatus: __expectString(output.VoiceprintGenerationStatus),
7822
+ };
7823
+ };
7824
+ const deserializeAws_restJson1SpeakerSearchResult = (output, context) => {
7825
+ return {
7826
+ ConfidenceScore: __limitedParseFloat32(output.ConfidenceScore),
7827
+ VoiceProfileId: __expectString(output.VoiceProfileId),
7828
+ };
7829
+ };
7830
+ const deserializeAws_restJson1SpeakerSearchResultList = (output, context) => {
7831
+ const retVal = (output || [])
7832
+ .filter((e) => e != null)
7833
+ .map((entry) => {
7834
+ if (entry === null) {
7835
+ return null;
7836
+ }
7837
+ return deserializeAws_restJson1SpeakerSearchResult(entry, context);
7838
+ });
7839
+ return retVal;
7840
+ };
7841
+ const deserializeAws_restJson1SpeakerSearchTask = (output, context) => {
7842
+ return {
7843
+ CallDetails: output.CallDetails != null ? deserializeAws_restJson1CallDetails(output.CallDetails, context) : undefined,
7844
+ CreatedTimestamp: output.CreatedTimestamp != null
7845
+ ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedTimestamp))
7846
+ : undefined,
7847
+ SpeakerSearchDetails: output.SpeakerSearchDetails != null
7848
+ ? deserializeAws_restJson1SpeakerSearchDetails(output.SpeakerSearchDetails, context)
7849
+ : undefined,
7850
+ SpeakerSearchTaskId: __expectString(output.SpeakerSearchTaskId),
7851
+ SpeakerSearchTaskStatus: __expectString(output.SpeakerSearchTaskStatus),
7852
+ StartedTimestamp: output.StartedTimestamp != null
7853
+ ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.StartedTimestamp))
7854
+ : undefined,
7855
+ StatusMessage: __expectString(output.StatusMessage),
7856
+ UpdatedTimestamp: output.UpdatedTimestamp != null
7857
+ ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedTimestamp))
7858
+ : undefined,
7859
+ };
7860
+ };
6279
7861
  const deserializeAws_restJson1StreamingConfiguration = (output, context) => {
6280
7862
  return {
6281
7863
  DataRetentionInHours: __expectInt32(output.DataRetentionInHours),
6282
7864
  Disabled: __expectBoolean(output.Disabled),
7865
+ MediaInsightsConfiguration: output.MediaInsightsConfiguration != null
7866
+ ? deserializeAws_restJson1MediaInsightsConfiguration(output.MediaInsightsConfiguration, context)
7867
+ : undefined,
6283
7868
  StreamingNotificationTargets: output.StreamingNotificationTargets != null
6284
7869
  ? deserializeAws_restJson1StreamingNotificationTargetList(output.StreamingNotificationTargets, context)
6285
7870
  : undefined,
@@ -6312,6 +7897,23 @@ const deserializeAws_restJson1StringList = (output, context) => {
6312
7897
  });
6313
7898
  return retVal;
6314
7899
  };
7900
+ const deserializeAws_restJson1Tag = (output, context) => {
7901
+ return {
7902
+ Key: __expectString(output.Key),
7903
+ Value: __expectString(output.Value),
7904
+ };
7905
+ };
7906
+ const deserializeAws_restJson1TagList = (output, context) => {
7907
+ const retVal = (output || [])
7908
+ .filter((e) => e != null)
7909
+ .map((entry) => {
7910
+ if (entry === null) {
7911
+ return null;
7912
+ }
7913
+ return deserializeAws_restJson1Tag(entry, context);
7914
+ });
7915
+ return retVal;
7916
+ };
6315
7917
  const deserializeAws_restJson1Termination = (output, context) => {
6316
7918
  return {
6317
7919
  CallingRegions: output.CallingRegions != null
@@ -6416,6 +8018,108 @@ const deserializeAws_restJson1VoiceConnectorSettings = (output, context) => {
6416
8018
  CdrBucket: __expectString(output.CdrBucket),
6417
8019
  };
6418
8020
  };
8021
+ const deserializeAws_restJson1VoiceProfile = (output, context) => {
8022
+ return {
8023
+ CreatedTimestamp: output.CreatedTimestamp != null
8024
+ ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedTimestamp))
8025
+ : undefined,
8026
+ ExpirationTimestamp: output.ExpirationTimestamp != null
8027
+ ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.ExpirationTimestamp))
8028
+ : undefined,
8029
+ UpdatedTimestamp: output.UpdatedTimestamp != null
8030
+ ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedTimestamp))
8031
+ : undefined,
8032
+ VoiceProfileArn: __expectString(output.VoiceProfileArn),
8033
+ VoiceProfileDomainId: __expectString(output.VoiceProfileDomainId),
8034
+ VoiceProfileId: __expectString(output.VoiceProfileId),
8035
+ };
8036
+ };
8037
+ const deserializeAws_restJson1VoiceProfileDomain = (output, context) => {
8038
+ return {
8039
+ CreatedTimestamp: output.CreatedTimestamp != null
8040
+ ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedTimestamp))
8041
+ : undefined,
8042
+ Description: __expectString(output.Description),
8043
+ Name: __expectString(output.Name),
8044
+ ServerSideEncryptionConfiguration: output.ServerSideEncryptionConfiguration != null
8045
+ ? deserializeAws_restJson1ServerSideEncryptionConfiguration(output.ServerSideEncryptionConfiguration, context)
8046
+ : undefined,
8047
+ UpdatedTimestamp: output.UpdatedTimestamp != null
8048
+ ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedTimestamp))
8049
+ : undefined,
8050
+ VoiceProfileDomainArn: __expectString(output.VoiceProfileDomainArn),
8051
+ VoiceProfileDomainId: __expectString(output.VoiceProfileDomainId),
8052
+ };
8053
+ };
8054
+ const deserializeAws_restJson1VoiceProfileDomainSummary = (output, context) => {
8055
+ return {
8056
+ CreatedTimestamp: output.CreatedTimestamp != null
8057
+ ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedTimestamp))
8058
+ : undefined,
8059
+ Description: __expectString(output.Description),
8060
+ Name: __expectString(output.Name),
8061
+ UpdatedTimestamp: output.UpdatedTimestamp != null
8062
+ ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedTimestamp))
8063
+ : undefined,
8064
+ VoiceProfileDomainArn: __expectString(output.VoiceProfileDomainArn),
8065
+ VoiceProfileDomainId: __expectString(output.VoiceProfileDomainId),
8066
+ };
8067
+ };
8068
+ const deserializeAws_restJson1VoiceProfileDomainSummaryList = (output, context) => {
8069
+ const retVal = (output || [])
8070
+ .filter((e) => e != null)
8071
+ .map((entry) => {
8072
+ if (entry === null) {
8073
+ return null;
8074
+ }
8075
+ return deserializeAws_restJson1VoiceProfileDomainSummary(entry, context);
8076
+ });
8077
+ return retVal;
8078
+ };
8079
+ const deserializeAws_restJson1VoiceProfileSummary = (output, context) => {
8080
+ return {
8081
+ CreatedTimestamp: output.CreatedTimestamp != null
8082
+ ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedTimestamp))
8083
+ : undefined,
8084
+ ExpirationTimestamp: output.ExpirationTimestamp != null
8085
+ ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.ExpirationTimestamp))
8086
+ : undefined,
8087
+ UpdatedTimestamp: output.UpdatedTimestamp != null
8088
+ ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedTimestamp))
8089
+ : undefined,
8090
+ VoiceProfileArn: __expectString(output.VoiceProfileArn),
8091
+ VoiceProfileDomainId: __expectString(output.VoiceProfileDomainId),
8092
+ VoiceProfileId: __expectString(output.VoiceProfileId),
8093
+ };
8094
+ };
8095
+ const deserializeAws_restJson1VoiceProfileSummaryList = (output, context) => {
8096
+ const retVal = (output || [])
8097
+ .filter((e) => e != null)
8098
+ .map((entry) => {
8099
+ if (entry === null) {
8100
+ return null;
8101
+ }
8102
+ return deserializeAws_restJson1VoiceProfileSummary(entry, context);
8103
+ });
8104
+ return retVal;
8105
+ };
8106
+ const deserializeAws_restJson1VoiceToneAnalysisTask = (output, context) => {
8107
+ return {
8108
+ CallDetails: output.CallDetails != null ? deserializeAws_restJson1CallDetails(output.CallDetails, context) : undefined,
8109
+ CreatedTimestamp: output.CreatedTimestamp != null
8110
+ ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedTimestamp))
8111
+ : undefined,
8112
+ StartedTimestamp: output.StartedTimestamp != null
8113
+ ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.StartedTimestamp))
8114
+ : undefined,
8115
+ StatusMessage: __expectString(output.StatusMessage),
8116
+ UpdatedTimestamp: output.UpdatedTimestamp != null
8117
+ ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedTimestamp))
8118
+ : undefined,
8119
+ VoiceToneAnalysisTaskId: __expectString(output.VoiceToneAnalysisTaskId),
8120
+ VoiceToneAnalysisTaskStatus: __expectString(output.VoiceToneAnalysisTaskStatus),
8121
+ };
8122
+ };
6419
8123
  const deserializeMetadata = (output) => ({
6420
8124
  httpStatusCode: output.statusCode,
6421
8125
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],