@aws-sdk/client-savingsplans 3.310.0 → 3.315.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.
- package/dist-cjs/protocols/Aws_restJson1.js +131 -530
- package/dist-es/protocols/Aws_restJson1.js +119 -518
- package/package.json +6 -6
|
@@ -13,14 +13,14 @@ const se_CreateSavingsPlanCommand = async (input, context) => {
|
|
|
13
13
|
};
|
|
14
14
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/CreateSavingsPlan";
|
|
15
15
|
let body;
|
|
16
|
-
body = JSON.stringify({
|
|
17
|
-
clientToken:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
});
|
|
16
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
17
|
+
clientToken: (_) => _ ?? (0, uuid_1.v4)(),
|
|
18
|
+
commitment: [],
|
|
19
|
+
purchaseTime: (_) => Math.round(_.getTime() / 1000),
|
|
20
|
+
savingsPlanOfferingId: [],
|
|
21
|
+
tags: (_) => (0, smithy_client_1._json)(_),
|
|
22
|
+
upfrontPaymentAmount: [],
|
|
23
|
+
}));
|
|
24
24
|
return new protocol_http_1.HttpRequest({
|
|
25
25
|
protocol,
|
|
26
26
|
hostname,
|
|
@@ -39,9 +39,9 @@ const se_DeleteQueuedSavingsPlanCommand = async (input, context) => {
|
|
|
39
39
|
};
|
|
40
40
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeleteQueuedSavingsPlan";
|
|
41
41
|
let body;
|
|
42
|
-
body = JSON.stringify({
|
|
43
|
-
|
|
44
|
-
});
|
|
42
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
43
|
+
savingsPlanId: [],
|
|
44
|
+
}));
|
|
45
45
|
return new protocol_http_1.HttpRequest({
|
|
46
46
|
protocol,
|
|
47
47
|
hostname,
|
|
@@ -60,12 +60,12 @@ const se_DescribeSavingsPlanRatesCommand = async (input, context) => {
|
|
|
60
60
|
};
|
|
61
61
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DescribeSavingsPlanRates";
|
|
62
62
|
let body;
|
|
63
|
-
body = JSON.stringify({
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
});
|
|
63
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
64
|
+
filters: (_) => (0, smithy_client_1._json)(_),
|
|
65
|
+
maxResults: [],
|
|
66
|
+
nextToken: [],
|
|
67
|
+
savingsPlanId: [],
|
|
68
|
+
}));
|
|
69
69
|
return new protocol_http_1.HttpRequest({
|
|
70
70
|
protocol,
|
|
71
71
|
hostname,
|
|
@@ -84,14 +84,14 @@ const se_DescribeSavingsPlansCommand = async (input, context) => {
|
|
|
84
84
|
};
|
|
85
85
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DescribeSavingsPlans";
|
|
86
86
|
let body;
|
|
87
|
-
body = JSON.stringify({
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
});
|
|
87
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
88
|
+
filters: (_) => (0, smithy_client_1._json)(_),
|
|
89
|
+
maxResults: [],
|
|
90
|
+
nextToken: [],
|
|
91
|
+
savingsPlanArns: (_) => (0, smithy_client_1._json)(_),
|
|
92
|
+
savingsPlanIds: (_) => (0, smithy_client_1._json)(_),
|
|
93
|
+
states: (_) => (0, smithy_client_1._json)(_),
|
|
94
|
+
}));
|
|
95
95
|
return new protocol_http_1.HttpRequest({
|
|
96
96
|
protocol,
|
|
97
97
|
hostname,
|
|
@@ -110,24 +110,18 @@ const se_DescribeSavingsPlansOfferingRatesCommand = async (input, context) => {
|
|
|
110
110
|
};
|
|
111
111
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DescribeSavingsPlansOfferingRates";
|
|
112
112
|
let body;
|
|
113
|
-
body = JSON.stringify({
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
...(input.savingsPlanTypes != null && {
|
|
126
|
-
savingsPlanTypes: se_SavingsPlanTypeList(input.savingsPlanTypes, context),
|
|
127
|
-
}),
|
|
128
|
-
...(input.serviceCodes != null && { serviceCodes: se_SavingsPlanRateServiceCodeList(input.serviceCodes, context) }),
|
|
129
|
-
...(input.usageTypes != null && { usageTypes: se_SavingsPlanRateUsageTypeList(input.usageTypes, context) }),
|
|
130
|
-
});
|
|
113
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
114
|
+
filters: (_) => (0, smithy_client_1._json)(_),
|
|
115
|
+
maxResults: [],
|
|
116
|
+
nextToken: [],
|
|
117
|
+
operations: (_) => (0, smithy_client_1._json)(_),
|
|
118
|
+
products: (_) => (0, smithy_client_1._json)(_),
|
|
119
|
+
savingsPlanOfferingIds: (_) => (0, smithy_client_1._json)(_),
|
|
120
|
+
savingsPlanPaymentOptions: (_) => (0, smithy_client_1._json)(_),
|
|
121
|
+
savingsPlanTypes: (_) => (0, smithy_client_1._json)(_),
|
|
122
|
+
serviceCodes: (_) => (0, smithy_client_1._json)(_),
|
|
123
|
+
usageTypes: (_) => (0, smithy_client_1._json)(_),
|
|
124
|
+
}));
|
|
131
125
|
return new protocol_http_1.HttpRequest({
|
|
132
126
|
protocol,
|
|
133
127
|
hostname,
|
|
@@ -146,23 +140,21 @@ const se_DescribeSavingsPlansOfferingsCommand = async (input, context) => {
|
|
|
146
140
|
};
|
|
147
141
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DescribeSavingsPlansOfferings";
|
|
148
142
|
let body;
|
|
149
|
-
body = JSON.stringify({
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
...(input.usageTypes != null && { usageTypes: se_SavingsPlanUsageTypeList(input.usageTypes, context) }),
|
|
165
|
-
});
|
|
143
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
144
|
+
currencies: (_) => (0, smithy_client_1._json)(_),
|
|
145
|
+
descriptions: (_) => (0, smithy_client_1._json)(_),
|
|
146
|
+
durations: (_) => (0, smithy_client_1._json)(_),
|
|
147
|
+
filters: (_) => (0, smithy_client_1._json)(_),
|
|
148
|
+
maxResults: [],
|
|
149
|
+
nextToken: [],
|
|
150
|
+
offeringIds: (_) => (0, smithy_client_1._json)(_),
|
|
151
|
+
operations: (_) => (0, smithy_client_1._json)(_),
|
|
152
|
+
paymentOptions: (_) => (0, smithy_client_1._json)(_),
|
|
153
|
+
planTypes: (_) => (0, smithy_client_1._json)(_),
|
|
154
|
+
productType: [],
|
|
155
|
+
serviceCodes: (_) => (0, smithy_client_1._json)(_),
|
|
156
|
+
usageTypes: (_) => (0, smithy_client_1._json)(_),
|
|
157
|
+
}));
|
|
166
158
|
return new protocol_http_1.HttpRequest({
|
|
167
159
|
protocol,
|
|
168
160
|
hostname,
|
|
@@ -181,9 +173,9 @@ const se_ListTagsForResourceCommand = async (input, context) => {
|
|
|
181
173
|
};
|
|
182
174
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListTagsForResource";
|
|
183
175
|
let body;
|
|
184
|
-
body = JSON.stringify({
|
|
185
|
-
|
|
186
|
-
});
|
|
176
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
177
|
+
resourceArn: [],
|
|
178
|
+
}));
|
|
187
179
|
return new protocol_http_1.HttpRequest({
|
|
188
180
|
protocol,
|
|
189
181
|
hostname,
|
|
@@ -202,10 +194,10 @@ const se_TagResourceCommand = async (input, context) => {
|
|
|
202
194
|
};
|
|
203
195
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/TagResource";
|
|
204
196
|
let body;
|
|
205
|
-
body = JSON.stringify({
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
});
|
|
197
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
198
|
+
resourceArn: [],
|
|
199
|
+
tags: (_) => (0, smithy_client_1._json)(_),
|
|
200
|
+
}));
|
|
209
201
|
return new protocol_http_1.HttpRequest({
|
|
210
202
|
protocol,
|
|
211
203
|
hostname,
|
|
@@ -224,10 +216,10 @@ const se_UntagResourceCommand = async (input, context) => {
|
|
|
224
216
|
};
|
|
225
217
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/UntagResource";
|
|
226
218
|
let body;
|
|
227
|
-
body = JSON.stringify({
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
});
|
|
219
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
220
|
+
resourceArn: [],
|
|
221
|
+
tagKeys: (_) => (0, smithy_client_1._json)(_),
|
|
222
|
+
}));
|
|
231
223
|
return new protocol_http_1.HttpRequest({
|
|
232
224
|
protocol,
|
|
233
225
|
hostname,
|
|
@@ -243,13 +235,14 @@ const de_CreateSavingsPlanCommand = async (output, context) => {
|
|
|
243
235
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
244
236
|
return de_CreateSavingsPlanCommandError(output, context);
|
|
245
237
|
}
|
|
246
|
-
const contents = map({
|
|
238
|
+
const contents = (0, smithy_client_1.map)({
|
|
247
239
|
$metadata: deserializeMetadata(output),
|
|
248
240
|
});
|
|
249
241
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
}
|
|
242
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
243
|
+
savingsPlanId: smithy_client_1.expectString,
|
|
244
|
+
});
|
|
245
|
+
Object.assign(contents, doc);
|
|
253
246
|
return contents;
|
|
254
247
|
};
|
|
255
248
|
exports.de_CreateSavingsPlanCommand = de_CreateSavingsPlanCommand;
|
|
@@ -274,10 +267,9 @@ const de_CreateSavingsPlanCommandError = async (output, context) => {
|
|
|
274
267
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
275
268
|
default:
|
|
276
269
|
const parsedBody = parsedOutput.body;
|
|
277
|
-
|
|
270
|
+
return throwDefaultError({
|
|
278
271
|
output,
|
|
279
272
|
parsedBody,
|
|
280
|
-
exceptionCtor: SavingsplansServiceException_1.SavingsplansServiceException,
|
|
281
273
|
errorCode,
|
|
282
274
|
});
|
|
283
275
|
}
|
|
@@ -286,7 +278,7 @@ const de_DeleteQueuedSavingsPlanCommand = async (output, context) => {
|
|
|
286
278
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
287
279
|
return de_DeleteQueuedSavingsPlanCommandError(output, context);
|
|
288
280
|
}
|
|
289
|
-
const contents = map({
|
|
281
|
+
const contents = (0, smithy_client_1.map)({
|
|
290
282
|
$metadata: deserializeMetadata(output),
|
|
291
283
|
});
|
|
292
284
|
await collectBody(output.body, context);
|
|
@@ -314,10 +306,9 @@ const de_DeleteQueuedSavingsPlanCommandError = async (output, context) => {
|
|
|
314
306
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
315
307
|
default:
|
|
316
308
|
const parsedBody = parsedOutput.body;
|
|
317
|
-
|
|
309
|
+
return throwDefaultError({
|
|
318
310
|
output,
|
|
319
311
|
parsedBody,
|
|
320
|
-
exceptionCtor: SavingsplansServiceException_1.SavingsplansServiceException,
|
|
321
312
|
errorCode,
|
|
322
313
|
});
|
|
323
314
|
}
|
|
@@ -326,19 +317,16 @@ const de_DescribeSavingsPlanRatesCommand = async (output, context) => {
|
|
|
326
317
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
327
318
|
return de_DescribeSavingsPlanRatesCommandError(output, context);
|
|
328
319
|
}
|
|
329
|
-
const contents = map({
|
|
320
|
+
const contents = (0, smithy_client_1.map)({
|
|
330
321
|
$metadata: deserializeMetadata(output),
|
|
331
322
|
});
|
|
332
323
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
if (data.searchResults != null) {
|
|
340
|
-
contents.searchResults = de_SavingsPlanRateList(data.searchResults, context);
|
|
341
|
-
}
|
|
324
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
325
|
+
nextToken: smithy_client_1.expectString,
|
|
326
|
+
savingsPlanId: smithy_client_1.expectString,
|
|
327
|
+
searchResults: smithy_client_1._json,
|
|
328
|
+
});
|
|
329
|
+
Object.assign(contents, doc);
|
|
342
330
|
return contents;
|
|
343
331
|
};
|
|
344
332
|
exports.de_DescribeSavingsPlanRatesCommand = de_DescribeSavingsPlanRatesCommand;
|
|
@@ -357,10 +345,9 @@ const de_DescribeSavingsPlanRatesCommandError = async (output, context) => {
|
|
|
357
345
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
358
346
|
default:
|
|
359
347
|
const parsedBody = parsedOutput.body;
|
|
360
|
-
|
|
348
|
+
return throwDefaultError({
|
|
361
349
|
output,
|
|
362
350
|
parsedBody,
|
|
363
|
-
exceptionCtor: SavingsplansServiceException_1.SavingsplansServiceException,
|
|
364
351
|
errorCode,
|
|
365
352
|
});
|
|
366
353
|
}
|
|
@@ -369,16 +356,15 @@ const de_DescribeSavingsPlansCommand = async (output, context) => {
|
|
|
369
356
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
370
357
|
return de_DescribeSavingsPlansCommandError(output, context);
|
|
371
358
|
}
|
|
372
|
-
const contents = map({
|
|
359
|
+
const contents = (0, smithy_client_1.map)({
|
|
373
360
|
$metadata: deserializeMetadata(output),
|
|
374
361
|
});
|
|
375
362
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
}
|
|
363
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
364
|
+
nextToken: smithy_client_1.expectString,
|
|
365
|
+
savingsPlans: smithy_client_1._json,
|
|
366
|
+
});
|
|
367
|
+
Object.assign(contents, doc);
|
|
382
368
|
return contents;
|
|
383
369
|
};
|
|
384
370
|
exports.de_DescribeSavingsPlansCommand = de_DescribeSavingsPlansCommand;
|
|
@@ -397,10 +383,9 @@ const de_DescribeSavingsPlansCommandError = async (output, context) => {
|
|
|
397
383
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
398
384
|
default:
|
|
399
385
|
const parsedBody = parsedOutput.body;
|
|
400
|
-
|
|
386
|
+
return throwDefaultError({
|
|
401
387
|
output,
|
|
402
388
|
parsedBody,
|
|
403
|
-
exceptionCtor: SavingsplansServiceException_1.SavingsplansServiceException,
|
|
404
389
|
errorCode,
|
|
405
390
|
});
|
|
406
391
|
}
|
|
@@ -409,16 +394,15 @@ const de_DescribeSavingsPlansOfferingRatesCommand = async (output, context) => {
|
|
|
409
394
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
410
395
|
return de_DescribeSavingsPlansOfferingRatesCommandError(output, context);
|
|
411
396
|
}
|
|
412
|
-
const contents = map({
|
|
397
|
+
const contents = (0, smithy_client_1.map)({
|
|
413
398
|
$metadata: deserializeMetadata(output),
|
|
414
399
|
});
|
|
415
400
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
}
|
|
401
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
402
|
+
nextToken: smithy_client_1.expectString,
|
|
403
|
+
searchResults: smithy_client_1._json,
|
|
404
|
+
});
|
|
405
|
+
Object.assign(contents, doc);
|
|
422
406
|
return contents;
|
|
423
407
|
};
|
|
424
408
|
exports.de_DescribeSavingsPlansOfferingRatesCommand = de_DescribeSavingsPlansOfferingRatesCommand;
|
|
@@ -437,10 +421,9 @@ const de_DescribeSavingsPlansOfferingRatesCommandError = async (output, context)
|
|
|
437
421
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
438
422
|
default:
|
|
439
423
|
const parsedBody = parsedOutput.body;
|
|
440
|
-
|
|
424
|
+
return throwDefaultError({
|
|
441
425
|
output,
|
|
442
426
|
parsedBody,
|
|
443
|
-
exceptionCtor: SavingsplansServiceException_1.SavingsplansServiceException,
|
|
444
427
|
errorCode,
|
|
445
428
|
});
|
|
446
429
|
}
|
|
@@ -449,16 +432,15 @@ const de_DescribeSavingsPlansOfferingsCommand = async (output, context) => {
|
|
|
449
432
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
450
433
|
return de_DescribeSavingsPlansOfferingsCommandError(output, context);
|
|
451
434
|
}
|
|
452
|
-
const contents = map({
|
|
435
|
+
const contents = (0, smithy_client_1.map)({
|
|
453
436
|
$metadata: deserializeMetadata(output),
|
|
454
437
|
});
|
|
455
438
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
}
|
|
439
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
440
|
+
nextToken: smithy_client_1.expectString,
|
|
441
|
+
searchResults: smithy_client_1._json,
|
|
442
|
+
});
|
|
443
|
+
Object.assign(contents, doc);
|
|
462
444
|
return contents;
|
|
463
445
|
};
|
|
464
446
|
exports.de_DescribeSavingsPlansOfferingsCommand = de_DescribeSavingsPlansOfferingsCommand;
|
|
@@ -477,10 +459,9 @@ const de_DescribeSavingsPlansOfferingsCommandError = async (output, context) =>
|
|
|
477
459
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
478
460
|
default:
|
|
479
461
|
const parsedBody = parsedOutput.body;
|
|
480
|
-
|
|
462
|
+
return throwDefaultError({
|
|
481
463
|
output,
|
|
482
464
|
parsedBody,
|
|
483
|
-
exceptionCtor: SavingsplansServiceException_1.SavingsplansServiceException,
|
|
484
465
|
errorCode,
|
|
485
466
|
});
|
|
486
467
|
}
|
|
@@ -489,13 +470,14 @@ const de_ListTagsForResourceCommand = async (output, context) => {
|
|
|
489
470
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
490
471
|
return de_ListTagsForResourceCommandError(output, context);
|
|
491
472
|
}
|
|
492
|
-
const contents = map({
|
|
473
|
+
const contents = (0, smithy_client_1.map)({
|
|
493
474
|
$metadata: deserializeMetadata(output),
|
|
494
475
|
});
|
|
495
476
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
}
|
|
477
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
478
|
+
tags: smithy_client_1._json,
|
|
479
|
+
});
|
|
480
|
+
Object.assign(contents, doc);
|
|
499
481
|
return contents;
|
|
500
482
|
};
|
|
501
483
|
exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
|
|
@@ -517,10 +499,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
|
|
|
517
499
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
518
500
|
default:
|
|
519
501
|
const parsedBody = parsedOutput.body;
|
|
520
|
-
|
|
502
|
+
return throwDefaultError({
|
|
521
503
|
output,
|
|
522
504
|
parsedBody,
|
|
523
|
-
exceptionCtor: SavingsplansServiceException_1.SavingsplansServiceException,
|
|
524
505
|
errorCode,
|
|
525
506
|
});
|
|
526
507
|
}
|
|
@@ -529,7 +510,7 @@ const de_TagResourceCommand = async (output, context) => {
|
|
|
529
510
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
530
511
|
return de_TagResourceCommandError(output, context);
|
|
531
512
|
}
|
|
532
|
-
const contents = map({
|
|
513
|
+
const contents = (0, smithy_client_1.map)({
|
|
533
514
|
$metadata: deserializeMetadata(output),
|
|
534
515
|
});
|
|
535
516
|
await collectBody(output.body, context);
|
|
@@ -557,10 +538,9 @@ const de_TagResourceCommandError = async (output, context) => {
|
|
|
557
538
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
558
539
|
default:
|
|
559
540
|
const parsedBody = parsedOutput.body;
|
|
560
|
-
|
|
541
|
+
return throwDefaultError({
|
|
561
542
|
output,
|
|
562
543
|
parsedBody,
|
|
563
|
-
exceptionCtor: SavingsplansServiceException_1.SavingsplansServiceException,
|
|
564
544
|
errorCode,
|
|
565
545
|
});
|
|
566
546
|
}
|
|
@@ -569,7 +549,7 @@ const de_UntagResourceCommand = async (output, context) => {
|
|
|
569
549
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
570
550
|
return de_UntagResourceCommandError(output, context);
|
|
571
551
|
}
|
|
572
|
-
const contents = map({
|
|
552
|
+
const contents = (0, smithy_client_1.map)({
|
|
573
553
|
$metadata: deserializeMetadata(output),
|
|
574
554
|
});
|
|
575
555
|
await collectBody(output.body, context);
|
|
@@ -594,21 +574,21 @@ const de_UntagResourceCommandError = async (output, context) => {
|
|
|
594
574
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
595
575
|
default:
|
|
596
576
|
const parsedBody = parsedOutput.body;
|
|
597
|
-
|
|
577
|
+
return throwDefaultError({
|
|
598
578
|
output,
|
|
599
579
|
parsedBody,
|
|
600
|
-
exceptionCtor: SavingsplansServiceException_1.SavingsplansServiceException,
|
|
601
580
|
errorCode,
|
|
602
581
|
});
|
|
603
582
|
}
|
|
604
583
|
};
|
|
605
|
-
const
|
|
584
|
+
const throwDefaultError = (0, smithy_client_1.withBaseException)(SavingsplansServiceException_1.SavingsplansServiceException);
|
|
606
585
|
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
607
|
-
const contents = map({});
|
|
586
|
+
const contents = (0, smithy_client_1.map)({});
|
|
608
587
|
const data = parsedOutput.body;
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
}
|
|
588
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
589
|
+
message: smithy_client_1.expectString,
|
|
590
|
+
});
|
|
591
|
+
Object.assign(contents, doc);
|
|
612
592
|
const exception = new models_0_1.InternalServerException({
|
|
613
593
|
$metadata: deserializeMetadata(parsedOutput),
|
|
614
594
|
...contents,
|
|
@@ -616,11 +596,12 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
|
616
596
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
617
597
|
};
|
|
618
598
|
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
619
|
-
const contents = map({});
|
|
599
|
+
const contents = (0, smithy_client_1.map)({});
|
|
620
600
|
const data = parsedOutput.body;
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
}
|
|
601
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
602
|
+
message: smithy_client_1.expectString,
|
|
603
|
+
});
|
|
604
|
+
Object.assign(contents, doc);
|
|
624
605
|
const exception = new models_0_1.ResourceNotFoundException({
|
|
625
606
|
$metadata: deserializeMetadata(parsedOutput),
|
|
626
607
|
...contents,
|
|
@@ -628,11 +609,12 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
|
628
609
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
629
610
|
};
|
|
630
611
|
const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
631
|
-
const contents = map({});
|
|
612
|
+
const contents = (0, smithy_client_1.map)({});
|
|
632
613
|
const data = parsedOutput.body;
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
}
|
|
614
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
615
|
+
message: smithy_client_1.expectString,
|
|
616
|
+
});
|
|
617
|
+
Object.assign(contents, doc);
|
|
636
618
|
const exception = new models_0_1.ServiceQuotaExceededException({
|
|
637
619
|
$metadata: deserializeMetadata(parsedOutput),
|
|
638
620
|
...contents,
|
|
@@ -640,399 +622,18 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
|
640
622
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
641
623
|
};
|
|
642
624
|
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
643
|
-
const contents = map({});
|
|
625
|
+
const contents = (0, smithy_client_1.map)({});
|
|
644
626
|
const data = parsedOutput.body;
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
}
|
|
627
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
628
|
+
message: smithy_client_1.expectString,
|
|
629
|
+
});
|
|
630
|
+
Object.assign(contents, doc);
|
|
648
631
|
const exception = new models_0_1.ValidationException({
|
|
649
632
|
$metadata: deserializeMetadata(parsedOutput),
|
|
650
633
|
...contents,
|
|
651
634
|
});
|
|
652
635
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
653
636
|
};
|
|
654
|
-
const se_CurrencyList = (input, context) => {
|
|
655
|
-
return input
|
|
656
|
-
.filter((e) => e != null)
|
|
657
|
-
.map((entry) => {
|
|
658
|
-
return entry;
|
|
659
|
-
});
|
|
660
|
-
};
|
|
661
|
-
const se_DurationsList = (input, context) => {
|
|
662
|
-
return input
|
|
663
|
-
.filter((e) => e != null)
|
|
664
|
-
.map((entry) => {
|
|
665
|
-
return entry;
|
|
666
|
-
});
|
|
667
|
-
};
|
|
668
|
-
const se_FilterValuesList = (input, context) => {
|
|
669
|
-
return input
|
|
670
|
-
.filter((e) => e != null)
|
|
671
|
-
.map((entry) => {
|
|
672
|
-
return entry;
|
|
673
|
-
});
|
|
674
|
-
};
|
|
675
|
-
const se_ListOfStrings = (input, context) => {
|
|
676
|
-
return input
|
|
677
|
-
.filter((e) => e != null)
|
|
678
|
-
.map((entry) => {
|
|
679
|
-
return entry;
|
|
680
|
-
});
|
|
681
|
-
};
|
|
682
|
-
const se_SavingsPlanArnList = (input, context) => {
|
|
683
|
-
return input
|
|
684
|
-
.filter((e) => e != null)
|
|
685
|
-
.map((entry) => {
|
|
686
|
-
return entry;
|
|
687
|
-
});
|
|
688
|
-
};
|
|
689
|
-
const se_SavingsPlanDescriptionsList = (input, context) => {
|
|
690
|
-
return input
|
|
691
|
-
.filter((e) => e != null)
|
|
692
|
-
.map((entry) => {
|
|
693
|
-
return entry;
|
|
694
|
-
});
|
|
695
|
-
};
|
|
696
|
-
const se_SavingsPlanFilter = (input, context) => {
|
|
697
|
-
return {
|
|
698
|
-
...(input.name != null && { name: input.name }),
|
|
699
|
-
...(input.values != null && { values: se_ListOfStrings(input.values, context) }),
|
|
700
|
-
};
|
|
701
|
-
};
|
|
702
|
-
const se_SavingsPlanFilterList = (input, context) => {
|
|
703
|
-
return input
|
|
704
|
-
.filter((e) => e != null)
|
|
705
|
-
.map((entry) => {
|
|
706
|
-
return se_SavingsPlanFilter(entry, context);
|
|
707
|
-
});
|
|
708
|
-
};
|
|
709
|
-
const se_SavingsPlanIdList = (input, context) => {
|
|
710
|
-
return input
|
|
711
|
-
.filter((e) => e != null)
|
|
712
|
-
.map((entry) => {
|
|
713
|
-
return entry;
|
|
714
|
-
});
|
|
715
|
-
};
|
|
716
|
-
const se_SavingsPlanOfferingFilterElement = (input, context) => {
|
|
717
|
-
return {
|
|
718
|
-
...(input.name != null && { name: input.name }),
|
|
719
|
-
...(input.values != null && { values: se_FilterValuesList(input.values, context) }),
|
|
720
|
-
};
|
|
721
|
-
};
|
|
722
|
-
const se_SavingsPlanOfferingFiltersList = (input, context) => {
|
|
723
|
-
return input
|
|
724
|
-
.filter((e) => e != null)
|
|
725
|
-
.map((entry) => {
|
|
726
|
-
return se_SavingsPlanOfferingFilterElement(entry, context);
|
|
727
|
-
});
|
|
728
|
-
};
|
|
729
|
-
const se_SavingsPlanOfferingRateFilterElement = (input, context) => {
|
|
730
|
-
return {
|
|
731
|
-
...(input.name != null && { name: input.name }),
|
|
732
|
-
...(input.values != null && { values: se_FilterValuesList(input.values, context) }),
|
|
733
|
-
};
|
|
734
|
-
};
|
|
735
|
-
const se_SavingsPlanOfferingRateFiltersList = (input, context) => {
|
|
736
|
-
return input
|
|
737
|
-
.filter((e) => e != null)
|
|
738
|
-
.map((entry) => {
|
|
739
|
-
return se_SavingsPlanOfferingRateFilterElement(entry, context);
|
|
740
|
-
});
|
|
741
|
-
};
|
|
742
|
-
const se_SavingsPlanOperationList = (input, context) => {
|
|
743
|
-
return input
|
|
744
|
-
.filter((e) => e != null)
|
|
745
|
-
.map((entry) => {
|
|
746
|
-
return entry;
|
|
747
|
-
});
|
|
748
|
-
};
|
|
749
|
-
const se_SavingsPlanPaymentOptionList = (input, context) => {
|
|
750
|
-
return input
|
|
751
|
-
.filter((e) => e != null)
|
|
752
|
-
.map((entry) => {
|
|
753
|
-
return entry;
|
|
754
|
-
});
|
|
755
|
-
};
|
|
756
|
-
const se_SavingsPlanProductTypeList = (input, context) => {
|
|
757
|
-
return input
|
|
758
|
-
.filter((e) => e != null)
|
|
759
|
-
.map((entry) => {
|
|
760
|
-
return entry;
|
|
761
|
-
});
|
|
762
|
-
};
|
|
763
|
-
const se_SavingsPlanRateFilter = (input, context) => {
|
|
764
|
-
return {
|
|
765
|
-
...(input.name != null && { name: input.name }),
|
|
766
|
-
...(input.values != null && { values: se_ListOfStrings(input.values, context) }),
|
|
767
|
-
};
|
|
768
|
-
};
|
|
769
|
-
const se_SavingsPlanRateFilterList = (input, context) => {
|
|
770
|
-
return input
|
|
771
|
-
.filter((e) => e != null)
|
|
772
|
-
.map((entry) => {
|
|
773
|
-
return se_SavingsPlanRateFilter(entry, context);
|
|
774
|
-
});
|
|
775
|
-
};
|
|
776
|
-
const se_SavingsPlanRateOperationList = (input, context) => {
|
|
777
|
-
return input
|
|
778
|
-
.filter((e) => e != null)
|
|
779
|
-
.map((entry) => {
|
|
780
|
-
return entry;
|
|
781
|
-
});
|
|
782
|
-
};
|
|
783
|
-
const se_SavingsPlanRateServiceCodeList = (input, context) => {
|
|
784
|
-
return input
|
|
785
|
-
.filter((e) => e != null)
|
|
786
|
-
.map((entry) => {
|
|
787
|
-
return entry;
|
|
788
|
-
});
|
|
789
|
-
};
|
|
790
|
-
const se_SavingsPlanRateUsageTypeList = (input, context) => {
|
|
791
|
-
return input
|
|
792
|
-
.filter((e) => e != null)
|
|
793
|
-
.map((entry) => {
|
|
794
|
-
return entry;
|
|
795
|
-
});
|
|
796
|
-
};
|
|
797
|
-
const se_SavingsPlanServiceCodeList = (input, context) => {
|
|
798
|
-
return input
|
|
799
|
-
.filter((e) => e != null)
|
|
800
|
-
.map((entry) => {
|
|
801
|
-
return entry;
|
|
802
|
-
});
|
|
803
|
-
};
|
|
804
|
-
const se_SavingsPlanStateList = (input, context) => {
|
|
805
|
-
return input
|
|
806
|
-
.filter((e) => e != null)
|
|
807
|
-
.map((entry) => {
|
|
808
|
-
return entry;
|
|
809
|
-
});
|
|
810
|
-
};
|
|
811
|
-
const se_SavingsPlanTypeList = (input, context) => {
|
|
812
|
-
return input
|
|
813
|
-
.filter((e) => e != null)
|
|
814
|
-
.map((entry) => {
|
|
815
|
-
return entry;
|
|
816
|
-
});
|
|
817
|
-
};
|
|
818
|
-
const se_SavingsPlanUsageTypeList = (input, context) => {
|
|
819
|
-
return input
|
|
820
|
-
.filter((e) => e != null)
|
|
821
|
-
.map((entry) => {
|
|
822
|
-
return entry;
|
|
823
|
-
});
|
|
824
|
-
};
|
|
825
|
-
const se_TagKeyList = (input, context) => {
|
|
826
|
-
return input
|
|
827
|
-
.filter((e) => e != null)
|
|
828
|
-
.map((entry) => {
|
|
829
|
-
return entry;
|
|
830
|
-
});
|
|
831
|
-
};
|
|
832
|
-
const se_TagMap = (input, context) => {
|
|
833
|
-
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
834
|
-
if (value === null) {
|
|
835
|
-
return acc;
|
|
836
|
-
}
|
|
837
|
-
acc[key] = value;
|
|
838
|
-
return acc;
|
|
839
|
-
}, {});
|
|
840
|
-
};
|
|
841
|
-
const se_UUIDs = (input, context) => {
|
|
842
|
-
return input
|
|
843
|
-
.filter((e) => e != null)
|
|
844
|
-
.map((entry) => {
|
|
845
|
-
return entry;
|
|
846
|
-
});
|
|
847
|
-
};
|
|
848
|
-
const de_ParentSavingsPlanOffering = (output, context) => {
|
|
849
|
-
return {
|
|
850
|
-
currency: (0, smithy_client_1.expectString)(output.currency),
|
|
851
|
-
durationSeconds: (0, smithy_client_1.expectLong)(output.durationSeconds),
|
|
852
|
-
offeringId: (0, smithy_client_1.expectString)(output.offeringId),
|
|
853
|
-
paymentOption: (0, smithy_client_1.expectString)(output.paymentOption),
|
|
854
|
-
planDescription: (0, smithy_client_1.expectString)(output.planDescription),
|
|
855
|
-
planType: (0, smithy_client_1.expectString)(output.planType),
|
|
856
|
-
};
|
|
857
|
-
};
|
|
858
|
-
const de_SavingsPlan = (output, context) => {
|
|
859
|
-
return {
|
|
860
|
-
commitment: (0, smithy_client_1.expectString)(output.commitment),
|
|
861
|
-
currency: (0, smithy_client_1.expectString)(output.currency),
|
|
862
|
-
description: (0, smithy_client_1.expectString)(output.description),
|
|
863
|
-
ec2InstanceFamily: (0, smithy_client_1.expectString)(output.ec2InstanceFamily),
|
|
864
|
-
end: (0, smithy_client_1.expectString)(output.end),
|
|
865
|
-
offeringId: (0, smithy_client_1.expectString)(output.offeringId),
|
|
866
|
-
paymentOption: (0, smithy_client_1.expectString)(output.paymentOption),
|
|
867
|
-
productTypes: output.productTypes != null ? de_SavingsPlanProductTypeList(output.productTypes, context) : undefined,
|
|
868
|
-
recurringPaymentAmount: (0, smithy_client_1.expectString)(output.recurringPaymentAmount),
|
|
869
|
-
region: (0, smithy_client_1.expectString)(output.region),
|
|
870
|
-
savingsPlanArn: (0, smithy_client_1.expectString)(output.savingsPlanArn),
|
|
871
|
-
savingsPlanId: (0, smithy_client_1.expectString)(output.savingsPlanId),
|
|
872
|
-
savingsPlanType: (0, smithy_client_1.expectString)(output.savingsPlanType),
|
|
873
|
-
start: (0, smithy_client_1.expectString)(output.start),
|
|
874
|
-
state: (0, smithy_client_1.expectString)(output.state),
|
|
875
|
-
tags: output.tags != null ? de_TagMap(output.tags, context) : undefined,
|
|
876
|
-
termDurationInSeconds: (0, smithy_client_1.expectLong)(output.termDurationInSeconds),
|
|
877
|
-
upfrontPaymentAmount: (0, smithy_client_1.expectString)(output.upfrontPaymentAmount),
|
|
878
|
-
};
|
|
879
|
-
};
|
|
880
|
-
const de_SavingsPlanList = (output, context) => {
|
|
881
|
-
const retVal = (output || [])
|
|
882
|
-
.filter((e) => e != null)
|
|
883
|
-
.map((entry) => {
|
|
884
|
-
if (entry === null) {
|
|
885
|
-
return null;
|
|
886
|
-
}
|
|
887
|
-
return de_SavingsPlan(entry, context);
|
|
888
|
-
});
|
|
889
|
-
return retVal;
|
|
890
|
-
};
|
|
891
|
-
const de_SavingsPlanOffering = (output, context) => {
|
|
892
|
-
return {
|
|
893
|
-
currency: (0, smithy_client_1.expectString)(output.currency),
|
|
894
|
-
description: (0, smithy_client_1.expectString)(output.description),
|
|
895
|
-
durationSeconds: (0, smithy_client_1.expectLong)(output.durationSeconds),
|
|
896
|
-
offeringId: (0, smithy_client_1.expectString)(output.offeringId),
|
|
897
|
-
operation: (0, smithy_client_1.expectString)(output.operation),
|
|
898
|
-
paymentOption: (0, smithy_client_1.expectString)(output.paymentOption),
|
|
899
|
-
planType: (0, smithy_client_1.expectString)(output.planType),
|
|
900
|
-
productTypes: output.productTypes != null ? de_SavingsPlanProductTypeList(output.productTypes, context) : undefined,
|
|
901
|
-
properties: output.properties != null ? de_SavingsPlanOfferingPropertyList(output.properties, context) : undefined,
|
|
902
|
-
serviceCode: (0, smithy_client_1.expectString)(output.serviceCode),
|
|
903
|
-
usageType: (0, smithy_client_1.expectString)(output.usageType),
|
|
904
|
-
};
|
|
905
|
-
};
|
|
906
|
-
const de_SavingsPlanOfferingProperty = (output, context) => {
|
|
907
|
-
return {
|
|
908
|
-
name: (0, smithy_client_1.expectString)(output.name),
|
|
909
|
-
value: (0, smithy_client_1.expectString)(output.value),
|
|
910
|
-
};
|
|
911
|
-
};
|
|
912
|
-
const de_SavingsPlanOfferingPropertyList = (output, context) => {
|
|
913
|
-
const retVal = (output || [])
|
|
914
|
-
.filter((e) => e != null)
|
|
915
|
-
.map((entry) => {
|
|
916
|
-
if (entry === null) {
|
|
917
|
-
return null;
|
|
918
|
-
}
|
|
919
|
-
return de_SavingsPlanOfferingProperty(entry, context);
|
|
920
|
-
});
|
|
921
|
-
return retVal;
|
|
922
|
-
};
|
|
923
|
-
const de_SavingsPlanOfferingRate = (output, context) => {
|
|
924
|
-
return {
|
|
925
|
-
operation: (0, smithy_client_1.expectString)(output.operation),
|
|
926
|
-
productType: (0, smithy_client_1.expectString)(output.productType),
|
|
927
|
-
properties: output.properties != null ? de_SavingsPlanOfferingRatePropertyList(output.properties, context) : undefined,
|
|
928
|
-
rate: (0, smithy_client_1.expectString)(output.rate),
|
|
929
|
-
savingsPlanOffering: output.savingsPlanOffering != null
|
|
930
|
-
? de_ParentSavingsPlanOffering(output.savingsPlanOffering, context)
|
|
931
|
-
: undefined,
|
|
932
|
-
serviceCode: (0, smithy_client_1.expectString)(output.serviceCode),
|
|
933
|
-
unit: (0, smithy_client_1.expectString)(output.unit),
|
|
934
|
-
usageType: (0, smithy_client_1.expectString)(output.usageType),
|
|
935
|
-
};
|
|
936
|
-
};
|
|
937
|
-
const de_SavingsPlanOfferingRateProperty = (output, context) => {
|
|
938
|
-
return {
|
|
939
|
-
name: (0, smithy_client_1.expectString)(output.name),
|
|
940
|
-
value: (0, smithy_client_1.expectString)(output.value),
|
|
941
|
-
};
|
|
942
|
-
};
|
|
943
|
-
const de_SavingsPlanOfferingRatePropertyList = (output, context) => {
|
|
944
|
-
const retVal = (output || [])
|
|
945
|
-
.filter((e) => e != null)
|
|
946
|
-
.map((entry) => {
|
|
947
|
-
if (entry === null) {
|
|
948
|
-
return null;
|
|
949
|
-
}
|
|
950
|
-
return de_SavingsPlanOfferingRateProperty(entry, context);
|
|
951
|
-
});
|
|
952
|
-
return retVal;
|
|
953
|
-
};
|
|
954
|
-
const de_SavingsPlanOfferingRatesList = (output, context) => {
|
|
955
|
-
const retVal = (output || [])
|
|
956
|
-
.filter((e) => e != null)
|
|
957
|
-
.map((entry) => {
|
|
958
|
-
if (entry === null) {
|
|
959
|
-
return null;
|
|
960
|
-
}
|
|
961
|
-
return de_SavingsPlanOfferingRate(entry, context);
|
|
962
|
-
});
|
|
963
|
-
return retVal;
|
|
964
|
-
};
|
|
965
|
-
const de_SavingsPlanOfferingsList = (output, context) => {
|
|
966
|
-
const retVal = (output || [])
|
|
967
|
-
.filter((e) => e != null)
|
|
968
|
-
.map((entry) => {
|
|
969
|
-
if (entry === null) {
|
|
970
|
-
return null;
|
|
971
|
-
}
|
|
972
|
-
return de_SavingsPlanOffering(entry, context);
|
|
973
|
-
});
|
|
974
|
-
return retVal;
|
|
975
|
-
};
|
|
976
|
-
const de_SavingsPlanProductTypeList = (output, context) => {
|
|
977
|
-
const retVal = (output || [])
|
|
978
|
-
.filter((e) => e != null)
|
|
979
|
-
.map((entry) => {
|
|
980
|
-
if (entry === null) {
|
|
981
|
-
return null;
|
|
982
|
-
}
|
|
983
|
-
return (0, smithy_client_1.expectString)(entry);
|
|
984
|
-
});
|
|
985
|
-
return retVal;
|
|
986
|
-
};
|
|
987
|
-
const de_SavingsPlanRate = (output, context) => {
|
|
988
|
-
return {
|
|
989
|
-
currency: (0, smithy_client_1.expectString)(output.currency),
|
|
990
|
-
operation: (0, smithy_client_1.expectString)(output.operation),
|
|
991
|
-
productType: (0, smithy_client_1.expectString)(output.productType),
|
|
992
|
-
properties: output.properties != null ? de_SavingsPlanRatePropertyList(output.properties, context) : undefined,
|
|
993
|
-
rate: (0, smithy_client_1.expectString)(output.rate),
|
|
994
|
-
serviceCode: (0, smithy_client_1.expectString)(output.serviceCode),
|
|
995
|
-
unit: (0, smithy_client_1.expectString)(output.unit),
|
|
996
|
-
usageType: (0, smithy_client_1.expectString)(output.usageType),
|
|
997
|
-
};
|
|
998
|
-
};
|
|
999
|
-
const de_SavingsPlanRateList = (output, context) => {
|
|
1000
|
-
const retVal = (output || [])
|
|
1001
|
-
.filter((e) => e != null)
|
|
1002
|
-
.map((entry) => {
|
|
1003
|
-
if (entry === null) {
|
|
1004
|
-
return null;
|
|
1005
|
-
}
|
|
1006
|
-
return de_SavingsPlanRate(entry, context);
|
|
1007
|
-
});
|
|
1008
|
-
return retVal;
|
|
1009
|
-
};
|
|
1010
|
-
const de_SavingsPlanRateProperty = (output, context) => {
|
|
1011
|
-
return {
|
|
1012
|
-
name: (0, smithy_client_1.expectString)(output.name),
|
|
1013
|
-
value: (0, smithy_client_1.expectString)(output.value),
|
|
1014
|
-
};
|
|
1015
|
-
};
|
|
1016
|
-
const de_SavingsPlanRatePropertyList = (output, context) => {
|
|
1017
|
-
const retVal = (output || [])
|
|
1018
|
-
.filter((e) => e != null)
|
|
1019
|
-
.map((entry) => {
|
|
1020
|
-
if (entry === null) {
|
|
1021
|
-
return null;
|
|
1022
|
-
}
|
|
1023
|
-
return de_SavingsPlanRateProperty(entry, context);
|
|
1024
|
-
});
|
|
1025
|
-
return retVal;
|
|
1026
|
-
};
|
|
1027
|
-
const de_TagMap = (output, context) => {
|
|
1028
|
-
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
1029
|
-
if (value === null) {
|
|
1030
|
-
return acc;
|
|
1031
|
-
}
|
|
1032
|
-
acc[key] = (0, smithy_client_1.expectString)(value);
|
|
1033
|
-
return acc;
|
|
1034
|
-
}, {});
|
|
1035
|
-
};
|
|
1036
637
|
const deserializeMetadata = (output) => ({
|
|
1037
638
|
httpStatusCode: output.statusCode,
|
|
1038
639
|
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|