@aws-sdk/client-tnb 3.489.0 → 3.495.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 (52) hide show
  1. package/dist-cjs/Tnb.js +1 -77
  2. package/dist-cjs/TnbClient.js +1 -43
  3. package/dist-cjs/commands/CancelSolNetworkOperationCommand.js +1 -28
  4. package/dist-cjs/commands/CreateSolFunctionPackageCommand.js +1 -29
  5. package/dist-cjs/commands/CreateSolNetworkInstanceCommand.js +1 -29
  6. package/dist-cjs/commands/CreateSolNetworkPackageCommand.js +1 -29
  7. package/dist-cjs/commands/DeleteSolFunctionPackageCommand.js +1 -28
  8. package/dist-cjs/commands/DeleteSolNetworkInstanceCommand.js +1 -28
  9. package/dist-cjs/commands/DeleteSolNetworkPackageCommand.js +1 -28
  10. package/dist-cjs/commands/GetSolFunctionInstanceCommand.js +1 -29
  11. package/dist-cjs/commands/GetSolFunctionPackageCommand.js +1 -29
  12. package/dist-cjs/commands/GetSolFunctionPackageContentCommand.js +1 -28
  13. package/dist-cjs/commands/GetSolFunctionPackageDescriptorCommand.js +1 -28
  14. package/dist-cjs/commands/GetSolNetworkInstanceCommand.js +1 -29
  15. package/dist-cjs/commands/GetSolNetworkOperationCommand.js +1 -29
  16. package/dist-cjs/commands/GetSolNetworkPackageCommand.js +1 -29
  17. package/dist-cjs/commands/GetSolNetworkPackageContentCommand.js +1 -28
  18. package/dist-cjs/commands/GetSolNetworkPackageDescriptorCommand.js +1 -28
  19. package/dist-cjs/commands/InstantiateSolNetworkInstanceCommand.js +1 -29
  20. package/dist-cjs/commands/ListSolFunctionInstancesCommand.js +1 -28
  21. package/dist-cjs/commands/ListSolFunctionPackagesCommand.js +1 -28
  22. package/dist-cjs/commands/ListSolNetworkInstancesCommand.js +1 -28
  23. package/dist-cjs/commands/ListSolNetworkOperationsCommand.js +1 -28
  24. package/dist-cjs/commands/ListSolNetworkPackagesCommand.js +1 -28
  25. package/dist-cjs/commands/ListTagsForResourceCommand.js +1 -29
  26. package/dist-cjs/commands/PutSolFunctionPackageContentCommand.js +1 -28
  27. package/dist-cjs/commands/PutSolNetworkPackageContentCommand.js +1 -28
  28. package/dist-cjs/commands/TagResourceCommand.js +1 -29
  29. package/dist-cjs/commands/TerminateSolNetworkInstanceCommand.js +1 -29
  30. package/dist-cjs/commands/UntagResourceCommand.js +1 -28
  31. package/dist-cjs/commands/UpdateSolFunctionPackageCommand.js +1 -28
  32. package/dist-cjs/commands/UpdateSolNetworkInstanceCommand.js +1 -29
  33. package/dist-cjs/commands/UpdateSolNetworkPackageCommand.js +1 -28
  34. package/dist-cjs/commands/ValidateSolFunctionPackageContentCommand.js +1 -28
  35. package/dist-cjs/commands/ValidateSolNetworkPackageContentCommand.js +1 -28
  36. package/dist-cjs/commands/index.js +1 -36
  37. package/dist-cjs/endpoint/EndpointParameters.js +1 -18
  38. package/dist-cjs/extensionConfiguration.js +1 -2
  39. package/dist-cjs/index.js +3458 -11
  40. package/dist-cjs/models/TnbServiceException.js +1 -12
  41. package/dist-cjs/models/index.js +1 -4
  42. package/dist-cjs/models/models_0.js +1 -252
  43. package/dist-cjs/pagination/Interfaces.js +1 -2
  44. package/dist-cjs/pagination/ListSolFunctionInstancesPaginator.js +1 -7
  45. package/dist-cjs/pagination/ListSolFunctionPackagesPaginator.js +1 -7
  46. package/dist-cjs/pagination/ListSolNetworkInstancesPaginator.js +1 -7
  47. package/dist-cjs/pagination/ListSolNetworkOperationsPaginator.js +1 -7
  48. package/dist-cjs/pagination/ListSolNetworkPackagesPaginator.js +1 -7
  49. package/dist-cjs/pagination/index.js +1 -9
  50. package/dist-cjs/protocols/Aws_restJson1.js +1 -2346
  51. package/dist-cjs/runtimeExtensions.js +1 -22
  52. package/package.json +41 -41
