@aws-sdk/client-pi 3.46.0 → 3.48.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 (73) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/README.md +18 -13
  3. package/dist-cjs/PI.js +45 -0
  4. package/dist-cjs/commands/GetResourceMetadataCommand.js +36 -0
  5. package/dist-cjs/commands/ListAvailableResourceDimensionsCommand.js +36 -0
  6. package/dist-cjs/commands/ListAvailableResourceMetricsCommand.js +36 -0
  7. package/dist-cjs/commands/index.js +3 -0
  8. package/dist-cjs/index.js +1 -0
  9. package/dist-cjs/models/models_0.js +77 -19
  10. package/dist-cjs/pagination/DescribeDimensionKeysPaginator.js +35 -0
  11. package/dist-cjs/pagination/GetResourceMetricsPaginator.js +35 -0
  12. package/dist-cjs/pagination/Interfaces.js +2 -0
  13. package/dist-cjs/pagination/ListAvailableResourceDimensionsPaginator.js +35 -0
  14. package/dist-cjs/pagination/ListAvailableResourceMetricsPaginator.js +35 -0
  15. package/dist-cjs/pagination/index.js +8 -0
  16. package/dist-cjs/protocols/Aws_json1_1.js +402 -1
  17. package/dist-cjs/runtimeConfig.browser.js +7 -2
  18. package/dist-cjs/runtimeConfig.js +10 -2
  19. package/dist-es/PI.js +45 -0
  20. package/dist-es/commands/GetResourceMetadataCommand.js +39 -0
  21. package/dist-es/commands/ListAvailableResourceDimensionsCommand.js +39 -0
  22. package/dist-es/commands/ListAvailableResourceMetricsCommand.js +39 -0
  23. package/dist-es/commands/index.js +3 -0
  24. package/dist-es/index.js +1 -0
  25. package/dist-es/models/models_0.js +54 -12
  26. package/dist-es/pagination/DescribeDimensionKeysPaginator.js +74 -0
  27. package/dist-es/pagination/GetResourceMetricsPaginator.js +74 -0
  28. package/dist-es/pagination/Interfaces.js +1 -0
  29. package/dist-es/pagination/ListAvailableResourceDimensionsPaginator.js +74 -0
  30. package/dist-es/pagination/ListAvailableResourceMetricsPaginator.js +74 -0
  31. package/dist-es/pagination/index.js +5 -0
  32. package/dist-es/protocols/Aws_json1_1.js +414 -1
  33. package/dist-es/runtimeConfig.browser.js +12 -3
  34. package/dist-es/runtimeConfig.js +13 -4
  35. package/dist-types/PI.d.ts +48 -18
  36. package/dist-types/PIClient.d.ts +27 -15
  37. package/dist-types/commands/DescribeDimensionKeysCommand.d.ts +2 -2
  38. package/dist-types/commands/GetDimensionKeyDetailsCommand.d.ts +5 -4
  39. package/dist-types/commands/GetResourceMetadataCommand.d.ts +37 -0
  40. package/dist-types/commands/ListAvailableResourceDimensionsCommand.d.ts +35 -0
  41. package/dist-types/commands/ListAvailableResourceMetricsCommand.d.ts +36 -0
  42. package/dist-types/commands/index.d.ts +3 -0
  43. package/dist-types/index.d.ts +1 -0
  44. package/dist-types/models/models_0.d.ts +413 -101
  45. package/dist-types/pagination/DescribeDimensionKeysPaginator.d.ts +4 -0
  46. package/dist-types/pagination/GetResourceMetricsPaginator.d.ts +4 -0
  47. package/dist-types/pagination/Interfaces.d.ts +6 -0
  48. package/dist-types/pagination/ListAvailableResourceDimensionsPaginator.d.ts +4 -0
  49. package/dist-types/pagination/ListAvailableResourceMetricsPaginator.d.ts +4 -0
  50. package/dist-types/pagination/index.d.ts +5 -0
  51. package/dist-types/protocols/Aws_json1_1.d.ts +9 -0
  52. package/dist-types/runtimeConfig.browser.d.ts +3 -2
  53. package/dist-types/runtimeConfig.d.ts +4 -3
  54. package/dist-types/runtimeConfig.native.d.ts +1 -0
  55. package/dist-types/ts3.4/PI.d.ts +15 -0
  56. package/dist-types/ts3.4/PIClient.d.ts +8 -3
  57. package/dist-types/ts3.4/commands/GetResourceMetadataCommand.d.ts +17 -0
  58. package/dist-types/ts3.4/commands/ListAvailableResourceDimensionsCommand.d.ts +17 -0
  59. package/dist-types/ts3.4/commands/ListAvailableResourceMetricsCommand.d.ts +17 -0
  60. package/dist-types/ts3.4/commands/index.d.ts +3 -0
  61. package/dist-types/ts3.4/index.d.ts +1 -0
  62. package/dist-types/ts3.4/models/models_0.d.ts +142 -12
  63. package/dist-types/ts3.4/pagination/DescribeDimensionKeysPaginator.d.ts +4 -0
  64. package/dist-types/ts3.4/pagination/GetResourceMetricsPaginator.d.ts +4 -0
  65. package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
  66. package/dist-types/ts3.4/pagination/ListAvailableResourceDimensionsPaginator.d.ts +4 -0
  67. package/dist-types/ts3.4/pagination/ListAvailableResourceMetricsPaginator.d.ts +4 -0
  68. package/dist-types/ts3.4/pagination/index.d.ts +5 -0
  69. package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +9 -0
  70. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +3 -2
  71. package/dist-types/ts3.4/runtimeConfig.d.ts +4 -3
  72. package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -0
  73. package/package.json +35 -35
