@aws-sdk/client-tnb 3.276.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 (223) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +205 -0
  3. package/dist-cjs/Tnb.js +502 -0
  4. package/dist-cjs/TnbClient.js +40 -0
  5. package/dist-cjs/commands/CancelSolNetworkOperationCommand.js +46 -0
  6. package/dist-cjs/commands/CreateSolFunctionPackageCommand.js +46 -0
  7. package/dist-cjs/commands/CreateSolNetworkInstanceCommand.js +46 -0
  8. package/dist-cjs/commands/CreateSolNetworkPackageCommand.js +46 -0
  9. package/dist-cjs/commands/DeleteSolFunctionPackageCommand.js +46 -0
  10. package/dist-cjs/commands/DeleteSolNetworkInstanceCommand.js +46 -0
  11. package/dist-cjs/commands/DeleteSolNetworkPackageCommand.js +46 -0
  12. package/dist-cjs/commands/GetSolFunctionInstanceCommand.js +46 -0
  13. package/dist-cjs/commands/GetSolFunctionPackageCommand.js +46 -0
  14. package/dist-cjs/commands/GetSolFunctionPackageContentCommand.js +46 -0
  15. package/dist-cjs/commands/GetSolFunctionPackageDescriptorCommand.js +46 -0
  16. package/dist-cjs/commands/GetSolNetworkInstanceCommand.js +46 -0
  17. package/dist-cjs/commands/GetSolNetworkOperationCommand.js +46 -0
  18. package/dist-cjs/commands/GetSolNetworkPackageCommand.js +46 -0
  19. package/dist-cjs/commands/GetSolNetworkPackageContentCommand.js +46 -0
  20. package/dist-cjs/commands/GetSolNetworkPackageDescriptorCommand.js +46 -0
  21. package/dist-cjs/commands/InstantiateSolNetworkInstanceCommand.js +46 -0
  22. package/dist-cjs/commands/ListSolFunctionInstancesCommand.js +46 -0
  23. package/dist-cjs/commands/ListSolFunctionPackagesCommand.js +46 -0
  24. package/dist-cjs/commands/ListSolNetworkInstancesCommand.js +46 -0
  25. package/dist-cjs/commands/ListSolNetworkOperationsCommand.js +46 -0
  26. package/dist-cjs/commands/ListSolNetworkPackagesCommand.js +46 -0
  27. package/dist-cjs/commands/ListTagsForResourceCommand.js +46 -0
  28. package/dist-cjs/commands/PutSolFunctionPackageContentCommand.js +46 -0
  29. package/dist-cjs/commands/PutSolNetworkPackageContentCommand.js +46 -0
  30. package/dist-cjs/commands/TagResourceCommand.js +46 -0
  31. package/dist-cjs/commands/TerminateSolNetworkInstanceCommand.js +46 -0
  32. package/dist-cjs/commands/UntagResourceCommand.js +46 -0
  33. package/dist-cjs/commands/UpdateSolFunctionPackageCommand.js +46 -0
  34. package/dist-cjs/commands/UpdateSolNetworkInstanceCommand.js +46 -0
  35. package/dist-cjs/commands/UpdateSolNetworkPackageCommand.js +46 -0
  36. package/dist-cjs/commands/ValidateSolFunctionPackageContentCommand.js +46 -0
  37. package/dist-cjs/commands/ValidateSolNetworkPackageContentCommand.js +46 -0
  38. package/dist-cjs/commands/index.js +36 -0
  39. package/dist-cjs/endpoint/EndpointParameters.js +12 -0
  40. package/dist-cjs/endpoint/endpointResolver.js +12 -0
  41. package/dist-cjs/endpoint/ruleset.js +7 -0
  42. package/dist-cjs/index.js +11 -0
  43. package/dist-cjs/models/TnbServiceException.js +11 -0
  44. package/dist-cjs/models/index.js +4 -0
  45. package/dist-cjs/models/models_0.js +559 -0
  46. package/dist-cjs/pagination/Interfaces.js +2 -0
  47. package/dist-cjs/pagination/ListSolFunctionInstancesPaginator.js +36 -0
  48. package/dist-cjs/pagination/ListSolFunctionPackagesPaginator.js +36 -0
  49. package/dist-cjs/pagination/ListSolNetworkInstancesPaginator.js +36 -0
  50. package/dist-cjs/pagination/ListSolNetworkOperationsPaginator.js +36 -0
  51. package/dist-cjs/pagination/ListSolNetworkPackagesPaginator.js +36 -0
  52. package/dist-cjs/pagination/index.js +9 -0
  53. package/dist-cjs/protocols/Aws_restJson1.js +2944 -0
  54. package/dist-cjs/runtimeConfig.browser.js +39 -0
  55. package/dist-cjs/runtimeConfig.js +48 -0
  56. package/dist-cjs/runtimeConfig.native.js +15 -0
  57. package/dist-cjs/runtimeConfig.shared.js +21 -0
  58. package/dist-es/Tnb.js +498 -0
  59. package/dist-es/TnbClient.js +36 -0
  60. package/dist-es/commands/CancelSolNetworkOperationCommand.js +42 -0
  61. package/dist-es/commands/CreateSolFunctionPackageCommand.js +42 -0
  62. package/dist-es/commands/CreateSolNetworkInstanceCommand.js +42 -0
  63. package/dist-es/commands/CreateSolNetworkPackageCommand.js +42 -0
  64. package/dist-es/commands/DeleteSolFunctionPackageCommand.js +42 -0
  65. package/dist-es/commands/DeleteSolNetworkInstanceCommand.js +42 -0
  66. package/dist-es/commands/DeleteSolNetworkPackageCommand.js +42 -0
  67. package/dist-es/commands/GetSolFunctionInstanceCommand.js +42 -0
  68. package/dist-es/commands/GetSolFunctionPackageCommand.js +42 -0
  69. package/dist-es/commands/GetSolFunctionPackageContentCommand.js +42 -0
  70. package/dist-es/commands/GetSolFunctionPackageDescriptorCommand.js +42 -0
  71. package/dist-es/commands/GetSolNetworkInstanceCommand.js +42 -0
  72. package/dist-es/commands/GetSolNetworkOperationCommand.js +42 -0
  73. package/dist-es/commands/GetSolNetworkPackageCommand.js +42 -0
  74. package/dist-es/commands/GetSolNetworkPackageContentCommand.js +42 -0
  75. package/dist-es/commands/GetSolNetworkPackageDescriptorCommand.js +42 -0
  76. package/dist-es/commands/InstantiateSolNetworkInstanceCommand.js +42 -0
  77. package/dist-es/commands/ListSolFunctionInstancesCommand.js +42 -0
  78. package/dist-es/commands/ListSolFunctionPackagesCommand.js +42 -0
  79. package/dist-es/commands/ListSolNetworkInstancesCommand.js +42 -0
  80. package/dist-es/commands/ListSolNetworkOperationsCommand.js +42 -0
  81. package/dist-es/commands/ListSolNetworkPackagesCommand.js +42 -0
  82. package/dist-es/commands/ListTagsForResourceCommand.js +42 -0
  83. package/dist-es/commands/PutSolFunctionPackageContentCommand.js +42 -0
  84. package/dist-es/commands/PutSolNetworkPackageContentCommand.js +42 -0
  85. package/dist-es/commands/TagResourceCommand.js +42 -0
  86. package/dist-es/commands/TerminateSolNetworkInstanceCommand.js +42 -0
  87. package/dist-es/commands/UntagResourceCommand.js +42 -0
  88. package/dist-es/commands/UpdateSolFunctionPackageCommand.js +42 -0
  89. package/dist-es/commands/UpdateSolNetworkInstanceCommand.js +42 -0
  90. package/dist-es/commands/UpdateSolNetworkPackageCommand.js +42 -0
  91. package/dist-es/commands/ValidateSolFunctionPackageContentCommand.js +42 -0
  92. package/dist-es/commands/ValidateSolNetworkPackageContentCommand.js +42 -0
  93. package/dist-es/commands/index.js +33 -0
  94. package/dist-es/endpoint/EndpointParameters.js +8 -0
  95. package/dist-es/endpoint/endpointResolver.js +8 -0
  96. package/dist-es/endpoint/ruleset.js +4 -0
  97. package/dist-es/index.js +6 -0
  98. package/dist-es/models/TnbServiceException.js +7 -0
  99. package/dist-es/models/index.js +1 -0
  100. package/dist-es/models/models_0.js +455 -0
  101. package/dist-es/pagination/Interfaces.js +1 -0
  102. package/dist-es/pagination/ListSolFunctionInstancesPaginator.js +32 -0
  103. package/dist-es/pagination/ListSolFunctionPackagesPaginator.js +32 -0
  104. package/dist-es/pagination/ListSolNetworkInstancesPaginator.js +32 -0
  105. package/dist-es/pagination/ListSolNetworkOperationsPaginator.js +32 -0
  106. package/dist-es/pagination/ListSolNetworkPackagesPaginator.js +32 -0
  107. package/dist-es/pagination/index.js +6 -0
  108. package/dist-es/protocols/Aws_restJson1.js +2874 -0
  109. package/dist-es/runtimeConfig.browser.js +34 -0
  110. package/dist-es/runtimeConfig.js +43 -0
  111. package/dist-es/runtimeConfig.native.js +11 -0
  112. package/dist-es/runtimeConfig.shared.js +17 -0
  113. package/dist-types/Tnb.d.ts +284 -0
  114. package/dist-types/TnbClient.d.ts +174 -0
  115. package/dist-types/commands/CancelSolNetworkOperationCommand.d.ts +38 -0
  116. package/dist-types/commands/CreateSolFunctionPackageCommand.d.ts +40 -0
  117. package/dist-types/commands/CreateSolNetworkInstanceCommand.d.ts +39 -0
  118. package/dist-types/commands/CreateSolNetworkPackageCommand.d.ts +41 -0
  119. package/dist-types/commands/DeleteSolFunctionPackageCommand.d.ts +40 -0
  120. package/dist-types/commands/DeleteSolNetworkInstanceCommand.d.ts +39 -0
  121. package/dist-types/commands/DeleteSolNetworkPackageCommand.d.ts +39 -0
  122. package/dist-types/commands/GetSolFunctionInstanceCommand.d.ts +38 -0
  123. package/dist-types/commands/GetSolFunctionPackageCommand.d.ts +38 -0
  124. package/dist-types/commands/GetSolFunctionPackageContentCommand.d.ts +38 -0
  125. package/dist-types/commands/GetSolFunctionPackageDescriptorCommand.d.ts +39 -0
  126. package/dist-types/commands/GetSolNetworkInstanceCommand.d.ts +38 -0
  127. package/dist-types/commands/GetSolNetworkOperationCommand.d.ts +38 -0
  128. package/dist-types/commands/GetSolNetworkPackageCommand.d.ts +38 -0
  129. package/dist-types/commands/GetSolNetworkPackageContentCommand.d.ts +38 -0
  130. package/dist-types/commands/GetSolNetworkPackageDescriptorCommand.d.ts +38 -0
  131. package/dist-types/commands/InstantiateSolNetworkInstanceCommand.d.ts +39 -0
  132. package/dist-types/commands/ListSolFunctionInstancesCommand.d.ts +38 -0
  133. package/dist-types/commands/ListSolFunctionPackagesCommand.d.ts +38 -0
  134. package/dist-types/commands/ListSolNetworkInstancesCommand.d.ts +38 -0
  135. package/dist-types/commands/ListSolNetworkOperationsCommand.d.ts +38 -0
  136. package/dist-types/commands/ListSolNetworkPackagesCommand.d.ts +38 -0
  137. package/dist-types/commands/ListTagsForResourceCommand.d.ts +37 -0
  138. package/dist-types/commands/PutSolFunctionPackageContentCommand.d.ts +38 -0
  139. package/dist-types/commands/PutSolNetworkPackageContentCommand.d.ts +38 -0
  140. package/dist-types/commands/TagResourceCommand.d.ts +38 -0
  141. package/dist-types/commands/TerminateSolNetworkInstanceCommand.d.ts +39 -0
  142. package/dist-types/commands/UntagResourceCommand.d.ts +38 -0
  143. package/dist-types/commands/UpdateSolFunctionPackageCommand.d.ts +38 -0
  144. package/dist-types/commands/UpdateSolNetworkInstanceCommand.d.ts +38 -0
  145. package/dist-types/commands/UpdateSolNetworkPackageCommand.d.ts +39 -0
  146. package/dist-types/commands/ValidateSolFunctionPackageContentCommand.d.ts +38 -0
  147. package/dist-types/commands/ValidateSolNetworkPackageContentCommand.d.ts +38 -0
  148. package/dist-types/commands/index.d.ts +33 -0
  149. package/dist-types/endpoint/EndpointParameters.d.ts +19 -0
  150. package/dist-types/endpoint/endpointResolver.d.ts +5 -0
  151. package/dist-types/endpoint/ruleset.d.ts +2 -0
  152. package/dist-types/index.d.ts +6 -0
  153. package/dist-types/models/TnbServiceException.d.ts +10 -0
  154. package/dist-types/models/index.d.ts +1 -0
  155. package/dist-types/models/models_0.d.ts +1935 -0
  156. package/dist-types/pagination/Interfaces.d.ts +6 -0
  157. package/dist-types/pagination/ListSolFunctionInstancesPaginator.d.ts +4 -0
  158. package/dist-types/pagination/ListSolFunctionPackagesPaginator.d.ts +4 -0
  159. package/dist-types/pagination/ListSolNetworkInstancesPaginator.d.ts +4 -0
  160. package/dist-types/pagination/ListSolNetworkOperationsPaginator.d.ts +4 -0
  161. package/dist-types/pagination/ListSolNetworkPackagesPaginator.d.ts +4 -0
  162. package/dist-types/pagination/index.d.ts +6 -0
  163. package/dist-types/protocols/Aws_restJson1.d.ts +101 -0
  164. package/dist-types/runtimeConfig.browser.d.ts +42 -0
  165. package/dist-types/runtimeConfig.d.ts +42 -0
  166. package/dist-types/runtimeConfig.native.d.ts +41 -0
  167. package/dist-types/runtimeConfig.shared.d.ts +18 -0
  168. package/dist-types/ts3.4/Tnb.d.ts +571 -0
  169. package/dist-types/ts3.4/TnbClient.d.ts +309 -0
  170. package/dist-types/ts3.4/commands/CancelSolNetworkOperationCommand.d.ts +37 -0
  171. package/dist-types/ts3.4/commands/CreateSolFunctionPackageCommand.d.ts +41 -0
  172. package/dist-types/ts3.4/commands/CreateSolNetworkInstanceCommand.d.ts +41 -0
  173. package/dist-types/ts3.4/commands/CreateSolNetworkPackageCommand.d.ts +41 -0
  174. package/dist-types/ts3.4/commands/DeleteSolFunctionPackageCommand.d.ts +37 -0
  175. package/dist-types/ts3.4/commands/DeleteSolNetworkInstanceCommand.d.ts +37 -0
  176. package/dist-types/ts3.4/commands/DeleteSolNetworkPackageCommand.d.ts +37 -0
  177. package/dist-types/ts3.4/commands/GetSolFunctionInstanceCommand.d.ts +41 -0
  178. package/dist-types/ts3.4/commands/GetSolFunctionPackageCommand.d.ts +41 -0
  179. package/dist-types/ts3.4/commands/GetSolFunctionPackageContentCommand.d.ts +41 -0
  180. package/dist-types/ts3.4/commands/GetSolFunctionPackageDescriptorCommand.d.ts +41 -0
  181. package/dist-types/ts3.4/commands/GetSolNetworkInstanceCommand.d.ts +41 -0
  182. package/dist-types/ts3.4/commands/GetSolNetworkOperationCommand.d.ts +41 -0
  183. package/dist-types/ts3.4/commands/GetSolNetworkPackageCommand.d.ts +41 -0
  184. package/dist-types/ts3.4/commands/GetSolNetworkPackageContentCommand.d.ts +41 -0
  185. package/dist-types/ts3.4/commands/GetSolNetworkPackageDescriptorCommand.d.ts +41 -0
  186. package/dist-types/ts3.4/commands/InstantiateSolNetworkInstanceCommand.d.ts +41 -0
  187. package/dist-types/ts3.4/commands/ListSolFunctionInstancesCommand.d.ts +41 -0
  188. package/dist-types/ts3.4/commands/ListSolFunctionPackagesCommand.d.ts +41 -0
  189. package/dist-types/ts3.4/commands/ListSolNetworkInstancesCommand.d.ts +41 -0
  190. package/dist-types/ts3.4/commands/ListSolNetworkOperationsCommand.d.ts +41 -0
  191. package/dist-types/ts3.4/commands/ListSolNetworkPackagesCommand.d.ts +41 -0
  192. package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +38 -0
  193. package/dist-types/ts3.4/commands/PutSolFunctionPackageContentCommand.d.ts +41 -0
  194. package/dist-types/ts3.4/commands/PutSolNetworkPackageContentCommand.d.ts +41 -0
  195. package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +34 -0
  196. package/dist-types/ts3.4/commands/TerminateSolNetworkInstanceCommand.d.ts +41 -0
  197. package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +34 -0
  198. package/dist-types/ts3.4/commands/UpdateSolFunctionPackageCommand.d.ts +41 -0
  199. package/dist-types/ts3.4/commands/UpdateSolNetworkInstanceCommand.d.ts +41 -0
  200. package/dist-types/ts3.4/commands/UpdateSolNetworkPackageCommand.d.ts +41 -0
  201. package/dist-types/ts3.4/commands/ValidateSolFunctionPackageContentCommand.d.ts +41 -0
  202. package/dist-types/ts3.4/commands/ValidateSolNetworkPackageContentCommand.d.ts +41 -0
  203. package/dist-types/ts3.4/commands/index.d.ts +33 -0
  204. package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +34 -0
  205. package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
  206. package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
  207. package/dist-types/ts3.4/index.d.ts +6 -0
  208. package/dist-types/ts3.4/models/TnbServiceException.d.ts +7 -0
  209. package/dist-types/ts3.4/models/index.d.ts +1 -0
  210. package/dist-types/ts3.4/models/models_0.d.ts +855 -0
  211. package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
  212. package/dist-types/ts3.4/pagination/ListSolFunctionInstancesPaginator.d.ts +11 -0
  213. package/dist-types/ts3.4/pagination/ListSolFunctionPackagesPaginator.d.ts +11 -0
  214. package/dist-types/ts3.4/pagination/ListSolNetworkInstancesPaginator.d.ts +11 -0
  215. package/dist-types/ts3.4/pagination/ListSolNetworkOperationsPaginator.d.ts +11 -0
  216. package/dist-types/ts3.4/pagination/ListSolNetworkPackagesPaginator.d.ts +11 -0
  217. package/dist-types/ts3.4/pagination/index.d.ts +6 -0
  218. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +401 -0
  219. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +91 -0
  220. package/dist-types/ts3.4/runtimeConfig.d.ts +91 -0
  221. package/dist-types/ts3.4/runtimeConfig.native.d.ts +80 -0
  222. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +18 -0
  223. package/package.json +102 -0