@@ -1,2346 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_InstantiateSolNetworkInstanceCommand = exports.de_GetSolNetworkPackageDescriptorCommand = exports.de_GetSolNetworkPackageContentCommand = exports.de_GetSolNetworkPackageCommand = exports.de_GetSolNetworkOperationCommand = exports.de_GetSolNetworkInstanceCommand = exports.de_GetSolFunctionPackageDescriptorCommand = exports.de_GetSolFunctionPackageContentCommand = exports.de_GetSolFunctionPackageCommand = exports.de_GetSolFunctionInstanceCommand = exports.de_DeleteSolNetworkPackageCommand = exports.de_DeleteSolNetworkInstanceCommand = exports.de_DeleteSolFunctionPackageCommand = exports.de_CreateSolNetworkPackageCommand = exports.de_CreateSolNetworkInstanceCommand = exports.de_CreateSolFunctionPackageCommand = exports.de_CancelSolNetworkOperationCommand = exports.se_ValidateSolNetworkPackageContentCommand = exports.se_ValidateSolFunctionPackageContentCommand = exports.se_UpdateSolNetworkPackageCommand = exports.se_UpdateSolNetworkInstanceCommand = exports.se_UpdateSolFunctionPackageCommand = exports.se_UntagResourceCommand = exports.se_TerminateSolNetworkInstanceCommand = exports.se_TagResourceCommand = exports.se_PutSolNetworkPackageContentCommand = exports.se_PutSolFunctionPackageContentCommand = exports.se_ListTagsForResourceCommand = exports.se_ListSolNetworkPackagesCommand = exports.se_ListSolNetworkOperationsCommand = exports.se_ListSolNetworkInstancesCommand = exports.se_ListSolFunctionPackagesCommand = exports.se_ListSolFunctionInstancesCommand = exports.se_InstantiateSolNetworkInstanceCommand = exports.se_GetSolNetworkPackageDescriptorCommand = exports.se_GetSolNetworkPackageContentCommand = exports.se_GetSolNetworkPackageCommand = exports.se_GetSolNetworkOperationCommand = exports.se_GetSolNetworkInstanceCommand = exports.se_GetSolFunctionPackageDescriptorCommand = exports.se_GetSolFunctionPackageContentCommand = exports.se_GetSolFunctionPackageCommand = exports.se_GetSolFunctionInstanceCommand = exports.se_DeleteSolNetworkPackageCommand = exports.se_DeleteSolNetworkInstanceCommand = exports.se_DeleteSolFunctionPackageCommand = exports.se_CreateSolNetworkPackageCommand = exports.se_CreateSolNetworkInstanceCommand = exports.se_CreateSolFunctionPackageCommand = exports.se_CancelSolNetworkOperationCommand = void 0;
4
- exports.de_ValidateSolNetworkPackageContentCommand = exports.de_ValidateSolFunctionPackageContentCommand = exports.de_UpdateSolNetworkPackageCommand = exports.de_UpdateSolNetworkInstanceCommand = exports.de_UpdateSolFunctionPackageCommand = exports.de_UntagResourceCommand = exports.de_TerminateSolNetworkInstanceCommand = exports.de_TagResourceCommand = exports.de_PutSolNetworkPackageContentCommand = exports.de_PutSolFunctionPackageContentCommand = exports.de_ListTagsForResourceCommand = exports.de_ListSolNetworkPackagesCommand = exports.de_ListSolNetworkOperationsCommand = exports.de_ListSolNetworkInstancesCommand = exports.de_ListSolFunctionPackagesCommand = exports.de_ListSolFunctionInstancesCommand = void 0;
5
- const core_1 = require("@smithy/core");
6
- const smithy_client_1 = require("@smithy/smithy-client");
7
- const models_0_1 = require("../models/models_0");
8
- const TnbServiceException_1 = require("../models/TnbServiceException");
9
- const se_CancelSolNetworkOperationCommand = async (input, context) => {
10
- const b = (0, core_1.requestBuilder)(input, context);
11
- const headers = {};
12
- b.bp("/sol/nslcm/v1/ns_lcm_op_occs/{nsLcmOpOccId}/cancel");
13
- b.p("nsLcmOpOccId", () => input.nsLcmOpOccId, "{nsLcmOpOccId}", false);
14
- let body;
15
- b.m("POST").h(headers).b(body);
16
- return b.build();
17
- };
18
- exports.se_CancelSolNetworkOperationCommand = se_CancelSolNetworkOperationCommand;
19
- const se_CreateSolFunctionPackageCommand = async (input, context) => {
20
- const b = (0, core_1.requestBuilder)(input, context);
21
- const headers = {
22
- "content-type": "application/json",
23
- };
24
- b.bp("/sol/vnfpkgm/v1/vnf_packages");
25
- let body;
26
- body = JSON.stringify((0, smithy_client_1.take)(input, {
27
- tags: (_) => (0, smithy_client_1._json)(_),
28
- }));
29
- b.m("POST").h(headers).b(body);
30
- return b.build();
31
- };
32
- exports.se_CreateSolFunctionPackageCommand = se_CreateSolFunctionPackageCommand;
33
- const se_CreateSolNetworkInstanceCommand = async (input, context) => {
34
- const b = (0, core_1.requestBuilder)(input, context);
35
- const headers = {
36
- "content-type": "application/json",
37
- };
38
- b.bp("/sol/nslcm/v1/ns_instances");
39
- let body;
40
- body = JSON.stringify((0, smithy_client_1.take)(input, {
41
- nsDescription: [],
42
- nsName: [],
43
- nsdInfoId: [],
44
- tags: (_) => (0, smithy_client_1._json)(_),
45
- }));
46
- b.m("POST").h(headers).b(body);
47
- return b.build();
48
- };
49
- exports.se_CreateSolNetworkInstanceCommand = se_CreateSolNetworkInstanceCommand;
50
- const se_CreateSolNetworkPackageCommand = async (input, context) => {
51
- const b = (0, core_1.requestBuilder)(input, context);
52
- const headers = {
53
- "content-type": "application/json",
54
- };
55
- b.bp("/sol/nsd/v1/ns_descriptors");
56
- let body;
57
- body = JSON.stringify((0, smithy_client_1.take)(input, {
58
- tags: (_) => (0, smithy_client_1._json)(_),
59
- }));
60
- b.m("POST").h(headers).b(body);
61
- return b.build();
62
- };
63
- exports.se_CreateSolNetworkPackageCommand = se_CreateSolNetworkPackageCommand;
64
- const se_DeleteSolFunctionPackageCommand = async (input, context) => {
65
- const b = (0, core_1.requestBuilder)(input, context);
66
- const headers = {};
67
- b.bp("/sol/vnfpkgm/v1/vnf_packages/{vnfPkgId}");
68
- b.p("vnfPkgId", () => input.vnfPkgId, "{vnfPkgId}", false);
69
- let body;
70
- b.m("DELETE").h(headers).b(body);
71
- return b.build();
72
- };
73
- exports.se_DeleteSolFunctionPackageCommand = se_DeleteSolFunctionPackageCommand;
74
- const se_DeleteSolNetworkInstanceCommand = async (input, context) => {
75
- const b = (0, core_1.requestBuilder)(input, context);
76
- const headers = {};
77
- b.bp("/sol/nslcm/v1/ns_instances/{nsInstanceId}");
78
- b.p("nsInstanceId", () => input.nsInstanceId, "{nsInstanceId}", false);
79
- let body;
80
- b.m("DELETE").h(headers).b(body);
81
- return b.build();
82
- };
83
- exports.se_DeleteSolNetworkInstanceCommand = se_DeleteSolNetworkInstanceCommand;
84
- const se_DeleteSolNetworkPackageCommand = async (input, context) => {
85
- const b = (0, core_1.requestBuilder)(input, context);
86
- const headers = {};
87
- b.bp("/sol/nsd/v1/ns_descriptors/{nsdInfoId}");
88
- b.p("nsdInfoId", () => input.nsdInfoId, "{nsdInfoId}", false);
89
- let body;
90
- b.m("DELETE").h(headers).b(body);
91
- return b.build();
92
- };
93
- exports.se_DeleteSolNetworkPackageCommand = se_DeleteSolNetworkPackageCommand;
94
- const se_GetSolFunctionInstanceCommand = async (input, context) => {
95
- const b = (0, core_1.requestBuilder)(input, context);
96
- const headers = {};
97
- b.bp("/sol/vnflcm/v1/vnf_instances/{vnfInstanceId}");
98
- b.p("vnfInstanceId", () => input.vnfInstanceId, "{vnfInstanceId}", false);
99
- let body;
100
- b.m("GET").h(headers).b(body);
101
- return b.build();
102
- };
103
- exports.se_GetSolFunctionInstanceCommand = se_GetSolFunctionInstanceCommand;
104
- const se_GetSolFunctionPackageCommand = async (input, context) => {
105
- const b = (0, core_1.requestBuilder)(input, context);
106
- const headers = {};
107
- b.bp("/sol/vnfpkgm/v1/vnf_packages/{vnfPkgId}");
108
- b.p("vnfPkgId", () => input.vnfPkgId, "{vnfPkgId}", false);
109
- let body;
110
- b.m("GET").h(headers).b(body);
111
- return b.build();
112
- };
113
- exports.se_GetSolFunctionPackageCommand = se_GetSolFunctionPackageCommand;
114
- const se_GetSolFunctionPackageContentCommand = async (input, context) => {
115
- const b = (0, core_1.requestBuilder)(input, context);
116
- const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
117
- [_a]: input[_a],
118
- });
119
- b.bp("/sol/vnfpkgm/v1/vnf_packages/{vnfPkgId}/package_content");
120
- b.p("vnfPkgId", () => input.vnfPkgId, "{vnfPkgId}", false);
121
- let body;
122
- b.m("GET").h(headers).b(body);
123
- return b.build();
124
- };
125
- exports.se_GetSolFunctionPackageContentCommand = se_GetSolFunctionPackageContentCommand;
126
- const se_GetSolFunctionPackageDescriptorCommand = async (input, context) => {
127
- const b = (0, core_1.requestBuilder)(input, context);
128
- const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
129
- [_a]: input[_a],
130
- });
131
- b.bp("/sol/vnfpkgm/v1/vnf_packages/{vnfPkgId}/vnfd");
132
- b.p("vnfPkgId", () => input.vnfPkgId, "{vnfPkgId}", false);
133
- let body;
134
- b.m("GET").h(headers).b(body);
135
- return b.build();
136
- };
137
- exports.se_GetSolFunctionPackageDescriptorCommand = se_GetSolFunctionPackageDescriptorCommand;
138
- const se_GetSolNetworkInstanceCommand = async (input, context) => {
139
- const b = (0, core_1.requestBuilder)(input, context);
140
- const headers = {};
141
- b.bp("/sol/nslcm/v1/ns_instances/{nsInstanceId}");
142
- b.p("nsInstanceId", () => input.nsInstanceId, "{nsInstanceId}", false);
143
- let body;
144
- b.m("GET").h(headers).b(body);
145
- return b.build();
146
- };
147
- exports.se_GetSolNetworkInstanceCommand = se_GetSolNetworkInstanceCommand;
148
- const se_GetSolNetworkOperationCommand = async (input, context) => {
149
- const b = (0, core_1.requestBuilder)(input, context);
150
- const headers = {};
151
- b.bp("/sol/nslcm/v1/ns_lcm_op_occs/{nsLcmOpOccId}");
152
- b.p("nsLcmOpOccId", () => input.nsLcmOpOccId, "{nsLcmOpOccId}", false);
153
- let body;
154
- b.m("GET").h(headers).b(body);
155
- return b.build();
156
- };
157
- exports.se_GetSolNetworkOperationCommand = se_GetSolNetworkOperationCommand;
158
- const se_GetSolNetworkPackageCommand = async (input, context) => {
159
- const b = (0, core_1.requestBuilder)(input, context);
160
- const headers = {};
161
- b.bp("/sol/nsd/v1/ns_descriptors/{nsdInfoId}");
162
- b.p("nsdInfoId", () => input.nsdInfoId, "{nsdInfoId}", false);
163
- let body;
164
- b.m("GET").h(headers).b(body);
165
- return b.build();
166
- };
167
- exports.se_GetSolNetworkPackageCommand = se_GetSolNetworkPackageCommand;
168
- const se_GetSolNetworkPackageContentCommand = async (input, context) => {
169
- const b = (0, core_1.requestBuilder)(input, context);
170
- const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
171
- [_a]: input[_a],
172
- });
173
- b.bp("/sol/nsd/v1/ns_descriptors/{nsdInfoId}/nsd_content");
174
- b.p("nsdInfoId", () => input.nsdInfoId, "{nsdInfoId}", false);
175
- let body;
176
- b.m("GET").h(headers).b(body);
177
- return b.build();
178
- };
179
- exports.se_GetSolNetworkPackageContentCommand = se_GetSolNetworkPackageContentCommand;
180
- const se_GetSolNetworkPackageDescriptorCommand = async (input, context) => {
181
- const b = (0, core_1.requestBuilder)(input, context);
182
- const headers = {};
183
- b.bp("/sol/nsd/v1/ns_descriptors/{nsdInfoId}/nsd");
184
- b.p("nsdInfoId", () => input.nsdInfoId, "{nsdInfoId}", false);
185
- let body;
186
- b.m("GET").h(headers).b(body);
187
- return b.build();
188
- };
189
- exports.se_GetSolNetworkPackageDescriptorCommand = se_GetSolNetworkPackageDescriptorCommand;
190
- const se_InstantiateSolNetworkInstanceCommand = async (input, context) => {
191
- const b = (0, core_1.requestBuilder)(input, context);
192
- const headers = {
193
- "content-type": "application/json",
194
- };
195
- b.bp("/sol/nslcm/v1/ns_instances/{nsInstanceId}/instantiate");
196
- b.p("nsInstanceId", () => input.nsInstanceId, "{nsInstanceId}", false);
197
- const query = (0, smithy_client_1.map)({
198
- [_dr]: [() => input.dryRun !== void 0, () => input[_dR].toString()],
199
- });
200
- let body;
201
- body = JSON.stringify((0, smithy_client_1.take)(input, {
202
- additionalParamsForNs: (_) => se_Document(_, context),
203
- tags: (_) => (0, smithy_client_1._json)(_),
204
- }));
205
- b.m("POST").h(headers).q(query).b(body);
206
- return b.build();
207
- };
208
- exports.se_InstantiateSolNetworkInstanceCommand = se_InstantiateSolNetworkInstanceCommand;
209
- const se_ListSolFunctionInstancesCommand = async (input, context) => {
210
- const b = (0, core_1.requestBuilder)(input, context);
211
- const headers = {};
212
- b.bp("/sol/vnflcm/v1/vnf_instances");
213
- const query = (0, smithy_client_1.map)({
214
- [_mr]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
215
- [_nom]: [, input[_nT]],
216
- });
217
- let body;
218
- b.m("GET").h(headers).q(query).b(body);
219
- return b.build();
220
- };
221
- exports.se_ListSolFunctionInstancesCommand = se_ListSolFunctionInstancesCommand;
222
- const se_ListSolFunctionPackagesCommand = async (input, context) => {
223
- const b = (0, core_1.requestBuilder)(input, context);
224
- const headers = {};
225
- b.bp("/sol/vnfpkgm/v1/vnf_packages");
226
- const query = (0, smithy_client_1.map)({
227
- [_mr]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
228
- [_nom]: [, input[_nT]],
229
- });
230
- let body;
231
- b.m("GET").h(headers).q(query).b(body);
232
- return b.build();
233
- };
234
- exports.se_ListSolFunctionPackagesCommand = se_ListSolFunctionPackagesCommand;
235
- const se_ListSolNetworkInstancesCommand = async (input, context) => {
236
- const b = (0, core_1.requestBuilder)(input, context);
237
- const headers = {};
238
- b.bp("/sol/nslcm/v1/ns_instances");
239
- const query = (0, smithy_client_1.map)({
240
- [_mr]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
241
- [_nom]: [, input[_nT]],
242
- });
243
- let body;
244
- b.m("GET").h(headers).q(query).b(body);
245
- return b.build();
246
- };
247
- exports.se_ListSolNetworkInstancesCommand = se_ListSolNetworkInstancesCommand;
248
- const se_ListSolNetworkOperationsCommand = async (input, context) => {
249
- const b = (0, core_1.requestBuilder)(input, context);
250
- const headers = {};
251
- b.bp("/sol/nslcm/v1/ns_lcm_op_occs");
252
- const query = (0, smithy_client_1.map)({
253
- [_mr]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
254
- [_nom]: [, input[_nT]],
255
- });
256
- let body;
257
- b.m("GET").h(headers).q(query).b(body);
258
- return b.build();
259
- };
260
- exports.se_ListSolNetworkOperationsCommand = se_ListSolNetworkOperationsCommand;
261
- const se_ListSolNetworkPackagesCommand = async (input, context) => {
262
- const b = (0, core_1.requestBuilder)(input, context);
263
- const headers = {};
264
- b.bp("/sol/nsd/v1/ns_descriptors");
265
- const query = (0, smithy_client_1.map)({
266
- [_mr]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
267
- [_nom]: [, input[_nT]],
268
- });
269
- let body;
270
- b.m("GET").h(headers).q(query).b(body);
271
- return b.build();
272
- };
273
- exports.se_ListSolNetworkPackagesCommand = se_ListSolNetworkPackagesCommand;
274
- const se_ListTagsForResourceCommand = async (input, context) => {
275
- const b = (0, core_1.requestBuilder)(input, context);
276
- const headers = {};
277
- b.bp("/tags/{resourceArn}");
278
- b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
279
- let body;
280
- b.m("GET").h(headers).b(body);
281
- return b.build();
282
- };
283
- exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
284
- const se_PutSolFunctionPackageContentCommand = async (input, context) => {
285
- const b = (0, core_1.requestBuilder)(input, context);
286
- const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
287
- [_ct]: input[_cT] || "application/octet-stream",
288
- });
289
- b.bp("/sol/vnfpkgm/v1/vnf_packages/{vnfPkgId}/package_content");
290
- b.p("vnfPkgId", () => input.vnfPkgId, "{vnfPkgId}", false);
291
- let body;
292
- if (input.file !== undefined) {
293
- body = input.file;
294
- }
295
- b.m("PUT").h(headers).b(body);
296
- return b.build();
297
- };
298
- exports.se_PutSolFunctionPackageContentCommand = se_PutSolFunctionPackageContentCommand;
299
- const se_PutSolNetworkPackageContentCommand = async (input, context) => {
300
- const b = (0, core_1.requestBuilder)(input, context);
301
- const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
302
- [_ct]: input[_cT] || "application/octet-stream",
303
- });
304
- b.bp("/sol/nsd/v1/ns_descriptors/{nsdInfoId}/nsd_content");
305
- b.p("nsdInfoId", () => input.nsdInfoId, "{nsdInfoId}", false);
306
- let body;
307
- if (input.file !== undefined) {
308
- body = input.file;
309
- }
310
- b.m("PUT").h(headers).b(body);
311
- return b.build();
312
- };
313
- exports.se_PutSolNetworkPackageContentCommand = se_PutSolNetworkPackageContentCommand;
314
- const se_TagResourceCommand = async (input, context) => {
315
- const b = (0, core_1.requestBuilder)(input, context);
316
- const headers = {
317
- "content-type": "application/json",
318
- };
319
- b.bp("/tags/{resourceArn}");
320
- b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
321
- let body;
322
- body = JSON.stringify((0, smithy_client_1.take)(input, {
323
- tags: (_) => (0, smithy_client_1._json)(_),
324
- }));
325
- b.m("POST").h(headers).b(body);
326
- return b.build();
327
- };
328
- exports.se_TagResourceCommand = se_TagResourceCommand;
329
- const se_TerminateSolNetworkInstanceCommand = async (input, context) => {
330
- const b = (0, core_1.requestBuilder)(input, context);
331
- const headers = {
332
- "content-type": "application/json",
333
- };
334
- b.bp("/sol/nslcm/v1/ns_instances/{nsInstanceId}/terminate");
335
- b.p("nsInstanceId", () => input.nsInstanceId, "{nsInstanceId}", false);
336
- let body;
337
- body = JSON.stringify((0, smithy_client_1.take)(input, {
338
- tags: (_) => (0, smithy_client_1._json)(_),
339
- }));
340
- b.m("POST").h(headers).b(body);
341
- return b.build();
342
- };
343
- exports.se_TerminateSolNetworkInstanceCommand = se_TerminateSolNetworkInstanceCommand;
344
- const se_UntagResourceCommand = async (input, context) => {
345
- const b = (0, core_1.requestBuilder)(input, context);
346
- const headers = {};
347
- b.bp("/tags/{resourceArn}");
348
- b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
349
- const query = (0, smithy_client_1.map)({
350
- [_tK]: [
351
- (0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
352
- () => (input[_tK] || []).map((_entry) => _entry),
353
- ],
354
- });
355
- let body;
356
- b.m("DELETE").h(headers).q(query).b(body);
357
- return b.build();
358
- };
359
- exports.se_UntagResourceCommand = se_UntagResourceCommand;
360
- const se_UpdateSolFunctionPackageCommand = async (input, context) => {
361
- const b = (0, core_1.requestBuilder)(input, context);
362
- const headers = {
363
- "content-type": "application/json",
364
- };
365
- b.bp("/sol/vnfpkgm/v1/vnf_packages/{vnfPkgId}");
366
- b.p("vnfPkgId", () => input.vnfPkgId, "{vnfPkgId}", false);
367
- let body;
368
- body = JSON.stringify((0, smithy_client_1.take)(input, {
369
- operationalState: [],
370
- }));
371
- b.m("PATCH").h(headers).b(body);
372
- return b.build();
373
- };
374
- exports.se_UpdateSolFunctionPackageCommand = se_UpdateSolFunctionPackageCommand;
375
- const se_UpdateSolNetworkInstanceCommand = async (input, context) => {
376
- const b = (0, core_1.requestBuilder)(input, context);
377
- const headers = {
378
- "content-type": "application/json",
379
- };
380
- b.bp("/sol/nslcm/v1/ns_instances/{nsInstanceId}/update");
381
- b.p("nsInstanceId", () => input.nsInstanceId, "{nsInstanceId}", false);
382
- let body;
383
- body = JSON.stringify((0, smithy_client_1.take)(input, {
384
- modifyVnfInfoData: (_) => se_UpdateSolNetworkModify(_, context),
385
- tags: (_) => (0, smithy_client_1._json)(_),
386
- updateType: [],
387
- }));
388
- b.m("POST").h(headers).b(body);
389
- return b.build();
390
- };
391
- exports.se_UpdateSolNetworkInstanceCommand = se_UpdateSolNetworkInstanceCommand;
392
- const se_UpdateSolNetworkPackageCommand = async (input, context) => {
393
- const b = (0, core_1.requestBuilder)(input, context);
394
- const headers = {
395
- "content-type": "application/json",
396
- };
397
- b.bp("/sol/nsd/v1/ns_descriptors/{nsdInfoId}");
398
- b.p("nsdInfoId", () => input.nsdInfoId, "{nsdInfoId}", false);
399
- let body;
400
- body = JSON.stringify((0, smithy_client_1.take)(input, {
401
- nsdOperationalState: [],
402
- }));
403
- b.m("PATCH").h(headers).b(body);
404
- return b.build();
405
- };
406
- exports.se_UpdateSolNetworkPackageCommand = se_UpdateSolNetworkPackageCommand;
407
- const se_ValidateSolFunctionPackageContentCommand = async (input, context) => {
408
- const b = (0, core_1.requestBuilder)(input, context);
409
- const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
410
- [_ct]: input[_cT] || "application/octet-stream",
411
- });
412
- b.bp("/sol/vnfpkgm/v1/vnf_packages/{vnfPkgId}/package_content/validate");
413
- b.p("vnfPkgId", () => input.vnfPkgId, "{vnfPkgId}", false);
414
- let body;
415
- if (input.file !== undefined) {
416
- body = input.file;
417
- }
418
- b.m("PUT").h(headers).b(body);
419
- return b.build();
420
- };
421
- exports.se_ValidateSolFunctionPackageContentCommand = se_ValidateSolFunctionPackageContentCommand;
422
- const se_ValidateSolNetworkPackageContentCommand = async (input, context) => {
423
- const b = (0, core_1.requestBuilder)(input, context);
424
- const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
425
- [_ct]: input[_cT] || "application/octet-stream",
426
- });
427
- b.bp("/sol/nsd/v1/ns_descriptors/{nsdInfoId}/nsd_content/validate");
428
- b.p("nsdInfoId", () => input.nsdInfoId, "{nsdInfoId}", false);
429
- let body;
430
- if (input.file !== undefined) {
431
- body = input.file;
432
- }
433
- b.m("PUT").h(headers).b(body);
434
- return b.build();
435
- };
436
- exports.se_ValidateSolNetworkPackageContentCommand = se_ValidateSolNetworkPackageContentCommand;
437
- const de_CancelSolNetworkOperationCommand = async (output, context) => {
438
- if (output.statusCode !== 202 && output.statusCode >= 300) {
439
- return de_CancelSolNetworkOperationCommandError(output, context);
440
- }
441
- const contents = (0, smithy_client_1.map)({
442
- $metadata: deserializeMetadata(output),
443
- });
444
- await (0, smithy_client_1.collectBody)(output.body, context);
445
- return contents;
446
- };
447
- exports.de_CancelSolNetworkOperationCommand = de_CancelSolNetworkOperationCommand;
448
- const de_CancelSolNetworkOperationCommandError = async (output, context) => {
449
- const parsedOutput = {
450
- ...output,
451
- body: await parseErrorBody(output.body, context),
452
- };
453
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
454
- switch (errorCode) {
455
- case "AccessDeniedException":
456
- case "com.amazonaws.tnb#AccessDeniedException":
457
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
458
- case "InternalServerException":
459
- case "com.amazonaws.tnb#InternalServerException":
460
- throw await de_InternalServerExceptionRes(parsedOutput, context);
461
- case "ResourceNotFoundException":
462
- case "com.amazonaws.tnb#ResourceNotFoundException":
463
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
464
- case "ThrottlingException":
465
- case "com.amazonaws.tnb#ThrottlingException":
466
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
467
- case "ValidationException":
468
- case "com.amazonaws.tnb#ValidationException":
469
- throw await de_ValidationExceptionRes(parsedOutput, context);
470
- default:
471
- const parsedBody = parsedOutput.body;
472
- return throwDefaultError({
473
- output,
474
- parsedBody,
475
- errorCode,
476
- });
477
- }
478
- };
479
- const de_CreateSolFunctionPackageCommand = async (output, context) => {
480
- if (output.statusCode !== 201 && output.statusCode >= 300) {
481
- return de_CreateSolFunctionPackageCommandError(output, context);
482
- }
483
- const contents = (0, smithy_client_1.map)({
484
- $metadata: deserializeMetadata(output),
485
- });
486
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
487
- const doc = (0, smithy_client_1.take)(data, {
488
- arn: smithy_client_1.expectString,
489
- id: smithy_client_1.expectString,
490
- onboardingState: smithy_client_1.expectString,
491
- operationalState: smithy_client_1.expectString,
492
- tags: smithy_client_1._json,
493
- usageState: smithy_client_1.expectString,
494
- });
495
- Object.assign(contents, doc);
496
- return contents;
497
- };
498
- exports.de_CreateSolFunctionPackageCommand = de_CreateSolFunctionPackageCommand;
499
- const de_CreateSolFunctionPackageCommandError = async (output, context) => {
500
- const parsedOutput = {
501
- ...output,
502
- body: await parseErrorBody(output.body, context),
503
- };
504
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
505
- switch (errorCode) {
506
- case "AccessDeniedException":
507
- case "com.amazonaws.tnb#AccessDeniedException":
508
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
509
- case "InternalServerException":
510
- case "com.amazonaws.tnb#InternalServerException":
511
- throw await de_InternalServerExceptionRes(parsedOutput, context);
512
- case "ServiceQuotaExceededException":
513
- case "com.amazonaws.tnb#ServiceQuotaExceededException":
514
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
515
- case "ThrottlingException":
516
- case "com.amazonaws.tnb#ThrottlingException":
517
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
518
- case "ValidationException":
519
- case "com.amazonaws.tnb#ValidationException":
520
- throw await de_ValidationExceptionRes(parsedOutput, context);
521
- default:
522
- const parsedBody = parsedOutput.body;
523
- return throwDefaultError({
524
- output,
525
- parsedBody,
526
- errorCode,
527
- });
528
- }
529
- };
530
- const de_CreateSolNetworkInstanceCommand = async (output, context) => {
531
- if (output.statusCode !== 201 && output.statusCode >= 300) {
532
- return de_CreateSolNetworkInstanceCommandError(output, context);
533
- }
534
- const contents = (0, smithy_client_1.map)({
535
- $metadata: deserializeMetadata(output),
536
- });
537
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
538
- const doc = (0, smithy_client_1.take)(data, {
539
- arn: smithy_client_1.expectString,
540
- id: smithy_client_1.expectString,
541
- nsInstanceName: smithy_client_1.expectString,
542
- nsdInfoId: smithy_client_1.expectString,
543
- tags: smithy_client_1._json,
544
- });
545
- Object.assign(contents, doc);
546
- return contents;
547
- };
548
- exports.de_CreateSolNetworkInstanceCommand = de_CreateSolNetworkInstanceCommand;
549
- const de_CreateSolNetworkInstanceCommandError = async (output, context) => {
550
- const parsedOutput = {
551
- ...output,
552
- body: await parseErrorBody(output.body, context),
553
- };
554
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
555
- switch (errorCode) {
556
- case "AccessDeniedException":
557
- case "com.amazonaws.tnb#AccessDeniedException":
558
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
559
- case "InternalServerException":
560
- case "com.amazonaws.tnb#InternalServerException":
561
- throw await de_InternalServerExceptionRes(parsedOutput, context);
562
- case "ResourceNotFoundException":
563
- case "com.amazonaws.tnb#ResourceNotFoundException":
564
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
565
- case "ServiceQuotaExceededException":
566
- case "com.amazonaws.tnb#ServiceQuotaExceededException":
567
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
568
- case "ThrottlingException":
569
- case "com.amazonaws.tnb#ThrottlingException":
570
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
571
- case "ValidationException":
572
- case "com.amazonaws.tnb#ValidationException":
573
- throw await de_ValidationExceptionRes(parsedOutput, context);
574
- default:
575
- const parsedBody = parsedOutput.body;
576
- return throwDefaultError({
577
- output,
578
- parsedBody,
579
- errorCode,
580
- });
581
- }
582
- };
583
- const de_CreateSolNetworkPackageCommand = async (output, context) => {
584
- if (output.statusCode !== 201 && output.statusCode >= 300) {
585
- return de_CreateSolNetworkPackageCommandError(output, context);
586
- }
587
- const contents = (0, smithy_client_1.map)({
588
- $metadata: deserializeMetadata(output),
589
- });
590
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
591
- const doc = (0, smithy_client_1.take)(data, {
592
- arn: smithy_client_1.expectString,
593
- id: smithy_client_1.expectString,
594
- nsdOnboardingState: smithy_client_1.expectString,
595
- nsdOperationalState: smithy_client_1.expectString,
596
- nsdUsageState: smithy_client_1.expectString,
597
- tags: smithy_client_1._json,
598
- });
599
- Object.assign(contents, doc);
600
- return contents;
601
- };
602
- exports.de_CreateSolNetworkPackageCommand = de_CreateSolNetworkPackageCommand;
603
- const de_CreateSolNetworkPackageCommandError = async (output, context) => {
604
- const parsedOutput = {
605
- ...output,
606
- body: await parseErrorBody(output.body, context),
607
- };
608
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
609
- switch (errorCode) {
610
- case "AccessDeniedException":
611
- case "com.amazonaws.tnb#AccessDeniedException":
612
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
613
- case "InternalServerException":
614
- case "com.amazonaws.tnb#InternalServerException":
615
- throw await de_InternalServerExceptionRes(parsedOutput, context);
616
- case "ServiceQuotaExceededException":
617
- case "com.amazonaws.tnb#ServiceQuotaExceededException":
618
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
619
- case "ThrottlingException":
620
- case "com.amazonaws.tnb#ThrottlingException":
621
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
622
- case "ValidationException":
623
- case "com.amazonaws.tnb#ValidationException":
624
- throw await de_ValidationExceptionRes(parsedOutput, context);
625
- default:
626
- const parsedBody = parsedOutput.body;
627
- return throwDefaultError({
628
- output,
629
- parsedBody,
630
- errorCode,
631
- });
632
- }
633
- };
634
- const de_DeleteSolFunctionPackageCommand = async (output, context) => {
635
- if (output.statusCode !== 204 && output.statusCode >= 300) {
636
- return de_DeleteSolFunctionPackageCommandError(output, context);
637
- }
638
- const contents = (0, smithy_client_1.map)({
639
- $metadata: deserializeMetadata(output),
640
- });
641
- await (0, smithy_client_1.collectBody)(output.body, context);
642
- return contents;
643
- };
644
- exports.de_DeleteSolFunctionPackageCommand = de_DeleteSolFunctionPackageCommand;
645
- const de_DeleteSolFunctionPackageCommandError = async (output, context) => {
646
- const parsedOutput = {
647
- ...output,
648
- body: await parseErrorBody(output.body, context),
649
- };
650
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
651
- switch (errorCode) {
652
- case "AccessDeniedException":
653
- case "com.amazonaws.tnb#AccessDeniedException":
654
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
655
- case "InternalServerException":
656
- case "com.amazonaws.tnb#InternalServerException":
657
- throw await de_InternalServerExceptionRes(parsedOutput, context);
658
- case "ResourceNotFoundException":
659
- case "com.amazonaws.tnb#ResourceNotFoundException":
660
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
661
- case "ThrottlingException":
662
- case "com.amazonaws.tnb#ThrottlingException":
663
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
664
- case "ValidationException":
665
- case "com.amazonaws.tnb#ValidationException":
666
- throw await de_ValidationExceptionRes(parsedOutput, context);
667
- default:
668
- const parsedBody = parsedOutput.body;
669
- return throwDefaultError({
670
- output,
671
- parsedBody,
672
- errorCode,
673
- });
674
- }
675
- };
676
- const de_DeleteSolNetworkInstanceCommand = async (output, context) => {
677
- if (output.statusCode !== 204 && output.statusCode >= 300) {
678
- return de_DeleteSolNetworkInstanceCommandError(output, context);
679
- }
680
- const contents = (0, smithy_client_1.map)({
681
- $metadata: deserializeMetadata(output),
682
- });
683
- await (0, smithy_client_1.collectBody)(output.body, context);
684
- return contents;
685
- };
686
- exports.de_DeleteSolNetworkInstanceCommand = de_DeleteSolNetworkInstanceCommand;
687
- const de_DeleteSolNetworkInstanceCommandError = async (output, context) => {
688
- const parsedOutput = {
689
- ...output,
690
- body: await parseErrorBody(output.body, context),
691
- };
692
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
693
- switch (errorCode) {
694
- case "AccessDeniedException":
695
- case "com.amazonaws.tnb#AccessDeniedException":
696
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
697
- case "InternalServerException":
698
- case "com.amazonaws.tnb#InternalServerException":
699
- throw await de_InternalServerExceptionRes(parsedOutput, context);
700
- case "ResourceNotFoundException":
701
- case "com.amazonaws.tnb#ResourceNotFoundException":
702
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
703
- case "ThrottlingException":
704
- case "com.amazonaws.tnb#ThrottlingException":
705
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
706
- case "ValidationException":
707
- case "com.amazonaws.tnb#ValidationException":
708
- throw await de_ValidationExceptionRes(parsedOutput, context);
709
- default:
710
- const parsedBody = parsedOutput.body;
711
- return throwDefaultError({
712
- output,
713
- parsedBody,
714
- errorCode,
715
- });
716
- }
717
- };
718
- const de_DeleteSolNetworkPackageCommand = async (output, context) => {
719
- if (output.statusCode !== 204 && output.statusCode >= 300) {
720
- return de_DeleteSolNetworkPackageCommandError(output, context);
721
- }
722
- const contents = (0, smithy_client_1.map)({
723
- $metadata: deserializeMetadata(output),
724
- });
725
- await (0, smithy_client_1.collectBody)(output.body, context);
726
- return contents;
727
- };
728
- exports.de_DeleteSolNetworkPackageCommand = de_DeleteSolNetworkPackageCommand;
729
- const de_DeleteSolNetworkPackageCommandError = async (output, context) => {
730
- const parsedOutput = {
731
- ...output,
732
- body: await parseErrorBody(output.body, context),
733
- };
734
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
735
- switch (errorCode) {
736
- case "AccessDeniedException":
737
- case "com.amazonaws.tnb#AccessDeniedException":
738
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
739
- case "InternalServerException":
740
- case "com.amazonaws.tnb#InternalServerException":
741
- throw await de_InternalServerExceptionRes(parsedOutput, context);
742
- case "ResourceNotFoundException":
743
- case "com.amazonaws.tnb#ResourceNotFoundException":
744
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
745
- case "ThrottlingException":
746
- case "com.amazonaws.tnb#ThrottlingException":
747
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
748
- case "ValidationException":
749
- case "com.amazonaws.tnb#ValidationException":
750
- throw await de_ValidationExceptionRes(parsedOutput, context);
751
- default:
752
- const parsedBody = parsedOutput.body;
753
- return throwDefaultError({
754
- output,
755
- parsedBody,
756
- errorCode,
757
- });
758
- }
759
- };
760
- const de_GetSolFunctionInstanceCommand = async (output, context) => {
761
- if (output.statusCode !== 200 && output.statusCode >= 300) {
762
- return de_GetSolFunctionInstanceCommandError(output, context);
763
- }
764
- const contents = (0, smithy_client_1.map)({
765
- $metadata: deserializeMetadata(output),
766
- });
767
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
768
- const doc = (0, smithy_client_1.take)(data, {
769
- arn: smithy_client_1.expectString,
770
- id: smithy_client_1.expectString,
771
- instantiatedVnfInfo: smithy_client_1._json,
772
- instantiationState: smithy_client_1.expectString,
773
- metadata: (_) => de_GetSolFunctionInstanceMetadata(_, context),
774
- nsInstanceId: smithy_client_1.expectString,
775
- tags: smithy_client_1._json,
776
- vnfPkgId: smithy_client_1.expectString,
777
- vnfProductName: smithy_client_1.expectString,
778
- vnfProvider: smithy_client_1.expectString,
779
- vnfdId: smithy_client_1.expectString,
780
- vnfdVersion: smithy_client_1.expectString,
781
- });
782
- Object.assign(contents, doc);
783
- return contents;
784
- };
785
- exports.de_GetSolFunctionInstanceCommand = de_GetSolFunctionInstanceCommand;
786
- const de_GetSolFunctionInstanceCommandError = async (output, context) => {
787
- const parsedOutput = {
788
- ...output,
789
- body: await parseErrorBody(output.body, context),
790
- };
791
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
792
- switch (errorCode) {
793
- case "AccessDeniedException":
794
- case "com.amazonaws.tnb#AccessDeniedException":
795
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
796
- case "InternalServerException":
797
- case "com.amazonaws.tnb#InternalServerException":
798
- throw await de_InternalServerExceptionRes(parsedOutput, context);
799
- case "ResourceNotFoundException":
800
- case "com.amazonaws.tnb#ResourceNotFoundException":
801
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
802
- case "ThrottlingException":
803
- case "com.amazonaws.tnb#ThrottlingException":
804
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
805
- case "ValidationException":
806
- case "com.amazonaws.tnb#ValidationException":
807
- throw await de_ValidationExceptionRes(parsedOutput, context);
808
- default:
809
- const parsedBody = parsedOutput.body;
810
- return throwDefaultError({
811
- output,
812
- parsedBody,
813
- errorCode,
814
- });
815
- }
816
- };
817
- const de_GetSolFunctionPackageCommand = async (output, context) => {
818
- if (output.statusCode !== 200 && output.statusCode >= 300) {
819
- return de_GetSolFunctionPackageCommandError(output, context);
820
- }
821
- const contents = (0, smithy_client_1.map)({
822
- $metadata: deserializeMetadata(output),
823
- });
824
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
825
- const doc = (0, smithy_client_1.take)(data, {
826
- arn: smithy_client_1.expectString,
827
- id: smithy_client_1.expectString,
828
- metadata: (_) => de_GetSolFunctionPackageMetadata(_, context),
829
- onboardingState: smithy_client_1.expectString,
830
- operationalState: smithy_client_1.expectString,
831
- tags: smithy_client_1._json,
832
- usageState: smithy_client_1.expectString,
833
- vnfProductName: smithy_client_1.expectString,
834
- vnfProvider: smithy_client_1.expectString,
835
- vnfdId: smithy_client_1.expectString,
836
- vnfdVersion: smithy_client_1.expectString,
837
- });
838
- Object.assign(contents, doc);
839
- return contents;
840
- };
841
- exports.de_GetSolFunctionPackageCommand = de_GetSolFunctionPackageCommand;
842
- const de_GetSolFunctionPackageCommandError = async (output, context) => {
843
- const parsedOutput = {
844
- ...output,
845
- body: await parseErrorBody(output.body, context),
846
- };
847
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
848
- switch (errorCode) {
849
- case "AccessDeniedException":
850
- case "com.amazonaws.tnb#AccessDeniedException":
851
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
852
- case "InternalServerException":
853
- case "com.amazonaws.tnb#InternalServerException":
854
- throw await de_InternalServerExceptionRes(parsedOutput, context);
855
- case "ResourceNotFoundException":
856
- case "com.amazonaws.tnb#ResourceNotFoundException":
857
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
858
- case "ThrottlingException":
859
- case "com.amazonaws.tnb#ThrottlingException":
860
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
861
- case "ValidationException":
862
- case "com.amazonaws.tnb#ValidationException":
863
- throw await de_ValidationExceptionRes(parsedOutput, context);
864
- default:
865
- const parsedBody = parsedOutput.body;
866
- return throwDefaultError({
867
- output,
868
- parsedBody,
869
- errorCode,
870
- });
871
- }
872
- };
873
- const de_GetSolFunctionPackageContentCommand = async (output, context) => {
874
- if (output.statusCode !== 200 && output.statusCode >= 300) {
875
- return de_GetSolFunctionPackageContentCommandError(output, context);
876
- }
877
- const contents = (0, smithy_client_1.map)({
878
- $metadata: deserializeMetadata(output),
879
- [_cT]: [, output.headers[_ct]],
880
- });
881
- const data = await (0, smithy_client_1.collectBody)(output.body, context);
882
- contents.packageContent = data;
883
- return contents;
884
- };
885
- exports.de_GetSolFunctionPackageContentCommand = de_GetSolFunctionPackageContentCommand;
886
- const de_GetSolFunctionPackageContentCommandError = async (output, context) => {
887
- const parsedOutput = {
888
- ...output,
889
- body: await parseErrorBody(output.body, context),
890
- };
891
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
892
- switch (errorCode) {
893
- case "AccessDeniedException":
894
- case "com.amazonaws.tnb#AccessDeniedException":
895
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
896
- case "InternalServerException":
897
- case "com.amazonaws.tnb#InternalServerException":
898
- throw await de_InternalServerExceptionRes(parsedOutput, context);
899
- case "ResourceNotFoundException":
900
- case "com.amazonaws.tnb#ResourceNotFoundException":
901
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
902
- case "ThrottlingException":
903
- case "com.amazonaws.tnb#ThrottlingException":
904
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
905
- case "ValidationException":
906
- case "com.amazonaws.tnb#ValidationException":
907
- throw await de_ValidationExceptionRes(parsedOutput, context);
908
- default:
909
- const parsedBody = parsedOutput.body;
910
- return throwDefaultError({
911
- output,
912
- parsedBody,
913
- errorCode,
914
- });
915
- }
916
- };
917
- const de_GetSolFunctionPackageDescriptorCommand = async (output, context) => {
918
- if (output.statusCode !== 200 && output.statusCode >= 300) {
919
- return de_GetSolFunctionPackageDescriptorCommandError(output, context);
920
- }
921
- const contents = (0, smithy_client_1.map)({
922
- $metadata: deserializeMetadata(output),
923
- [_cT]: [, output.headers[_ct]],
924
- });
925
- const data = await (0, smithy_client_1.collectBody)(output.body, context);
926
- contents.vnfd = data;
927
- return contents;
928
- };
929
- exports.de_GetSolFunctionPackageDescriptorCommand = de_GetSolFunctionPackageDescriptorCommand;
930
- const de_GetSolFunctionPackageDescriptorCommandError = async (output, context) => {
931
- const parsedOutput = {
932
- ...output,
933
- body: await parseErrorBody(output.body, context),
934
- };
935
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
936
- switch (errorCode) {
937
- case "AccessDeniedException":
938
- case "com.amazonaws.tnb#AccessDeniedException":
939
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
940
- case "InternalServerException":
941
- case "com.amazonaws.tnb#InternalServerException":
942
- throw await de_InternalServerExceptionRes(parsedOutput, context);
943
- case "ResourceNotFoundException":
944
- case "com.amazonaws.tnb#ResourceNotFoundException":
945
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
946
- case "ThrottlingException":
947
- case "com.amazonaws.tnb#ThrottlingException":
948
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
949
- case "ValidationException":
950
- case "com.amazonaws.tnb#ValidationException":
951
- throw await de_ValidationExceptionRes(parsedOutput, context);
952
- default:
953
- const parsedBody = parsedOutput.body;
954
- return throwDefaultError({
955
- output,
956
- parsedBody,
957
- errorCode,
958
- });
959
- }
960
- };
961
- const de_GetSolNetworkInstanceCommand = async (output, context) => {
962
- if (output.statusCode !== 200 && output.statusCode >= 300) {
963
- return de_GetSolNetworkInstanceCommandError(output, context);
964
- }
965
- const contents = (0, smithy_client_1.map)({
966
- $metadata: deserializeMetadata(output),
967
- });
968
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
969
- const doc = (0, smithy_client_1.take)(data, {
970
- arn: smithy_client_1.expectString,
971
- id: smithy_client_1.expectString,
972
- lcmOpInfo: smithy_client_1._json,
973
- metadata: (_) => de_GetSolNetworkInstanceMetadata(_, context),
974
- nsInstanceDescription: smithy_client_1.expectString,
975
- nsInstanceName: smithy_client_1.expectString,
976
- nsState: smithy_client_1.expectString,
977
- nsdId: smithy_client_1.expectString,
978
- nsdInfoId: smithy_client_1.expectString,
979
- tags: smithy_client_1._json,
980
- });
981
- Object.assign(contents, doc);
982
- return contents;
983
- };
984
- exports.de_GetSolNetworkInstanceCommand = de_GetSolNetworkInstanceCommand;
985
- const de_GetSolNetworkInstanceCommandError = async (output, context) => {
986
- const parsedOutput = {
987
- ...output,
988
- body: await parseErrorBody(output.body, context),
989
- };
990
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
991
- switch (errorCode) {
992
- case "AccessDeniedException":
993
- case "com.amazonaws.tnb#AccessDeniedException":
994
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
995
- case "InternalServerException":
996
- case "com.amazonaws.tnb#InternalServerException":
997
- throw await de_InternalServerExceptionRes(parsedOutput, context);
998
- case "ResourceNotFoundException":
999
- case "com.amazonaws.tnb#ResourceNotFoundException":
1000
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1001
- case "ThrottlingException":
1002
- case "com.amazonaws.tnb#ThrottlingException":
1003
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1004
- case "ValidationException":
1005
- case "com.amazonaws.tnb#ValidationException":
1006
- throw await de_ValidationExceptionRes(parsedOutput, context);
1007
- default:
1008
- const parsedBody = parsedOutput.body;
1009
- return throwDefaultError({
1010
- output,
1011
- parsedBody,
1012
- errorCode,
1013
- });
1014
- }
1015
- };
1016
- const de_GetSolNetworkOperationCommand = async (output, context) => {
1017
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1018
- return de_GetSolNetworkOperationCommandError(output, context);
1019
- }
1020
- const contents = (0, smithy_client_1.map)({
1021
- $metadata: deserializeMetadata(output),
1022
- });
1023
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1024
- const doc = (0, smithy_client_1.take)(data, {
1025
- arn: smithy_client_1.expectString,
1026
- error: smithy_client_1._json,
1027
- id: smithy_client_1.expectString,
1028
- lcmOperationType: smithy_client_1.expectString,
1029
- metadata: (_) => de_GetSolNetworkOperationMetadata(_, context),
1030
- nsInstanceId: smithy_client_1.expectString,
1031
- operationState: smithy_client_1.expectString,
1032
- tags: smithy_client_1._json,
1033
- tasks: (_) => de_GetSolNetworkOperationTasksList(_, context),
1034
- });
1035
- Object.assign(contents, doc);
1036
- return contents;
1037
- };
1038
- exports.de_GetSolNetworkOperationCommand = de_GetSolNetworkOperationCommand;
1039
- const de_GetSolNetworkOperationCommandError = async (output, context) => {
1040
- const parsedOutput = {
1041
- ...output,
1042
- body: await parseErrorBody(output.body, context),
1043
- };
1044
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1045
- switch (errorCode) {
1046
- case "AccessDeniedException":
1047
- case "com.amazonaws.tnb#AccessDeniedException":
1048
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1049
- case "InternalServerException":
1050
- case "com.amazonaws.tnb#InternalServerException":
1051
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1052
- case "ResourceNotFoundException":
1053
- case "com.amazonaws.tnb#ResourceNotFoundException":
1054
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1055
- case "ThrottlingException":
1056
- case "com.amazonaws.tnb#ThrottlingException":
1057
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1058
- case "ValidationException":
1059
- case "com.amazonaws.tnb#ValidationException":
1060
- throw await de_ValidationExceptionRes(parsedOutput, context);
1061
- default:
1062
- const parsedBody = parsedOutput.body;
1063
- return throwDefaultError({
1064
- output,
1065
- parsedBody,
1066
- errorCode,
1067
- });
1068
- }
1069
- };
1070
- const de_GetSolNetworkPackageCommand = async (output, context) => {
1071
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1072
- return de_GetSolNetworkPackageCommandError(output, context);
1073
- }
1074
- const contents = (0, smithy_client_1.map)({
1075
- $metadata: deserializeMetadata(output),
1076
- });
1077
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1078
- const doc = (0, smithy_client_1.take)(data, {
1079
- arn: smithy_client_1.expectString,
1080
- id: smithy_client_1.expectString,
1081
- metadata: (_) => de_GetSolNetworkPackageMetadata(_, context),
1082
- nsdId: smithy_client_1.expectString,
1083
- nsdName: smithy_client_1.expectString,
1084
- nsdOnboardingState: smithy_client_1.expectString,
1085
- nsdOperationalState: smithy_client_1.expectString,
1086
- nsdUsageState: smithy_client_1.expectString,
1087
- nsdVersion: smithy_client_1.expectString,
1088
- tags: smithy_client_1._json,
1089
- vnfPkgIds: smithy_client_1._json,
1090
- });
1091
- Object.assign(contents, doc);
1092
- return contents;
1093
- };
1094
- exports.de_GetSolNetworkPackageCommand = de_GetSolNetworkPackageCommand;
1095
- const de_GetSolNetworkPackageCommandError = async (output, context) => {
1096
- const parsedOutput = {
1097
- ...output,
1098
- body: await parseErrorBody(output.body, context),
1099
- };
1100
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1101
- switch (errorCode) {
1102
- case "AccessDeniedException":
1103
- case "com.amazonaws.tnb#AccessDeniedException":
1104
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1105
- case "InternalServerException":
1106
- case "com.amazonaws.tnb#InternalServerException":
1107
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1108
- case "ResourceNotFoundException":
1109
- case "com.amazonaws.tnb#ResourceNotFoundException":
1110
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1111
- case "ThrottlingException":
1112
- case "com.amazonaws.tnb#ThrottlingException":
1113
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1114
- case "ValidationException":
1115
- case "com.amazonaws.tnb#ValidationException":
1116
- throw await de_ValidationExceptionRes(parsedOutput, context);
1117
- default:
1118
- const parsedBody = parsedOutput.body;
1119
- return throwDefaultError({
1120
- output,
1121
- parsedBody,
1122
- errorCode,
1123
- });
1124
- }
1125
- };
1126
- const de_GetSolNetworkPackageContentCommand = async (output, context) => {
1127
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1128
- return de_GetSolNetworkPackageContentCommandError(output, context);
1129
- }
1130
- const contents = (0, smithy_client_1.map)({
1131
- $metadata: deserializeMetadata(output),
1132
- [_cT]: [, output.headers[_ct]],
1133
- });
1134
- const data = await (0, smithy_client_1.collectBody)(output.body, context);
1135
- contents.nsdContent = data;
1136
- return contents;
1137
- };
1138
- exports.de_GetSolNetworkPackageContentCommand = de_GetSolNetworkPackageContentCommand;
1139
- const de_GetSolNetworkPackageContentCommandError = async (output, context) => {
1140
- const parsedOutput = {
1141
- ...output,
1142
- body: await parseErrorBody(output.body, context),
1143
- };
1144
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1145
- switch (errorCode) {
1146
- case "AccessDeniedException":
1147
- case "com.amazonaws.tnb#AccessDeniedException":
1148
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1149
- case "InternalServerException":
1150
- case "com.amazonaws.tnb#InternalServerException":
1151
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1152
- case "ResourceNotFoundException":
1153
- case "com.amazonaws.tnb#ResourceNotFoundException":
1154
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1155
- case "ThrottlingException":
1156
- case "com.amazonaws.tnb#ThrottlingException":
1157
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1158
- case "ValidationException":
1159
- case "com.amazonaws.tnb#ValidationException":
1160
- throw await de_ValidationExceptionRes(parsedOutput, context);
1161
- default:
1162
- const parsedBody = parsedOutput.body;
1163
- return throwDefaultError({
1164
- output,
1165
- parsedBody,
1166
- errorCode,
1167
- });
1168
- }
1169
- };
1170
- const de_GetSolNetworkPackageDescriptorCommand = async (output, context) => {
1171
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1172
- return de_GetSolNetworkPackageDescriptorCommandError(output, context);
1173
- }
1174
- const contents = (0, smithy_client_1.map)({
1175
- $metadata: deserializeMetadata(output),
1176
- [_cT]: [, output.headers[_ct]],
1177
- });
1178
- const data = await (0, smithy_client_1.collectBody)(output.body, context);
1179
- contents.nsd = data;
1180
- return contents;
1181
- };
1182
- exports.de_GetSolNetworkPackageDescriptorCommand = de_GetSolNetworkPackageDescriptorCommand;
1183
- const de_GetSolNetworkPackageDescriptorCommandError = async (output, context) => {
1184
- const parsedOutput = {
1185
- ...output,
1186
- body: await parseErrorBody(output.body, context),
1187
- };
1188
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1189
- switch (errorCode) {
1190
- case "AccessDeniedException":
1191
- case "com.amazonaws.tnb#AccessDeniedException":
1192
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1193
- case "InternalServerException":
1194
- case "com.amazonaws.tnb#InternalServerException":
1195
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1196
- case "ResourceNotFoundException":
1197
- case "com.amazonaws.tnb#ResourceNotFoundException":
1198
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1199
- case "ThrottlingException":
1200
- case "com.amazonaws.tnb#ThrottlingException":
1201
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1202
- case "ValidationException":
1203
- case "com.amazonaws.tnb#ValidationException":
1204
- throw await de_ValidationExceptionRes(parsedOutput, context);
1205
- default:
1206
- const parsedBody = parsedOutput.body;
1207
- return throwDefaultError({
1208
- output,
1209
- parsedBody,
1210
- errorCode,
1211
- });
1212
- }
1213
- };
1214
- const de_InstantiateSolNetworkInstanceCommand = async (output, context) => {
1215
- if (output.statusCode !== 201 && output.statusCode >= 300) {
1216
- return de_InstantiateSolNetworkInstanceCommandError(output, context);
1217
- }
1218
- const contents = (0, smithy_client_1.map)({
1219
- $metadata: deserializeMetadata(output),
1220
- });
1221
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1222
- const doc = (0, smithy_client_1.take)(data, {
1223
- nsLcmOpOccId: smithy_client_1.expectString,
1224
- tags: smithy_client_1._json,
1225
- });
1226
- Object.assign(contents, doc);
1227
- return contents;
1228
- };
1229
- exports.de_InstantiateSolNetworkInstanceCommand = de_InstantiateSolNetworkInstanceCommand;
1230
- const de_InstantiateSolNetworkInstanceCommandError = async (output, context) => {
1231
- const parsedOutput = {
1232
- ...output,
1233
- body: await parseErrorBody(output.body, context),
1234
- };
1235
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1236
- switch (errorCode) {
1237
- case "AccessDeniedException":
1238
- case "com.amazonaws.tnb#AccessDeniedException":
1239
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1240
- case "InternalServerException":
1241
- case "com.amazonaws.tnb#InternalServerException":
1242
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1243
- case "ResourceNotFoundException":
1244
- case "com.amazonaws.tnb#ResourceNotFoundException":
1245
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1246
- case "ServiceQuotaExceededException":
1247
- case "com.amazonaws.tnb#ServiceQuotaExceededException":
1248
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1249
- case "ThrottlingException":
1250
- case "com.amazonaws.tnb#ThrottlingException":
1251
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1252
- case "ValidationException":
1253
- case "com.amazonaws.tnb#ValidationException":
1254
- throw await de_ValidationExceptionRes(parsedOutput, context);
1255
- default:
1256
- const parsedBody = parsedOutput.body;
1257
- return throwDefaultError({
1258
- output,
1259
- parsedBody,
1260
- errorCode,
1261
- });
1262
- }
1263
- };
1264
- const de_ListSolFunctionInstancesCommand = async (output, context) => {
1265
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1266
- return de_ListSolFunctionInstancesCommandError(output, context);
1267
- }
1268
- const contents = (0, smithy_client_1.map)({
1269
- $metadata: deserializeMetadata(output),
1270
- });
1271
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1272
- const doc = (0, smithy_client_1.take)(data, {
1273
- functionInstances: (_) => de_ListSolFunctionInstanceResources(_, context),
1274
- nextToken: smithy_client_1.expectString,
1275
- });
1276
- Object.assign(contents, doc);
1277
- return contents;
1278
- };
1279
- exports.de_ListSolFunctionInstancesCommand = de_ListSolFunctionInstancesCommand;
1280
- const de_ListSolFunctionInstancesCommandError = async (output, context) => {
1281
- const parsedOutput = {
1282
- ...output,
1283
- body: await parseErrorBody(output.body, context),
1284
- };
1285
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1286
- switch (errorCode) {
1287
- case "AccessDeniedException":
1288
- case "com.amazonaws.tnb#AccessDeniedException":
1289
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1290
- case "InternalServerException":
1291
- case "com.amazonaws.tnb#InternalServerException":
1292
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1293
- case "ThrottlingException":
1294
- case "com.amazonaws.tnb#ThrottlingException":
1295
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1296
- case "ValidationException":
1297
- case "com.amazonaws.tnb#ValidationException":
1298
- throw await de_ValidationExceptionRes(parsedOutput, context);
1299
- default:
1300
- const parsedBody = parsedOutput.body;
1301
- return throwDefaultError({
1302
- output,
1303
- parsedBody,
1304
- errorCode,
1305
- });
1306
- }
1307
- };
1308
- const de_ListSolFunctionPackagesCommand = async (output, context) => {
1309
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1310
- return de_ListSolFunctionPackagesCommandError(output, context);
1311
- }
1312
- const contents = (0, smithy_client_1.map)({
1313
- $metadata: deserializeMetadata(output),
1314
- });
1315
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1316
- const doc = (0, smithy_client_1.take)(data, {
1317
- functionPackages: (_) => de_ListSolFunctionPackageResources(_, context),
1318
- nextToken: smithy_client_1.expectString,
1319
- });
1320
- Object.assign(contents, doc);
1321
- return contents;
1322
- };
1323
- exports.de_ListSolFunctionPackagesCommand = de_ListSolFunctionPackagesCommand;
1324
- const de_ListSolFunctionPackagesCommandError = async (output, context) => {
1325
- const parsedOutput = {
1326
- ...output,
1327
- body: await parseErrorBody(output.body, context),
1328
- };
1329
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1330
- switch (errorCode) {
1331
- case "AccessDeniedException":
1332
- case "com.amazonaws.tnb#AccessDeniedException":
1333
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1334
- case "InternalServerException":
1335
- case "com.amazonaws.tnb#InternalServerException":
1336
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1337
- case "ThrottlingException":
1338
- case "com.amazonaws.tnb#ThrottlingException":
1339
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1340
- case "ValidationException":
1341
- case "com.amazonaws.tnb#ValidationException":
1342
- throw await de_ValidationExceptionRes(parsedOutput, context);
1343
- default:
1344
- const parsedBody = parsedOutput.body;
1345
- return throwDefaultError({
1346
- output,
1347
- parsedBody,
1348
- errorCode,
1349
- });
1350
- }
1351
- };
1352
- const de_ListSolNetworkInstancesCommand = async (output, context) => {
1353
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1354
- return de_ListSolNetworkInstancesCommandError(output, context);
1355
- }
1356
- const contents = (0, smithy_client_1.map)({
1357
- $metadata: deserializeMetadata(output),
1358
- });
1359
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1360
- const doc = (0, smithy_client_1.take)(data, {
1361
- networkInstances: (_) => de_ListSolNetworkInstanceResources(_, context),
1362
- nextToken: smithy_client_1.expectString,
1363
- });
1364
- Object.assign(contents, doc);
1365
- return contents;
1366
- };
1367
- exports.de_ListSolNetworkInstancesCommand = de_ListSolNetworkInstancesCommand;
1368
- const de_ListSolNetworkInstancesCommandError = async (output, context) => {
1369
- const parsedOutput = {
1370
- ...output,
1371
- body: await parseErrorBody(output.body, context),
1372
- };
1373
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1374
- switch (errorCode) {
1375
- case "AccessDeniedException":
1376
- case "com.amazonaws.tnb#AccessDeniedException":
1377
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1378
- case "InternalServerException":
1379
- case "com.amazonaws.tnb#InternalServerException":
1380
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1381
- case "ThrottlingException":
1382
- case "com.amazonaws.tnb#ThrottlingException":
1383
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1384
- case "ValidationException":
1385
- case "com.amazonaws.tnb#ValidationException":
1386
- throw await de_ValidationExceptionRes(parsedOutput, context);
1387
- default:
1388
- const parsedBody = parsedOutput.body;
1389
- return throwDefaultError({
1390
- output,
1391
- parsedBody,
1392
- errorCode,
1393
- });
1394
- }
1395
- };
1396
- const de_ListSolNetworkOperationsCommand = async (output, context) => {
1397
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1398
- return de_ListSolNetworkOperationsCommandError(output, context);
1399
- }
1400
- const contents = (0, smithy_client_1.map)({
1401
- $metadata: deserializeMetadata(output),
1402
- });
1403
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1404
- const doc = (0, smithy_client_1.take)(data, {
1405
- networkOperations: (_) => de_ListSolNetworkOperationsResources(_, context),
1406
- nextToken: smithy_client_1.expectString,
1407
- });
1408
- Object.assign(contents, doc);
1409
- return contents;
1410
- };
1411
- exports.de_ListSolNetworkOperationsCommand = de_ListSolNetworkOperationsCommand;
1412
- const de_ListSolNetworkOperationsCommandError = async (output, context) => {
1413
- const parsedOutput = {
1414
- ...output,
1415
- body: await parseErrorBody(output.body, context),
1416
- };
1417
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1418
- switch (errorCode) {
1419
- case "AccessDeniedException":
1420
- case "com.amazonaws.tnb#AccessDeniedException":
1421
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1422
- case "InternalServerException":
1423
- case "com.amazonaws.tnb#InternalServerException":
1424
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1425
- case "ThrottlingException":
1426
- case "com.amazonaws.tnb#ThrottlingException":
1427
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1428
- case "ValidationException":
1429
- case "com.amazonaws.tnb#ValidationException":
1430
- throw await de_ValidationExceptionRes(parsedOutput, context);
1431
- default:
1432
- const parsedBody = parsedOutput.body;
1433
- return throwDefaultError({
1434
- output,
1435
- parsedBody,
1436
- errorCode,
1437
- });
1438
- }
1439
- };
1440
- const de_ListSolNetworkPackagesCommand = async (output, context) => {
1441
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1442
- return de_ListSolNetworkPackagesCommandError(output, context);
1443
- }
1444
- const contents = (0, smithy_client_1.map)({
1445
- $metadata: deserializeMetadata(output),
1446
- });
1447
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1448
- const doc = (0, smithy_client_1.take)(data, {
1449
- networkPackages: (_) => de_ListSolNetworkPackageResources(_, context),
1450
- nextToken: smithy_client_1.expectString,
1451
- });
1452
- Object.assign(contents, doc);
1453
- return contents;
1454
- };
1455
- exports.de_ListSolNetworkPackagesCommand = de_ListSolNetworkPackagesCommand;
1456
- const de_ListSolNetworkPackagesCommandError = async (output, context) => {
1457
- const parsedOutput = {
1458
- ...output,
1459
- body: await parseErrorBody(output.body, context),
1460
- };
1461
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1462
- switch (errorCode) {
1463
- case "AccessDeniedException":
1464
- case "com.amazonaws.tnb#AccessDeniedException":
1465
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1466
- case "InternalServerException":
1467
- case "com.amazonaws.tnb#InternalServerException":
1468
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1469
- case "ThrottlingException":
1470
- case "com.amazonaws.tnb#ThrottlingException":
1471
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1472
- case "ValidationException":
1473
- case "com.amazonaws.tnb#ValidationException":
1474
- throw await de_ValidationExceptionRes(parsedOutput, context);
1475
- default:
1476
- const parsedBody = parsedOutput.body;
1477
- return throwDefaultError({
1478
- output,
1479
- parsedBody,
1480
- errorCode,
1481
- });
1482
- }
1483
- };
1484
- const de_ListTagsForResourceCommand = async (output, context) => {
1485
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1486
- return de_ListTagsForResourceCommandError(output, context);
1487
- }
1488
- const contents = (0, smithy_client_1.map)({
1489
- $metadata: deserializeMetadata(output),
1490
- });
1491
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1492
- const doc = (0, smithy_client_1.take)(data, {
1493
- tags: smithy_client_1._json,
1494
- });
1495
- Object.assign(contents, doc);
1496
- return contents;
1497
- };
1498
- exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
1499
- const de_ListTagsForResourceCommandError = async (output, context) => {
1500
- const parsedOutput = {
1501
- ...output,
1502
- body: await parseErrorBody(output.body, context),
1503
- };
1504
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1505
- switch (errorCode) {
1506
- case "AccessDeniedException":
1507
- case "com.amazonaws.tnb#AccessDeniedException":
1508
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1509
- case "InternalServerException":
1510
- case "com.amazonaws.tnb#InternalServerException":
1511
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1512
- case "ResourceNotFoundException":
1513
- case "com.amazonaws.tnb#ResourceNotFoundException":
1514
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1515
- case "ThrottlingException":
1516
- case "com.amazonaws.tnb#ThrottlingException":
1517
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1518
- case "ValidationException":
1519
- case "com.amazonaws.tnb#ValidationException":
1520
- throw await de_ValidationExceptionRes(parsedOutput, context);
1521
- default:
1522
- const parsedBody = parsedOutput.body;
1523
- return throwDefaultError({
1524
- output,
1525
- parsedBody,
1526
- errorCode,
1527
- });
1528
- }
1529
- };
1530
- const de_PutSolFunctionPackageContentCommand = async (output, context) => {
1531
- if (output.statusCode !== 202 && output.statusCode >= 300) {
1532
- return de_PutSolFunctionPackageContentCommandError(output, context);
1533
- }
1534
- const contents = (0, smithy_client_1.map)({
1535
- $metadata: deserializeMetadata(output),
1536
- });
1537
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1538
- const doc = (0, smithy_client_1.take)(data, {
1539
- id: smithy_client_1.expectString,
1540
- metadata: smithy_client_1._json,
1541
- vnfProductName: smithy_client_1.expectString,
1542
- vnfProvider: smithy_client_1.expectString,
1543
- vnfdId: smithy_client_1.expectString,
1544
- vnfdVersion: smithy_client_1.expectString,
1545
- });
1546
- Object.assign(contents, doc);
1547
- return contents;
1548
- };
1549
- exports.de_PutSolFunctionPackageContentCommand = de_PutSolFunctionPackageContentCommand;
1550
- const de_PutSolFunctionPackageContentCommandError = async (output, context) => {
1551
- const parsedOutput = {
1552
- ...output,
1553
- body: await parseErrorBody(output.body, context),
1554
- };
1555
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1556
- switch (errorCode) {
1557
- case "AccessDeniedException":
1558
- case "com.amazonaws.tnb#AccessDeniedException":
1559
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1560
- case "InternalServerException":
1561
- case "com.amazonaws.tnb#InternalServerException":
1562
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1563
- case "ResourceNotFoundException":
1564
- case "com.amazonaws.tnb#ResourceNotFoundException":
1565
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1566
- case "ThrottlingException":
1567
- case "com.amazonaws.tnb#ThrottlingException":
1568
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1569
- case "ValidationException":
1570
- case "com.amazonaws.tnb#ValidationException":
1571
- throw await de_ValidationExceptionRes(parsedOutput, context);
1572
- default:
1573
- const parsedBody = parsedOutput.body;
1574
- return throwDefaultError({
1575
- output,
1576
- parsedBody,
1577
- errorCode,
1578
- });
1579
- }
1580
- };
1581
- const de_PutSolNetworkPackageContentCommand = async (output, context) => {
1582
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1583
- return de_PutSolNetworkPackageContentCommandError(output, context);
1584
- }
1585
- const contents = (0, smithy_client_1.map)({
1586
- $metadata: deserializeMetadata(output),
1587
- });
1588
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1589
- const doc = (0, smithy_client_1.take)(data, {
1590
- arn: smithy_client_1.expectString,
1591
- id: smithy_client_1.expectString,
1592
- metadata: smithy_client_1._json,
1593
- nsdId: smithy_client_1.expectString,
1594
- nsdName: smithy_client_1.expectString,
1595
- nsdVersion: smithy_client_1.expectString,
1596
- vnfPkgIds: smithy_client_1._json,
1597
- });
1598
- Object.assign(contents, doc);
1599
- return contents;
1600
- };
1601
- exports.de_PutSolNetworkPackageContentCommand = de_PutSolNetworkPackageContentCommand;
1602
- const de_PutSolNetworkPackageContentCommandError = async (output, context) => {
1603
- const parsedOutput = {
1604
- ...output,
1605
- body: await parseErrorBody(output.body, context),
1606
- };
1607
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1608
- switch (errorCode) {
1609
- case "AccessDeniedException":
1610
- case "com.amazonaws.tnb#AccessDeniedException":
1611
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1612
- case "InternalServerException":
1613
- case "com.amazonaws.tnb#InternalServerException":
1614
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1615
- case "ResourceNotFoundException":
1616
- case "com.amazonaws.tnb#ResourceNotFoundException":
1617
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1618
- case "ThrottlingException":
1619
- case "com.amazonaws.tnb#ThrottlingException":
1620
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1621
- case "ValidationException":
1622
- case "com.amazonaws.tnb#ValidationException":
1623
- throw await de_ValidationExceptionRes(parsedOutput, context);
1624
- default:
1625
- const parsedBody = parsedOutput.body;
1626
- return throwDefaultError({
1627
- output,
1628
- parsedBody,
1629
- errorCode,
1630
- });
1631
- }
1632
- };
1633
- const de_TagResourceCommand = async (output, context) => {
1634
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1635
- return de_TagResourceCommandError(output, context);
1636
- }
1637
- const contents = (0, smithy_client_1.map)({
1638
- $metadata: deserializeMetadata(output),
1639
- });
1640
- await (0, smithy_client_1.collectBody)(output.body, context);
1641
- return contents;
1642
- };
1643
- exports.de_TagResourceCommand = de_TagResourceCommand;
1644
- const de_TagResourceCommandError = async (output, context) => {
1645
- const parsedOutput = {
1646
- ...output,
1647
- body: await parseErrorBody(output.body, context),
1648
- };
1649
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1650
- switch (errorCode) {
1651
- case "AccessDeniedException":
1652
- case "com.amazonaws.tnb#AccessDeniedException":
1653
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1654
- case "InternalServerException":
1655
- case "com.amazonaws.tnb#InternalServerException":
1656
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1657
- case "ResourceNotFoundException":
1658
- case "com.amazonaws.tnb#ResourceNotFoundException":
1659
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1660
- case "ThrottlingException":
1661
- case "com.amazonaws.tnb#ThrottlingException":
1662
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1663
- case "ValidationException":
1664
- case "com.amazonaws.tnb#ValidationException":
1665
- throw await de_ValidationExceptionRes(parsedOutput, context);
1666
- default:
1667
- const parsedBody = parsedOutput.body;
1668
- return throwDefaultError({
1669
- output,
1670
- parsedBody,
1671
- errorCode,
1672
- });
1673
- }
1674
- };
1675
- const de_TerminateSolNetworkInstanceCommand = async (output, context) => {
1676
- if (output.statusCode !== 201 && output.statusCode >= 300) {
1677
- return de_TerminateSolNetworkInstanceCommandError(output, context);
1678
- }
1679
- const contents = (0, smithy_client_1.map)({
1680
- $metadata: deserializeMetadata(output),
1681
- });
1682
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1683
- const doc = (0, smithy_client_1.take)(data, {
1684
- nsLcmOpOccId: smithy_client_1.expectString,
1685
- tags: smithy_client_1._json,
1686
- });
1687
- Object.assign(contents, doc);
1688
- return contents;
1689
- };
1690
- exports.de_TerminateSolNetworkInstanceCommand = de_TerminateSolNetworkInstanceCommand;
1691
- const de_TerminateSolNetworkInstanceCommandError = async (output, context) => {
1692
- const parsedOutput = {
1693
- ...output,
1694
- body: await parseErrorBody(output.body, context),
1695
- };
1696
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1697
- switch (errorCode) {
1698
- case "AccessDeniedException":
1699
- case "com.amazonaws.tnb#AccessDeniedException":
1700
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1701
- case "InternalServerException":
1702
- case "com.amazonaws.tnb#InternalServerException":
1703
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1704
- case "ResourceNotFoundException":
1705
- case "com.amazonaws.tnb#ResourceNotFoundException":
1706
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1707
- case "ServiceQuotaExceededException":
1708
- case "com.amazonaws.tnb#ServiceQuotaExceededException":
1709
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1710
- case "ThrottlingException":
1711
- case "com.amazonaws.tnb#ThrottlingException":
1712
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1713
- case "ValidationException":
1714
- case "com.amazonaws.tnb#ValidationException":
1715
- throw await de_ValidationExceptionRes(parsedOutput, context);
1716
- default:
1717
- const parsedBody = parsedOutput.body;
1718
- return throwDefaultError({
1719
- output,
1720
- parsedBody,
1721
- errorCode,
1722
- });
1723
- }
1724
- };
1725
- const de_UntagResourceCommand = async (output, context) => {
1726
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1727
- return de_UntagResourceCommandError(output, context);
1728
- }
1729
- const contents = (0, smithy_client_1.map)({
1730
- $metadata: deserializeMetadata(output),
1731
- });
1732
- await (0, smithy_client_1.collectBody)(output.body, context);
1733
- return contents;
1734
- };
1735
- exports.de_UntagResourceCommand = de_UntagResourceCommand;
1736
- const de_UntagResourceCommandError = async (output, context) => {
1737
- const parsedOutput = {
1738
- ...output,
1739
- body: await parseErrorBody(output.body, context),
1740
- };
1741
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1742
- switch (errorCode) {
1743
- case "AccessDeniedException":
1744
- case "com.amazonaws.tnb#AccessDeniedException":
1745
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1746
- case "InternalServerException":
1747
- case "com.amazonaws.tnb#InternalServerException":
1748
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1749
- case "ResourceNotFoundException":
1750
- case "com.amazonaws.tnb#ResourceNotFoundException":
1751
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1752
- case "ThrottlingException":
1753
- case "com.amazonaws.tnb#ThrottlingException":
1754
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1755
- case "ValidationException":
1756
- case "com.amazonaws.tnb#ValidationException":
1757
- throw await de_ValidationExceptionRes(parsedOutput, context);
1758
- default:
1759
- const parsedBody = parsedOutput.body;
1760
- return throwDefaultError({
1761
- output,
1762
- parsedBody,
1763
- errorCode,
1764
- });
1765
- }
1766
- };
1767
- const de_UpdateSolFunctionPackageCommand = async (output, context) => {
1768
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1769
- return de_UpdateSolFunctionPackageCommandError(output, context);
1770
- }
1771
- const contents = (0, smithy_client_1.map)({
1772
- $metadata: deserializeMetadata(output),
1773
- });
1774
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1775
- const doc = (0, smithy_client_1.take)(data, {
1776
- operationalState: smithy_client_1.expectString,
1777
- });
1778
- Object.assign(contents, doc);
1779
- return contents;
1780
- };
1781
- exports.de_UpdateSolFunctionPackageCommand = de_UpdateSolFunctionPackageCommand;
1782
- const de_UpdateSolFunctionPackageCommandError = async (output, context) => {
1783
- const parsedOutput = {
1784
- ...output,
1785
- body: await parseErrorBody(output.body, context),
1786
- };
1787
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1788
- switch (errorCode) {
1789
- case "AccessDeniedException":
1790
- case "com.amazonaws.tnb#AccessDeniedException":
1791
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1792
- case "InternalServerException":
1793
- case "com.amazonaws.tnb#InternalServerException":
1794
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1795
- case "ResourceNotFoundException":
1796
- case "com.amazonaws.tnb#ResourceNotFoundException":
1797
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1798
- case "ThrottlingException":
1799
- case "com.amazonaws.tnb#ThrottlingException":
1800
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1801
- case "ValidationException":
1802
- case "com.amazonaws.tnb#ValidationException":
1803
- throw await de_ValidationExceptionRes(parsedOutput, context);
1804
- default:
1805
- const parsedBody = parsedOutput.body;
1806
- return throwDefaultError({
1807
- output,
1808
- parsedBody,
1809
- errorCode,
1810
- });
1811
- }
1812
- };
1813
- const de_UpdateSolNetworkInstanceCommand = async (output, context) => {
1814
- if (output.statusCode !== 201 && output.statusCode >= 300) {
1815
- return de_UpdateSolNetworkInstanceCommandError(output, context);
1816
- }
1817
- const contents = (0, smithy_client_1.map)({
1818
- $metadata: deserializeMetadata(output),
1819
- });
1820
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1821
- const doc = (0, smithy_client_1.take)(data, {
1822
- nsLcmOpOccId: smithy_client_1.expectString,
1823
- tags: smithy_client_1._json,
1824
- });
1825
- Object.assign(contents, doc);
1826
- return contents;
1827
- };
1828
- exports.de_UpdateSolNetworkInstanceCommand = de_UpdateSolNetworkInstanceCommand;
1829
- const de_UpdateSolNetworkInstanceCommandError = async (output, context) => {
1830
- const parsedOutput = {
1831
- ...output,
1832
- body: await parseErrorBody(output.body, context),
1833
- };
1834
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1835
- switch (errorCode) {
1836
- case "AccessDeniedException":
1837
- case "com.amazonaws.tnb#AccessDeniedException":
1838
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1839
- case "InternalServerException":
1840
- case "com.amazonaws.tnb#InternalServerException":
1841
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1842
- case "ResourceNotFoundException":
1843
- case "com.amazonaws.tnb#ResourceNotFoundException":
1844
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1845
- case "ServiceQuotaExceededException":
1846
- case "com.amazonaws.tnb#ServiceQuotaExceededException":
1847
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1848
- case "ThrottlingException":
1849
- case "com.amazonaws.tnb#ThrottlingException":
1850
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1851
- case "ValidationException":
1852
- case "com.amazonaws.tnb#ValidationException":
1853
- throw await de_ValidationExceptionRes(parsedOutput, context);
1854
- default:
1855
- const parsedBody = parsedOutput.body;
1856
- return throwDefaultError({
1857
- output,
1858
- parsedBody,
1859
- errorCode,
1860
- });
1861
- }
1862
- };
1863
- const de_UpdateSolNetworkPackageCommand = async (output, context) => {
1864
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1865
- return de_UpdateSolNetworkPackageCommandError(output, context);
1866
- }
1867
- const contents = (0, smithy_client_1.map)({
1868
- $metadata: deserializeMetadata(output),
1869
- });
1870
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1871
- const doc = (0, smithy_client_1.take)(data, {
1872
- nsdOperationalState: smithy_client_1.expectString,
1873
- });
1874
- Object.assign(contents, doc);
1875
- return contents;
1876
- };
1877
- exports.de_UpdateSolNetworkPackageCommand = de_UpdateSolNetworkPackageCommand;
1878
- const de_UpdateSolNetworkPackageCommandError = async (output, context) => {
1879
- const parsedOutput = {
1880
- ...output,
1881
- body: await parseErrorBody(output.body, context),
1882
- };
1883
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1884
- switch (errorCode) {
1885
- case "AccessDeniedException":
1886
- case "com.amazonaws.tnb#AccessDeniedException":
1887
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1888
- case "InternalServerException":
1889
- case "com.amazonaws.tnb#InternalServerException":
1890
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1891
- case "ResourceNotFoundException":
1892
- case "com.amazonaws.tnb#ResourceNotFoundException":
1893
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1894
- case "ThrottlingException":
1895
- case "com.amazonaws.tnb#ThrottlingException":
1896
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1897
- case "ValidationException":
1898
- case "com.amazonaws.tnb#ValidationException":
1899
- throw await de_ValidationExceptionRes(parsedOutput, context);
1900
- default:
1901
- const parsedBody = parsedOutput.body;
1902
- return throwDefaultError({
1903
- output,
1904
- parsedBody,
1905
- errorCode,
1906
- });
1907
- }
1908
- };
1909
- const de_ValidateSolFunctionPackageContentCommand = async (output, context) => {
1910
- if (output.statusCode !== 202 && output.statusCode >= 300) {
1911
- return de_ValidateSolFunctionPackageContentCommandError(output, context);
1912
- }
1913
- const contents = (0, smithy_client_1.map)({
1914
- $metadata: deserializeMetadata(output),
1915
- });
1916
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1917
- const doc = (0, smithy_client_1.take)(data, {
1918
- id: smithy_client_1.expectString,
1919
- metadata: smithy_client_1._json,
1920
- vnfProductName: smithy_client_1.expectString,
1921
- vnfProvider: smithy_client_1.expectString,
1922
- vnfdId: smithy_client_1.expectString,
1923
- vnfdVersion: smithy_client_1.expectString,
1924
- });
1925
- Object.assign(contents, doc);
1926
- return contents;
1927
- };
1928
- exports.de_ValidateSolFunctionPackageContentCommand = de_ValidateSolFunctionPackageContentCommand;
1929
- const de_ValidateSolFunctionPackageContentCommandError = async (output, context) => {
1930
- const parsedOutput = {
1931
- ...output,
1932
- body: await parseErrorBody(output.body, context),
1933
- };
1934
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1935
- switch (errorCode) {
1936
- case "AccessDeniedException":
1937
- case "com.amazonaws.tnb#AccessDeniedException":
1938
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1939
- case "InternalServerException":
1940
- case "com.amazonaws.tnb#InternalServerException":
1941
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1942
- case "ResourceNotFoundException":
1943
- case "com.amazonaws.tnb#ResourceNotFoundException":
1944
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1945
- case "ThrottlingException":
1946
- case "com.amazonaws.tnb#ThrottlingException":
1947
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1948
- case "ValidationException":
1949
- case "com.amazonaws.tnb#ValidationException":
1950
- throw await de_ValidationExceptionRes(parsedOutput, context);
1951
- default:
1952
- const parsedBody = parsedOutput.body;
1953
- return throwDefaultError({
1954
- output,
1955
- parsedBody,
1956
- errorCode,
1957
- });
1958
- }
1959
- };
1960
- const de_ValidateSolNetworkPackageContentCommand = async (output, context) => {
1961
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1962
- return de_ValidateSolNetworkPackageContentCommandError(output, context);
1963
- }
1964
- const contents = (0, smithy_client_1.map)({
1965
- $metadata: deserializeMetadata(output),
1966
- });
1967
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1968
- const doc = (0, smithy_client_1.take)(data, {
1969
- arn: smithy_client_1.expectString,
1970
- id: smithy_client_1.expectString,
1971
- metadata: smithy_client_1._json,
1972
- nsdId: smithy_client_1.expectString,
1973
- nsdName: smithy_client_1.expectString,
1974
- nsdVersion: smithy_client_1.expectString,
1975
- vnfPkgIds: smithy_client_1._json,
1976
- });
1977
- Object.assign(contents, doc);
1978
- return contents;
1979
- };
1980
- exports.de_ValidateSolNetworkPackageContentCommand = de_ValidateSolNetworkPackageContentCommand;
1981
- const de_ValidateSolNetworkPackageContentCommandError = async (output, context) => {
1982
- const parsedOutput = {
1983
- ...output,
1984
- body: await parseErrorBody(output.body, context),
1985
- };
1986
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1987
- switch (errorCode) {
1988
- case "AccessDeniedException":
1989
- case "com.amazonaws.tnb#AccessDeniedException":
1990
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1991
- case "InternalServerException":
1992
- case "com.amazonaws.tnb#InternalServerException":
1993
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1994
- case "ResourceNotFoundException":
1995
- case "com.amazonaws.tnb#ResourceNotFoundException":
1996
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1997
- case "ThrottlingException":
1998
- case "com.amazonaws.tnb#ThrottlingException":
1999
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2000
- case "ValidationException":
2001
- case "com.amazonaws.tnb#ValidationException":
2002
- throw await de_ValidationExceptionRes(parsedOutput, context);
2003
- default:
2004
- const parsedBody = parsedOutput.body;
2005
- return throwDefaultError({
2006
- output,
2007
- parsedBody,
2008
- errorCode,
2009
- });
2010
- }
2011
- };
2012
- const throwDefaultError = (0, smithy_client_1.withBaseException)(TnbServiceException_1.TnbServiceException);
2013
- const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
2014
- const contents = (0, smithy_client_1.map)({});
2015
- const data = parsedOutput.body;
2016
- const doc = (0, smithy_client_1.take)(data, {
2017
- message: smithy_client_1.expectString,
2018
- });
2019
- Object.assign(contents, doc);
2020
- const exception = new models_0_1.AccessDeniedException({
2021
- $metadata: deserializeMetadata(parsedOutput),
2022
- ...contents,
2023
- });
2024
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2025
- };
2026
- const de_InternalServerExceptionRes = async (parsedOutput, context) => {
2027
- const contents = (0, smithy_client_1.map)({});
2028
- const data = parsedOutput.body;
2029
- const doc = (0, smithy_client_1.take)(data, {
2030
- message: smithy_client_1.expectString,
2031
- });
2032
- Object.assign(contents, doc);
2033
- const exception = new models_0_1.InternalServerException({
2034
- $metadata: deserializeMetadata(parsedOutput),
2035
- ...contents,
2036
- });
2037
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2038
- };
2039
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
2040
- const contents = (0, smithy_client_1.map)({});
2041
- const data = parsedOutput.body;
2042
- const doc = (0, smithy_client_1.take)(data, {
2043
- message: smithy_client_1.expectString,
2044
- });
2045
- Object.assign(contents, doc);
2046
- const exception = new models_0_1.ResourceNotFoundException({
2047
- $metadata: deserializeMetadata(parsedOutput),
2048
- ...contents,
2049
- });
2050
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2051
- };
2052
- const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
2053
- const contents = (0, smithy_client_1.map)({});
2054
- const data = parsedOutput.body;
2055
- const doc = (0, smithy_client_1.take)(data, {
2056
- message: smithy_client_1.expectString,
2057
- });
2058
- Object.assign(contents, doc);
2059
- const exception = new models_0_1.ServiceQuotaExceededException({
2060
- $metadata: deserializeMetadata(parsedOutput),
2061
- ...contents,
2062
- });
2063
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2064
- };
2065
- const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
2066
- const contents = (0, smithy_client_1.map)({});
2067
- const data = parsedOutput.body;
2068
- const doc = (0, smithy_client_1.take)(data, {
2069
- message: smithy_client_1.expectString,
2070
- });
2071
- Object.assign(contents, doc);
2072
- const exception = new models_0_1.ThrottlingException({
2073
- $metadata: deserializeMetadata(parsedOutput),
2074
- ...contents,
2075
- });
2076
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2077
- };
2078
- const de_ValidationExceptionRes = async (parsedOutput, context) => {
2079
- const contents = (0, smithy_client_1.map)({});
2080
- const data = parsedOutput.body;
2081
- const doc = (0, smithy_client_1.take)(data, {
2082
- message: smithy_client_1.expectString,
2083
- });
2084
- Object.assign(contents, doc);
2085
- const exception = new models_0_1.ValidationException({
2086
- $metadata: deserializeMetadata(parsedOutput),
2087
- ...contents,
2088
- });
2089
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2090
- };
2091
- const se_UpdateSolNetworkModify = (input, context) => {
2092
- return (0, smithy_client_1.take)(input, {
2093
- vnfConfigurableProperties: (_) => se_Document(_, context),
2094
- vnfInstanceId: [],
2095
- });
2096
- };
2097
- const se_Document = (input, context) => {
2098
- return input;
2099
- };
2100
- const de_GetSolFunctionInstanceMetadata = (output, context) => {
2101
- return (0, smithy_client_1.take)(output, {
2102
- createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2103
- lastModified: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2104
- });
2105
- };
2106
- const de_GetSolFunctionPackageMetadata = (output, context) => {
2107
- return (0, smithy_client_1.take)(output, {
2108
- createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2109
- lastModified: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2110
- vnfd: smithy_client_1._json,
2111
- });
2112
- };
2113
- const de_GetSolNetworkInstanceMetadata = (output, context) => {
2114
- return (0, smithy_client_1.take)(output, {
2115
- createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2116
- lastModified: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2117
- });
2118
- };
2119
- const de_GetSolNetworkOperationMetadata = (output, context) => {
2120
- return (0, smithy_client_1.take)(output, {
2121
- createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2122
- lastModified: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2123
- });
2124
- };
2125
- const de_GetSolNetworkOperationTaskDetails = (output, context) => {
2126
- return (0, smithy_client_1.take)(output, {
2127
- taskContext: smithy_client_1._json,
2128
- taskEndTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2129
- taskErrorDetails: smithy_client_1._json,
2130
- taskName: smithy_client_1.expectString,
2131
- taskStartTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2132
- taskStatus: smithy_client_1.expectString,
2133
- });
2134
- };
2135
- const de_GetSolNetworkOperationTasksList = (output, context) => {
2136
- const retVal = (output || [])
2137
- .filter((e) => e != null)
2138
- .map((entry) => {
2139
- return de_GetSolNetworkOperationTaskDetails(entry, context);
2140
- });
2141
- return retVal;
2142
- };
2143
- const de_GetSolNetworkPackageMetadata = (output, context) => {
2144
- return (0, smithy_client_1.take)(output, {
2145
- createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2146
- lastModified: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2147
- nsd: smithy_client_1._json,
2148
- });
2149
- };
2150
- const de_ListSolFunctionInstanceInfo = (output, context) => {
2151
- return (0, smithy_client_1.take)(output, {
2152
- arn: smithy_client_1.expectString,
2153
- id: smithy_client_1.expectString,
2154
- instantiatedVnfInfo: smithy_client_1._json,
2155
- instantiationState: smithy_client_1.expectString,
2156
- metadata: (_) => de_ListSolFunctionInstanceMetadata(_, context),
2157
- nsInstanceId: smithy_client_1.expectString,
2158
- vnfPkgId: smithy_client_1.expectString,
2159
- vnfPkgName: smithy_client_1.expectString,
2160
- });
2161
- };
2162
- const de_ListSolFunctionInstanceMetadata = (output, context) => {
2163
- return (0, smithy_client_1.take)(output, {
2164
- createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2165
- lastModified: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2166
- });
2167
- };
2168
- const de_ListSolFunctionInstanceResources = (output, context) => {
2169
- const retVal = (output || [])
2170
- .filter((e) => e != null)
2171
- .map((entry) => {
2172
- return de_ListSolFunctionInstanceInfo(entry, context);
2173
- });
2174
- return retVal;
2175
- };
2176
- const de_ListSolFunctionPackageInfo = (output, context) => {
2177
- return (0, smithy_client_1.take)(output, {
2178
- arn: smithy_client_1.expectString,
2179
- id: smithy_client_1.expectString,
2180
- metadata: (_) => de_ListSolFunctionPackageMetadata(_, context),
2181
- onboardingState: smithy_client_1.expectString,
2182
- operationalState: smithy_client_1.expectString,
2183
- usageState: smithy_client_1.expectString,
2184
- vnfProductName: smithy_client_1.expectString,
2185
- vnfProvider: smithy_client_1.expectString,
2186
- vnfdId: smithy_client_1.expectString,
2187
- vnfdVersion: smithy_client_1.expectString,
2188
- });
2189
- };
2190
- const de_ListSolFunctionPackageMetadata = (output, context) => {
2191
- return (0, smithy_client_1.take)(output, {
2192
- createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2193
- lastModified: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2194
- });
2195
- };
2196
- const de_ListSolFunctionPackageResources = (output, context) => {
2197
- const retVal = (output || [])
2198
- .filter((e) => e != null)
2199
- .map((entry) => {
2200
- return de_ListSolFunctionPackageInfo(entry, context);
2201
- });
2202
- return retVal;
2203
- };
2204
- const de_ListSolNetworkInstanceInfo = (output, context) => {
2205
- return (0, smithy_client_1.take)(output, {
2206
- arn: smithy_client_1.expectString,
2207
- id: smithy_client_1.expectString,
2208
- metadata: (_) => de_ListSolNetworkInstanceMetadata(_, context),
2209
- nsInstanceDescription: smithy_client_1.expectString,
2210
- nsInstanceName: smithy_client_1.expectString,
2211
- nsState: smithy_client_1.expectString,
2212
- nsdId: smithy_client_1.expectString,
2213
- nsdInfoId: smithy_client_1.expectString,
2214
- });
2215
- };
2216
- const de_ListSolNetworkInstanceMetadata = (output, context) => {
2217
- return (0, smithy_client_1.take)(output, {
2218
- createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2219
- lastModified: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2220
- });
2221
- };
2222
- const de_ListSolNetworkInstanceResources = (output, context) => {
2223
- const retVal = (output || [])
2224
- .filter((e) => e != null)
2225
- .map((entry) => {
2226
- return de_ListSolNetworkInstanceInfo(entry, context);
2227
- });
2228
- return retVal;
2229
- };
2230
- const de_ListSolNetworkOperationsInfo = (output, context) => {
2231
- return (0, smithy_client_1.take)(output, {
2232
- arn: smithy_client_1.expectString,
2233
- error: smithy_client_1._json,
2234
- id: smithy_client_1.expectString,
2235
- lcmOperationType: smithy_client_1.expectString,
2236
- metadata: (_) => de_ListSolNetworkOperationsMetadata(_, context),
2237
- nsInstanceId: smithy_client_1.expectString,
2238
- operationState: smithy_client_1.expectString,
2239
- });
2240
- };
2241
- const de_ListSolNetworkOperationsMetadata = (output, context) => {
2242
- return (0, smithy_client_1.take)(output, {
2243
- createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2244
- lastModified: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2245
- });
2246
- };
2247
- const de_ListSolNetworkOperationsResources = (output, context) => {
2248
- const retVal = (output || [])
2249
- .filter((e) => e != null)
2250
- .map((entry) => {
2251
- return de_ListSolNetworkOperationsInfo(entry, context);
2252
- });
2253
- return retVal;
2254
- };
2255
- const de_ListSolNetworkPackageInfo = (output, context) => {
2256
- return (0, smithy_client_1.take)(output, {
2257
- arn: smithy_client_1.expectString,
2258
- id: smithy_client_1.expectString,
2259
- metadata: (_) => de_ListSolNetworkPackageMetadata(_, context),
2260
- nsdDesigner: smithy_client_1.expectString,
2261
- nsdId: smithy_client_1.expectString,
2262
- nsdInvariantId: smithy_client_1.expectString,
2263
- nsdName: smithy_client_1.expectString,
2264
- nsdOnboardingState: smithy_client_1.expectString,
2265
- nsdOperationalState: smithy_client_1.expectString,
2266
- nsdUsageState: smithy_client_1.expectString,
2267
- nsdVersion: smithy_client_1.expectString,
2268
- vnfPkgIds: smithy_client_1._json,
2269
- });
2270
- };
2271
- const de_ListSolNetworkPackageMetadata = (output, context) => {
2272
- return (0, smithy_client_1.take)(output, {
2273
- createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2274
- lastModified: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2275
- });
2276
- };
2277
- const de_ListSolNetworkPackageResources = (output, context) => {
2278
- const retVal = (output || [])
2279
- .filter((e) => e != null)
2280
- .map((entry) => {
2281
- return de_ListSolNetworkPackageInfo(entry, context);
2282
- });
2283
- return retVal;
2284
- };
2285
- const deserializeMetadata = (output) => ({
2286
- httpStatusCode: output.statusCode,
2287
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
2288
- extendedRequestId: output.headers["x-amz-id-2"],
2289
- cfId: output.headers["x-amz-cf-id"],
2290
- });
2291
- const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
2292
- const isSerializableHeaderValue = (value) => value !== undefined &&
2293
- value !== null &&
2294
- value !== "" &&
2295
- (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
2296
- (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
2297
- const _a = "accept";
2298
- const _cT = "contentType";
2299
- const _ct = "content-type";
2300
- const _dR = "dryRun";
2301
- const _dr = "dry_run";
2302
- const _mR = "maxResults";
2303
- const _mr = "max_results";
2304
- const _nT = "nextToken";
2305
- const _nom = "nextpage_opaque_marker";
2306
- const _tK = "tagKeys";
2307
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2308
- if (encoded.length) {
2309
- return JSON.parse(encoded);
2310
- }
2311
- return {};
2312
- });
2313
- const parseErrorBody = async (errorBody, context) => {
2314
- const value = await parseBody(errorBody, context);
2315
- value.message = value.message ?? value.Message;
2316
- return value;
2317
- };
2318
- const loadRestJsonErrorCode = (output, data) => {
2319
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
2320
- const sanitizeErrorCode = (rawValue) => {
2321
- let cleanValue = rawValue;
2322
- if (typeof cleanValue === "number") {
2323
- cleanValue = cleanValue.toString();
2324
- }
2325
- if (cleanValue.indexOf(",") >= 0) {
2326
- cleanValue = cleanValue.split(",")[0];
2327
- }
2328
- if (cleanValue.indexOf(":") >= 0) {
2329
- cleanValue = cleanValue.split(":")[0];
2330
- }
2331
- if (cleanValue.indexOf("#") >= 0) {
2332
- cleanValue = cleanValue.split("#")[1];
2333
- }
2334
- return cleanValue;
2335
- };
2336
- const headerKey = findKey(output.headers, "x-amzn-errortype");
2337
- if (headerKey !== undefined) {
2338
- return sanitizeErrorCode(output.headers[headerKey]);
2339
- }
2340
- if (data.code !== undefined) {
2341
- return sanitizeErrorCode(data.code);
2342
- }
2343
- if (data["__type"] !== undefined) {
2344
- return sanitizeErrorCode(data["__type"]);
2345
- }
2346
- };
1
+ module.exports = require("../index.js");