@@ -23,6 +23,17 @@ export var serializeAws_json1_1GetDimensionKeyDetailsCommand = function (input,
23
23
  return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
24
24
  });
25
25
  }); };
26
+ export var serializeAws_json1_1GetResourceMetadataCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
27
+ var headers, body;
28
+ return __generator(this, function (_a) {
29
+ headers = {
30
+ "content-type": "application/x-amz-json-1.1",
31
+ "x-amz-target": "PerformanceInsightsv20180227.GetResourceMetadata",
32
+ };
33
+ body = JSON.stringify(serializeAws_json1_1GetResourceMetadataRequest(input, context));
34
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
35
+ });
36
+ }); };
26
37
  export var serializeAws_json1_1GetResourceMetricsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
27
38
  var headers, body;
28
39
  return __generator(this, function (_a) {
@@ -34,6 +45,28 @@ export var serializeAws_json1_1GetResourceMetricsCommand = function (input, cont
34
45
  return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
35
46
  });
36
47
  }); };
48
+ export var serializeAws_json1_1ListAvailableResourceDimensionsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
49
+ var headers, body;
50
+ return __generator(this, function (_a) {
51
+ headers = {
52
+ "content-type": "application/x-amz-json-1.1",
53
+ "x-amz-target": "PerformanceInsightsv20180227.ListAvailableResourceDimensions",
54
+ };
55
+ body = JSON.stringify(serializeAws_json1_1ListAvailableResourceDimensionsRequest(input, context));
56
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
57
+ });
58
+ }); };
59
+ export var serializeAws_json1_1ListAvailableResourceMetricsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
60
+ var headers, body;
61
+ return __generator(this, function (_a) {
62
+ headers = {
63
+ "content-type": "application/x-amz-json-1.1",
64
+ "x-amz-target": "PerformanceInsightsv20180227.ListAvailableResourceMetrics",
65
+ };
66
+ body = JSON.stringify(serializeAws_json1_1ListAvailableResourceMetricsRequest(input, context));
67
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
68
+ });
69
+ }); };
37
70
  export var deserializeAws_json1_1DescribeDimensionKeysCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
38
71
  var data, contents, response;
39
72
  return __generator(this, function (_a) {
@@ -178,6 +211,78 @@ var deserializeAws_json1_1GetDimensionKeyDetailsCommandError = function (output,
178
211
  }
179
212
  });
180
213
  }); };