@@ -0,0 +1,2874 @@
1
+ import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
+ import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map as __map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
3
+ import { AccessDeniedException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
4
+ import { TnbServiceException as __BaseException } from "../models/TnbServiceException";
5
+ export const serializeAws_restJson1CancelSolNetworkOperationCommand = async (input, context) => {
6
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
7
+ const headers = {};
8
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
9
+ "/sol/nslcm/v1/ns_lcm_op_occs/{nsLcmOpOccId}/cancel";
10
+ resolvedPath = __resolvedPath(resolvedPath, input, "nsLcmOpOccId", () => input.nsLcmOpOccId, "{nsLcmOpOccId}", false);
11
+ let body;
12
+ return new __HttpRequest({
13
+ protocol,
14
+ hostname,
15
+ port,
16
+ method: "POST",
17
+ headers,
18
+ path: resolvedPath,
19
+ body,
20
+ });
21
+ };
22
+ export const serializeAws_restJson1CreateSolFunctionPackageCommand = async (input, context) => {
23
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
24
+ const headers = {
25
+ "content-type": "application/json",
26
+ };
27
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sol/vnfpkgm/v1/vnf_packages";
28
+ let body;
29
+ body = JSON.stringify({
30
+ ...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
31
+ });
32
+ return new __HttpRequest({
33
+ protocol,
34
+ hostname,
35
+ port,
36
+ method: "POST",
37
+ headers,
38
+ path: resolvedPath,
39
+ body,
40
+ });
41
+ };
42
+ export const serializeAws_restJson1CreateSolNetworkInstanceCommand = async (input, context) => {
43
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
44
+ const headers = {
45
+ "content-type": "application/json",
46
+ };
47
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sol/nslcm/v1/ns_instances";
48
+ let body;
49
+ body = JSON.stringify({
50
+ ...(input.nsDescription != null && { nsDescription: input.nsDescription }),
51
+ ...(input.nsName != null && { nsName: input.nsName }),
52
+ ...(input.nsdInfoId != null && { nsdInfoId: input.nsdInfoId }),
53
+ ...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
54
+ });
55
+ return new __HttpRequest({
56
+ protocol,
57
+ hostname,
58
+ port,
59
+ method: "POST",
60
+ headers,
61
+ path: resolvedPath,
62
+ body,
63
+ });
64
+ };
65
+ export const serializeAws_restJson1CreateSolNetworkPackageCommand = async (input, context) => {
66
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
67
+ const headers = {
68
+ "content-type": "application/json",
69
+ };
70
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sol/nsd/v1/ns_descriptors";
71
+ let body;
72
+ body = JSON.stringify({
73
+ ...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
74
+ });
75
+ return new __HttpRequest({
76
+ protocol,
77
+ hostname,
78
+ port,
79
+ method: "POST",
80
+ headers,
81
+ path: resolvedPath,
82
+ body,
83
+ });
84
+ };
85
+ export const serializeAws_restJson1DeleteSolFunctionPackageCommand = async (input, context) => {
86
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
87
+ const headers = {};
88
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sol/vnfpkgm/v1/vnf_packages/{vnfPkgId}";
89
+ resolvedPath = __resolvedPath(resolvedPath, input, "vnfPkgId", () => input.vnfPkgId, "{vnfPkgId}", false);
90
+ let body;
91
+ return new __HttpRequest({
92
+ protocol,
93
+ hostname,
94
+ port,
95
+ method: "DELETE",
96
+ headers,
97
+ path: resolvedPath,
98
+ body,
99
+ });
100
+ };
101
+ export const serializeAws_restJson1DeleteSolNetworkInstanceCommand = async (input, context) => {
102
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
103
+ const headers = {};
104
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sol/nslcm/v1/ns_instances/{nsInstanceId}";
105
+ resolvedPath = __resolvedPath(resolvedPath, input, "nsInstanceId", () => input.nsInstanceId, "{nsInstanceId}", false);
106
+ let body;
107
+ return new __HttpRequest({
108
+ protocol,
109
+ hostname,
110
+ port,
111
+ method: "DELETE",
112
+ headers,
113
+ path: resolvedPath,
114
+ body,
115
+ });
116
+ };
117
+ export const serializeAws_restJson1DeleteSolNetworkPackageCommand = async (input, context) => {
118
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
119
+ const headers = {};
120
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sol/nsd/v1/ns_descriptors/{nsdInfoId}";
121
+ resolvedPath = __resolvedPath(resolvedPath, input, "nsdInfoId", () => input.nsdInfoId, "{nsdInfoId}", false);
122
+ let body;
123
+ return new __HttpRequest({
124
+ protocol,
125
+ hostname,
126
+ port,
127
+ method: "DELETE",
128
+ headers,
129
+ path: resolvedPath,
130
+ body,
131
+ });
132
+ };
133
+ export const serializeAws_restJson1GetSolFunctionInstanceCommand = async (input, context) => {
134
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
135
+ const headers = {};
136
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
137
+ "/sol/vnflcm/v1/vnf_instances/{vnfInstanceId}";
138
+ resolvedPath = __resolvedPath(resolvedPath, input, "vnfInstanceId", () => input.vnfInstanceId, "{vnfInstanceId}", false);
139
+ let body;
140
+ return new __HttpRequest({
141
+ protocol,
142
+ hostname,
143
+ port,
144
+ method: "GET",
145
+ headers,
146
+ path: resolvedPath,
147
+ body,
148
+ });
149
+ };
150
+ export const serializeAws_restJson1GetSolFunctionPackageCommand = async (input, context) => {
151
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
152
+ const headers = {};
153
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sol/vnfpkgm/v1/vnf_packages/{vnfPkgId}";
154
+ resolvedPath = __resolvedPath(resolvedPath, input, "vnfPkgId", () => input.vnfPkgId, "{vnfPkgId}", false);
155
+ let body;
156
+ return new __HttpRequest({
157
+ protocol,
158
+ hostname,
159
+ port,
160
+ method: "GET",
161
+ headers,
162
+ path: resolvedPath,
163
+ body,
164
+ });
165
+ };
166
+ export const serializeAws_restJson1GetSolFunctionPackageContentCommand = async (input, context) => {
167
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
168
+ const headers = map({}, isSerializableHeaderValue, {
169
+ accept: input.accept,
170
+ });
171
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
172
+ "/sol/vnfpkgm/v1/vnf_packages/{vnfPkgId}/package_content";
173
+ resolvedPath = __resolvedPath(resolvedPath, input, "vnfPkgId", () => input.vnfPkgId, "{vnfPkgId}", false);
174
+ let body;
175
+ return new __HttpRequest({
176
+ protocol,
177
+ hostname,
178
+ port,
179
+ method: "GET",
180
+ headers,
181
+ path: resolvedPath,
182
+ body,
183
+ });
184
+ };
185
+ export const serializeAws_restJson1GetSolFunctionPackageDescriptorCommand = async (input, context) => {
186
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
187
+ const headers = map({}, isSerializableHeaderValue, {
188
+ accept: input.accept,
189
+ });
190
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
191
+ "/sol/vnfpkgm/v1/vnf_packages/{vnfPkgId}/vnfd";
192
+ resolvedPath = __resolvedPath(resolvedPath, input, "vnfPkgId", () => input.vnfPkgId, "{vnfPkgId}", false);
193
+ let body;
194
+ return new __HttpRequest({
195
+ protocol,
196
+ hostname,
197
+ port,
198
+ method: "GET",
199
+ headers,
200
+ path: resolvedPath,
201
+ body,
202
+ });
203
+ };
204
+ export const serializeAws_restJson1GetSolNetworkInstanceCommand = async (input, context) => {
205
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
206
+ const headers = {};
207
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sol/nslcm/v1/ns_instances/{nsInstanceId}";
208
+ resolvedPath = __resolvedPath(resolvedPath, input, "nsInstanceId", () => input.nsInstanceId, "{nsInstanceId}", false);
209
+ let body;
210
+ return new __HttpRequest({
211
+ protocol,
212
+ hostname,
213
+ port,
214
+ method: "GET",
215
+ headers,
216
+ path: resolvedPath,
217
+ body,
218
+ });
219
+ };
220
+ export const serializeAws_restJson1GetSolNetworkOperationCommand = async (input, context) => {
221
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
222
+ const headers = {};
223
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
224
+ "/sol/nslcm/v1/ns_lcm_op_occs/{nsLcmOpOccId}";
225
+ resolvedPath = __resolvedPath(resolvedPath, input, "nsLcmOpOccId", () => input.nsLcmOpOccId, "{nsLcmOpOccId}", false);
226
+ let body;
227
+ return new __HttpRequest({
228
+ protocol,
229
+ hostname,
230
+ port,
231
+ method: "GET",
232
+ headers,
233
+ path: resolvedPath,
234
+ body,
235
+ });
236
+ };
237
+ export const serializeAws_restJson1GetSolNetworkPackageCommand = async (input, context) => {
238
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
239
+ const headers = {};
240
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sol/nsd/v1/ns_descriptors/{nsdInfoId}";
241
+ resolvedPath = __resolvedPath(resolvedPath, input, "nsdInfoId", () => input.nsdInfoId, "{nsdInfoId}", false);
242
+ let body;
243
+ return new __HttpRequest({
244
+ protocol,
245
+ hostname,
246
+ port,
247
+ method: "GET",
248
+ headers,
249
+ path: resolvedPath,
250
+ body,
251
+ });
252
+ };
253
+ export const serializeAws_restJson1GetSolNetworkPackageContentCommand = async (input, context) => {
254
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
255
+ const headers = map({}, isSerializableHeaderValue, {
256
+ accept: input.accept,
257
+ });
258
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
259
+ "/sol/nsd/v1/ns_descriptors/{nsdInfoId}/nsd_content";
260
+ resolvedPath = __resolvedPath(resolvedPath, input, "nsdInfoId", () => input.nsdInfoId, "{nsdInfoId}", false);
261
+ let body;
262
+ return new __HttpRequest({
263
+ protocol,
264
+ hostname,
265
+ port,
266
+ method: "GET",
267
+ headers,
268
+ path: resolvedPath,
269
+ body,
270
+ });
271
+ };
272
+ export const serializeAws_restJson1GetSolNetworkPackageDescriptorCommand = async (input, context) => {
273
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
274
+ const headers = {};
275
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
276
+ "/sol/nsd/v1/ns_descriptors/{nsdInfoId}/nsd";
277
+ resolvedPath = __resolvedPath(resolvedPath, input, "nsdInfoId", () => input.nsdInfoId, "{nsdInfoId}", false);
278
+ let body;
279
+ return new __HttpRequest({
280
+ protocol,
281
+ hostname,
282
+ port,
283
+ method: "GET",
284
+ headers,
285
+ path: resolvedPath,
286
+ body,
287
+ });
288
+ };
289
+ export const serializeAws_restJson1InstantiateSolNetworkInstanceCommand = async (input, context) => {
290
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
291
+ const headers = {
292
+ "content-type": "application/json",
293
+ };
294
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
295
+ "/sol/nslcm/v1/ns_instances/{nsInstanceId}/instantiate";
296
+ resolvedPath = __resolvedPath(resolvedPath, input, "nsInstanceId", () => input.nsInstanceId, "{nsInstanceId}", false);
297
+ const query = map({
298
+ dry_run: [() => input.dryRun !== void 0, () => input.dryRun.toString()],
299
+ });
300
+ let body;
301
+ body = JSON.stringify({
302
+ ...(input.additionalParamsForNs != null && {
303
+ additionalParamsForNs: serializeAws_restJson1Document(input.additionalParamsForNs, context),
304
+ }),
305
+ });
306
+ return new __HttpRequest({
307
+ protocol,
308
+ hostname,
309
+ port,
310
+ method: "POST",
311
+ headers,
312
+ path: resolvedPath,
313
+ query,
314
+ body,
315
+ });
316
+ };
317
+ export const serializeAws_restJson1ListSolFunctionInstancesCommand = async (input, context) => {
318
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
319
+ const headers = {};
320
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sol/vnflcm/v1/vnf_instances";
321
+ const query = map({
322
+ max_results: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
323
+ nextpage_opaque_marker: [, input.nextToken],
324
+ });
325
+ let body;
326
+ return new __HttpRequest({
327
+ protocol,
328
+ hostname,
329
+ port,
330
+ method: "GET",
331
+ headers,
332
+ path: resolvedPath,
333
+ query,
334
+ body,
335
+ });
336
+ };
337
+ export const serializeAws_restJson1ListSolFunctionPackagesCommand = async (input, context) => {
338
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
339
+ const headers = {};
340
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sol/vnfpkgm/v1/vnf_packages";
341
+ const query = map({
342
+ max_results: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
343
+ nextpage_opaque_marker: [, input.nextToken],
344
+ });
345
+ let body;
346
+ return new __HttpRequest({
347
+ protocol,
348
+ hostname,
349
+ port,
350
+ method: "GET",
351
+ headers,
352
+ path: resolvedPath,
353
+ query,
354
+ body,
355
+ });
356
+ };
357
+ export const serializeAws_restJson1ListSolNetworkInstancesCommand = async (input, context) => {
358
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
359
+ const headers = {};
360
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sol/nslcm/v1/ns_instances";
361
+ const query = map({
362
+ max_results: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
363
+ nextpage_opaque_marker: [, input.nextToken],
364
+ });
365
+ let body;
366
+ return new __HttpRequest({
367
+ protocol,
368
+ hostname,
369
+ port,
370
+ method: "GET",
371
+ headers,
372
+ path: resolvedPath,
373
+ query,
374
+ body,
375
+ });
376
+ };
377
+ export const serializeAws_restJson1ListSolNetworkOperationsCommand = async (input, context) => {
378
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
379
+ const headers = {};
380
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sol/nslcm/v1/ns_lcm_op_occs";
381
+ const query = map({
382
+ max_results: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
383
+ nextpage_opaque_marker: [, input.nextToken],
384
+ });
385
+ let body;
386
+ return new __HttpRequest({
387
+ protocol,
388
+ hostname,
389
+ port,
390
+ method: "GET",
391
+ headers,
392
+ path: resolvedPath,
393
+ query,
394
+ body,
395
+ });
396
+ };
397
+ export const serializeAws_restJson1ListSolNetworkPackagesCommand = async (input, context) => {
398
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
399
+ const headers = {};
400
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sol/nsd/v1/ns_descriptors";
401
+ const query = map({
402
+ max_results: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
403
+ nextpage_opaque_marker: [, input.nextToken],
404
+ });
405
+ let body;
406
+ return new __HttpRequest({
407
+ protocol,
408
+ hostname,
409
+ port,
410
+ method: "GET",
411
+ headers,
412
+ path: resolvedPath,
413
+ query,
414
+ body,
415
+ });
416
+ };
417
+ export const serializeAws_restJson1ListTagsForResourceCommand = async (input, context) => {
418
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
419
+ const headers = {};
420
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
421
+ resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
422
+ let body;
423
+ return new __HttpRequest({
424
+ protocol,
425
+ hostname,
426
+ port,
427
+ method: "GET",
428
+ headers,
429
+ path: resolvedPath,
430
+ body,
431
+ });
432
+ };
433
+ export const serializeAws_restJson1PutSolFunctionPackageContentCommand = async (input, context) => {
434
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
435
+ const headers = map({}, isSerializableHeaderValue, {
436
+ "content-type": input.contentType || "application/octet-stream",
437
+ });
438
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
439
+ "/sol/vnfpkgm/v1/vnf_packages/{vnfPkgId}/package_content";
440
+ resolvedPath = __resolvedPath(resolvedPath, input, "vnfPkgId", () => input.vnfPkgId, "{vnfPkgId}", false);
441
+ let body;
442
+ if (input.file !== undefined) {
443
+ body = input.file;
444
+ }
445
+ return new __HttpRequest({
446
+ protocol,
447
+ hostname,
448
+ port,
449
+ method: "PUT",
450
+ headers,
451
+ path: resolvedPath,
452
+ body,
453
+ });
454
+ };
455
+ export const serializeAws_restJson1PutSolNetworkPackageContentCommand = async (input, context) => {
456
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
457
+ const headers = map({}, isSerializableHeaderValue, {
458
+ "content-type": input.contentType || "application/octet-stream",
459
+ });
460
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
461
+ "/sol/nsd/v1/ns_descriptors/{nsdInfoId}/nsd_content";
462
+ resolvedPath = __resolvedPath(resolvedPath, input, "nsdInfoId", () => input.nsdInfoId, "{nsdInfoId}", false);
463
+ let body;
464
+ if (input.file !== undefined) {
465
+ body = input.file;
466
+ }
467
+ return new __HttpRequest({
468
+ protocol,
469
+ hostname,
470
+ port,
471
+ method: "PUT",
472
+ headers,
473
+ path: resolvedPath,
474
+ body,
475
+ });
476
+ };
477
+ export const serializeAws_restJson1TagResourceCommand = async (input, context) => {
478
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
479
+ const headers = {
480
+ "content-type": "application/json",
481
+ };
482
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
483
+ resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
484
+ let body;
485
+ body = JSON.stringify({
486
+ ...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
487
+ });
488
+ return new __HttpRequest({
489
+ protocol,
490
+ hostname,
491
+ port,
492
+ method: "POST",
493
+ headers,
494
+ path: resolvedPath,
495
+ body,
496
+ });
497
+ };
498
+ export const serializeAws_restJson1TerminateSolNetworkInstanceCommand = async (input, context) => {
499
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
500
+ const headers = {};
501
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
502
+ "/sol/nslcm/v1/ns_instances/{nsInstanceId}/terminate";
503
+ resolvedPath = __resolvedPath(resolvedPath, input, "nsInstanceId", () => input.nsInstanceId, "{nsInstanceId}", false);
504
+ let body;
505
+ return new __HttpRequest({
506
+ protocol,
507
+ hostname,
508
+ port,
509
+ method: "POST",
510
+ headers,
511
+ path: resolvedPath,
512
+ body,
513
+ });
514
+ };
515
+ export const serializeAws_restJson1UntagResourceCommand = async (input, context) => {
516
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
517
+ const headers = {};
518
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
519
+ resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
520
+ const query = map({
521
+ tagKeys: [
522
+ __expectNonNull(input.tagKeys, `tagKeys`) != null,
523
+ () => (input.tagKeys || []).map((_entry) => _entry),
524
+ ],
525
+ });
526
+ let body;
527
+ return new __HttpRequest({
528
+ protocol,
529
+ hostname,
530
+ port,
531
+ method: "DELETE",
532
+ headers,
533
+ path: resolvedPath,
534
+ query,
535
+ body,
536
+ });
537
+ };
538
+ export const serializeAws_restJson1UpdateSolFunctionPackageCommand = async (input, context) => {
539
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
540
+ const headers = {
541
+ "content-type": "application/json",
542
+ };
543
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sol/vnfpkgm/v1/vnf_packages/{vnfPkgId}";
544
+ resolvedPath = __resolvedPath(resolvedPath, input, "vnfPkgId", () => input.vnfPkgId, "{vnfPkgId}", false);
545
+ let body;
546
+ body = JSON.stringify({
547
+ ...(input.operationalState != null && { operationalState: input.operationalState }),
548
+ });
549
+ return new __HttpRequest({
550
+ protocol,
551
+ hostname,
552
+ port,
553
+ method: "PATCH",
554
+ headers,
555
+ path: resolvedPath,
556
+ body,
557
+ });
558
+ };
559
+ export const serializeAws_restJson1UpdateSolNetworkInstanceCommand = async (input, context) => {
560
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
561
+ const headers = {
562
+ "content-type": "application/json",
563
+ };
564
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
565
+ "/sol/nslcm/v1/ns_instances/{nsInstanceId}/update";
566
+ resolvedPath = __resolvedPath(resolvedPath, input, "nsInstanceId", () => input.nsInstanceId, "{nsInstanceId}", false);
567
+ let body;
568
+ body = JSON.stringify({
569
+ ...(input.modifyVnfInfoData != null && {
570
+ modifyVnfInfoData: serializeAws_restJson1UpdateSolNetworkModify(input.modifyVnfInfoData, context),
571
+ }),
572
+ ...(input.updateType != null && { updateType: input.updateType }),
573
+ });
574
+ return new __HttpRequest({
575
+ protocol,
576
+ hostname,
577
+ port,
578
+ method: "POST",
579
+ headers,
580
+ path: resolvedPath,
581
+ body,
582
+ });
583
+ };
584
+ export const serializeAws_restJson1UpdateSolNetworkPackageCommand = async (input, context) => {
585
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
586
+ const headers = {
587
+ "content-type": "application/json",
588
+ };
589
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sol/nsd/v1/ns_descriptors/{nsdInfoId}";
590
+ resolvedPath = __resolvedPath(resolvedPath, input, "nsdInfoId", () => input.nsdInfoId, "{nsdInfoId}", false);
591
+ let body;
592
+ body = JSON.stringify({
593
+ ...(input.nsdOperationalState != null && { nsdOperationalState: input.nsdOperationalState }),
594
+ });
595
+ return new __HttpRequest({
596
+ protocol,
597
+ hostname,
598
+ port,
599
+ method: "PATCH",
600
+ headers,
601
+ path: resolvedPath,
602
+ body,
603
+ });
604
+ };
605
+ export const serializeAws_restJson1ValidateSolFunctionPackageContentCommand = async (input, context) => {
606
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
607
+ const headers = map({}, isSerializableHeaderValue, {
608
+ "content-type": input.contentType || "application/octet-stream",
609
+ });
610
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
611
+ "/sol/vnfpkgm/v1/vnf_packages/{vnfPkgId}/package_content/validate";
612
+ resolvedPath = __resolvedPath(resolvedPath, input, "vnfPkgId", () => input.vnfPkgId, "{vnfPkgId}", false);
613
+ let body;
614
+ if (input.file !== undefined) {
615
+ body = input.file;
616
+ }
617
+ return new __HttpRequest({
618
+ protocol,
619
+ hostname,
620
+ port,
621
+ method: "PUT",
622
+ headers,
623
+ path: resolvedPath,
624
+ body,
625
+ });
626
+ };
627
+ export const serializeAws_restJson1ValidateSolNetworkPackageContentCommand = async (input, context) => {
628
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
629
+ const headers = map({}, isSerializableHeaderValue, {
630
+ "content-type": input.contentType || "application/octet-stream",
631
+ });
632
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
633
+ "/sol/nsd/v1/ns_descriptors/{nsdInfoId}/nsd_content/validate";
634
+ resolvedPath = __resolvedPath(resolvedPath, input, "nsdInfoId", () => input.nsdInfoId, "{nsdInfoId}", false);
635
+ let body;
636
+ if (input.file !== undefined) {
637
+ body = input.file;
638
+ }
639
+ return new __HttpRequest({
640
+ protocol,
641
+ hostname,
642
+ port,
643
+ method: "PUT",
644
+ headers,
645
+ path: resolvedPath,
646
+ body,
647
+ });
648
+ };
649
+ export const deserializeAws_restJson1CancelSolNetworkOperationCommand = async (output, context) => {
650
+ if (output.statusCode !== 202 && output.statusCode >= 300) {
651
+ return deserializeAws_restJson1CancelSolNetworkOperationCommandError(output, context);
652
+ }
653
+ const contents = map({
654
+ $metadata: deserializeMetadata(output),
655
+ });
656
+ await collectBody(output.body, context);
657
+ return contents;
658
+ };
659
+ const deserializeAws_restJson1CancelSolNetworkOperationCommandError = async (output, context) => {
660
+ const parsedOutput = {
661
+ ...output,
662
+ body: await parseErrorBody(output.body, context),
663
+ };
664
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
665
+ switch (errorCode) {
666
+ case "AccessDeniedException":
667
+ case "com.amazonaws.tnb#AccessDeniedException":
668
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
669
+ case "InternalServerException":
670
+ case "com.amazonaws.tnb#InternalServerException":
671
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
672
+ case "ResourceNotFoundException":
673
+ case "com.amazonaws.tnb#ResourceNotFoundException":
674
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
675
+ case "ThrottlingException":
676
+ case "com.amazonaws.tnb#ThrottlingException":
677
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
678
+ case "ValidationException":
679
+ case "com.amazonaws.tnb#ValidationException":
680
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
681
+ default:
682
+ const parsedBody = parsedOutput.body;
683
+ throwDefaultError({
684
+ output,
685
+ parsedBody,
686
+ exceptionCtor: __BaseException,
687
+ errorCode,
688
+ });
689
+ }
690
+ };
691
+ export const deserializeAws_restJson1CreateSolFunctionPackageCommand = async (output, context) => {
692
+ if (output.statusCode !== 201 && output.statusCode >= 300) {
693
+ return deserializeAws_restJson1CreateSolFunctionPackageCommandError(output, context);
694
+ }
695
+ const contents = map({
696
+ $metadata: deserializeMetadata(output),
697
+ });
698
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
699
+ if (data.arn != null) {
700
+ contents.arn = __expectString(data.arn);
701
+ }
702
+ if (data.id != null) {
703
+ contents.id = __expectString(data.id);
704
+ }
705
+ if (data.onboardingState != null) {
706
+ contents.onboardingState = __expectString(data.onboardingState);
707
+ }
708
+ if (data.operationalState != null) {
709
+ contents.operationalState = __expectString(data.operationalState);
710
+ }
711
+ if (data.tags != null) {
712
+ contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
713
+ }
714
+ if (data.usageState != null) {
715
+ contents.usageState = __expectString(data.usageState);
716
+ }
717
+ return contents;
718
+ };
719
+ const deserializeAws_restJson1CreateSolFunctionPackageCommandError = async (output, context) => {
720
+ const parsedOutput = {
721
+ ...output,
722
+ body: await parseErrorBody(output.body, context),
723
+ };
724
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
725
+ switch (errorCode) {
726
+ case "AccessDeniedException":
727
+ case "com.amazonaws.tnb#AccessDeniedException":
728
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
729
+ case "InternalServerException":
730
+ case "com.amazonaws.tnb#InternalServerException":
731
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
732
+ case "ServiceQuotaExceededException":
733
+ case "com.amazonaws.tnb#ServiceQuotaExceededException":
734
+ throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
735
+ case "ThrottlingException":
736
+ case "com.amazonaws.tnb#ThrottlingException":
737
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
738
+ case "ValidationException":
739
+ case "com.amazonaws.tnb#ValidationException":
740
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
741
+ default:
742
+ const parsedBody = parsedOutput.body;
743
+ throwDefaultError({
744
+ output,
745
+ parsedBody,
746
+ exceptionCtor: __BaseException,
747
+ errorCode,
748
+ });
749
+ }
750
+ };
751
+ export const deserializeAws_restJson1CreateSolNetworkInstanceCommand = async (output, context) => {
752
+ if (output.statusCode !== 201 && output.statusCode >= 300) {
753
+ return deserializeAws_restJson1CreateSolNetworkInstanceCommandError(output, context);
754
+ }
755
+ const contents = map({
756
+ $metadata: deserializeMetadata(output),
757
+ });
758
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
759
+ if (data.arn != null) {
760
+ contents.arn = __expectString(data.arn);
761
+ }
762
+ if (data.id != null) {
763
+ contents.id = __expectString(data.id);
764
+ }
765
+ if (data.nsInstanceName != null) {
766
+ contents.nsInstanceName = __expectString(data.nsInstanceName);
767
+ }
768
+ if (data.nsdInfoId != null) {
769
+ contents.nsdInfoId = __expectString(data.nsdInfoId);
770
+ }
771
+ if (data.tags != null) {
772
+ contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
773
+ }
774
+ return contents;
775
+ };
776
+ const deserializeAws_restJson1CreateSolNetworkInstanceCommandError = async (output, context) => {
777
+ const parsedOutput = {
778
+ ...output,
779
+ body: await parseErrorBody(output.body, context),
780
+ };
781
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
782
+ switch (errorCode) {
783
+ case "AccessDeniedException":
784
+ case "com.amazonaws.tnb#AccessDeniedException":
785
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
786
+ case "InternalServerException":
787
+ case "com.amazonaws.tnb#InternalServerException":
788
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
789
+ case "ResourceNotFoundException":
790
+ case "com.amazonaws.tnb#ResourceNotFoundException":
791
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
792
+ case "ServiceQuotaExceededException":
793
+ case "com.amazonaws.tnb#ServiceQuotaExceededException":
794
+ throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
795
+ case "ThrottlingException":
796
+ case "com.amazonaws.tnb#ThrottlingException":
797
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
798
+ case "ValidationException":
799
+ case "com.amazonaws.tnb#ValidationException":
800
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
801
+ default:
802
+ const parsedBody = parsedOutput.body;
803
+ throwDefaultError({
804
+ output,
805
+ parsedBody,
806
+ exceptionCtor: __BaseException,
807
+ errorCode,
808
+ });
809
+ }
810
+ };
811
+ export const deserializeAws_restJson1CreateSolNetworkPackageCommand = async (output, context) => {
812
+ if (output.statusCode !== 201 && output.statusCode >= 300) {
813
+ return deserializeAws_restJson1CreateSolNetworkPackageCommandError(output, context);
814
+ }
815
+ const contents = map({
816
+ $metadata: deserializeMetadata(output),
817
+ });
818
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
819
+ if (data.arn != null) {
820
+ contents.arn = __expectString(data.arn);
821
+ }
822
+ if (data.id != null) {
823
+ contents.id = __expectString(data.id);
824
+ }
825
+ if (data.nsdOnboardingState != null) {
826
+ contents.nsdOnboardingState = __expectString(data.nsdOnboardingState);
827
+ }
828
+ if (data.nsdOperationalState != null) {
829
+ contents.nsdOperationalState = __expectString(data.nsdOperationalState);
830
+ }
831
+ if (data.nsdUsageState != null) {
832
+ contents.nsdUsageState = __expectString(data.nsdUsageState);
833
+ }
834
+ if (data.tags != null) {
835
+ contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
836
+ }
837
+ return contents;
838
+ };
839
+ const deserializeAws_restJson1CreateSolNetworkPackageCommandError = async (output, context) => {
840
+ const parsedOutput = {
841
+ ...output,
842
+ body: await parseErrorBody(output.body, context),
843
+ };
844
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
845
+ switch (errorCode) {
846
+ case "AccessDeniedException":
847
+ case "com.amazonaws.tnb#AccessDeniedException":
848
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
849
+ case "InternalServerException":
850
+ case "com.amazonaws.tnb#InternalServerException":
851
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
852
+ case "ServiceQuotaExceededException":
853
+ case "com.amazonaws.tnb#ServiceQuotaExceededException":
854
+ throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
855
+ case "ThrottlingException":
856
+ case "com.amazonaws.tnb#ThrottlingException":
857
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
858
+ case "ValidationException":
859
+ case "com.amazonaws.tnb#ValidationException":
860
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
861
+ default:
862
+ const parsedBody = parsedOutput.body;
863
+ throwDefaultError({
864
+ output,
865
+ parsedBody,
866
+ exceptionCtor: __BaseException,
867
+ errorCode,
868
+ });
869
+ }
870
+ };
871
+ export const deserializeAws_restJson1DeleteSolFunctionPackageCommand = async (output, context) => {
872
+ if (output.statusCode !== 204 && output.statusCode >= 300) {
873
+ return deserializeAws_restJson1DeleteSolFunctionPackageCommandError(output, context);
874
+ }
875
+ const contents = map({
876
+ $metadata: deserializeMetadata(output),
877
+ });
878
+ await collectBody(output.body, context);
879
+ return contents;
880
+ };
881
+ const deserializeAws_restJson1DeleteSolFunctionPackageCommandError = async (output, context) => {
882
+ const parsedOutput = {
883
+ ...output,
884
+ body: await parseErrorBody(output.body, context),
885
+ };
886
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
887
+ switch (errorCode) {
888
+ case "AccessDeniedException":
889
+ case "com.amazonaws.tnb#AccessDeniedException":
890
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
891
+ case "InternalServerException":
892
+ case "com.amazonaws.tnb#InternalServerException":
893
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
894
+ case "ResourceNotFoundException":
895
+ case "com.amazonaws.tnb#ResourceNotFoundException":
896
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
897
+ case "ThrottlingException":
898
+ case "com.amazonaws.tnb#ThrottlingException":
899
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
900
+ case "ValidationException":
901
+ case "com.amazonaws.tnb#ValidationException":
902
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
903
+ default:
904
+ const parsedBody = parsedOutput.body;
905
+ throwDefaultError({
906
+ output,
907
+ parsedBody,
908
+ exceptionCtor: __BaseException,
909
+ errorCode,
910
+ });
911
+ }
912
+ };
913
+ export const deserializeAws_restJson1DeleteSolNetworkInstanceCommand = async (output, context) => {
914
+ if (output.statusCode !== 204 && output.statusCode >= 300) {
915
+ return deserializeAws_restJson1DeleteSolNetworkInstanceCommandError(output, context);
916
+ }
917
+ const contents = map({
918
+ $metadata: deserializeMetadata(output),
919
+ });
920
+ await collectBody(output.body, context);
921
+ return contents;
922
+ };
923
+ const deserializeAws_restJson1DeleteSolNetworkInstanceCommandError = async (output, context) => {
924
+ const parsedOutput = {
925
+ ...output,
926
+ body: await parseErrorBody(output.body, context),
927
+ };
928
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
929
+ switch (errorCode) {
930
+ case "AccessDeniedException":
931
+ case "com.amazonaws.tnb#AccessDeniedException":
932
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
933
+ case "InternalServerException":
934
+ case "com.amazonaws.tnb#InternalServerException":
935
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
936
+ case "ResourceNotFoundException":
937
+ case "com.amazonaws.tnb#ResourceNotFoundException":
938
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
939
+ case "ThrottlingException":
940
+ case "com.amazonaws.tnb#ThrottlingException":
941
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
942
+ case "ValidationException":
943
+ case "com.amazonaws.tnb#ValidationException":
944
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
945
+ default:
946
+ const parsedBody = parsedOutput.body;
947
+ throwDefaultError({
948
+ output,
949
+ parsedBody,
950
+ exceptionCtor: __BaseException,
951
+ errorCode,
952
+ });
953
+ }
954
+ };
955
+ export const deserializeAws_restJson1DeleteSolNetworkPackageCommand = async (output, context) => {
956
+ if (output.statusCode !== 204 && output.statusCode >= 300) {
957
+ return deserializeAws_restJson1DeleteSolNetworkPackageCommandError(output, context);
958
+ }
959
+ const contents = map({
960
+ $metadata: deserializeMetadata(output),
961
+ });
962
+ await collectBody(output.body, context);
963
+ return contents;
964
+ };
965
+ const deserializeAws_restJson1DeleteSolNetworkPackageCommandError = async (output, context) => {
966
+ const parsedOutput = {
967
+ ...output,
968
+ body: await parseErrorBody(output.body, context),
969
+ };
970
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
971
+ switch (errorCode) {
972
+ case "AccessDeniedException":
973
+ case "com.amazonaws.tnb#AccessDeniedException":
974
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
975
+ case "InternalServerException":
976
+ case "com.amazonaws.tnb#InternalServerException":
977
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
978
+ case "ResourceNotFoundException":
979
+ case "com.amazonaws.tnb#ResourceNotFoundException":
980
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
981
+ case "ThrottlingException":
982
+ case "com.amazonaws.tnb#ThrottlingException":
983
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
984
+ case "ValidationException":
985
+ case "com.amazonaws.tnb#ValidationException":
986
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
987
+ default:
988
+ const parsedBody = parsedOutput.body;
989
+ throwDefaultError({
990
+ output,
991
+ parsedBody,
992
+ exceptionCtor: __BaseException,
993
+ errorCode,
994
+ });
995
+ }
996
+ };
997
+ export const deserializeAws_restJson1GetSolFunctionInstanceCommand = async (output, context) => {
998
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
999
+ return deserializeAws_restJson1GetSolFunctionInstanceCommandError(output, context);
1000
+ }
1001
+ const contents = map({
1002
+ $metadata: deserializeMetadata(output),
1003
+ });
1004
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1005
+ if (data.arn != null) {
1006
+ contents.arn = __expectString(data.arn);
1007
+ }
1008
+ if (data.id != null) {
1009
+ contents.id = __expectString(data.id);
1010
+ }
1011
+ if (data.instantiatedVnfInfo != null) {
1012
+ contents.instantiatedVnfInfo = deserializeAws_restJson1GetSolVnfInfo(data.instantiatedVnfInfo, context);
1013
+ }
1014
+ if (data.instantiationState != null) {
1015
+ contents.instantiationState = __expectString(data.instantiationState);
1016
+ }
1017
+ if (data.metadata != null) {
1018
+ contents.metadata = deserializeAws_restJson1GetSolFunctionInstanceMetadata(data.metadata, context);
1019
+ }
1020
+ if (data.nsInstanceId != null) {
1021
+ contents.nsInstanceId = __expectString(data.nsInstanceId);
1022
+ }
1023
+ if (data.tags != null) {
1024
+ contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
1025
+ }
1026
+ if (data.vnfPkgId != null) {
1027
+ contents.vnfPkgId = __expectString(data.vnfPkgId);
1028
+ }
1029
+ if (data.vnfProductName != null) {
1030
+ contents.vnfProductName = __expectString(data.vnfProductName);
1031
+ }
1032
+ if (data.vnfProvider != null) {
1033
+ contents.vnfProvider = __expectString(data.vnfProvider);
1034
+ }
1035
+ if (data.vnfdId != null) {
1036
+ contents.vnfdId = __expectString(data.vnfdId);
1037
+ }
1038
+ if (data.vnfdVersion != null) {
1039
+ contents.vnfdVersion = __expectString(data.vnfdVersion);
1040
+ }
1041
+ return contents;
1042
+ };
1043
+ const deserializeAws_restJson1GetSolFunctionInstanceCommandError = async (output, context) => {
1044
+ const parsedOutput = {
1045
+ ...output,
1046
+ body: await parseErrorBody(output.body, context),
1047
+ };
1048
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1049
+ switch (errorCode) {
1050
+ case "AccessDeniedException":
1051
+ case "com.amazonaws.tnb#AccessDeniedException":
1052
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1053
+ case "InternalServerException":
1054
+ case "com.amazonaws.tnb#InternalServerException":
1055
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1056
+ case "ResourceNotFoundException":
1057
+ case "com.amazonaws.tnb#ResourceNotFoundException":
1058
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1059
+ case "ThrottlingException":
1060
+ case "com.amazonaws.tnb#ThrottlingException":
1061
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1062
+ case "ValidationException":
1063
+ case "com.amazonaws.tnb#ValidationException":
1064
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1065
+ default:
1066
+ const parsedBody = parsedOutput.body;
1067
+ throwDefaultError({
1068
+ output,
1069
+ parsedBody,
1070
+ exceptionCtor: __BaseException,
1071
+ errorCode,
1072
+ });
1073
+ }
1074
+ };
1075
+ export const deserializeAws_restJson1GetSolFunctionPackageCommand = async (output, context) => {
1076
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1077
+ return deserializeAws_restJson1GetSolFunctionPackageCommandError(output, context);
1078
+ }
1079
+ const contents = map({
1080
+ $metadata: deserializeMetadata(output),
1081
+ });
1082
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1083
+ if (data.arn != null) {
1084
+ contents.arn = __expectString(data.arn);
1085
+ }
1086
+ if (data.id != null) {
1087
+ contents.id = __expectString(data.id);
1088
+ }
1089
+ if (data.metadata != null) {
1090
+ contents.metadata = deserializeAws_restJson1GetSolFunctionPackageMetadata(data.metadata, context);
1091
+ }
1092
+ if (data.onboardingState != null) {
1093
+ contents.onboardingState = __expectString(data.onboardingState);
1094
+ }
1095
+ if (data.operationalState != null) {
1096
+ contents.operationalState = __expectString(data.operationalState);
1097
+ }
1098
+ if (data.tags != null) {
1099
+ contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
1100
+ }
1101
+ if (data.usageState != null) {
1102
+ contents.usageState = __expectString(data.usageState);
1103
+ }
1104
+ if (data.vnfProductName != null) {
1105
+ contents.vnfProductName = __expectString(data.vnfProductName);
1106
+ }
1107
+ if (data.vnfProvider != null) {
1108
+ contents.vnfProvider = __expectString(data.vnfProvider);
1109
+ }
1110
+ if (data.vnfdId != null) {
1111
+ contents.vnfdId = __expectString(data.vnfdId);
1112
+ }
1113
+ if (data.vnfdVersion != null) {
1114
+ contents.vnfdVersion = __expectString(data.vnfdVersion);
1115
+ }
1116
+ return contents;
1117
+ };
1118
+ const deserializeAws_restJson1GetSolFunctionPackageCommandError = async (output, context) => {
1119
+ const parsedOutput = {
1120
+ ...output,
1121
+ body: await parseErrorBody(output.body, context),
1122
+ };
1123
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1124
+ switch (errorCode) {
1125
+ case "AccessDeniedException":
1126
+ case "com.amazonaws.tnb#AccessDeniedException":
1127
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1128
+ case "InternalServerException":
1129
+ case "com.amazonaws.tnb#InternalServerException":
1130
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1131
+ case "ResourceNotFoundException":
1132
+ case "com.amazonaws.tnb#ResourceNotFoundException":
1133
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1134
+ case "ThrottlingException":
1135
+ case "com.amazonaws.tnb#ThrottlingException":
1136
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1137
+ case "ValidationException":
1138
+ case "com.amazonaws.tnb#ValidationException":
1139
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1140
+ default:
1141
+ const parsedBody = parsedOutput.body;
1142
+ throwDefaultError({
1143
+ output,
1144
+ parsedBody,
1145
+ exceptionCtor: __BaseException,
1146
+ errorCode,
1147
+ });
1148
+ }
1149
+ };
1150
+ export const deserializeAws_restJson1GetSolFunctionPackageContentCommand = async (output, context) => {
1151
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1152
+ return deserializeAws_restJson1GetSolFunctionPackageContentCommandError(output, context);
1153
+ }
1154
+ const contents = map({
1155
+ $metadata: deserializeMetadata(output),
1156
+ contentType: [, output.headers["content-type"]],
1157
+ });
1158
+ const data = await collectBody(output.body, context);
1159
+ contents.packageContent = data;
1160
+ return contents;
1161
+ };
1162
+ const deserializeAws_restJson1GetSolFunctionPackageContentCommandError = async (output, context) => {
1163
+ const parsedOutput = {
1164
+ ...output,
1165
+ body: await parseErrorBody(output.body, context),
1166
+ };
1167
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1168
+ switch (errorCode) {
1169
+ case "AccessDeniedException":
1170
+ case "com.amazonaws.tnb#AccessDeniedException":
1171
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1172
+ case "InternalServerException":
1173
+ case "com.amazonaws.tnb#InternalServerException":
1174
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1175
+ case "ResourceNotFoundException":
1176
+ case "com.amazonaws.tnb#ResourceNotFoundException":
1177
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1178
+ case "ThrottlingException":
1179
+ case "com.amazonaws.tnb#ThrottlingException":
1180
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1181
+ case "ValidationException":
1182
+ case "com.amazonaws.tnb#ValidationException":
1183
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1184
+ default:
1185
+ const parsedBody = parsedOutput.body;
1186
+ throwDefaultError({
1187
+ output,
1188
+ parsedBody,
1189
+ exceptionCtor: __BaseException,
1190
+ errorCode,
1191
+ });
1192
+ }
1193
+ };
1194
+ export const deserializeAws_restJson1GetSolFunctionPackageDescriptorCommand = async (output, context) => {
1195
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1196
+ return deserializeAws_restJson1GetSolFunctionPackageDescriptorCommandError(output, context);
1197
+ }
1198
+ const contents = map({
1199
+ $metadata: deserializeMetadata(output),
1200
+ contentType: [, output.headers["content-type"]],
1201
+ });
1202
+ const data = await collectBody(output.body, context);
1203
+ contents.vnfd = data;
1204
+ return contents;
1205
+ };
1206
+ const deserializeAws_restJson1GetSolFunctionPackageDescriptorCommandError = async (output, context) => {
1207
+ const parsedOutput = {
1208
+ ...output,
1209
+ body: await parseErrorBody(output.body, context),
1210
+ };
1211
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1212
+ switch (errorCode) {
1213
+ case "AccessDeniedException":
1214
+ case "com.amazonaws.tnb#AccessDeniedException":
1215
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1216
+ case "InternalServerException":
1217
+ case "com.amazonaws.tnb#InternalServerException":
1218
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1219
+ case "ResourceNotFoundException":
1220
+ case "com.amazonaws.tnb#ResourceNotFoundException":
1221
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1222
+ case "ThrottlingException":
1223
+ case "com.amazonaws.tnb#ThrottlingException":
1224
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1225
+ case "ValidationException":
1226
+ case "com.amazonaws.tnb#ValidationException":
1227
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1228
+ default:
1229
+ const parsedBody = parsedOutput.body;
1230
+ throwDefaultError({
1231
+ output,
1232
+ parsedBody,
1233
+ exceptionCtor: __BaseException,
1234
+ errorCode,
1235
+ });
1236
+ }
1237
+ };
1238
+ export const deserializeAws_restJson1GetSolNetworkInstanceCommand = async (output, context) => {
1239
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1240
+ return deserializeAws_restJson1GetSolNetworkInstanceCommandError(output, context);
1241
+ }
1242
+ const contents = map({
1243
+ $metadata: deserializeMetadata(output),
1244
+ });
1245
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1246
+ if (data.arn != null) {
1247
+ contents.arn = __expectString(data.arn);
1248
+ }
1249
+ if (data.id != null) {
1250
+ contents.id = __expectString(data.id);
1251
+ }
1252
+ if (data.lcmOpInfo != null) {
1253
+ contents.lcmOpInfo = deserializeAws_restJson1LcmOperationInfo(data.lcmOpInfo, context);
1254
+ }
1255
+ if (data.metadata != null) {
1256
+ contents.metadata = deserializeAws_restJson1GetSolNetworkInstanceMetadata(data.metadata, context);
1257
+ }
1258
+ if (data.nsInstanceDescription != null) {
1259
+ contents.nsInstanceDescription = __expectString(data.nsInstanceDescription);
1260
+ }
1261
+ if (data.nsInstanceName != null) {
1262
+ contents.nsInstanceName = __expectString(data.nsInstanceName);
1263
+ }
1264
+ if (data.nsState != null) {
1265
+ contents.nsState = __expectString(data.nsState);
1266
+ }
1267
+ if (data.nsdId != null) {
1268
+ contents.nsdId = __expectString(data.nsdId);
1269
+ }
1270
+ if (data.nsdInfoId != null) {
1271
+ contents.nsdInfoId = __expectString(data.nsdInfoId);
1272
+ }
1273
+ if (data.tags != null) {
1274
+ contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
1275
+ }
1276
+ return contents;
1277
+ };
1278
+ const deserializeAws_restJson1GetSolNetworkInstanceCommandError = async (output, context) => {
1279
+ const parsedOutput = {
1280
+ ...output,
1281
+ body: await parseErrorBody(output.body, context),
1282
+ };
1283
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1284
+ switch (errorCode) {
1285
+ case "AccessDeniedException":
1286
+ case "com.amazonaws.tnb#AccessDeniedException":
1287
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1288
+ case "InternalServerException":
1289
+ case "com.amazonaws.tnb#InternalServerException":
1290
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1291
+ case "ResourceNotFoundException":
1292
+ case "com.amazonaws.tnb#ResourceNotFoundException":
1293
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1294
+ case "ThrottlingException":
1295
+ case "com.amazonaws.tnb#ThrottlingException":
1296
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1297
+ case "ValidationException":
1298
+ case "com.amazonaws.tnb#ValidationException":
1299
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1300
+ default:
1301
+ const parsedBody = parsedOutput.body;
1302
+ throwDefaultError({
1303
+ output,
1304
+ parsedBody,
1305
+ exceptionCtor: __BaseException,
1306
+ errorCode,
1307
+ });
1308
+ }
1309
+ };
1310
+ export const deserializeAws_restJson1GetSolNetworkOperationCommand = async (output, context) => {
1311
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1312
+ return deserializeAws_restJson1GetSolNetworkOperationCommandError(output, context);
1313
+ }
1314
+ const contents = map({
1315
+ $metadata: deserializeMetadata(output),
1316
+ });
1317
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1318
+ if (data.arn != null) {
1319
+ contents.arn = __expectString(data.arn);
1320
+ }
1321
+ if (data.error != null) {
1322
+ contents.error = deserializeAws_restJson1ProblemDetails(data.error, context);
1323
+ }
1324
+ if (data.id != null) {
1325
+ contents.id = __expectString(data.id);
1326
+ }
1327
+ if (data.lcmOperationType != null) {
1328
+ contents.lcmOperationType = __expectString(data.lcmOperationType);
1329
+ }
1330
+ if (data.metadata != null) {
1331
+ contents.metadata = deserializeAws_restJson1GetSolNetworkOperationMetadata(data.metadata, context);
1332
+ }
1333
+ if (data.nsInstanceId != null) {
1334
+ contents.nsInstanceId = __expectString(data.nsInstanceId);
1335
+ }
1336
+ if (data.operationState != null) {
1337
+ contents.operationState = __expectString(data.operationState);
1338
+ }
1339
+ if (data.tags != null) {
1340
+ contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
1341
+ }
1342
+ if (data.tasks != null) {
1343
+ contents.tasks = deserializeAws_restJson1GetSolNetworkOperationTasksList(data.tasks, context);
1344
+ }
1345
+ return contents;
1346
+ };
1347
+ const deserializeAws_restJson1GetSolNetworkOperationCommandError = async (output, context) => {
1348
+ const parsedOutput = {
1349
+ ...output,
1350
+ body: await parseErrorBody(output.body, context),
1351
+ };
1352
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1353
+ switch (errorCode) {
1354
+ case "AccessDeniedException":
1355
+ case "com.amazonaws.tnb#AccessDeniedException":
1356
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1357
+ case "InternalServerException":
1358
+ case "com.amazonaws.tnb#InternalServerException":
1359
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1360
+ case "ResourceNotFoundException":
1361
+ case "com.amazonaws.tnb#ResourceNotFoundException":
1362
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1363
+ case "ThrottlingException":
1364
+ case "com.amazonaws.tnb#ThrottlingException":
1365
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1366
+ case "ValidationException":
1367
+ case "com.amazonaws.tnb#ValidationException":
1368
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1369
+ default:
1370
+ const parsedBody = parsedOutput.body;
1371
+ throwDefaultError({
1372
+ output,
1373
+ parsedBody,
1374
+ exceptionCtor: __BaseException,
1375
+ errorCode,
1376
+ });
1377
+ }
1378
+ };
1379
+ export const deserializeAws_restJson1GetSolNetworkPackageCommand = async (output, context) => {
1380
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1381
+ return deserializeAws_restJson1GetSolNetworkPackageCommandError(output, context);
1382
+ }
1383
+ const contents = map({
1384
+ $metadata: deserializeMetadata(output),
1385
+ });
1386
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1387
+ if (data.arn != null) {
1388
+ contents.arn = __expectString(data.arn);
1389
+ }
1390
+ if (data.id != null) {
1391
+ contents.id = __expectString(data.id);
1392
+ }
1393
+ if (data.metadata != null) {
1394
+ contents.metadata = deserializeAws_restJson1GetSolNetworkPackageMetadata(data.metadata, context);
1395
+ }
1396
+ if (data.nsdId != null) {
1397
+ contents.nsdId = __expectString(data.nsdId);
1398
+ }
1399
+ if (data.nsdName != null) {
1400
+ contents.nsdName = __expectString(data.nsdName);
1401
+ }
1402
+ if (data.nsdOnboardingState != null) {
1403
+ contents.nsdOnboardingState = __expectString(data.nsdOnboardingState);
1404
+ }
1405
+ if (data.nsdOperationalState != null) {
1406
+ contents.nsdOperationalState = __expectString(data.nsdOperationalState);
1407
+ }
1408
+ if (data.nsdUsageState != null) {
1409
+ contents.nsdUsageState = __expectString(data.nsdUsageState);
1410
+ }
1411
+ if (data.nsdVersion != null) {
1412
+ contents.nsdVersion = __expectString(data.nsdVersion);
1413
+ }
1414
+ if (data.tags != null) {
1415
+ contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
1416
+ }
1417
+ if (data.vnfPkgIds != null) {
1418
+ contents.vnfPkgIds = deserializeAws_restJson1VnfPkgIdList(data.vnfPkgIds, context);
1419
+ }
1420
+ return contents;
1421
+ };
1422
+ const deserializeAws_restJson1GetSolNetworkPackageCommandError = async (output, context) => {
1423
+ const parsedOutput = {
1424
+ ...output,
1425
+ body: await parseErrorBody(output.body, context),
1426
+ };
1427
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1428
+ switch (errorCode) {
1429
+ case "AccessDeniedException":
1430
+ case "com.amazonaws.tnb#AccessDeniedException":
1431
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1432
+ case "InternalServerException":
1433
+ case "com.amazonaws.tnb#InternalServerException":
1434
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1435
+ case "ResourceNotFoundException":
1436
+ case "com.amazonaws.tnb#ResourceNotFoundException":
1437
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1438
+ case "ThrottlingException":
1439
+ case "com.amazonaws.tnb#ThrottlingException":
1440
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1441
+ case "ValidationException":
1442
+ case "com.amazonaws.tnb#ValidationException":
1443
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1444
+ default:
1445
+ const parsedBody = parsedOutput.body;
1446
+ throwDefaultError({
1447
+ output,
1448
+ parsedBody,
1449
+ exceptionCtor: __BaseException,
1450
+ errorCode,
1451
+ });
1452
+ }
1453
+ };
1454
+ export const deserializeAws_restJson1GetSolNetworkPackageContentCommand = async (output, context) => {
1455
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1456
+ return deserializeAws_restJson1GetSolNetworkPackageContentCommandError(output, context);
1457
+ }
1458
+ const contents = map({
1459
+ $metadata: deserializeMetadata(output),
1460
+ contentType: [, output.headers["content-type"]],
1461
+ });
1462
+ const data = await collectBody(output.body, context);
1463
+ contents.nsdContent = data;
1464
+ return contents;
1465
+ };
1466
+ const deserializeAws_restJson1GetSolNetworkPackageContentCommandError = async (output, context) => {
1467
+ const parsedOutput = {
1468
+ ...output,
1469
+ body: await parseErrorBody(output.body, context),
1470
+ };
1471
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1472
+ switch (errorCode) {
1473
+ case "AccessDeniedException":
1474
+ case "com.amazonaws.tnb#AccessDeniedException":
1475
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1476
+ case "InternalServerException":
1477
+ case "com.amazonaws.tnb#InternalServerException":
1478
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1479
+ case "ResourceNotFoundException":
1480
+ case "com.amazonaws.tnb#ResourceNotFoundException":
1481
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1482
+ case "ThrottlingException":
1483
+ case "com.amazonaws.tnb#ThrottlingException":
1484
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1485
+ case "ValidationException":
1486
+ case "com.amazonaws.tnb#ValidationException":
1487
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1488
+ default:
1489
+ const parsedBody = parsedOutput.body;
1490
+ throwDefaultError({
1491
+ output,
1492
+ parsedBody,
1493
+ exceptionCtor: __BaseException,
1494
+ errorCode,
1495
+ });
1496
+ }
1497
+ };
1498
+ export const deserializeAws_restJson1GetSolNetworkPackageDescriptorCommand = async (output, context) => {
1499
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1500
+ return deserializeAws_restJson1GetSolNetworkPackageDescriptorCommandError(output, context);
1501
+ }
1502
+ const contents = map({
1503
+ $metadata: deserializeMetadata(output),
1504
+ contentType: [, output.headers["content-type"]],
1505
+ });
1506
+ const data = await collectBody(output.body, context);
1507
+ contents.nsd = data;
1508
+ return contents;
1509
+ };
1510
+ const deserializeAws_restJson1GetSolNetworkPackageDescriptorCommandError = async (output, context) => {
1511
+ const parsedOutput = {
1512
+ ...output,
1513
+ body: await parseErrorBody(output.body, context),
1514
+ };
1515
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1516
+ switch (errorCode) {
1517
+ case "AccessDeniedException":
1518
+ case "com.amazonaws.tnb#AccessDeniedException":
1519
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1520
+ case "InternalServerException":
1521
+ case "com.amazonaws.tnb#InternalServerException":
1522
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1523
+ case "ResourceNotFoundException":
1524
+ case "com.amazonaws.tnb#ResourceNotFoundException":
1525
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1526
+ case "ThrottlingException":
1527
+ case "com.amazonaws.tnb#ThrottlingException":
1528
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1529
+ case "ValidationException":
1530
+ case "com.amazonaws.tnb#ValidationException":
1531
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1532
+ default:
1533
+ const parsedBody = parsedOutput.body;
1534
+ throwDefaultError({
1535
+ output,
1536
+ parsedBody,
1537
+ exceptionCtor: __BaseException,
1538
+ errorCode,
1539
+ });
1540
+ }
1541
+ };
1542
+ export const deserializeAws_restJson1InstantiateSolNetworkInstanceCommand = async (output, context) => {
1543
+ if (output.statusCode !== 201 && output.statusCode >= 300) {
1544
+ return deserializeAws_restJson1InstantiateSolNetworkInstanceCommandError(output, context);
1545
+ }
1546
+ const contents = map({
1547
+ $metadata: deserializeMetadata(output),
1548
+ });
1549
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1550
+ if (data.nsLcmOpOccId != null) {
1551
+ contents.nsLcmOpOccId = __expectString(data.nsLcmOpOccId);
1552
+ }
1553
+ return contents;
1554
+ };
1555
+ const deserializeAws_restJson1InstantiateSolNetworkInstanceCommandError = async (output, context) => {
1556
+ const parsedOutput = {
1557
+ ...output,
1558
+ body: await parseErrorBody(output.body, context),
1559
+ };
1560
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1561
+ switch (errorCode) {
1562
+ case "AccessDeniedException":
1563
+ case "com.amazonaws.tnb#AccessDeniedException":
1564
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1565
+ case "InternalServerException":
1566
+ case "com.amazonaws.tnb#InternalServerException":
1567
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1568
+ case "ResourceNotFoundException":
1569
+ case "com.amazonaws.tnb#ResourceNotFoundException":
1570
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1571
+ case "ServiceQuotaExceededException":
1572
+ case "com.amazonaws.tnb#ServiceQuotaExceededException":
1573
+ throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
1574
+ case "ThrottlingException":
1575
+ case "com.amazonaws.tnb#ThrottlingException":
1576
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1577
+ case "ValidationException":
1578
+ case "com.amazonaws.tnb#ValidationException":
1579
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1580
+ default:
1581
+ const parsedBody = parsedOutput.body;
1582
+ throwDefaultError({
1583
+ output,
1584
+ parsedBody,
1585
+ exceptionCtor: __BaseException,
1586
+ errorCode,
1587
+ });
1588
+ }
1589
+ };
1590
+ export const deserializeAws_restJson1ListSolFunctionInstancesCommand = async (output, context) => {
1591
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1592
+ return deserializeAws_restJson1ListSolFunctionInstancesCommandError(output, context);
1593
+ }
1594
+ const contents = map({
1595
+ $metadata: deserializeMetadata(output),
1596
+ });
1597
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1598
+ if (data.functionInstances != null) {
1599
+ contents.functionInstances = deserializeAws_restJson1ListSolFunctionInstanceResources(data.functionInstances, context);
1600
+ }
1601
+ if (data.nextToken != null) {
1602
+ contents.nextToken = __expectString(data.nextToken);
1603
+ }
1604
+ return contents;
1605
+ };
1606
+ const deserializeAws_restJson1ListSolFunctionInstancesCommandError = async (output, context) => {
1607
+ const parsedOutput = {
1608
+ ...output,
1609
+ body: await parseErrorBody(output.body, context),
1610
+ };
1611
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1612
+ switch (errorCode) {
1613
+ case "AccessDeniedException":
1614
+ case "com.amazonaws.tnb#AccessDeniedException":
1615
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1616
+ case "InternalServerException":
1617
+ case "com.amazonaws.tnb#InternalServerException":
1618
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1619
+ case "ThrottlingException":
1620
+ case "com.amazonaws.tnb#ThrottlingException":
1621
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1622
+ case "ValidationException":
1623
+ case "com.amazonaws.tnb#ValidationException":
1624
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1625
+ default:
1626
+ const parsedBody = parsedOutput.body;
1627
+ throwDefaultError({
1628
+ output,
1629
+ parsedBody,
1630
+ exceptionCtor: __BaseException,
1631
+ errorCode,
1632
+ });
1633
+ }
1634
+ };
1635
+ export const deserializeAws_restJson1ListSolFunctionPackagesCommand = async (output, context) => {
1636
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1637
+ return deserializeAws_restJson1ListSolFunctionPackagesCommandError(output, context);
1638
+ }
1639
+ const contents = map({
1640
+ $metadata: deserializeMetadata(output),
1641
+ });
1642
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1643
+ if (data.functionPackages != null) {
1644
+ contents.functionPackages = deserializeAws_restJson1ListSolFunctionPackageResources(data.functionPackages, context);
1645
+ }
1646
+ if (data.nextToken != null) {
1647
+ contents.nextToken = __expectString(data.nextToken);
1648
+ }
1649
+ return contents;
1650
+ };
1651
+ const deserializeAws_restJson1ListSolFunctionPackagesCommandError = async (output, context) => {
1652
+ const parsedOutput = {
1653
+ ...output,
1654
+ body: await parseErrorBody(output.body, context),
1655
+ };
1656
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1657
+ switch (errorCode) {
1658
+ case "AccessDeniedException":
1659
+ case "com.amazonaws.tnb#AccessDeniedException":
1660
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1661
+ case "InternalServerException":
1662
+ case "com.amazonaws.tnb#InternalServerException":
1663
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1664
+ case "ThrottlingException":
1665
+ case "com.amazonaws.tnb#ThrottlingException":
1666
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1667
+ case "ValidationException":
1668
+ case "com.amazonaws.tnb#ValidationException":
1669
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1670
+ default:
1671
+ const parsedBody = parsedOutput.body;
1672
+ throwDefaultError({
1673
+ output,
1674
+ parsedBody,
1675
+ exceptionCtor: __BaseException,
1676
+ errorCode,
1677
+ });
1678
+ }
1679
+ };
1680
+ export const deserializeAws_restJson1ListSolNetworkInstancesCommand = async (output, context) => {
1681
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1682
+ return deserializeAws_restJson1ListSolNetworkInstancesCommandError(output, context);
1683
+ }
1684
+ const contents = map({
1685
+ $metadata: deserializeMetadata(output),
1686
+ });
1687
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1688
+ if (data.networkInstances != null) {
1689
+ contents.networkInstances = deserializeAws_restJson1ListSolNetworkInstanceResources(data.networkInstances, context);
1690
+ }
1691
+ if (data.nextToken != null) {
1692
+ contents.nextToken = __expectString(data.nextToken);
1693
+ }
1694
+ return contents;
1695
+ };
1696
+ const deserializeAws_restJson1ListSolNetworkInstancesCommandError = async (output, context) => {
1697
+ const parsedOutput = {
1698
+ ...output,
1699
+ body: await parseErrorBody(output.body, context),
1700
+ };
1701
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1702
+ switch (errorCode) {
1703
+ case "AccessDeniedException":
1704
+ case "com.amazonaws.tnb#AccessDeniedException":
1705
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1706
+ case "InternalServerException":
1707
+ case "com.amazonaws.tnb#InternalServerException":
1708
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1709
+ case "ThrottlingException":
1710
+ case "com.amazonaws.tnb#ThrottlingException":
1711
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1712
+ case "ValidationException":
1713
+ case "com.amazonaws.tnb#ValidationException":
1714
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1715
+ default:
1716
+ const parsedBody = parsedOutput.body;
1717
+ throwDefaultError({
1718
+ output,
1719
+ parsedBody,
1720
+ exceptionCtor: __BaseException,
1721
+ errorCode,
1722
+ });
1723
+ }
1724
+ };
1725
+ export const deserializeAws_restJson1ListSolNetworkOperationsCommand = async (output, context) => {
1726
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1727
+ return deserializeAws_restJson1ListSolNetworkOperationsCommandError(output, context);
1728
+ }
1729
+ const contents = map({
1730
+ $metadata: deserializeMetadata(output),
1731
+ });
1732
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1733
+ if (data.networkOperations != null) {
1734
+ contents.networkOperations = deserializeAws_restJson1ListSolNetworkOperationsResources(data.networkOperations, context);
1735
+ }
1736
+ if (data.nextToken != null) {
1737
+ contents.nextToken = __expectString(data.nextToken);
1738
+ }
1739
+ return contents;
1740
+ };
1741
+ const deserializeAws_restJson1ListSolNetworkOperationsCommandError = async (output, context) => {
1742
+ const parsedOutput = {
1743
+ ...output,
1744
+ body: await parseErrorBody(output.body, context),
1745
+ };
1746
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1747
+ switch (errorCode) {
1748
+ case "AccessDeniedException":
1749
+ case "com.amazonaws.tnb#AccessDeniedException":
1750
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1751
+ case "InternalServerException":
1752
+ case "com.amazonaws.tnb#InternalServerException":
1753
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1754
+ case "ThrottlingException":
1755
+ case "com.amazonaws.tnb#ThrottlingException":
1756
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1757
+ case "ValidationException":
1758
+ case "com.amazonaws.tnb#ValidationException":
1759
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1760
+ default:
1761
+ const parsedBody = parsedOutput.body;
1762
+ throwDefaultError({
1763
+ output,
1764
+ parsedBody,
1765
+ exceptionCtor: __BaseException,
1766
+ errorCode,
1767
+ });
1768
+ }
1769
+ };
1770
+ export const deserializeAws_restJson1ListSolNetworkPackagesCommand = async (output, context) => {
1771
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1772
+ return deserializeAws_restJson1ListSolNetworkPackagesCommandError(output, context);
1773
+ }
1774
+ const contents = map({
1775
+ $metadata: deserializeMetadata(output),
1776
+ });
1777
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1778
+ if (data.networkPackages != null) {
1779
+ contents.networkPackages = deserializeAws_restJson1ListSolNetworkPackageResources(data.networkPackages, context);
1780
+ }
1781
+ if (data.nextToken != null) {
1782
+ contents.nextToken = __expectString(data.nextToken);
1783
+ }
1784
+ return contents;
1785
+ };
1786
+ const deserializeAws_restJson1ListSolNetworkPackagesCommandError = async (output, context) => {
1787
+ const parsedOutput = {
1788
+ ...output,
1789
+ body: await parseErrorBody(output.body, context),
1790
+ };
1791
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1792
+ switch (errorCode) {
1793
+ case "AccessDeniedException":
1794
+ case "com.amazonaws.tnb#AccessDeniedException":
1795
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1796
+ case "InternalServerException":
1797
+ case "com.amazonaws.tnb#InternalServerException":
1798
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1799
+ case "ThrottlingException":
1800
+ case "com.amazonaws.tnb#ThrottlingException":
1801
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1802
+ case "ValidationException":
1803
+ case "com.amazonaws.tnb#ValidationException":
1804
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1805
+ default:
1806
+ const parsedBody = parsedOutput.body;
1807
+ throwDefaultError({
1808
+ output,
1809
+ parsedBody,
1810
+ exceptionCtor: __BaseException,
1811
+ errorCode,
1812
+ });
1813
+ }
1814
+ };
1815
+ export const deserializeAws_restJson1ListTagsForResourceCommand = async (output, context) => {
1816
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1817
+ return deserializeAws_restJson1ListTagsForResourceCommandError(output, context);
1818
+ }
1819
+ const contents = map({
1820
+ $metadata: deserializeMetadata(output),
1821
+ });
1822
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1823
+ if (data.tags != null) {
1824
+ contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
1825
+ }
1826
+ return contents;
1827
+ };
1828
+ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
1829
+ const parsedOutput = {
1830
+ ...output,
1831
+ body: await parseErrorBody(output.body, context),
1832
+ };
1833
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1834
+ switch (errorCode) {
1835
+ case "AccessDeniedException":
1836
+ case "com.amazonaws.tnb#AccessDeniedException":
1837
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1838
+ case "InternalServerException":
1839
+ case "com.amazonaws.tnb#InternalServerException":
1840
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1841
+ case "ResourceNotFoundException":
1842
+ case "com.amazonaws.tnb#ResourceNotFoundException":
1843
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1844
+ case "ThrottlingException":
1845
+ case "com.amazonaws.tnb#ThrottlingException":
1846
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1847
+ case "ValidationException":
1848
+ case "com.amazonaws.tnb#ValidationException":
1849
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1850
+ default:
1851
+ const parsedBody = parsedOutput.body;
1852
+ throwDefaultError({
1853
+ output,
1854
+ parsedBody,
1855
+ exceptionCtor: __BaseException,
1856
+ errorCode,
1857
+ });
1858
+ }
1859
+ };
1860
+ export const deserializeAws_restJson1PutSolFunctionPackageContentCommand = async (output, context) => {
1861
+ if (output.statusCode !== 202 && output.statusCode >= 300) {
1862
+ return deserializeAws_restJson1PutSolFunctionPackageContentCommandError(output, context);
1863
+ }
1864
+ const contents = map({
1865
+ $metadata: deserializeMetadata(output),
1866
+ });
1867
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1868
+ if (data.id != null) {
1869
+ contents.id = __expectString(data.id);
1870
+ }
1871
+ if (data.metadata != null) {
1872
+ contents.metadata = deserializeAws_restJson1PutSolFunctionPackageContentMetadata(data.metadata, context);
1873
+ }
1874
+ if (data.vnfProductName != null) {
1875
+ contents.vnfProductName = __expectString(data.vnfProductName);
1876
+ }
1877
+ if (data.vnfProvider != null) {
1878
+ contents.vnfProvider = __expectString(data.vnfProvider);
1879
+ }
1880
+ if (data.vnfdId != null) {
1881
+ contents.vnfdId = __expectString(data.vnfdId);
1882
+ }
1883
+ if (data.vnfdVersion != null) {
1884
+ contents.vnfdVersion = __expectString(data.vnfdVersion);
1885
+ }
1886
+ return contents;
1887
+ };
1888
+ const deserializeAws_restJson1PutSolFunctionPackageContentCommandError = async (output, context) => {
1889
+ const parsedOutput = {
1890
+ ...output,
1891
+ body: await parseErrorBody(output.body, context),
1892
+ };
1893
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1894
+ switch (errorCode) {
1895
+ case "AccessDeniedException":
1896
+ case "com.amazonaws.tnb#AccessDeniedException":
1897
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1898
+ case "InternalServerException":
1899
+ case "com.amazonaws.tnb#InternalServerException":
1900
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1901
+ case "ResourceNotFoundException":
1902
+ case "com.amazonaws.tnb#ResourceNotFoundException":
1903
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1904
+ case "ThrottlingException":
1905
+ case "com.amazonaws.tnb#ThrottlingException":
1906
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1907
+ case "ValidationException":
1908
+ case "com.amazonaws.tnb#ValidationException":
1909
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1910
+ default:
1911
+ const parsedBody = parsedOutput.body;
1912
+ throwDefaultError({
1913
+ output,
1914
+ parsedBody,
1915
+ exceptionCtor: __BaseException,
1916
+ errorCode,
1917
+ });
1918
+ }
1919
+ };
1920
+ export const deserializeAws_restJson1PutSolNetworkPackageContentCommand = async (output, context) => {
1921
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1922
+ return deserializeAws_restJson1PutSolNetworkPackageContentCommandError(output, context);
1923
+ }
1924
+ const contents = map({
1925
+ $metadata: deserializeMetadata(output),
1926
+ });
1927
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1928
+ if (data.arn != null) {
1929
+ contents.arn = __expectString(data.arn);
1930
+ }
1931
+ if (data.id != null) {
1932
+ contents.id = __expectString(data.id);
1933
+ }
1934
+ if (data.metadata != null) {
1935
+ contents.metadata = deserializeAws_restJson1PutSolNetworkPackageContentMetadata(data.metadata, context);
1936
+ }
1937
+ if (data.nsdId != null) {
1938
+ contents.nsdId = __expectString(data.nsdId);
1939
+ }
1940
+ if (data.nsdName != null) {
1941
+ contents.nsdName = __expectString(data.nsdName);
1942
+ }
1943
+ if (data.nsdVersion != null) {
1944
+ contents.nsdVersion = __expectString(data.nsdVersion);
1945
+ }
1946
+ if (data.vnfPkgIds != null) {
1947
+ contents.vnfPkgIds = deserializeAws_restJson1VnfPkgIdList(data.vnfPkgIds, context);
1948
+ }
1949
+ return contents;
1950
+ };
1951
+ const deserializeAws_restJson1PutSolNetworkPackageContentCommandError = async (output, context) => {
1952
+ const parsedOutput = {
1953
+ ...output,
1954
+ body: await parseErrorBody(output.body, context),
1955
+ };
1956
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1957
+ switch (errorCode) {
1958
+ case "AccessDeniedException":
1959
+ case "com.amazonaws.tnb#AccessDeniedException":
1960
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1961
+ case "InternalServerException":
1962
+ case "com.amazonaws.tnb#InternalServerException":
1963
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1964
+ case "ResourceNotFoundException":
1965
+ case "com.amazonaws.tnb#ResourceNotFoundException":
1966
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1967
+ case "ThrottlingException":
1968
+ case "com.amazonaws.tnb#ThrottlingException":
1969
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1970
+ case "ValidationException":
1971
+ case "com.amazonaws.tnb#ValidationException":
1972
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1973
+ default:
1974
+ const parsedBody = parsedOutput.body;
1975
+ throwDefaultError({
1976
+ output,
1977
+ parsedBody,
1978
+ exceptionCtor: __BaseException,
1979
+ errorCode,
1980
+ });
1981
+ }
1982
+ };
1983
+ export const deserializeAws_restJson1TagResourceCommand = async (output, context) => {
1984
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1985
+ return deserializeAws_restJson1TagResourceCommandError(output, context);
1986
+ }
1987
+ const contents = map({
1988
+ $metadata: deserializeMetadata(output),
1989
+ });
1990
+ await collectBody(output.body, context);
1991
+ return contents;
1992
+ };
1993
+ const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
1994
+ const parsedOutput = {
1995
+ ...output,
1996
+ body: await parseErrorBody(output.body, context),
1997
+ };
1998
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1999
+ switch (errorCode) {
2000
+ case "AccessDeniedException":
2001
+ case "com.amazonaws.tnb#AccessDeniedException":
2002
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
2003
+ case "InternalServerException":
2004
+ case "com.amazonaws.tnb#InternalServerException":
2005
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
2006
+ case "ResourceNotFoundException":
2007
+ case "com.amazonaws.tnb#ResourceNotFoundException":
2008
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
2009
+ case "ThrottlingException":
2010
+ case "com.amazonaws.tnb#ThrottlingException":
2011
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2012
+ case "ValidationException":
2013
+ case "com.amazonaws.tnb#ValidationException":
2014
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2015
+ default:
2016
+ const parsedBody = parsedOutput.body;
2017
+ throwDefaultError({
2018
+ output,
2019
+ parsedBody,
2020
+ exceptionCtor: __BaseException,
2021
+ errorCode,
2022
+ });
2023
+ }
2024
+ };
2025
+ export const deserializeAws_restJson1TerminateSolNetworkInstanceCommand = async (output, context) => {
2026
+ if (output.statusCode !== 201 && output.statusCode >= 300) {
2027
+ return deserializeAws_restJson1TerminateSolNetworkInstanceCommandError(output, context);
2028
+ }
2029
+ const contents = map({
2030
+ $metadata: deserializeMetadata(output),
2031
+ });
2032
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2033
+ if (data.nsLcmOpOccId != null) {
2034
+ contents.nsLcmOpOccId = __expectString(data.nsLcmOpOccId);
2035
+ }
2036
+ return contents;
2037
+ };
2038
+ const deserializeAws_restJson1TerminateSolNetworkInstanceCommandError = async (output, context) => {
2039
+ const parsedOutput = {
2040
+ ...output,
2041
+ body: await parseErrorBody(output.body, context),
2042
+ };
2043
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2044
+ switch (errorCode) {
2045
+ case "AccessDeniedException":
2046
+ case "com.amazonaws.tnb#AccessDeniedException":
2047
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
2048
+ case "InternalServerException":
2049
+ case "com.amazonaws.tnb#InternalServerException":
2050
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
2051
+ case "ResourceNotFoundException":
2052
+ case "com.amazonaws.tnb#ResourceNotFoundException":
2053
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
2054
+ case "ServiceQuotaExceededException":
2055
+ case "com.amazonaws.tnb#ServiceQuotaExceededException":
2056
+ throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
2057
+ case "ThrottlingException":
2058
+ case "com.amazonaws.tnb#ThrottlingException":
2059
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2060
+ case "ValidationException":
2061
+ case "com.amazonaws.tnb#ValidationException":
2062
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2063
+ default:
2064
+ const parsedBody = parsedOutput.body;
2065
+ throwDefaultError({
2066
+ output,
2067
+ parsedBody,
2068
+ exceptionCtor: __BaseException,
2069
+ errorCode,
2070
+ });
2071
+ }
2072
+ };
2073
+ export const deserializeAws_restJson1UntagResourceCommand = async (output, context) => {
2074
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2075
+ return deserializeAws_restJson1UntagResourceCommandError(output, context);
2076
+ }
2077
+ const contents = map({
2078
+ $metadata: deserializeMetadata(output),
2079
+ });
2080
+ await collectBody(output.body, context);
2081
+ return contents;
2082
+ };
2083
+ const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
2084
+ const parsedOutput = {
2085
+ ...output,
2086
+ body: await parseErrorBody(output.body, context),
2087
+ };
2088
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2089
+ switch (errorCode) {
2090
+ case "AccessDeniedException":
2091
+ case "com.amazonaws.tnb#AccessDeniedException":
2092
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
2093
+ case "InternalServerException":
2094
+ case "com.amazonaws.tnb#InternalServerException":
2095
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
2096
+ case "ResourceNotFoundException":
2097
+ case "com.amazonaws.tnb#ResourceNotFoundException":
2098
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
2099
+ case "ThrottlingException":
2100
+ case "com.amazonaws.tnb#ThrottlingException":
2101
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2102
+ case "ValidationException":
2103
+ case "com.amazonaws.tnb#ValidationException":
2104
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2105
+ default:
2106
+ const parsedBody = parsedOutput.body;
2107
+ throwDefaultError({
2108
+ output,
2109
+ parsedBody,
2110
+ exceptionCtor: __BaseException,
2111
+ errorCode,
2112
+ });
2113
+ }
2114
+ };
2115
+ export const deserializeAws_restJson1UpdateSolFunctionPackageCommand = async (output, context) => {
2116
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2117
+ return deserializeAws_restJson1UpdateSolFunctionPackageCommandError(output, context);
2118
+ }
2119
+ const contents = map({
2120
+ $metadata: deserializeMetadata(output),
2121
+ });
2122
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2123
+ if (data.operationalState != null) {
2124
+ contents.operationalState = __expectString(data.operationalState);
2125
+ }
2126
+ return contents;
2127
+ };
2128
+ const deserializeAws_restJson1UpdateSolFunctionPackageCommandError = async (output, context) => {
2129
+ const parsedOutput = {
2130
+ ...output,
2131
+ body: await parseErrorBody(output.body, context),
2132
+ };
2133
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2134
+ switch (errorCode) {
2135
+ case "AccessDeniedException":
2136
+ case "com.amazonaws.tnb#AccessDeniedException":
2137
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
2138
+ case "InternalServerException":
2139
+ case "com.amazonaws.tnb#InternalServerException":
2140
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
2141
+ case "ResourceNotFoundException":
2142
+ case "com.amazonaws.tnb#ResourceNotFoundException":
2143
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
2144
+ case "ThrottlingException":
2145
+ case "com.amazonaws.tnb#ThrottlingException":
2146
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2147
+ case "ValidationException":
2148
+ case "com.amazonaws.tnb#ValidationException":
2149
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2150
+ default:
2151
+ const parsedBody = parsedOutput.body;
2152
+ throwDefaultError({
2153
+ output,
2154
+ parsedBody,
2155
+ exceptionCtor: __BaseException,
2156
+ errorCode,
2157
+ });
2158
+ }
2159
+ };
2160
+ export const deserializeAws_restJson1UpdateSolNetworkInstanceCommand = async (output, context) => {
2161
+ if (output.statusCode !== 201 && output.statusCode >= 300) {
2162
+ return deserializeAws_restJson1UpdateSolNetworkInstanceCommandError(output, context);
2163
+ }
2164
+ const contents = map({
2165
+ $metadata: deserializeMetadata(output),
2166
+ });
2167
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2168
+ if (data.nsLcmOpOccId != null) {
2169
+ contents.nsLcmOpOccId = __expectString(data.nsLcmOpOccId);
2170
+ }
2171
+ return contents;
2172
+ };
2173
+ const deserializeAws_restJson1UpdateSolNetworkInstanceCommandError = async (output, context) => {
2174
+ const parsedOutput = {
2175
+ ...output,
2176
+ body: await parseErrorBody(output.body, context),
2177
+ };
2178
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2179
+ switch (errorCode) {
2180
+ case "AccessDeniedException":
2181
+ case "com.amazonaws.tnb#AccessDeniedException":
2182
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
2183
+ case "InternalServerException":
2184
+ case "com.amazonaws.tnb#InternalServerException":
2185
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
2186
+ case "ResourceNotFoundException":
2187
+ case "com.amazonaws.tnb#ResourceNotFoundException":
2188
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
2189
+ case "ServiceQuotaExceededException":
2190
+ case "com.amazonaws.tnb#ServiceQuotaExceededException":
2191
+ throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
2192
+ case "ThrottlingException":
2193
+ case "com.amazonaws.tnb#ThrottlingException":
2194
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2195
+ case "ValidationException":
2196
+ case "com.amazonaws.tnb#ValidationException":
2197
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2198
+ default:
2199
+ const parsedBody = parsedOutput.body;
2200
+ throwDefaultError({
2201
+ output,
2202
+ parsedBody,
2203
+ exceptionCtor: __BaseException,
2204
+ errorCode,
2205
+ });
2206
+ }
2207
+ };
2208
+ export const deserializeAws_restJson1UpdateSolNetworkPackageCommand = async (output, context) => {
2209
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2210
+ return deserializeAws_restJson1UpdateSolNetworkPackageCommandError(output, context);
2211
+ }
2212
+ const contents = map({
2213
+ $metadata: deserializeMetadata(output),
2214
+ });
2215
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2216
+ if (data.nsdOperationalState != null) {
2217
+ contents.nsdOperationalState = __expectString(data.nsdOperationalState);
2218
+ }
2219
+ return contents;
2220
+ };
2221
+ const deserializeAws_restJson1UpdateSolNetworkPackageCommandError = async (output, context) => {
2222
+ const parsedOutput = {
2223
+ ...output,
2224
+ body: await parseErrorBody(output.body, context),
2225
+ };
2226
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2227
+ switch (errorCode) {
2228
+ case "AccessDeniedException":
2229
+ case "com.amazonaws.tnb#AccessDeniedException":
2230
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
2231
+ case "InternalServerException":
2232
+ case "com.amazonaws.tnb#InternalServerException":
2233
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
2234
+ case "ResourceNotFoundException":
2235
+ case "com.amazonaws.tnb#ResourceNotFoundException":
2236
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
2237
+ case "ThrottlingException":
2238
+ case "com.amazonaws.tnb#ThrottlingException":
2239
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2240
+ case "ValidationException":
2241
+ case "com.amazonaws.tnb#ValidationException":
2242
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2243
+ default:
2244
+ const parsedBody = parsedOutput.body;
2245
+ throwDefaultError({
2246
+ output,
2247
+ parsedBody,
2248
+ exceptionCtor: __BaseException,
2249
+ errorCode,
2250
+ });
2251
+ }
2252
+ };
2253
+ export const deserializeAws_restJson1ValidateSolFunctionPackageContentCommand = async (output, context) => {
2254
+ if (output.statusCode !== 202 && output.statusCode >= 300) {
2255
+ return deserializeAws_restJson1ValidateSolFunctionPackageContentCommandError(output, context);
2256
+ }
2257
+ const contents = map({
2258
+ $metadata: deserializeMetadata(output),
2259
+ });
2260
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2261
+ if (data.id != null) {
2262
+ contents.id = __expectString(data.id);
2263
+ }
2264
+ if (data.metadata != null) {
2265
+ contents.metadata = deserializeAws_restJson1ValidateSolFunctionPackageContentMetadata(data.metadata, context);
2266
+ }
2267
+ if (data.vnfProductName != null) {
2268
+ contents.vnfProductName = __expectString(data.vnfProductName);
2269
+ }
2270
+ if (data.vnfProvider != null) {
2271
+ contents.vnfProvider = __expectString(data.vnfProvider);
2272
+ }
2273
+ if (data.vnfdId != null) {
2274
+ contents.vnfdId = __expectString(data.vnfdId);
2275
+ }
2276
+ if (data.vnfdVersion != null) {
2277
+ contents.vnfdVersion = __expectString(data.vnfdVersion);
2278
+ }
2279
+ return contents;
2280
+ };
2281
+ const deserializeAws_restJson1ValidateSolFunctionPackageContentCommandError = async (output, context) => {
2282
+ const parsedOutput = {
2283
+ ...output,
2284
+ body: await parseErrorBody(output.body, context),
2285
+ };
2286
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2287
+ switch (errorCode) {
2288
+ case "AccessDeniedException":
2289
+ case "com.amazonaws.tnb#AccessDeniedException":
2290
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
2291
+ case "InternalServerException":
2292
+ case "com.amazonaws.tnb#InternalServerException":
2293
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
2294
+ case "ResourceNotFoundException":
2295
+ case "com.amazonaws.tnb#ResourceNotFoundException":
2296
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
2297
+ case "ThrottlingException":
2298
+ case "com.amazonaws.tnb#ThrottlingException":
2299
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2300
+ case "ValidationException":
2301
+ case "com.amazonaws.tnb#ValidationException":
2302
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2303
+ default:
2304
+ const parsedBody = parsedOutput.body;
2305
+ throwDefaultError({
2306
+ output,
2307
+ parsedBody,
2308
+ exceptionCtor: __BaseException,
2309
+ errorCode,
2310
+ });
2311
+ }
2312
+ };
2313
+ export const deserializeAws_restJson1ValidateSolNetworkPackageContentCommand = async (output, context) => {
2314
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2315
+ return deserializeAws_restJson1ValidateSolNetworkPackageContentCommandError(output, context);
2316
+ }
2317
+ const contents = map({
2318
+ $metadata: deserializeMetadata(output),
2319
+ });
2320
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2321
+ if (data.arn != null) {
2322
+ contents.arn = __expectString(data.arn);
2323
+ }
2324
+ if (data.id != null) {
2325
+ contents.id = __expectString(data.id);
2326
+ }
2327
+ if (data.metadata != null) {
2328
+ contents.metadata = deserializeAws_restJson1ValidateSolNetworkPackageContentMetadata(data.metadata, context);
2329
+ }
2330
+ if (data.nsdId != null) {
2331
+ contents.nsdId = __expectString(data.nsdId);
2332
+ }
2333
+ if (data.nsdName != null) {
2334
+ contents.nsdName = __expectString(data.nsdName);
2335
+ }
2336
+ if (data.nsdVersion != null) {
2337
+ contents.nsdVersion = __expectString(data.nsdVersion);
2338
+ }
2339
+ if (data.vnfPkgIds != null) {
2340
+ contents.vnfPkgIds = deserializeAws_restJson1VnfPkgIdList(data.vnfPkgIds, context);
2341
+ }
2342
+ return contents;
2343
+ };
2344
+ const deserializeAws_restJson1ValidateSolNetworkPackageContentCommandError = async (output, context) => {
2345
+ const parsedOutput = {
2346
+ ...output,
2347
+ body: await parseErrorBody(output.body, context),
2348
+ };
2349
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2350
+ switch (errorCode) {
2351
+ case "AccessDeniedException":
2352
+ case "com.amazonaws.tnb#AccessDeniedException":
2353
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
2354
+ case "InternalServerException":
2355
+ case "com.amazonaws.tnb#InternalServerException":
2356
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
2357
+ case "ResourceNotFoundException":
2358
+ case "com.amazonaws.tnb#ResourceNotFoundException":
2359
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
2360
+ case "ThrottlingException":
2361
+ case "com.amazonaws.tnb#ThrottlingException":
2362
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2363
+ case "ValidationException":
2364
+ case "com.amazonaws.tnb#ValidationException":
2365
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2366
+ default:
2367
+ const parsedBody = parsedOutput.body;
2368
+ throwDefaultError({
2369
+ output,
2370
+ parsedBody,
2371
+ exceptionCtor: __BaseException,
2372
+ errorCode,
2373
+ });
2374
+ }
2375
+ };
2376
+ const map = __map;
2377
+ const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
2378
+ const contents = map({});
2379
+ const data = parsedOutput.body;
2380
+ if (data.message != null) {
2381
+ contents.message = __expectString(data.message);
2382
+ }
2383
+ const exception = new AccessDeniedException({
2384
+ $metadata: deserializeMetadata(parsedOutput),
2385
+ ...contents,
2386
+ });
2387
+ return __decorateServiceException(exception, parsedOutput.body);
2388
+ };
2389
+ const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOutput, context) => {
2390
+ const contents = map({});
2391
+ const data = parsedOutput.body;
2392
+ if (data.message != null) {
2393
+ contents.message = __expectString(data.message);
2394
+ }
2395
+ const exception = new InternalServerException({
2396
+ $metadata: deserializeMetadata(parsedOutput),
2397
+ ...contents,
2398
+ });
2399
+ return __decorateServiceException(exception, parsedOutput.body);
2400
+ };
2401
+ const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
2402
+ const contents = map({});
2403
+ const data = parsedOutput.body;
2404
+ if (data.message != null) {
2405
+ contents.message = __expectString(data.message);
2406
+ }
2407
+ const exception = new ResourceNotFoundException({
2408
+ $metadata: deserializeMetadata(parsedOutput),
2409
+ ...contents,
2410
+ });
2411
+ return __decorateServiceException(exception, parsedOutput.body);
2412
+ };
2413
+ const deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = async (parsedOutput, context) => {
2414
+ const contents = map({});
2415
+ const data = parsedOutput.body;
2416
+ if (data.message != null) {
2417
+ contents.message = __expectString(data.message);
2418
+ }
2419
+ const exception = new ServiceQuotaExceededException({
2420
+ $metadata: deserializeMetadata(parsedOutput),
2421
+ ...contents,
2422
+ });
2423
+ return __decorateServiceException(exception, parsedOutput.body);
2424
+ };
2425
+ const deserializeAws_restJson1ThrottlingExceptionResponse = async (parsedOutput, context) => {
2426
+ const contents = map({});
2427
+ const data = parsedOutput.body;
2428
+ if (data.message != null) {
2429
+ contents.message = __expectString(data.message);
2430
+ }
2431
+ const exception = new ThrottlingException({
2432
+ $metadata: deserializeMetadata(parsedOutput),
2433
+ ...contents,
2434
+ });
2435
+ return __decorateServiceException(exception, parsedOutput.body);
2436
+ };
2437
+ const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput, context) => {
2438
+ const contents = map({});
2439
+ const data = parsedOutput.body;
2440
+ if (data.message != null) {
2441
+ contents.message = __expectString(data.message);
2442
+ }
2443
+ const exception = new ValidationException({
2444
+ $metadata: deserializeMetadata(parsedOutput),
2445
+ ...contents,
2446
+ });
2447
+ return __decorateServiceException(exception, parsedOutput.body);
2448
+ };
2449
+ const serializeAws_restJson1TagMap = (input, context) => {
2450
+ return Object.entries(input).reduce((acc, [key, value]) => {
2451
+ if (value === null) {
2452
+ return acc;
2453
+ }
2454
+ acc[key] = value;
2455
+ return acc;
2456
+ }, {});
2457
+ };
2458
+ const serializeAws_restJson1UpdateSolNetworkModify = (input, context) => {
2459
+ return {
2460
+ ...(input.vnfConfigurableProperties != null && {
2461
+ vnfConfigurableProperties: serializeAws_restJson1Document(input.vnfConfigurableProperties, context),
2462
+ }),
2463
+ ...(input.vnfInstanceId != null && { vnfInstanceId: input.vnfInstanceId }),
2464
+ };
2465
+ };
2466
+ const serializeAws_restJson1Document = (input, context) => {
2467
+ return input;
2468
+ };
2469
+ const deserializeAws_restJson1ErrorInfo = (output, context) => {
2470
+ return {
2471
+ cause: __expectString(output.cause),
2472
+ details: __expectString(output.details),
2473
+ };
2474
+ };
2475
+ const deserializeAws_restJson1FunctionArtifactMeta = (output, context) => {
2476
+ return {
2477
+ overrides: output.overrides != null ? deserializeAws_restJson1OverrideList(output.overrides, context) : undefined,
2478
+ };
2479
+ };
2480
+ const deserializeAws_restJson1GetSolFunctionInstanceMetadata = (output, context) => {
2481
+ return {
2482
+ createdAt: output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined,
2483
+ lastModified: output.lastModified != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.lastModified)) : undefined,
2484
+ };
2485
+ };
2486
+ const deserializeAws_restJson1GetSolFunctionPackageMetadata = (output, context) => {
2487
+ return {
2488
+ createdAt: output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined,
2489
+ lastModified: output.lastModified != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.lastModified)) : undefined,
2490
+ vnfd: output.vnfd != null ? deserializeAws_restJson1FunctionArtifactMeta(output.vnfd, context) : undefined,
2491
+ };
2492
+ };
2493
+ const deserializeAws_restJson1GetSolInstantiatedVnfInfo = (output, context) => {
2494
+ return {
2495
+ vnfState: __expectString(output.vnfState),
2496
+ };
2497
+ };
2498
+ const deserializeAws_restJson1GetSolNetworkInstanceMetadata = (output, context) => {
2499
+ return {
2500
+ createdAt: output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined,
2501
+ lastModified: output.lastModified != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.lastModified)) : undefined,
2502
+ };
2503
+ };
2504
+ const deserializeAws_restJson1GetSolNetworkOperationMetadata = (output, context) => {
2505
+ return {
2506
+ createdAt: output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined,
2507
+ lastModified: output.lastModified != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.lastModified)) : undefined,
2508
+ };
2509
+ };
2510
+ const deserializeAws_restJson1GetSolNetworkOperationTaskDetails = (output, context) => {
2511
+ return {
2512
+ taskContext: output.taskContext != null ? deserializeAws_restJson1StringMap(output.taskContext, context) : undefined,
2513
+ taskEndTime: output.taskEndTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.taskEndTime)) : undefined,
2514
+ taskErrorDetails: output.taskErrorDetails != null ? deserializeAws_restJson1ErrorInfo(output.taskErrorDetails, context) : undefined,
2515
+ taskName: __expectString(output.taskName),
2516
+ taskStartTime: output.taskStartTime != null
2517
+ ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.taskStartTime))
2518
+ : undefined,
2519
+ taskStatus: __expectString(output.taskStatus),
2520
+ };
2521
+ };
2522
+ const deserializeAws_restJson1GetSolNetworkOperationTasksList = (output, context) => {
2523
+ const retVal = (output || [])
2524
+ .filter((e) => e != null)
2525
+ .map((entry) => {
2526
+ if (entry === null) {
2527
+ return null;
2528
+ }
2529
+ return deserializeAws_restJson1GetSolNetworkOperationTaskDetails(entry, context);
2530
+ });
2531
+ return retVal;
2532
+ };
2533
+ const deserializeAws_restJson1GetSolNetworkPackageMetadata = (output, context) => {
2534
+ return {
2535
+ createdAt: output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined,
2536
+ lastModified: output.lastModified != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.lastModified)) : undefined,
2537
+ nsd: output.nsd != null ? deserializeAws_restJson1NetworkArtifactMeta(output.nsd, context) : undefined,
2538
+ };
2539
+ };
2540
+ const deserializeAws_restJson1GetSolVnfcResourceInfo = (output, context) => {
2541
+ return {
2542
+ metadata: output.metadata != null
2543
+ ? deserializeAws_restJson1GetSolVnfcResourceInfoMetadata(output.metadata, context)
2544
+ : undefined,
2545
+ };
2546
+ };
2547
+ const deserializeAws_restJson1GetSolVnfcResourceInfoList = (output, context) => {
2548
+ const retVal = (output || [])
2549
+ .filter((e) => e != null)
2550
+ .map((entry) => {
2551
+ if (entry === null) {
2552
+ return null;
2553
+ }
2554
+ return deserializeAws_restJson1GetSolVnfcResourceInfo(entry, context);
2555
+ });
2556
+ return retVal;
2557
+ };
2558
+ const deserializeAws_restJson1GetSolVnfcResourceInfoMetadata = (output, context) => {
2559
+ return {
2560
+ cluster: __expectString(output.cluster),
2561
+ helmChart: __expectString(output.helmChart),
2562
+ nodeGroup: __expectString(output.nodeGroup),
2563
+ };
2564
+ };
2565
+ const deserializeAws_restJson1GetSolVnfInfo = (output, context) => {
2566
+ return {
2567
+ vnfState: __expectString(output.vnfState),
2568
+ vnfcResourceInfo: output.vnfcResourceInfo != null
2569
+ ? deserializeAws_restJson1GetSolVnfcResourceInfoList(output.vnfcResourceInfo, context)
2570
+ : undefined,
2571
+ };
2572
+ };
2573
+ const deserializeAws_restJson1LcmOperationInfo = (output, context) => {
2574
+ return {
2575
+ nsLcmOpOccId: __expectString(output.nsLcmOpOccId),
2576
+ };
2577
+ };
2578
+ const deserializeAws_restJson1ListSolFunctionInstanceInfo = (output, context) => {
2579
+ return {
2580
+ arn: __expectString(output.arn),
2581
+ id: __expectString(output.id),
2582
+ instantiatedVnfInfo: output.instantiatedVnfInfo != null
2583
+ ? deserializeAws_restJson1GetSolInstantiatedVnfInfo(output.instantiatedVnfInfo, context)
2584
+ : undefined,
2585
+ instantiationState: __expectString(output.instantiationState),
2586
+ metadata: output.metadata != null
2587
+ ? deserializeAws_restJson1ListSolFunctionInstanceMetadata(output.metadata, context)
2588
+ : undefined,
2589
+ nsInstanceId: __expectString(output.nsInstanceId),
2590
+ vnfPkgId: __expectString(output.vnfPkgId),
2591
+ vnfPkgName: __expectString(output.vnfPkgName),
2592
+ };
2593
+ };
2594
+ const deserializeAws_restJson1ListSolFunctionInstanceMetadata = (output, context) => {
2595
+ return {
2596
+ createdAt: output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined,
2597
+ lastModified: output.lastModified != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.lastModified)) : undefined,
2598
+ };
2599
+ };
2600
+ const deserializeAws_restJson1ListSolFunctionInstanceResources = (output, context) => {
2601
+ const retVal = (output || [])
2602
+ .filter((e) => e != null)
2603
+ .map((entry) => {
2604
+ if (entry === null) {
2605
+ return null;
2606
+ }
2607
+ return deserializeAws_restJson1ListSolFunctionInstanceInfo(entry, context);
2608
+ });
2609
+ return retVal;
2610
+ };
2611
+ const deserializeAws_restJson1ListSolFunctionPackageInfo = (output, context) => {
2612
+ return {
2613
+ arn: __expectString(output.arn),
2614
+ id: __expectString(output.id),
2615
+ metadata: output.metadata != null
2616
+ ? deserializeAws_restJson1ListSolFunctionPackageMetadata(output.metadata, context)
2617
+ : undefined,
2618
+ onboardingState: __expectString(output.onboardingState),
2619
+ operationalState: __expectString(output.operationalState),
2620
+ usageState: __expectString(output.usageState),
2621
+ vnfProductName: __expectString(output.vnfProductName),
2622
+ vnfProvider: __expectString(output.vnfProvider),
2623
+ vnfdId: __expectString(output.vnfdId),
2624
+ vnfdVersion: __expectString(output.vnfdVersion),
2625
+ };
2626
+ };
2627
+ const deserializeAws_restJson1ListSolFunctionPackageMetadata = (output, context) => {
2628
+ return {
2629
+ createdAt: output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined,
2630
+ lastModified: output.lastModified != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.lastModified)) : undefined,
2631
+ };
2632
+ };
2633
+ const deserializeAws_restJson1ListSolFunctionPackageResources = (output, context) => {
2634
+ const retVal = (output || [])
2635
+ .filter((e) => e != null)
2636
+ .map((entry) => {
2637
+ if (entry === null) {
2638
+ return null;
2639
+ }
2640
+ return deserializeAws_restJson1ListSolFunctionPackageInfo(entry, context);
2641
+ });
2642
+ return retVal;
2643
+ };
2644
+ const deserializeAws_restJson1ListSolNetworkInstanceInfo = (output, context) => {
2645
+ return {
2646
+ arn: __expectString(output.arn),
2647
+ id: __expectString(output.id),
2648
+ metadata: output.metadata != null
2649
+ ? deserializeAws_restJson1ListSolNetworkInstanceMetadata(output.metadata, context)
2650
+ : undefined,
2651
+ nsInstanceDescription: __expectString(output.nsInstanceDescription),
2652
+ nsInstanceName: __expectString(output.nsInstanceName),
2653
+ nsState: __expectString(output.nsState),
2654
+ nsdId: __expectString(output.nsdId),
2655
+ nsdInfoId: __expectString(output.nsdInfoId),
2656
+ };
2657
+ };
2658
+ const deserializeAws_restJson1ListSolNetworkInstanceMetadata = (output, context) => {
2659
+ return {
2660
+ createdAt: output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined,
2661
+ lastModified: output.lastModified != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.lastModified)) : undefined,
2662
+ };
2663
+ };
2664
+ const deserializeAws_restJson1ListSolNetworkInstanceResources = (output, context) => {
2665
+ const retVal = (output || [])
2666
+ .filter((e) => e != null)
2667
+ .map((entry) => {
2668
+ if (entry === null) {
2669
+ return null;
2670
+ }
2671
+ return deserializeAws_restJson1ListSolNetworkInstanceInfo(entry, context);
2672
+ });
2673
+ return retVal;
2674
+ };
2675
+ const deserializeAws_restJson1ListSolNetworkOperationsInfo = (output, context) => {
2676
+ return {
2677
+ arn: __expectString(output.arn),
2678
+ error: output.error != null ? deserializeAws_restJson1ProblemDetails(output.error, context) : undefined,
2679
+ id: __expectString(output.id),
2680
+ lcmOperationType: __expectString(output.lcmOperationType),
2681
+ metadata: output.metadata != null
2682
+ ? deserializeAws_restJson1ListSolNetworkOperationsMetadata(output.metadata, context)
2683
+ : undefined,
2684
+ nsInstanceId: __expectString(output.nsInstanceId),
2685
+ operationState: __expectString(output.operationState),
2686
+ };
2687
+ };
2688
+ const deserializeAws_restJson1ListSolNetworkOperationsMetadata = (output, context) => {
2689
+ return {
2690
+ createdAt: output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined,
2691
+ lastModified: output.lastModified != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.lastModified)) : undefined,
2692
+ };
2693
+ };
2694
+ const deserializeAws_restJson1ListSolNetworkOperationsResources = (output, context) => {
2695
+ const retVal = (output || [])
2696
+ .filter((e) => e != null)
2697
+ .map((entry) => {
2698
+ if (entry === null) {
2699
+ return null;
2700
+ }
2701
+ return deserializeAws_restJson1ListSolNetworkOperationsInfo(entry, context);
2702
+ });
2703
+ return retVal;
2704
+ };
2705
+ const deserializeAws_restJson1ListSolNetworkPackageInfo = (output, context) => {
2706
+ return {
2707
+ arn: __expectString(output.arn),
2708
+ id: __expectString(output.id),
2709
+ metadata: output.metadata != null
2710
+ ? deserializeAws_restJson1ListSolNetworkPackageMetadata(output.metadata, context)
2711
+ : undefined,
2712
+ nsdDesigner: __expectString(output.nsdDesigner),
2713
+ nsdId: __expectString(output.nsdId),
2714
+ nsdInvariantId: __expectString(output.nsdInvariantId),
2715
+ nsdName: __expectString(output.nsdName),
2716
+ nsdOnboardingState: __expectString(output.nsdOnboardingState),
2717
+ nsdOperationalState: __expectString(output.nsdOperationalState),
2718
+ nsdUsageState: __expectString(output.nsdUsageState),
2719
+ nsdVersion: __expectString(output.nsdVersion),
2720
+ vnfPkgIds: output.vnfPkgIds != null ? deserializeAws_restJson1VnfPkgIdList(output.vnfPkgIds, context) : undefined,
2721
+ };
2722
+ };
2723
+ const deserializeAws_restJson1ListSolNetworkPackageMetadata = (output, context) => {
2724
+ return {
2725
+ createdAt: output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined,
2726
+ lastModified: output.lastModified != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.lastModified)) : undefined,
2727
+ };
2728
+ };
2729
+ const deserializeAws_restJson1ListSolNetworkPackageResources = (output, context) => {
2730
+ const retVal = (output || [])
2731
+ .filter((e) => e != null)
2732
+ .map((entry) => {
2733
+ if (entry === null) {
2734
+ return null;
2735
+ }
2736
+ return deserializeAws_restJson1ListSolNetworkPackageInfo(entry, context);
2737
+ });
2738
+ return retVal;
2739
+ };
2740
+ const deserializeAws_restJson1NetworkArtifactMeta = (output, context) => {
2741
+ return {
2742
+ overrides: output.overrides != null ? deserializeAws_restJson1OverrideList(output.overrides, context) : undefined,
2743
+ };
2744
+ };
2745
+ const deserializeAws_restJson1OverrideList = (output, context) => {
2746
+ const retVal = (output || [])
2747
+ .filter((e) => e != null)
2748
+ .map((entry) => {
2749
+ if (entry === null) {
2750
+ return null;
2751
+ }
2752
+ return deserializeAws_restJson1ToscaOverride(entry, context);
2753
+ });
2754
+ return retVal;
2755
+ };
2756
+ const deserializeAws_restJson1ProblemDetails = (output, context) => {
2757
+ return {
2758
+ detail: __expectString(output.detail),
2759
+ title: __expectString(output.title),
2760
+ };
2761
+ };
2762
+ const deserializeAws_restJson1PutSolFunctionPackageContentMetadata = (output, context) => {
2763
+ return {
2764
+ vnfd: output.vnfd != null ? deserializeAws_restJson1FunctionArtifactMeta(output.vnfd, context) : undefined,
2765
+ };
2766
+ };
2767
+ const deserializeAws_restJson1PutSolNetworkPackageContentMetadata = (output, context) => {
2768
+ return {
2769
+ nsd: output.nsd != null ? deserializeAws_restJson1NetworkArtifactMeta(output.nsd, context) : undefined,
2770
+ };
2771
+ };
2772
+ const deserializeAws_restJson1StringMap = (output, context) => {
2773
+ return Object.entries(output).reduce((acc, [key, value]) => {
2774
+ if (value === null) {
2775
+ return acc;
2776
+ }
2777
+ acc[key] = __expectString(value);
2778
+ return acc;
2779
+ }, {});
2780
+ };
2781
+ const deserializeAws_restJson1TagMap = (output, context) => {
2782
+ return Object.entries(output).reduce((acc, [key, value]) => {
2783
+ if (value === null) {
2784
+ return acc;
2785
+ }
2786
+ acc[key] = __expectString(value);
2787
+ return acc;
2788
+ }, {});
2789
+ };
2790
+ const deserializeAws_restJson1ToscaOverride = (output, context) => {
2791
+ return {
2792
+ defaultValue: __expectString(output.defaultValue),
2793
+ name: __expectString(output.name),
2794
+ };
2795
+ };
2796
+ const deserializeAws_restJson1ValidateSolFunctionPackageContentMetadata = (output, context) => {
2797
+ return {
2798
+ vnfd: output.vnfd != null ? deserializeAws_restJson1FunctionArtifactMeta(output.vnfd, context) : undefined,
2799
+ };
2800
+ };
2801
+ const deserializeAws_restJson1ValidateSolNetworkPackageContentMetadata = (output, context) => {
2802
+ return {
2803
+ nsd: output.nsd != null ? deserializeAws_restJson1NetworkArtifactMeta(output.nsd, context) : undefined,
2804
+ };
2805
+ };
2806
+ const deserializeAws_restJson1VnfPkgIdList = (output, context) => {
2807
+ const retVal = (output || [])
2808
+ .filter((e) => e != null)
2809
+ .map((entry) => {
2810
+ if (entry === null) {
2811
+ return null;
2812
+ }
2813
+ return __expectString(entry);
2814
+ });
2815
+ return retVal;
2816
+ };
2817
+ const deserializeMetadata = (output) => ({
2818
+ httpStatusCode: output.statusCode,
2819
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
2820
+ extendedRequestId: output.headers["x-amz-id-2"],
2821
+ cfId: output.headers["x-amz-cf-id"],
2822
+ });
2823
+ const collectBody = (streamBody = new Uint8Array(), context) => {
2824
+ if (streamBody instanceof Uint8Array) {
2825
+ return Promise.resolve(streamBody);
2826
+ }
2827
+ return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
2828
+ };
2829
+ const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
2830
+ const isSerializableHeaderValue = (value) => value !== undefined &&
2831
+ value !== null &&
2832
+ value !== "" &&
2833
+ (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
2834
+ (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
2835
+ const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2836
+ if (encoded.length) {
2837
+ return JSON.parse(encoded);
2838
+ }
2839
+ return {};
2840
+ });
2841
+ const parseErrorBody = async (errorBody, context) => {
2842
+ const value = await parseBody(errorBody, context);
2843
+ value.message = value.message ?? value.Message;
2844
+ return value;
2845
+ };
2846
+ const loadRestJsonErrorCode = (output, data) => {
2847
+ const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
2848
+ const sanitizeErrorCode = (rawValue) => {
2849
+ let cleanValue = rawValue;
2850
+ if (typeof cleanValue === "number") {
2851
+ cleanValue = cleanValue.toString();
2852
+ }
2853
+ if (cleanValue.indexOf(",") >= 0) {
2854
+ cleanValue = cleanValue.split(",")[0];
2855
+ }
2856
+ if (cleanValue.indexOf(":") >= 0) {
2857
+ cleanValue = cleanValue.split(":")[0];
2858
+ }
2859
+ if (cleanValue.indexOf("#") >= 0) {
2860
+ cleanValue = cleanValue.split("#")[1];
2861
+ }
2862
+ return cleanValue;
2863
+ };
2864
+ const headerKey = findKey(output.headers, "x-amzn-errortype");
2865
+ if (headerKey !== undefined) {
2866
+ return sanitizeErrorCode(output.headers[headerKey]);
2867
+ }
2868
+ if (data.code !== undefined) {
2869
+ return sanitizeErrorCode(data.code);
2870
+ }
2871
+ if (data["__type"] !== undefined) {
2872
+ return sanitizeErrorCode(data["__type"]);
2873
+ }
2874
+ };