@aws-sdk/client-pi 3.312.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_json1_1.js +73 -369
- package/dist-es/protocols/Aws_json1_1.js +74 -370
- package/package.json +6 -6
|
@@ -15,14 +15,14 @@ exports.se_DescribeDimensionKeysCommand = se_DescribeDimensionKeysCommand;
|
|
|
15
15
|
const se_GetDimensionKeyDetailsCommand = async (input, context) => {
|
|
16
16
|
const headers = sharedHeaders("GetDimensionKeyDetails");
|
|
17
17
|
let body;
|
|
18
|
-
body = JSON.stringify(
|
|
18
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
19
19
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
20
20
|
};
|
|
21
21
|
exports.se_GetDimensionKeyDetailsCommand = se_GetDimensionKeyDetailsCommand;
|
|
22
22
|
const se_GetResourceMetadataCommand = async (input, context) => {
|
|
23
23
|
const headers = sharedHeaders("GetResourceMetadata");
|
|
24
24
|
let body;
|
|
25
|
-
body = JSON.stringify(
|
|
25
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
26
26
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
27
27
|
};
|
|
28
28
|
exports.se_GetResourceMetadataCommand = se_GetResourceMetadataCommand;
|
|
@@ -36,14 +36,14 @@ exports.se_GetResourceMetricsCommand = se_GetResourceMetricsCommand;
|
|
|
36
36
|
const se_ListAvailableResourceDimensionsCommand = async (input, context) => {
|
|
37
37
|
const headers = sharedHeaders("ListAvailableResourceDimensions");
|
|
38
38
|
let body;
|
|
39
|
-
body = JSON.stringify(
|
|
39
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
40
40
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
41
41
|
};
|
|
42
42
|
exports.se_ListAvailableResourceDimensionsCommand = se_ListAvailableResourceDimensionsCommand;
|
|
43
43
|
const se_ListAvailableResourceMetricsCommand = async (input, context) => {
|
|
44
44
|
const headers = sharedHeaders("ListAvailableResourceMetrics");
|
|
45
45
|
let body;
|
|
46
|
-
body = JSON.stringify(
|
|
46
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
47
47
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
48
48
|
};
|
|
49
49
|
exports.se_ListAvailableResourceMetricsCommand = se_ListAvailableResourceMetricsCommand;
|
|
@@ -58,7 +58,7 @@ const de_DescribeDimensionKeysCommand = async (output, context) => {
|
|
|
58
58
|
$metadata: deserializeMetadata(output),
|
|
59
59
|
...contents,
|
|
60
60
|
};
|
|
61
|
-
return
|
|
61
|
+
return response;
|
|
62
62
|
};
|
|
63
63
|
exports.de_DescribeDimensionKeysCommand = de_DescribeDimensionKeysCommand;
|
|
64
64
|
const de_DescribeDimensionKeysCommandError = async (output, context) => {
|
|
@@ -79,10 +79,9 @@ const de_DescribeDimensionKeysCommandError = async (output, context) => {
|
|
|
79
79
|
throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
|
|
80
80
|
default:
|
|
81
81
|
const parsedBody = parsedOutput.body;
|
|
82
|
-
|
|
82
|
+
return throwDefaultError({
|
|
83
83
|
output,
|
|
84
84
|
parsedBody,
|
|
85
|
-
exceptionCtor: PIServiceException_1.PIServiceException,
|
|
86
85
|
errorCode,
|
|
87
86
|
});
|
|
88
87
|
}
|
|
@@ -93,12 +92,12 @@ const de_GetDimensionKeyDetailsCommand = async (output, context) => {
|
|
|
93
92
|
}
|
|
94
93
|
const data = await parseBody(output.body, context);
|
|
95
94
|
let contents = {};
|
|
96
|
-
contents =
|
|
95
|
+
contents = (0, smithy_client_1._json)(data);
|
|
97
96
|
const response = {
|
|
98
97
|
$metadata: deserializeMetadata(output),
|
|
99
98
|
...contents,
|
|
100
99
|
};
|
|
101
|
-
return
|
|
100
|
+
return response;
|
|
102
101
|
};
|
|
103
102
|
exports.de_GetDimensionKeyDetailsCommand = de_GetDimensionKeyDetailsCommand;
|
|
104
103
|
const de_GetDimensionKeyDetailsCommandError = async (output, context) => {
|
|
@@ -119,10 +118,9 @@ const de_GetDimensionKeyDetailsCommandError = async (output, context) => {
|
|
|
119
118
|
throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
|
|
120
119
|
default:
|
|
121
120
|
const parsedBody = parsedOutput.body;
|
|
122
|
-
|
|
121
|
+
return throwDefaultError({
|
|
123
122
|
output,
|
|
124
123
|
parsedBody,
|
|
125
|
-
exceptionCtor: PIServiceException_1.PIServiceException,
|
|
126
124
|
errorCode,
|
|
127
125
|
});
|
|
128
126
|
}
|
|
@@ -133,12 +131,12 @@ const de_GetResourceMetadataCommand = async (output, context) => {
|
|
|
133
131
|
}
|
|
134
132
|
const data = await parseBody(output.body, context);
|
|
135
133
|
let contents = {};
|
|
136
|
-
contents =
|
|
134
|
+
contents = (0, smithy_client_1._json)(data);
|
|
137
135
|
const response = {
|
|
138
136
|
$metadata: deserializeMetadata(output),
|
|
139
137
|
...contents,
|
|
140
138
|
};
|
|
141
|
-
return
|
|
139
|
+
return response;
|
|
142
140
|
};
|
|
143
141
|
exports.de_GetResourceMetadataCommand = de_GetResourceMetadataCommand;
|
|
144
142
|
const de_GetResourceMetadataCommandError = async (output, context) => {
|
|
@@ -159,10 +157,9 @@ const de_GetResourceMetadataCommandError = async (output, context) => {
|
|
|
159
157
|
throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
|
|
160
158
|
default:
|
|
161
159
|
const parsedBody = parsedOutput.body;
|
|
162
|
-
|
|
160
|
+
return throwDefaultError({
|
|
163
161
|
output,
|
|
164
162
|
parsedBody,
|
|
165
|
-
exceptionCtor: PIServiceException_1.PIServiceException,
|
|
166
163
|
errorCode,
|
|
167
164
|
});
|
|
168
165
|
}
|
|
@@ -178,7 +175,7 @@ const de_GetResourceMetricsCommand = async (output, context) => {
|
|
|
178
175
|
$metadata: deserializeMetadata(output),
|
|
179
176
|
...contents,
|
|
180
177
|
};
|
|
181
|
-
return
|
|
178
|
+
return response;
|
|
182
179
|
};
|
|
183
180
|
exports.de_GetResourceMetricsCommand = de_GetResourceMetricsCommand;
|
|
184
181
|
const de_GetResourceMetricsCommandError = async (output, context) => {
|
|
@@ -199,10 +196,9 @@ const de_GetResourceMetricsCommandError = async (output, context) => {
|
|
|
199
196
|
throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
|
|
200
197
|
default:
|
|
201
198
|
const parsedBody = parsedOutput.body;
|
|
202
|
-
|
|
199
|
+
return throwDefaultError({
|
|
203
200
|
output,
|
|
204
201
|
parsedBody,
|
|
205
|
-
exceptionCtor: PIServiceException_1.PIServiceException,
|
|
206
202
|
errorCode,
|
|
207
203
|
});
|
|
208
204
|
}
|
|
@@ -213,12 +209,12 @@ const de_ListAvailableResourceDimensionsCommand = async (output, context) => {
|
|
|
213
209
|
}
|
|
214
210
|
const data = await parseBody(output.body, context);
|
|
215
211
|
let contents = {};
|
|
216
|
-
contents =
|
|
212
|
+
contents = (0, smithy_client_1._json)(data);
|
|
217
213
|
const response = {
|
|
218
214
|
$metadata: deserializeMetadata(output),
|
|
219
215
|
...contents,
|
|
220
216
|
};
|
|
221
|
-
return
|
|
217
|
+
return response;
|
|
222
218
|
};
|
|
223
219
|
exports.de_ListAvailableResourceDimensionsCommand = de_ListAvailableResourceDimensionsCommand;
|
|
224
220
|
const de_ListAvailableResourceDimensionsCommandError = async (output, context) => {
|
|
@@ -239,10 +235,9 @@ const de_ListAvailableResourceDimensionsCommandError = async (output, context) =
|
|
|
239
235
|
throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
|
|
240
236
|
default:
|
|
241
237
|
const parsedBody = parsedOutput.body;
|
|
242
|
-
|
|
238
|
+
return throwDefaultError({
|
|
243
239
|
output,
|
|
244
240
|
parsedBody,
|
|
245
|
-
exceptionCtor: PIServiceException_1.PIServiceException,
|
|
246
241
|
errorCode,
|
|
247
242
|
});
|
|
248
243
|
}
|
|
@@ -253,12 +248,12 @@ const de_ListAvailableResourceMetricsCommand = async (output, context) => {
|
|
|
253
248
|
}
|
|
254
249
|
const data = await parseBody(output.body, context);
|
|
255
250
|
let contents = {};
|
|
256
|
-
contents =
|
|
251
|
+
contents = (0, smithy_client_1._json)(data);
|
|
257
252
|
const response = {
|
|
258
253
|
$metadata: deserializeMetadata(output),
|
|
259
254
|
...contents,
|
|
260
255
|
};
|
|
261
|
-
return
|
|
256
|
+
return response;
|
|
262
257
|
};
|
|
263
258
|
exports.de_ListAvailableResourceMetricsCommand = de_ListAvailableResourceMetricsCommand;
|
|
264
259
|
const de_ListAvailableResourceMetricsCommandError = async (output, context) => {
|
|
@@ -279,17 +274,16 @@ const de_ListAvailableResourceMetricsCommandError = async (output, context) => {
|
|
|
279
274
|
throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
|
|
280
275
|
default:
|
|
281
276
|
const parsedBody = parsedOutput.body;
|
|
282
|
-
|
|
277
|
+
return throwDefaultError({
|
|
283
278
|
output,
|
|
284
279
|
parsedBody,
|
|
285
|
-
exceptionCtor: PIServiceException_1.PIServiceException,
|
|
286
280
|
errorCode,
|
|
287
281
|
});
|
|
288
282
|
}
|
|
289
283
|
};
|
|
290
284
|
const de_InternalServiceErrorRes = async (parsedOutput, context) => {
|
|
291
285
|
const body = parsedOutput.body;
|
|
292
|
-
const deserialized =
|
|
286
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
293
287
|
const exception = new models_0_1.InternalServiceError({
|
|
294
288
|
$metadata: deserializeMetadata(parsedOutput),
|
|
295
289
|
...deserialized,
|
|
@@ -298,7 +292,7 @@ const de_InternalServiceErrorRes = async (parsedOutput, context) => {
|
|
|
298
292
|
};
|
|
299
293
|
const de_InvalidArgumentExceptionRes = async (parsedOutput, context) => {
|
|
300
294
|
const body = parsedOutput.body;
|
|
301
|
-
const deserialized =
|
|
295
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
302
296
|
const exception = new models_0_1.InvalidArgumentException({
|
|
303
297
|
$metadata: deserializeMetadata(parsedOutput),
|
|
304
298
|
...deserialized,
|
|
@@ -307,142 +301,40 @@ const de_InvalidArgumentExceptionRes = async (parsedOutput, context) => {
|
|
|
307
301
|
};
|
|
308
302
|
const de_NotAuthorizedExceptionRes = async (parsedOutput, context) => {
|
|
309
303
|
const body = parsedOutput.body;
|
|
310
|
-
const deserialized =
|
|
304
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
311
305
|
const exception = new models_0_1.NotAuthorizedException({
|
|
312
306
|
$metadata: deserializeMetadata(parsedOutput),
|
|
313
307
|
...deserialized,
|
|
314
308
|
});
|
|
315
309
|
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
316
310
|
};
|
|
317
|
-
const se_AdditionalMetricsList = (input, context) => {
|
|
318
|
-
return input
|
|
319
|
-
.filter((e) => e != null)
|
|
320
|
-
.map((entry) => {
|
|
321
|
-
return entry;
|
|
322
|
-
});
|
|
323
|
-
};
|
|
324
311
|
const se_DescribeDimensionKeysRequest = (input, context) => {
|
|
325
|
-
return {
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
...(input.ServiceType != null && { ServiceType: input.ServiceType }),
|
|
339
|
-
...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }),
|
|
340
|
-
};
|
|
341
|
-
};
|
|
342
|
-
const se_DimensionGroup = (input, context) => {
|
|
343
|
-
return {
|
|
344
|
-
...(input.Dimensions != null && { Dimensions: se_RequestStringList(input.Dimensions, context) }),
|
|
345
|
-
...(input.Group != null && { Group: input.Group }),
|
|
346
|
-
...(input.Limit != null && { Limit: input.Limit }),
|
|
347
|
-
};
|
|
348
|
-
};
|
|
349
|
-
const se_DimensionsMetricList = (input, context) => {
|
|
350
|
-
return input
|
|
351
|
-
.filter((e) => e != null)
|
|
352
|
-
.map((entry) => {
|
|
353
|
-
return entry;
|
|
312
|
+
return (0, smithy_client_1.take)(input, {
|
|
313
|
+
AdditionalMetrics: smithy_client_1._json,
|
|
314
|
+
EndTime: (_) => Math.round(_.getTime() / 1000),
|
|
315
|
+
Filter: smithy_client_1._json,
|
|
316
|
+
GroupBy: smithy_client_1._json,
|
|
317
|
+
Identifier: [],
|
|
318
|
+
MaxResults: [],
|
|
319
|
+
Metric: [],
|
|
320
|
+
NextToken: [],
|
|
321
|
+
PartitionBy: smithy_client_1._json,
|
|
322
|
+
PeriodInSeconds: [],
|
|
323
|
+
ServiceType: [],
|
|
324
|
+
StartTime: (_) => Math.round(_.getTime() / 1000),
|
|
354
325
|
});
|
|
355
326
|
};
|
|
356
|
-
const se_GetDimensionKeyDetailsRequest = (input, context) => {
|
|
357
|
-
return {
|
|
358
|
-
...(input.Group != null && { Group: input.Group }),
|
|
359
|
-
...(input.GroupIdentifier != null && { GroupIdentifier: input.GroupIdentifier }),
|
|
360
|
-
...(input.Identifier != null && { Identifier: input.Identifier }),
|
|
361
|
-
...(input.RequestedDimensions != null && {
|
|
362
|
-
RequestedDimensions: se_RequestedDimensionList(input.RequestedDimensions, context),
|
|
363
|
-
}),
|
|
364
|
-
...(input.ServiceType != null && { ServiceType: input.ServiceType }),
|
|
365
|
-
};
|
|
366
|
-
};
|
|
367
|
-
const se_GetResourceMetadataRequest = (input, context) => {
|
|
368
|
-
return {
|
|
369
|
-
...(input.Identifier != null && { Identifier: input.Identifier }),
|
|
370
|
-
...(input.ServiceType != null && { ServiceType: input.ServiceType }),
|
|
371
|
-
};
|
|
372
|
-
};
|
|
373
327
|
const se_GetResourceMetricsRequest = (input, context) => {
|
|
374
|
-
return {
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
};
|
|
385
|
-
};
|
|
386
|
-
const se_ListAvailableResourceDimensionsRequest = (input, context) => {
|
|
387
|
-
return {
|
|
388
|
-
...(input.Identifier != null && { Identifier: input.Identifier }),
|
|
389
|
-
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
390
|
-
...(input.Metrics != null && { Metrics: se_DimensionsMetricList(input.Metrics, context) }),
|
|
391
|
-
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
392
|
-
...(input.ServiceType != null && { ServiceType: input.ServiceType }),
|
|
393
|
-
};
|
|
394
|
-
};
|
|
395
|
-
const se_ListAvailableResourceMetricsRequest = (input, context) => {
|
|
396
|
-
return {
|
|
397
|
-
...(input.Identifier != null && { Identifier: input.Identifier }),
|
|
398
|
-
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
399
|
-
...(input.MetricTypes != null && { MetricTypes: se_MetricTypeList(input.MetricTypes, context) }),
|
|
400
|
-
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
401
|
-
...(input.ServiceType != null && { ServiceType: input.ServiceType }),
|
|
402
|
-
};
|
|
403
|
-
};
|
|
404
|
-
const se_MetricQuery = (input, context) => {
|
|
405
|
-
return {
|
|
406
|
-
...(input.Filter != null && { Filter: se_MetricQueryFilterMap(input.Filter, context) }),
|
|
407
|
-
...(input.GroupBy != null && { GroupBy: se_DimensionGroup(input.GroupBy, context) }),
|
|
408
|
-
...(input.Metric != null && { Metric: input.Metric }),
|
|
409
|
-
};
|
|
410
|
-
};
|
|
411
|
-
const se_MetricQueryFilterMap = (input, context) => {
|
|
412
|
-
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
413
|
-
if (value === null) {
|
|
414
|
-
return acc;
|
|
415
|
-
}
|
|
416
|
-
acc[key] = value;
|
|
417
|
-
return acc;
|
|
418
|
-
}, {});
|
|
419
|
-
};
|
|
420
|
-
const se_MetricQueryList = (input, context) => {
|
|
421
|
-
return input
|
|
422
|
-
.filter((e) => e != null)
|
|
423
|
-
.map((entry) => {
|
|
424
|
-
return se_MetricQuery(entry, context);
|
|
425
|
-
});
|
|
426
|
-
};
|
|
427
|
-
const se_MetricTypeList = (input, context) => {
|
|
428
|
-
return input
|
|
429
|
-
.filter((e) => e != null)
|
|
430
|
-
.map((entry) => {
|
|
431
|
-
return entry;
|
|
432
|
-
});
|
|
433
|
-
};
|
|
434
|
-
const se_RequestedDimensionList = (input, context) => {
|
|
435
|
-
return input
|
|
436
|
-
.filter((e) => e != null)
|
|
437
|
-
.map((entry) => {
|
|
438
|
-
return entry;
|
|
439
|
-
});
|
|
440
|
-
};
|
|
441
|
-
const se_RequestStringList = (input, context) => {
|
|
442
|
-
return input
|
|
443
|
-
.filter((e) => e != null)
|
|
444
|
-
.map((entry) => {
|
|
445
|
-
return entry;
|
|
328
|
+
return (0, smithy_client_1.take)(input, {
|
|
329
|
+
EndTime: (_) => Math.round(_.getTime() / 1000),
|
|
330
|
+
Identifier: [],
|
|
331
|
+
MaxResults: [],
|
|
332
|
+
MetricQueries: smithy_client_1._json,
|
|
333
|
+
NextToken: [],
|
|
334
|
+
PeriodAlignment: [],
|
|
335
|
+
PeriodInSeconds: [],
|
|
336
|
+
ServiceType: [],
|
|
337
|
+
StartTime: (_) => Math.round(_.getTime() / 1000),
|
|
446
338
|
});
|
|
447
339
|
};
|
|
448
340
|
const de_AdditionalMetricsMap = (output, context) => {
|
|
@@ -455,204 +347,63 @@ const de_AdditionalMetricsMap = (output, context) => {
|
|
|
455
347
|
}, {});
|
|
456
348
|
};
|
|
457
349
|
const de_DataPoint = (output, context) => {
|
|
458
|
-
return {
|
|
459
|
-
Timestamp:
|
|
460
|
-
Value:
|
|
461
|
-
};
|
|
350
|
+
return (0, smithy_client_1.take)(output, {
|
|
351
|
+
Timestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
352
|
+
Value: smithy_client_1.limitedParseDouble,
|
|
353
|
+
});
|
|
462
354
|
};
|
|
463
355
|
const de_DataPointsList = (output, context) => {
|
|
464
356
|
const retVal = (output || [])
|
|
465
357
|
.filter((e) => e != null)
|
|
466
358
|
.map((entry) => {
|
|
467
|
-
if (entry === null) {
|
|
468
|
-
return null;
|
|
469
|
-
}
|
|
470
359
|
return de_DataPoint(entry, context);
|
|
471
360
|
});
|
|
472
361
|
return retVal;
|
|
473
362
|
};
|
|
474
363
|
const de_DescribeDimensionKeysResponse = (output, context) => {
|
|
475
|
-
return {
|
|
476
|
-
AlignedEndTime:
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
: undefined,
|
|
482
|
-
Keys: output.Keys != null ? de_DimensionKeyDescriptionList(output.Keys, context) : undefined,
|
|
483
|
-
NextToken: (0, smithy_client_1.expectString)(output.NextToken),
|
|
484
|
-
PartitionKeys: output.PartitionKeys != null ? de_ResponsePartitionKeyList(output.PartitionKeys, context) : undefined,
|
|
485
|
-
};
|
|
486
|
-
};
|
|
487
|
-
const de_DimensionDetail = (output, context) => {
|
|
488
|
-
return {
|
|
489
|
-
Identifier: (0, smithy_client_1.expectString)(output.Identifier),
|
|
490
|
-
};
|
|
491
|
-
};
|
|
492
|
-
const de_DimensionDetailList = (output, context) => {
|
|
493
|
-
const retVal = (output || [])
|
|
494
|
-
.filter((e) => e != null)
|
|
495
|
-
.map((entry) => {
|
|
496
|
-
if (entry === null) {
|
|
497
|
-
return null;
|
|
498
|
-
}
|
|
499
|
-
return de_DimensionDetail(entry, context);
|
|
500
|
-
});
|
|
501
|
-
return retVal;
|
|
502
|
-
};
|
|
503
|
-
const de_DimensionGroupDetail = (output, context) => {
|
|
504
|
-
return {
|
|
505
|
-
Dimensions: output.Dimensions != null ? de_DimensionDetailList(output.Dimensions, context) : undefined,
|
|
506
|
-
Group: (0, smithy_client_1.expectString)(output.Group),
|
|
507
|
-
};
|
|
508
|
-
};
|
|
509
|
-
const de_DimensionGroupDetailList = (output, context) => {
|
|
510
|
-
const retVal = (output || [])
|
|
511
|
-
.filter((e) => e != null)
|
|
512
|
-
.map((entry) => {
|
|
513
|
-
if (entry === null) {
|
|
514
|
-
return null;
|
|
515
|
-
}
|
|
516
|
-
return de_DimensionGroupDetail(entry, context);
|
|
364
|
+
return (0, smithy_client_1.take)(output, {
|
|
365
|
+
AlignedEndTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
366
|
+
AlignedStartTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
367
|
+
Keys: (_) => de_DimensionKeyDescriptionList(_, context),
|
|
368
|
+
NextToken: smithy_client_1.expectString,
|
|
369
|
+
PartitionKeys: smithy_client_1._json,
|
|
517
370
|
});
|
|
518
|
-
return retVal;
|
|
519
371
|
};
|
|
520
372
|
const de_DimensionKeyDescription = (output, context) => {
|
|
521
|
-
return {
|
|
522
|
-
AdditionalMetrics:
|
|
523
|
-
Dimensions:
|
|
524
|
-
Partitions:
|
|
525
|
-
Total:
|
|
526
|
-
};
|
|
373
|
+
return (0, smithy_client_1.take)(output, {
|
|
374
|
+
AdditionalMetrics: (_) => de_AdditionalMetricsMap(_, context),
|
|
375
|
+
Dimensions: smithy_client_1._json,
|
|
376
|
+
Partitions: (_) => de_MetricValuesList(_, context),
|
|
377
|
+
Total: smithy_client_1.limitedParseDouble,
|
|
378
|
+
});
|
|
527
379
|
};
|
|
528
380
|
const de_DimensionKeyDescriptionList = (output, context) => {
|
|
529
381
|
const retVal = (output || [])
|
|
530
382
|
.filter((e) => e != null)
|
|
531
383
|
.map((entry) => {
|
|
532
|
-
if (entry === null) {
|
|
533
|
-
return null;
|
|
534
|
-
}
|
|
535
384
|
return de_DimensionKeyDescription(entry, context);
|
|
536
385
|
});
|
|
537
386
|
return retVal;
|
|
538
387
|
};
|
|
539
|
-
const de_DimensionKeyDetail = (output, context) => {
|
|
540
|
-
return {
|
|
541
|
-
Dimension: (0, smithy_client_1.expectString)(output.Dimension),
|
|
542
|
-
Status: (0, smithy_client_1.expectString)(output.Status),
|
|
543
|
-
Value: (0, smithy_client_1.expectString)(output.Value),
|
|
544
|
-
};
|
|
545
|
-
};
|
|
546
|
-
const de_DimensionKeyDetailList = (output, context) => {
|
|
547
|
-
const retVal = (output || [])
|
|
548
|
-
.filter((e) => e != null)
|
|
549
|
-
.map((entry) => {
|
|
550
|
-
if (entry === null) {
|
|
551
|
-
return null;
|
|
552
|
-
}
|
|
553
|
-
return de_DimensionKeyDetail(entry, context);
|
|
554
|
-
});
|
|
555
|
-
return retVal;
|
|
556
|
-
};
|
|
557
|
-
const de_DimensionMap = (output, context) => {
|
|
558
|
-
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
559
|
-
if (value === null) {
|
|
560
|
-
return acc;
|
|
561
|
-
}
|
|
562
|
-
acc[key] = (0, smithy_client_1.expectString)(value);
|
|
563
|
-
return acc;
|
|
564
|
-
}, {});
|
|
565
|
-
};
|
|
566
|
-
const de_FeatureMetadata = (output, context) => {
|
|
567
|
-
return {
|
|
568
|
-
Status: (0, smithy_client_1.expectString)(output.Status),
|
|
569
|
-
};
|
|
570
|
-
};
|
|
571
|
-
const de_FeatureMetadataMap = (output, context) => {
|
|
572
|
-
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
573
|
-
if (value === null) {
|
|
574
|
-
return acc;
|
|
575
|
-
}
|
|
576
|
-
acc[key] = de_FeatureMetadata(value, context);
|
|
577
|
-
return acc;
|
|
578
|
-
}, {});
|
|
579
|
-
};
|
|
580
|
-
const de_GetDimensionKeyDetailsResponse = (output, context) => {
|
|
581
|
-
return {
|
|
582
|
-
Dimensions: output.Dimensions != null ? de_DimensionKeyDetailList(output.Dimensions, context) : undefined,
|
|
583
|
-
};
|
|
584
|
-
};
|
|
585
|
-
const de_GetResourceMetadataResponse = (output, context) => {
|
|
586
|
-
return {
|
|
587
|
-
Features: output.Features != null ? de_FeatureMetadataMap(output.Features, context) : undefined,
|
|
588
|
-
Identifier: (0, smithy_client_1.expectString)(output.Identifier),
|
|
589
|
-
};
|
|
590
|
-
};
|
|
591
388
|
const de_GetResourceMetricsResponse = (output, context) => {
|
|
592
|
-
return {
|
|
593
|
-
AlignedEndTime:
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
: undefined,
|
|
599
|
-
Identifier: (0, smithy_client_1.expectString)(output.Identifier),
|
|
600
|
-
MetricList: output.MetricList != null ? de_MetricKeyDataPointsList(output.MetricList, context) : undefined,
|
|
601
|
-
NextToken: (0, smithy_client_1.expectString)(output.NextToken),
|
|
602
|
-
};
|
|
603
|
-
};
|
|
604
|
-
const de_InternalServiceError = (output, context) => {
|
|
605
|
-
return {
|
|
606
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
607
|
-
};
|
|
608
|
-
};
|
|
609
|
-
const de_InvalidArgumentException = (output, context) => {
|
|
610
|
-
return {
|
|
611
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
612
|
-
};
|
|
613
|
-
};
|
|
614
|
-
const de_ListAvailableResourceDimensionsResponse = (output, context) => {
|
|
615
|
-
return {
|
|
616
|
-
MetricDimensions: output.MetricDimensions != null ? de_MetricDimensionsList(output.MetricDimensions, context) : undefined,
|
|
617
|
-
NextToken: (0, smithy_client_1.expectString)(output.NextToken),
|
|
618
|
-
};
|
|
619
|
-
};
|
|
620
|
-
const de_ListAvailableResourceMetricsResponse = (output, context) => {
|
|
621
|
-
return {
|
|
622
|
-
Metrics: output.Metrics != null ? de_ResponseResourceMetricList(output.Metrics, context) : undefined,
|
|
623
|
-
NextToken: (0, smithy_client_1.expectString)(output.NextToken),
|
|
624
|
-
};
|
|
625
|
-
};
|
|
626
|
-
const de_MetricDimensionGroups = (output, context) => {
|
|
627
|
-
return {
|
|
628
|
-
Groups: output.Groups != null ? de_DimensionGroupDetailList(output.Groups, context) : undefined,
|
|
629
|
-
Metric: (0, smithy_client_1.expectString)(output.Metric),
|
|
630
|
-
};
|
|
631
|
-
};
|
|
632
|
-
const de_MetricDimensionsList = (output, context) => {
|
|
633
|
-
const retVal = (output || [])
|
|
634
|
-
.filter((e) => e != null)
|
|
635
|
-
.map((entry) => {
|
|
636
|
-
if (entry === null) {
|
|
637
|
-
return null;
|
|
638
|
-
}
|
|
639
|
-
return de_MetricDimensionGroups(entry, context);
|
|
389
|
+
return (0, smithy_client_1.take)(output, {
|
|
390
|
+
AlignedEndTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
391
|
+
AlignedStartTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
392
|
+
Identifier: smithy_client_1.expectString,
|
|
393
|
+
MetricList: (_) => de_MetricKeyDataPointsList(_, context),
|
|
394
|
+
NextToken: smithy_client_1.expectString,
|
|
640
395
|
});
|
|
641
|
-
return retVal;
|
|
642
396
|
};
|
|
643
397
|
const de_MetricKeyDataPoints = (output, context) => {
|
|
644
|
-
return {
|
|
645
|
-
DataPoints:
|
|
646
|
-
Key:
|
|
647
|
-
};
|
|
398
|
+
return (0, smithy_client_1.take)(output, {
|
|
399
|
+
DataPoints: (_) => de_DataPointsList(_, context),
|
|
400
|
+
Key: smithy_client_1._json,
|
|
401
|
+
});
|
|
648
402
|
};
|
|
649
403
|
const de_MetricKeyDataPointsList = (output, context) => {
|
|
650
404
|
const retVal = (output || [])
|
|
651
405
|
.filter((e) => e != null)
|
|
652
406
|
.map((entry) => {
|
|
653
|
-
if (entry === null) {
|
|
654
|
-
return null;
|
|
655
|
-
}
|
|
656
407
|
return de_MetricKeyDataPoints(entry, context);
|
|
657
408
|
});
|
|
658
409
|
return retVal;
|
|
@@ -661,58 +412,10 @@ const de_MetricValuesList = (output, context) => {
|
|
|
661
412
|
const retVal = (output || [])
|
|
662
413
|
.filter((e) => e != null)
|
|
663
414
|
.map((entry) => {
|
|
664
|
-
if (entry === null) {
|
|
665
|
-
return null;
|
|
666
|
-
}
|
|
667
415
|
return (0, smithy_client_1.limitedParseDouble)(entry);
|
|
668
416
|
});
|
|
669
417
|
return retVal;
|
|
670
418
|
};
|
|
671
|
-
const de_NotAuthorizedException = (output, context) => {
|
|
672
|
-
return {
|
|
673
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
674
|
-
};
|
|
675
|
-
};
|
|
676
|
-
const de_ResponsePartitionKey = (output, context) => {
|
|
677
|
-
return {
|
|
678
|
-
Dimensions: output.Dimensions != null ? de_DimensionMap(output.Dimensions, context) : undefined,
|
|
679
|
-
};
|
|
680
|
-
};
|
|
681
|
-
const de_ResponsePartitionKeyList = (output, context) => {
|
|
682
|
-
const retVal = (output || [])
|
|
683
|
-
.filter((e) => e != null)
|
|
684
|
-
.map((entry) => {
|
|
685
|
-
if (entry === null) {
|
|
686
|
-
return null;
|
|
687
|
-
}
|
|
688
|
-
return de_ResponsePartitionKey(entry, context);
|
|
689
|
-
});
|
|
690
|
-
return retVal;
|
|
691
|
-
};
|
|
692
|
-
const de_ResponseResourceMetric = (output, context) => {
|
|
693
|
-
return {
|
|
694
|
-
Description: (0, smithy_client_1.expectString)(output.Description),
|
|
695
|
-
Metric: (0, smithy_client_1.expectString)(output.Metric),
|
|
696
|
-
Unit: (0, smithy_client_1.expectString)(output.Unit),
|
|
697
|
-
};
|
|
698
|
-
};
|
|
699
|
-
const de_ResponseResourceMetricKey = (output, context) => {
|
|
700
|
-
return {
|
|
701
|
-
Dimensions: output.Dimensions != null ? de_DimensionMap(output.Dimensions, context) : undefined,
|
|
702
|
-
Metric: (0, smithy_client_1.expectString)(output.Metric),
|
|
703
|
-
};
|
|
704
|
-
};
|
|
705
|
-
const de_ResponseResourceMetricList = (output, context) => {
|
|
706
|
-
const retVal = (output || [])
|
|
707
|
-
.filter((e) => e != null)
|
|
708
|
-
.map((entry) => {
|
|
709
|
-
if (entry === null) {
|
|
710
|
-
return null;
|
|
711
|
-
}
|
|
712
|
-
return de_ResponseResourceMetric(entry, context);
|
|
713
|
-
});
|
|
714
|
-
return retVal;
|
|
715
|
-
};
|
|
716
419
|
const deserializeMetadata = (output) => ({
|
|
717
420
|
httpStatusCode: output.statusCode,
|
|
718
421
|
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
@@ -726,6 +429,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
|
|
|
726
429
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
727
430
|
};
|
|
728
431
|
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
432
|
+
const throwDefaultError = (0, smithy_client_1.withBaseException)(PIServiceException_1.PIServiceException);
|
|
729
433
|
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
|
|
730
434
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
731
435
|
const contents = {
|