214
+ export var deserializeAws_json1_1GetResourceMetadataCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
215
+ var data, contents, response;
216
+ return __generator(this, function (_a) {
217
+ switch (_a.label) {
218
+ case 0:
219
+ if (output.statusCode >= 300) {
220
+ return [2, deserializeAws_json1_1GetResourceMetadataCommandError(output, context)];
221
+ }
222
+ return [4, parseBody(output.body, context)];
223
+ case 1:
224
+ data = _a.sent();
225
+ contents = {};
226
+ contents = deserializeAws_json1_1GetResourceMetadataResponse(data, context);
227
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
228
+ return [2, Promise.resolve(response)];
229
+ }
230
+ });
231
+ }); };
232
+ var deserializeAws_json1_1GetResourceMetadataCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
233
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, parsedBody, message;
234
+ var _f;
235
+ return __generator(this, function (_g) {
236
+ switch (_g.label) {
237
+ case 0:
238
+ _a = [__assign({}, output)];
239
+ _f = {};
240
+ return [4, parseBody(output.body, context)];
241
+ case 1:
242
+ parsedOutput = __assign.apply(void 0, _a.concat([(_f.body = _g.sent(), _f)]));
243
+ errorCode = "UnknownError";
244
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
245
+ _b = errorCode;
246
+ switch (_b) {
247
+ case "InternalServiceError": return [3, 2];
248
+ case "com.amazonaws.pi#InternalServiceError": return [3, 2];
249
+ case "InvalidArgumentException": return [3, 4];
250
+ case "com.amazonaws.pi#InvalidArgumentException": return [3, 4];
251
+ case "NotAuthorizedException": return [3, 6];
252
+ case "com.amazonaws.pi#NotAuthorizedException": return [3, 6];
253
+ }
254
+ return [3, 8];
255
+ case 2:
256
+ _c = [{}];
257
+ return [4, deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)];
258
+ case 3:
259
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
260
+ return [3, 9];
261
+ case 4:
262
+ _d = [{}];
263
+ return [4, deserializeAws_json1_1InvalidArgumentExceptionResponse(parsedOutput, context)];
264
+ case 5:
265
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
266
+ return [3, 9];
267
+ case 6:
268
+ _e = [{}];
269
+ return [4, deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)];
270
+ case 7:
271
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
272
+ return [3, 9];
273
+ case 8:
274
+ parsedBody = parsedOutput.body;
275
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
276
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
277
+ _g.label = 9;
278
+ case 9:
279
+ message = response.message || response.Message || errorCode;
280
+ response.message = message;
281
+ delete response.Message;
282
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
283
+ }
284
+ });
285
+ }); };
181
286
  export var deserializeAws_json1_1GetResourceMetricsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
182
287
  var data, contents, response;
183
288
  return __generator(this, function (_a) {
@@ -250,6 +355,150 @@ var deserializeAws_json1_1GetResourceMetricsCommandError = function (output, con
250
355
  }
251
356
  });
252
357
  }); };
358
+ export var deserializeAws_json1_1ListAvailableResourceDimensionsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
359
+ var data, contents, response;
360
+ return __generator(this, function (_a) {
361
+ switch (_a.label) {
362
+ case 0:
363
+ if (output.statusCode >= 300) {
364
+ return [2, deserializeAws_json1_1ListAvailableResourceDimensionsCommandError(output, context)];
365
+ }
366
+ return [4, parseBody(output.body, context)];
367
+ case 1:
368
+ data = _a.sent();
369
+ contents = {};
370
+ contents = deserializeAws_json1_1ListAvailableResourceDimensionsResponse(data, context);
371
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
372
+ return [2, Promise.resolve(response)];
373
+ }
374
+ });
375
+ }); };
376
+ var deserializeAws_json1_1ListAvailableResourceDimensionsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
377
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, parsedBody, message;
378
+ var _f;
379
+ return __generator(this, function (_g) {
380
+ switch (_g.label) {
381
+ case 0:
382
+ _a = [__assign({}, output)];
383
+ _f = {};
384
+ return [4, parseBody(output.body, context)];
385
+ case 1:
386
+ parsedOutput = __assign.apply(void 0, _a.concat([(_f.body = _g.sent(), _f)]));
387
+ errorCode = "UnknownError";
388
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
389
+ _b = errorCode;
390
+ switch (_b) {
391
+ case "InternalServiceError": return [3, 2];
392
+ case "com.amazonaws.pi#InternalServiceError": return [3, 2];
393
+ case "InvalidArgumentException": return [3, 4];
394
+ case "com.amazonaws.pi#InvalidArgumentException": return [3, 4];
395
+ case "NotAuthorizedException": return [3, 6];
396
+ case "com.amazonaws.pi#NotAuthorizedException": return [3, 6];
397
+ }
398
+ return [3, 8];
399
+ case 2:
400
+ _c = [{}];
401
+ return [4, deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)];
402
+ case 3:
403
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
404
+ return [3, 9];
405
+ case 4:
406
+ _d = [{}];
407
+ return [4, deserializeAws_json1_1InvalidArgumentExceptionResponse(parsedOutput, context)];
408
+ case 5:
409
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
410
+ return [3, 9];
411
+ case 6:
412
+ _e = [{}];
413
+ return [4, deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)];
414
+ case 7:
415
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
416
+ return [3, 9];
417
+ case 8:
418
+ parsedBody = parsedOutput.body;
419
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
420
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
421
+ _g.label = 9;
422
+ case 9:
423
+ message = response.message || response.Message || errorCode;
424
+ response.message = message;
425
+ delete response.Message;
426
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
427
+ }
428
+ });
429
+ }); };
430
+ export var deserializeAws_json1_1ListAvailableResourceMetricsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
431
+ var data, contents, response;
432
+ return __generator(this, function (_a) {
433
+ switch (_a.label) {
434
+ case 0:
435
+ if (output.statusCode >= 300) {
436
+ return [2, deserializeAws_json1_1ListAvailableResourceMetricsCommandError(output, context)];
437
+ }
438
+ return [4, parseBody(output.body, context)];
439
+ case 1:
440
+ data = _a.sent();
441
+ contents = {};
442
+ contents = deserializeAws_json1_1ListAvailableResourceMetricsResponse(data, context);
443
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
444
+ return [2, Promise.resolve(response)];
445
+ }
446
+ });
447
+ }); };
448
+ var deserializeAws_json1_1ListAvailableResourceMetricsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
449
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, parsedBody, message;
450
+ var _f;
451
+ return __generator(this, function (_g) {
452
+ switch (_g.label) {
453
+ case 0:
454
+ _a = [__assign({}, output)];
455
+ _f = {};
456
+ return [4, parseBody(output.body, context)];
457
+ case 1:
458
+ parsedOutput = __assign.apply(void 0, _a.concat([(_f.body = _g.sent(), _f)]));
459
+ errorCode = "UnknownError";
460
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
461
+ _b = errorCode;
462
+ switch (_b) {
463
+ case "InternalServiceError": return [3, 2];
464
+ case "com.amazonaws.pi#InternalServiceError": return [3, 2];
465
+ case "InvalidArgumentException": return [3, 4];
466
+ case "com.amazonaws.pi#InvalidArgumentException": return [3, 4];
467
+ case "NotAuthorizedException": return [3, 6];
468
+ case "com.amazonaws.pi#NotAuthorizedException": return [3, 6];
469
+ }
470
+ return [3, 8];
471
+ case 2:
472
+ _c = [{}];
473
+ return [4, deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)];
474
+ case 3:
475
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
476
+ return [3, 9];
477
+ case 4:
478
+ _d = [{}];
479
+ return [4, deserializeAws_json1_1InvalidArgumentExceptionResponse(parsedOutput, context)];
480
+ case 5:
481
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
482
+ return [3, 9];
483
+ case 6:
484
+ _e = [{}];
485
+ return [4, deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)];
486
+ case 7:
487
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
488
+ return [3, 9];
489
+ case 8:
490
+ parsedBody = parsedOutput.body;
491
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
492
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
493
+ _g.label = 9;
494
+ case 9:
495
+ message = response.message || response.Message || errorCode;
496
+ response.message = message;
497
+ delete response.Message;
498
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
499
+ }
500
+ });
501
+ }); };
253
502
  var deserializeAws_json1_1InternalServiceErrorResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
254
503
  var body, deserialized, contents;
255
504
  return __generator(this, function (_a) {
@@ -277,8 +526,21 @@ var deserializeAws_json1_1NotAuthorizedExceptionResponse = function (parsedOutpu
277
526
  return [2, contents];
278
527
  });
279
528
  }); };
529
+ var serializeAws_json1_1AdditionalMetricsList = function (input, context) {
530
+ return input
531
+ .filter(function (e) { return e != null; })
532
+ .map(function (entry) {
533
+ if (entry === null) {
534
+ return null;
535
+ }
536
+ return entry;
537
+ });
538
+ };
280
539
  var serializeAws_json1_1DescribeDimensionKeysRequest = function (input, context) {
281
- return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.EndTime !== undefined &&
540
+ return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.AdditionalMetrics !== undefined &&
541
+ input.AdditionalMetrics !== null && {
542
+ AdditionalMetrics: serializeAws_json1_1AdditionalMetricsList(input.AdditionalMetrics, context),
543
+ })), (input.EndTime !== undefined &&
282
544
  input.EndTime !== null && { EndTime: Math.round(input.EndTime.getTime() / 1000) })), (input.Filter !== undefined &&
283
545
  input.Filter !== null && { Filter: serializeAws_json1_1MetricQueryFilterMap(input.Filter, context) })), (input.GroupBy !== undefined &&
284
546
  input.GroupBy !== null && { GroupBy: serializeAws_json1_1DimensionGroup(input.GroupBy, context) })), (input.Identifier !== undefined && input.Identifier !== null && { Identifier: input.Identifier })), (input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults })), (input.Metric !== undefined && input.Metric !== null && { Metric: input.Metric })), (input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken })), (input.PartitionBy !== undefined &&
@@ -290,6 +552,16 @@ var serializeAws_json1_1DimensionGroup = function (input, context) {
290
552
  return __assign(__assign(__assign({}, (input.Dimensions !== undefined &&
291
553
  input.Dimensions !== null && { Dimensions: serializeAws_json1_1RequestStringList(input.Dimensions, context) })), (input.Group !== undefined && input.Group !== null && { Group: input.Group })), (input.Limit !== undefined && input.Limit !== null && { Limit: input.Limit }));
292
554
  };
555
+ var serializeAws_json1_1DimensionsMetricList = function (input, context) {
556
+ return input
557
+ .filter(function (e) { return e != null; })
558
+ .map(function (entry) {
559
+ if (entry === null) {
560
+ return null;
561
+ }
562
+ return entry;
563
+ });
564
+ };
293
565
  var serializeAws_json1_1GetDimensionKeyDetailsRequest = function (input, context) {
294
566
  return __assign(__assign(__assign(__assign(__assign({}, (input.Group !== undefined && input.Group !== null && { Group: input.Group })), (input.GroupIdentifier !== undefined &&
295
567
  input.GroupIdentifier !== null && { GroupIdentifier: input.GroupIdentifier })), (input.Identifier !== undefined && input.Identifier !== null && { Identifier: input.Identifier })), (input.RequestedDimensions !== undefined &&
@@ -297,6 +569,9 @@ var serializeAws_json1_1GetDimensionKeyDetailsRequest = function (input, context
297
569
  RequestedDimensions: serializeAws_json1_1RequestedDimensionList(input.RequestedDimensions, context),
298
570
  })), (input.ServiceType !== undefined && input.ServiceType !== null && { ServiceType: input.ServiceType }));
299
571
  };
572
+ var serializeAws_json1_1GetResourceMetadataRequest = function (input, context) {
573
+ return __assign(__assign({}, (input.Identifier !== undefined && input.Identifier !== null && { Identifier: input.Identifier })), (input.ServiceType !== undefined && input.ServiceType !== null && { ServiceType: input.ServiceType }));
574
+ };
300
575
  var serializeAws_json1_1GetResourceMetricsRequest = function (input, context) {
301
576
  return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.EndTime !== undefined &&
302
577
  input.EndTime !== null && { EndTime: Math.round(input.EndTime.getTime() / 1000) })), (input.Identifier !== undefined && input.Identifier !== null && { Identifier: input.Identifier })), (input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults })), (input.MetricQueries !== undefined &&
@@ -306,6 +581,14 @@ var serializeAws_json1_1GetResourceMetricsRequest = function (input, context) {
306
581
  input.PeriodInSeconds !== null && { PeriodInSeconds: input.PeriodInSeconds })), (input.ServiceType !== undefined && input.ServiceType !== null && { ServiceType: input.ServiceType })), (input.StartTime !== undefined &&
307
582
  input.StartTime !== null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }));
308
583
  };
584
+ var serializeAws_json1_1ListAvailableResourceDimensionsRequest = function (input, context) {
585
+ return __assign(__assign(__assign(__assign(__assign({}, (input.Identifier !== undefined && input.Identifier !== null && { Identifier: input.Identifier })), (input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults })), (input.Metrics !== undefined &&
586
+ input.Metrics !== null && { Metrics: serializeAws_json1_1DimensionsMetricList(input.Metrics, context) })), (input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken })), (input.ServiceType !== undefined && input.ServiceType !== null && { ServiceType: input.ServiceType }));
587
+ };
588
+ var serializeAws_json1_1ListAvailableResourceMetricsRequest = function (input, context) {
589
+ return __assign(__assign(__assign(__assign(__assign({}, (input.Identifier !== undefined && input.Identifier !== null && { Identifier: input.Identifier })), (input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults })), (input.MetricTypes !== undefined &&
590
+ input.MetricTypes !== null && { MetricTypes: serializeAws_json1_1MetricTypeList(input.MetricTypes, context) })), (input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken })), (input.ServiceType !== undefined && input.ServiceType !== null && { ServiceType: input.ServiceType }));
591
+ };
309
592
  var serializeAws_json1_1MetricQuery = function (input, context) {
310
593
  return __assign(__assign(__assign({}, (input.Filter !== undefined &&
311
594
  input.Filter !== null && { Filter: serializeAws_json1_1MetricQueryFilterMap(input.Filter, context) })), (input.GroupBy !== undefined &&
@@ -331,6 +614,16 @@ var serializeAws_json1_1MetricQueryList = function (input, context) {
331
614
  return serializeAws_json1_1MetricQuery(entry, context);
332
615
  });
333
616
  };
617
+ var serializeAws_json1_1MetricTypeList = function (input, context) {
618
+ return input
619
+ .filter(function (e) { return e != null; })
620
+ .map(function (entry) {
621
+ if (entry === null) {
622
+ return null;
623
+ }
624
+ return entry;
625
+ });
626
+ };
334
627
  var serializeAws_json1_1RequestedDimensionList = function (input, context) {
335
628
  return input
336
629
  .filter(function (e) { return e != null; })
@@ -351,6 +644,16 @@ var serializeAws_json1_1RequestStringList = function (input, context) {
351
644
  return entry;
352
645
  });
353
646
  };
647
+ var deserializeAws_json1_1AdditionalMetricsMap = function (output, context) {
648
+ return Object.entries(output).reduce(function (acc, _a) {
649
+ var _b;
650
+ var _c = __read(_a, 2), key = _c[0], value = _c[1];
651
+ if (value === null) {
652
+ return acc;
653
+ }
654
+ return __assign(__assign({}, acc), (_b = {}, _b[key] = __limitedParseDouble(value), _b));
655
+ }, {});
656
+ };
354
657
  var deserializeAws_json1_1DataPoint = function (output, context) {
355
658
  return {
356
659
  Timestamp: output.Timestamp !== undefined && output.Timestamp !== null
@@ -386,8 +689,44 @@ var deserializeAws_json1_1DescribeDimensionKeysResponse = function (output, cont
386
689
  : undefined,
387
690
  };
388
691
  };
692
+ var deserializeAws_json1_1DimensionDetail = function (output, context) {
693
+ return {
694
+ Identifier: __expectString(output.Identifier),
695
+ };
696
+ };
697
+ var deserializeAws_json1_1DimensionDetailList = function (output, context) {
698
+ return (output || [])
699
+ .filter(function (e) { return e != null; })
700
+ .map(function (entry) {
701
+ if (entry === null) {
702
+ return null;
703
+ }
704
+ return deserializeAws_json1_1DimensionDetail(entry, context);
705
+ });
706
+ };
707
+ var deserializeAws_json1_1DimensionGroupDetail = function (output, context) {
708
+ return {
709
+ Dimensions: output.Dimensions !== undefined && output.Dimensions !== null
710
+ ? deserializeAws_json1_1DimensionDetailList(output.Dimensions, context)
711
+ : undefined,
712
+ Group: __expectString(output.Group),
713
+ };
714
+ };
715
+ var deserializeAws_json1_1DimensionGroupDetailList = function (output, context) {
716
+ return (output || [])
717
+ .filter(function (e) { return e != null; })
718
+ .map(function (entry) {
719
+ if (entry === null) {
720
+ return null;
721
+ }
722
+ return deserializeAws_json1_1DimensionGroupDetail(entry, context);
723
+ });
724
+ };
389
725
  var deserializeAws_json1_1DimensionKeyDescription = function (output, context) {
390
726
  return {
727
+ AdditionalMetrics: output.AdditionalMetrics !== undefined && output.AdditionalMetrics !== null
728
+ ? deserializeAws_json1_1AdditionalMetricsMap(output.AdditionalMetrics, context)
729
+ : undefined,
391
730
  Dimensions: output.Dimensions !== undefined && output.Dimensions !== null
392
731
  ? deserializeAws_json1_1DimensionMap(output.Dimensions, context)
393
732
  : undefined,
@@ -434,6 +773,21 @@ var deserializeAws_json1_1DimensionMap = function (output, context) {
434
773
  return __assign(__assign({}, acc), (_b = {}, _b[key] = __expectString(value), _b));
435
774
  }, {});
436
775
  };
776
+ var deserializeAws_json1_1FeatureMetadata = function (output, context) {
777
+ return {
778
+ Status: __expectString(output.Status),
779
+ };
780
+ };
781
+ var deserializeAws_json1_1FeatureMetadataMap = function (output, context) {
782
+ return Object.entries(output).reduce(function (acc, _a) {
783
+ var _b;
784
+ var _c = __read(_a, 2), key = _c[0], value = _c[1];
785
+ if (value === null) {
786
+ return acc;
787
+ }
788
+ return __assign(__assign({}, acc), (_b = {}, _b[key] = deserializeAws_json1_1FeatureMetadata(value, context), _b));
789
+ }, {});
790
+ };
437
791
  var deserializeAws_json1_1GetDimensionKeyDetailsResponse = function (output, context) {
438
792
  return {
439
793
  Dimensions: output.Dimensions !== undefined && output.Dimensions !== null
@@ -441,6 +795,14 @@ var deserializeAws_json1_1GetDimensionKeyDetailsResponse = function (output, con
441
795
  : undefined,
442
796
  };
443
797
  };
798
+ var deserializeAws_json1_1GetResourceMetadataResponse = function (output, context) {
799
+ return {
800
+ Features: output.Features !== undefined && output.Features !== null
801
+ ? deserializeAws_json1_1FeatureMetadataMap(output.Features, context)
802
+ : undefined,
803
+ Identifier: __expectString(output.Identifier),
804
+ };
805
+ };
444
806
  var deserializeAws_json1_1GetResourceMetricsResponse = function (output, context) {
445
807
  return {
446
808
  AlignedEndTime: output.AlignedEndTime !== undefined && output.AlignedEndTime !== null
@@ -466,6 +828,40 @@ var deserializeAws_json1_1InvalidArgumentException = function (output, context)
466
828
  Message: __expectString(output.Message),
467
829
  };
468
830
  };
831
+ var deserializeAws_json1_1ListAvailableResourceDimensionsResponse = function (output, context) {
832
+ return {
833
+ MetricDimensions: output.MetricDimensions !== undefined && output.MetricDimensions !== null
834
+ ? deserializeAws_json1_1MetricDimensionsList(output.MetricDimensions, context)
835
+ : undefined,
836
+ NextToken: __expectString(output.NextToken),
837
+ };
838
+ };
839
+ var deserializeAws_json1_1ListAvailableResourceMetricsResponse = function (output, context) {
840
+ return {
841
+ Metrics: output.Metrics !== undefined && output.Metrics !== null
842
+ ? deserializeAws_json1_1ResponseResourceMetricList(output.Metrics, context)
843
+ : undefined,
844
+ NextToken: __expectString(output.NextToken),
845
+ };
846
+ };
847
+ var deserializeAws_json1_1MetricDimensionGroups = function (output, context) {
848
+ return {
849
+ Groups: output.Groups !== undefined && output.Groups !== null
850
+ ? deserializeAws_json1_1DimensionGroupDetailList(output.Groups, context)
851
+ : undefined,
852
+ Metric: __expectString(output.Metric),
853
+ };
854
+ };
855
+ var deserializeAws_json1_1MetricDimensionsList = function (output, context) {
856
+ return (output || [])
857
+ .filter(function (e) { return e != null; })
858
+ .map(function (entry) {
859
+ if (entry === null) {
860
+ return null;
861
+ }
862
+ return deserializeAws_json1_1MetricDimensionGroups(entry, context);
863
+ });
864
+ };
469
865
  var deserializeAws_json1_1MetricKeyDataPoints = function (output, context) {
470
866
  return {
471
867
  DataPoints: output.DataPoints !== undefined && output.DataPoints !== null
@@ -518,6 +914,13 @@ var deserializeAws_json1_1ResponsePartitionKeyList = function (output, context)
518
914
  return deserializeAws_json1_1ResponsePartitionKey(entry, context);
519
915
  });
520
916
  };
917
+ var deserializeAws_json1_1ResponseResourceMetric = function (output, context) {
918
+ return {
919
+ Description: __expectString(output.Description),
920
+ Metric: __expectString(output.Metric),
921
+ Unit: __expectString(output.Unit),
922
+ };
923
+ };
521
924
  var deserializeAws_json1_1ResponseResourceMetricKey = function (output, context) {
522
925
  return {
523
926
  Dimensions: output.Dimensions !== undefined && output.Dimensions !== null
@@ -526,6 +929,16 @@ var deserializeAws_json1_1ResponseResourceMetricKey = function (output, context)
526
929
  Metric: __expectString(output.Metric),
527
930
  };
528
931
  };
932
+ var deserializeAws_json1_1ResponseResourceMetricList = function (output, context) {
933
+ return (output || [])
934
+ .filter(function (e) { return e != null; })
935
+ .map(function (entry) {
936
+ if (entry === null) {
937
+ return null;
938
+ }
939
+ return deserializeAws_json1_1ResponseResourceMetric(entry, context);
940
+ });
941
+ };
529
942
  var deserializeMetadata = function (output) {
530
943
  var _a;
531
944
  return ({
@@ -1,8 +1,8 @@
1
- import { __assign } from "tslib";
1
+ import { __assign, __awaiter, __generator } from "tslib";
2
2
  import packageInfo from "../package.json";
3
3
  import { Sha256 } from "@aws-crypto/sha256-browser";
4
4
  import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver";
5
- import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
5
+ import { FetchHttpHandler as RequestHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
6
6
  import { invalidProvider } from "@aws-sdk/invalid-dependency";
7
7
  import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry";
8
8
  import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser";
@@ -10,8 +10,17 @@ import { calculateBodyLength } from "@aws-sdk/util-body-length-browser";
10
10
  import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser";
11
11
  import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-browser";
12
12
  import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
13
+ import { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
14
+ import { resolveDefaultsModeConfig } from "@aws-sdk/util-defaults-mode-browser";
13
15
  export var getRuntimeConfig = function (config) {
14
16
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
17
+ var defaultsMode = resolveDefaultsModeConfig(config);
18
+ var defaultConfigProvider = function () { return defaultsMode().then(loadConfigsForDefaultMode); };
15
19
  var clientSharedValues = getSharedRuntimeConfig(config);
16
- return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "browser", base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : (function (_) { return function () { return Promise.reject(new Error("Credential is missing")); }; }), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : DEFAULT_MAX_ATTEMPTS, region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : invalidProvider("Region is missing"), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new FetchHttpHandler(), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : (function () { return Promise.resolve(DEFAULT_RETRY_MODE); }), sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : Sha256, streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : streamCollector, useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : (function () { return Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT); }), useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : (function () { return Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT); }), utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : fromUtf8, utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : toUtf8 });
20
+ return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "browser", defaultsMode: defaultsMode, base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : (function (_) { return function () { return Promise.reject(new Error("Credential is missing")); }; }), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : DEFAULT_MAX_ATTEMPTS, region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : invalidProvider("Region is missing"), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new RequestHandler(defaultConfigProvider), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : (function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
21
+ switch (_a.label) {
22
+ case 0: return [4, defaultConfigProvider()];
23
+ case 1: return [2, (_a.sent()).retryMode || DEFAULT_RETRY_MODE];
24
+ }
25
+ }); }); }), sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : Sha256, streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : streamCollector, useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : (function () { return Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT); }), useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : (function () { return Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT); }), utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : fromUtf8, utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : toUtf8 });
17
26
  };
@@ -1,19 +1,28 @@
1
- import { __assign } from "tslib";
1
+ import { __assign, __awaiter, __generator } from "tslib";
2
2
  import packageInfo from "../package.json";
3
3
  import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts";
4
4
  import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, } from "@aws-sdk/config-resolver";
5
5
  import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
6
6
  import { Hash } from "@aws-sdk/hash-node";
7
- import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry";
7
+ import { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS, } from "@aws-sdk/middleware-retry";
8
8
  import { loadConfig as loadNodeConfig } from "@aws-sdk/node-config-provider";
9
- import { NodeHttpHandler, streamCollector } from "@aws-sdk/node-http-handler";
9
+ import { NodeHttpHandler as RequestHandler, streamCollector } from "@aws-sdk/node-http-handler";
10
10
  import { fromBase64, toBase64 } from "@aws-sdk/util-base64-node";
11
11
  import { calculateBodyLength } from "@aws-sdk/util-body-length-node";
12
12
  import { defaultUserAgent } from "@aws-sdk/util-user-agent-node";
13
13
  import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-node";
14
14
  import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
15
+ import { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
16
+ import { resolveDefaultsModeConfig } from "@aws-sdk/util-defaults-mode-node";
15
17
  export var getRuntimeConfig = function (config) {
16
18
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
19
+ var defaultsMode = resolveDefaultsModeConfig(config);
20
+ var defaultConfigProvider = function () { return defaultsMode().then(loadConfigsForDefaultMode); };
17
21
  var clientSharedValues = getSharedRuntimeConfig(config);
18
- return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "node", base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : decorateDefaultCredentialProvider(credentialDefaultProvider), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new NodeHttpHandler(), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : Hash.bind(null, "sha256"), streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : streamCollector, useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : fromUtf8, utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : toUtf8 });
22
+ return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "node", defaultsMode: defaultsMode, base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : decorateDefaultCredentialProvider(credentialDefaultProvider), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new RequestHandler(defaultConfigProvider), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : loadNodeConfig(__assign(__assign({}, NODE_RETRY_MODE_CONFIG_OPTIONS), { default: function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
23
+ switch (_a.label) {
24
+ case 0: return [4, defaultConfigProvider()];
25
+ case 1: return [2, (_a.sent()).retryMode || DEFAULT_RETRY_MODE];
26
+ }
27
+ }); }); } })), sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : Hash.bind(null, "sha256"), streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : streamCollector, useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : fromUtf8, utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : toUtf8 });
19
28
  };