@aws-sdk/client-resource-groups-tagging-api 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.
@@ -6,82 +6,58 @@ const smithy_client_1 = require("@aws-sdk/smithy-client");
6
6
  const models_0_1 = require("../models/models_0");
7
7
  const ResourceGroupsTaggingAPIServiceException_1 = require("../models/ResourceGroupsTaggingAPIServiceException");
8
8
  const se_DescribeReportCreationCommand = async (input, context) => {
9
- const headers = {
10
- "content-type": "application/x-amz-json-1.1",
11
- "x-amz-target": "ResourceGroupsTaggingAPI_20170126.DescribeReportCreation",
12
- };
9
+ const headers = sharedHeaders("DescribeReportCreation");
13
10
  let body;
14
- body = JSON.stringify(se_DescribeReportCreationInput(input, context));
11
+ body = JSON.stringify((0, smithy_client_1._json)(input));
15
12
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
16
13
  };
17
14
  exports.se_DescribeReportCreationCommand = se_DescribeReportCreationCommand;
18
15
  const se_GetComplianceSummaryCommand = async (input, context) => {
19
- const headers = {
20
- "content-type": "application/x-amz-json-1.1",
21
- "x-amz-target": "ResourceGroupsTaggingAPI_20170126.GetComplianceSummary",
22
- };
16
+ const headers = sharedHeaders("GetComplianceSummary");
23
17
  let body;
24
- body = JSON.stringify(se_GetComplianceSummaryInput(input, context));
18
+ body = JSON.stringify((0, smithy_client_1._json)(input));
25
19
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
26
20
  };
27
21
  exports.se_GetComplianceSummaryCommand = se_GetComplianceSummaryCommand;
28
22
  const se_GetResourcesCommand = async (input, context) => {
29
- const headers = {
30
- "content-type": "application/x-amz-json-1.1",
31
- "x-amz-target": "ResourceGroupsTaggingAPI_20170126.GetResources",
32
- };
23
+ const headers = sharedHeaders("GetResources");
33
24
  let body;
34
- body = JSON.stringify(se_GetResourcesInput(input, context));
25
+ body = JSON.stringify((0, smithy_client_1._json)(input));
35
26
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
36
27
  };
37
28
  exports.se_GetResourcesCommand = se_GetResourcesCommand;
38
29
  const se_GetTagKeysCommand = async (input, context) => {
39
- const headers = {
40
- "content-type": "application/x-amz-json-1.1",
41
- "x-amz-target": "ResourceGroupsTaggingAPI_20170126.GetTagKeys",
42
- };
30
+ const headers = sharedHeaders("GetTagKeys");
43
31
  let body;
44
- body = JSON.stringify(se_GetTagKeysInput(input, context));
32
+ body = JSON.stringify((0, smithy_client_1._json)(input));
45
33
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
46
34
  };
47
35
  exports.se_GetTagKeysCommand = se_GetTagKeysCommand;
48
36
  const se_GetTagValuesCommand = async (input, context) => {
49
- const headers = {
50
- "content-type": "application/x-amz-json-1.1",
51
- "x-amz-target": "ResourceGroupsTaggingAPI_20170126.GetTagValues",
52
- };
37
+ const headers = sharedHeaders("GetTagValues");
53
38
  let body;
54
- body = JSON.stringify(se_GetTagValuesInput(input, context));
39
+ body = JSON.stringify((0, smithy_client_1._json)(input));
55
40
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
56
41
  };
57
42
  exports.se_GetTagValuesCommand = se_GetTagValuesCommand;
58
43
  const se_StartReportCreationCommand = async (input, context) => {
59
- const headers = {
60
- "content-type": "application/x-amz-json-1.1",
61
- "x-amz-target": "ResourceGroupsTaggingAPI_20170126.StartReportCreation",
62
- };
44
+ const headers = sharedHeaders("StartReportCreation");
63
45
  let body;
64
- body = JSON.stringify(se_StartReportCreationInput(input, context));
46
+ body = JSON.stringify((0, smithy_client_1._json)(input));
65
47
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
66
48
  };
67
49
  exports.se_StartReportCreationCommand = se_StartReportCreationCommand;
68
50
  const se_TagResourcesCommand = async (input, context) => {
69
- const headers = {
70
- "content-type": "application/x-amz-json-1.1",
71
- "x-amz-target": "ResourceGroupsTaggingAPI_20170126.TagResources",
72
- };
51
+ const headers = sharedHeaders("TagResources");
73
52
  let body;
74
- body = JSON.stringify(se_TagResourcesInput(input, context));
53
+ body = JSON.stringify((0, smithy_client_1._json)(input));
75
54
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
76
55
  };
77
56
  exports.se_TagResourcesCommand = se_TagResourcesCommand;
78
57
  const se_UntagResourcesCommand = async (input, context) => {
79
- const headers = {
80
- "content-type": "application/x-amz-json-1.1",
81
- "x-amz-target": "ResourceGroupsTaggingAPI_20170126.UntagResources",
82
- };
58
+ const headers = sharedHeaders("UntagResources");
83
59
  let body;
84
- body = JSON.stringify(se_UntagResourcesInput(input, context));
60
+ body = JSON.stringify((0, smithy_client_1._json)(input));
85
61
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
86
62
  };
87
63
  exports.se_UntagResourcesCommand = se_UntagResourcesCommand;
@@ -91,12 +67,12 @@ const de_DescribeReportCreationCommand = async (output, context) => {
91
67
  }
92
68
  const data = await parseBody(output.body, context);
93
69
  let contents = {};
94
- contents = de_DescribeReportCreationOutput(data, context);
70
+ contents = (0, smithy_client_1._json)(data);
95
71
  const response = {
96
72
  $metadata: deserializeMetadata(output),
97
73
  ...contents,
98
74
  };
99
- return Promise.resolve(response);
75
+ return response;
100
76
  };
101
77
  exports.de_DescribeReportCreationCommand = de_DescribeReportCreationCommand;
102
78
  const de_DescribeReportCreationCommandError = async (output, context) => {
@@ -120,10 +96,9 @@ const de_DescribeReportCreationCommandError = async (output, context) => {
120
96
  throw await de_ThrottledExceptionRes(parsedOutput, context);
121
97
  default:
122
98
  const parsedBody = parsedOutput.body;
123
- (0, smithy_client_1.throwDefaultError)({
99
+ return throwDefaultError({
124
100
  output,
125
101
  parsedBody,
126
- exceptionCtor: ResourceGroupsTaggingAPIServiceException_1.ResourceGroupsTaggingAPIServiceException,
127
102
  errorCode,
128
103
  });
129
104
  }
@@ -134,12 +109,12 @@ const de_GetComplianceSummaryCommand = async (output, context) => {
134
109
  }
135
110
  const data = await parseBody(output.body, context);
136
111
  let contents = {};
137
- contents = de_GetComplianceSummaryOutput(data, context);
112
+ contents = (0, smithy_client_1._json)(data);
138
113
  const response = {
139
114
  $metadata: deserializeMetadata(output),
140
115
  ...contents,
141
116
  };
142
- return Promise.resolve(response);
117
+ return response;
143
118
  };
144
119
  exports.de_GetComplianceSummaryCommand = de_GetComplianceSummaryCommand;
145
120
  const de_GetComplianceSummaryCommandError = async (output, context) => {
@@ -163,10 +138,9 @@ const de_GetComplianceSummaryCommandError = async (output, context) => {
163
138
  throw await de_ThrottledExceptionRes(parsedOutput, context);
164
139
  default:
165
140
  const parsedBody = parsedOutput.body;
166
- (0, smithy_client_1.throwDefaultError)({
141
+ return throwDefaultError({
167
142
  output,
168
143
  parsedBody,
169
- exceptionCtor: ResourceGroupsTaggingAPIServiceException_1.ResourceGroupsTaggingAPIServiceException,
170
144
  errorCode,
171
145
  });
172
146
  }
@@ -177,12 +151,12 @@ const de_GetResourcesCommand = async (output, context) => {
177
151
  }
178
152
  const data = await parseBody(output.body, context);
179
153
  let contents = {};
180
- contents = de_GetResourcesOutput(data, context);
154
+ contents = (0, smithy_client_1._json)(data);
181
155
  const response = {
182
156
  $metadata: deserializeMetadata(output),
183
157
  ...contents,
184
158
  };
185
- return Promise.resolve(response);
159
+ return response;
186
160
  };
187
161
  exports.de_GetResourcesCommand = de_GetResourcesCommand;
188
162
  const de_GetResourcesCommandError = async (output, context) => {
@@ -206,10 +180,9 @@ const de_GetResourcesCommandError = async (output, context) => {
206
180
  throw await de_ThrottledExceptionRes(parsedOutput, context);
207
181
  default:
208
182
  const parsedBody = parsedOutput.body;
209
- (0, smithy_client_1.throwDefaultError)({
183
+ return throwDefaultError({
210
184
  output,
211
185
  parsedBody,
212
- exceptionCtor: ResourceGroupsTaggingAPIServiceException_1.ResourceGroupsTaggingAPIServiceException,
213
186
  errorCode,
214
187
  });
215
188
  }
@@ -220,12 +193,12 @@ const de_GetTagKeysCommand = async (output, context) => {
220
193
  }
221
194
  const data = await parseBody(output.body, context);
222
195
  let contents = {};
223
- contents = de_GetTagKeysOutput(data, context);
196
+ contents = (0, smithy_client_1._json)(data);
224
197
  const response = {
225
198
  $metadata: deserializeMetadata(output),
226
199
  ...contents,
227
200
  };
228
- return Promise.resolve(response);
201
+ return response;
229
202
  };
230
203
  exports.de_GetTagKeysCommand = de_GetTagKeysCommand;
231
204
  const de_GetTagKeysCommandError = async (output, context) => {
@@ -249,10 +222,9 @@ const de_GetTagKeysCommandError = async (output, context) => {
249
222
  throw await de_ThrottledExceptionRes(parsedOutput, context);
250
223
  default:
251
224
  const parsedBody = parsedOutput.body;
252
- (0, smithy_client_1.throwDefaultError)({
225
+ return throwDefaultError({
253
226
  output,
254
227
  parsedBody,
255
- exceptionCtor: ResourceGroupsTaggingAPIServiceException_1.ResourceGroupsTaggingAPIServiceException,
256
228
  errorCode,
257
229
  });
258
230
  }
@@ -263,12 +235,12 @@ const de_GetTagValuesCommand = async (output, context) => {
263
235
  }
264
236
  const data = await parseBody(output.body, context);
265
237
  let contents = {};
266
- contents = de_GetTagValuesOutput(data, context);
238
+ contents = (0, smithy_client_1._json)(data);
267
239
  const response = {
268
240
  $metadata: deserializeMetadata(output),
269
241
  ...contents,
270
242
  };
271
- return Promise.resolve(response);
243
+ return response;
272
244
  };
273
245
  exports.de_GetTagValuesCommand = de_GetTagValuesCommand;
274
246
  const de_GetTagValuesCommandError = async (output, context) => {
@@ -292,10 +264,9 @@ const de_GetTagValuesCommandError = async (output, context) => {
292
264
  throw await de_ThrottledExceptionRes(parsedOutput, context);
293
265
  default:
294
266
  const parsedBody = parsedOutput.body;
295
- (0, smithy_client_1.throwDefaultError)({
267
+ return throwDefaultError({
296
268
  output,
297
269
  parsedBody,
298
- exceptionCtor: ResourceGroupsTaggingAPIServiceException_1.ResourceGroupsTaggingAPIServiceException,
299
270
  errorCode,
300
271
  });
301
272
  }
@@ -306,12 +277,12 @@ const de_StartReportCreationCommand = async (output, context) => {
306
277
  }
307
278
  const data = await parseBody(output.body, context);
308
279
  let contents = {};
309
- contents = de_StartReportCreationOutput(data, context);
280
+ contents = (0, smithy_client_1._json)(data);
310
281
  const response = {
311
282
  $metadata: deserializeMetadata(output),
312
283
  ...contents,
313
284
  };
314
- return Promise.resolve(response);
285
+ return response;
315
286
  };
316
287
  exports.de_StartReportCreationCommand = de_StartReportCreationCommand;
317
288
  const de_StartReportCreationCommandError = async (output, context) => {
@@ -338,10 +309,9 @@ const de_StartReportCreationCommandError = async (output, context) => {
338
309
  throw await de_ThrottledExceptionRes(parsedOutput, context);
339
310
  default:
340
311
  const parsedBody = parsedOutput.body;
341
- (0, smithy_client_1.throwDefaultError)({
312
+ return throwDefaultError({
342
313
  output,
343
314
  parsedBody,
344
- exceptionCtor: ResourceGroupsTaggingAPIServiceException_1.ResourceGroupsTaggingAPIServiceException,
345
315
  errorCode,
346
316
  });
347
317
  }
@@ -352,12 +322,12 @@ const de_TagResourcesCommand = async (output, context) => {
352
322
  }
353
323
  const data = await parseBody(output.body, context);
354
324
  let contents = {};
355
- contents = de_TagResourcesOutput(data, context);
325
+ contents = (0, smithy_client_1._json)(data);
356
326
  const response = {
357
327
  $metadata: deserializeMetadata(output),
358
328
  ...contents,
359
329
  };
360
- return Promise.resolve(response);
330
+ return response;
361
331
  };
362
332
  exports.de_TagResourcesCommand = de_TagResourcesCommand;
363
333
  const de_TagResourcesCommandError = async (output, context) => {
@@ -378,10 +348,9 @@ const de_TagResourcesCommandError = async (output, context) => {
378
348
  throw await de_ThrottledExceptionRes(parsedOutput, context);
379
349
  default:
380
350
  const parsedBody = parsedOutput.body;
381
- (0, smithy_client_1.throwDefaultError)({
351
+ return throwDefaultError({
382
352
  output,
383
353
  parsedBody,
384
- exceptionCtor: ResourceGroupsTaggingAPIServiceException_1.ResourceGroupsTaggingAPIServiceException,
385
354
  errorCode,
386
355
  });
387
356
  }
@@ -392,12 +361,12 @@ const de_UntagResourcesCommand = async (output, context) => {
392
361
  }
393
362
  const data = await parseBody(output.body, context);
394
363
  let contents = {};
395
- contents = de_UntagResourcesOutput(data, context);
364
+ contents = (0, smithy_client_1._json)(data);
396
365
  const response = {
397
366
  $metadata: deserializeMetadata(output),
398
367
  ...contents,
399
368
  };
400
- return Promise.resolve(response);
369
+ return response;
401
370
  };
402
371
  exports.de_UntagResourcesCommand = de_UntagResourcesCommand;
403
372
  const de_UntagResourcesCommandError = async (output, context) => {
@@ -418,17 +387,16 @@ const de_UntagResourcesCommandError = async (output, context) => {
418
387
  throw await de_ThrottledExceptionRes(parsedOutput, context);
419
388
  default:
420
389
  const parsedBody = parsedOutput.body;
421
- (0, smithy_client_1.throwDefaultError)({
390
+ return throwDefaultError({
422
391
  output,
423
392
  parsedBody,
424
- exceptionCtor: ResourceGroupsTaggingAPIServiceException_1.ResourceGroupsTaggingAPIServiceException,
425
393
  errorCode,
426
394
  });
427
395
  }
428
396
  };
429
397
  const de_ConcurrentModificationExceptionRes = async (parsedOutput, context) => {
430
398
  const body = parsedOutput.body;
431
- const deserialized = de_ConcurrentModificationException(body, context);
399
+ const deserialized = (0, smithy_client_1._json)(body);
432
400
  const exception = new models_0_1.ConcurrentModificationException({
433
401
  $metadata: deserializeMetadata(parsedOutput),
434
402
  ...deserialized,
@@ -437,7 +405,7 @@ const de_ConcurrentModificationExceptionRes = async (parsedOutput, context) => {
437
405
  };
438
406
  const de_ConstraintViolationExceptionRes = async (parsedOutput, context) => {
439
407
  const body = parsedOutput.body;
440
- const deserialized = de_ConstraintViolationException(body, context);
408
+ const deserialized = (0, smithy_client_1._json)(body);
441
409
  const exception = new models_0_1.ConstraintViolationException({
442
410
  $metadata: deserializeMetadata(parsedOutput),
443
411
  ...deserialized,
@@ -446,7 +414,7 @@ const de_ConstraintViolationExceptionRes = async (parsedOutput, context) => {
446
414
  };
447
415
  const de_InternalServiceExceptionRes = async (parsedOutput, context) => {
448
416
  const body = parsedOutput.body;
449
- const deserialized = de_InternalServiceException(body, context);
417
+ const deserialized = (0, smithy_client_1._json)(body);
450
418
  const exception = new models_0_1.InternalServiceException({
451
419
  $metadata: deserializeMetadata(parsedOutput),
452
420
  ...deserialized,
@@ -455,7 +423,7 @@ const de_InternalServiceExceptionRes = async (parsedOutput, context) => {
455
423
  };
456
424
  const de_InvalidParameterExceptionRes = async (parsedOutput, context) => {
457
425
  const body = parsedOutput.body;
458
- const deserialized = de_InvalidParameterException(body, context);
426
+ const deserialized = (0, smithy_client_1._json)(body);
459
427
  const exception = new models_0_1.InvalidParameterException({
460
428
  $metadata: deserializeMetadata(parsedOutput),
461
429
  ...deserialized,
@@ -464,7 +432,7 @@ const de_InvalidParameterExceptionRes = async (parsedOutput, context) => {
464
432
  };
465
433
  const de_PaginationTokenExpiredExceptionRes = async (parsedOutput, context) => {
466
434
  const body = parsedOutput.body;
467
- const deserialized = de_PaginationTokenExpiredException(body, context);
435
+ const deserialized = (0, smithy_client_1._json)(body);
468
436
  const exception = new models_0_1.PaginationTokenExpiredException({
469
437
  $metadata: deserializeMetadata(parsedOutput),
470
438
  ...deserialized,
@@ -473,338 +441,13 @@ const de_PaginationTokenExpiredExceptionRes = async (parsedOutput, context) => {
473
441
  };
474
442
  const de_ThrottledExceptionRes = async (parsedOutput, context) => {
475
443
  const body = parsedOutput.body;
476
- const deserialized = de_ThrottledException(body, context);
444
+ const deserialized = (0, smithy_client_1._json)(body);
477
445
  const exception = new models_0_1.ThrottledException({
478
446
  $metadata: deserializeMetadata(parsedOutput),
479
447
  ...deserialized,
480
448
  });
481
449
  return (0, smithy_client_1.decorateServiceException)(exception, body);
482
450
  };
483
- const se_DescribeReportCreationInput = (input, context) => {
484
- return {};
485
- };
486
- const se_GetComplianceSummaryInput = (input, context) => {
487
- return {
488
- ...(input.GroupBy != null && { GroupBy: se_GroupBy(input.GroupBy, context) }),
489
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
490
- ...(input.PaginationToken != null && { PaginationToken: input.PaginationToken }),
491
- ...(input.RegionFilters != null && { RegionFilters: se_RegionFilterList(input.RegionFilters, context) }),
492
- ...(input.ResourceTypeFilters != null && {
493
- ResourceTypeFilters: se_ResourceTypeFilterList(input.ResourceTypeFilters, context),
494
- }),
495
- ...(input.TagKeyFilters != null && { TagKeyFilters: se_TagKeyFilterList(input.TagKeyFilters, context) }),
496
- ...(input.TargetIdFilters != null && { TargetIdFilters: se_TargetIdFilterList(input.TargetIdFilters, context) }),
497
- };
498
- };
499
- const se_GetResourcesInput = (input, context) => {
500
- return {
501
- ...(input.ExcludeCompliantResources != null && { ExcludeCompliantResources: input.ExcludeCompliantResources }),
502
- ...(input.IncludeComplianceDetails != null && { IncludeComplianceDetails: input.IncludeComplianceDetails }),
503
- ...(input.PaginationToken != null && { PaginationToken: input.PaginationToken }),
504
- ...(input.ResourceARNList != null && { ResourceARNList: se_ResourceARNListForGet(input.ResourceARNList, context) }),
505
- ...(input.ResourceTypeFilters != null && {
506
- ResourceTypeFilters: se_ResourceTypeFilterList(input.ResourceTypeFilters, context),
507
- }),
508
- ...(input.ResourcesPerPage != null && { ResourcesPerPage: input.ResourcesPerPage }),
509
- ...(input.TagFilters != null && { TagFilters: se_TagFilterList(input.TagFilters, context) }),
510
- ...(input.TagsPerPage != null && { TagsPerPage: input.TagsPerPage }),
511
- };
512
- };
513
- const se_GetTagKeysInput = (input, context) => {
514
- return {
515
- ...(input.PaginationToken != null && { PaginationToken: input.PaginationToken }),
516
- };
517
- };
518
- const se_GetTagValuesInput = (input, context) => {
519
- return {
520
- ...(input.Key != null && { Key: input.Key }),
521
- ...(input.PaginationToken != null && { PaginationToken: input.PaginationToken }),
522
- };
523
- };
524
- const se_GroupBy = (input, context) => {
525
- return input
526
- .filter((e) => e != null)
527
- .map((entry) => {
528
- return entry;
529
- });
530
- };
531
- const se_RegionFilterList = (input, context) => {
532
- return input
533
- .filter((e) => e != null)
534
- .map((entry) => {
535
- return entry;
536
- });
537
- };
538
- const se_ResourceARNListForGet = (input, context) => {
539
- return input
540
- .filter((e) => e != null)
541
- .map((entry) => {
542
- return entry;
543
- });
544
- };
545
- const se_ResourceARNListForTagUntag = (input, context) => {
546
- return input
547
- .filter((e) => e != null)
548
- .map((entry) => {
549
- return entry;
550
- });
551
- };
552
- const se_ResourceTypeFilterList = (input, context) => {
553
- return input
554
- .filter((e) => e != null)
555
- .map((entry) => {
556
- return entry;
557
- });
558
- };
559
- const se_StartReportCreationInput = (input, context) => {
560
- return {
561
- ...(input.S3Bucket != null && { S3Bucket: input.S3Bucket }),
562
- };
563
- };
564
- const se_TagFilter = (input, context) => {
565
- return {
566
- ...(input.Key != null && { Key: input.Key }),
567
- ...(input.Values != null && { Values: se_TagValueList(input.Values, context) }),
568
- };
569
- };
570
- const se_TagFilterList = (input, context) => {
571
- return input
572
- .filter((e) => e != null)
573
- .map((entry) => {
574
- return se_TagFilter(entry, context);
575
- });
576
- };
577
- const se_TagKeyFilterList = (input, context) => {
578
- return input
579
- .filter((e) => e != null)
580
- .map((entry) => {
581
- return entry;
582
- });
583
- };
584
- const se_TagKeyListForUntag = (input, context) => {
585
- return input
586
- .filter((e) => e != null)
587
- .map((entry) => {
588
- return entry;
589
- });
590
- };
591
- const se_TagMap = (input, context) => {
592
- return Object.entries(input).reduce((acc, [key, value]) => {
593
- if (value === null) {
594
- return acc;
595
- }
596
- acc[key] = value;
597
- return acc;
598
- }, {});
599
- };
600
- const se_TagResourcesInput = (input, context) => {
601
- return {
602
- ...(input.ResourceARNList != null && {
603
- ResourceARNList: se_ResourceARNListForTagUntag(input.ResourceARNList, context),
604
- }),
605
- ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }),
606
- };
607
- };
608
- const se_TagValueList = (input, context) => {
609
- return input
610
- .filter((e) => e != null)
611
- .map((entry) => {
612
- return entry;
613
- });
614
- };
615
- const se_TargetIdFilterList = (input, context) => {
616
- return input
617
- .filter((e) => e != null)
618
- .map((entry) => {
619
- return entry;
620
- });
621
- };
622
- const se_UntagResourcesInput = (input, context) => {
623
- return {
624
- ...(input.ResourceARNList != null && {
625
- ResourceARNList: se_ResourceARNListForTagUntag(input.ResourceARNList, context),
626
- }),
627
- ...(input.TagKeys != null && { TagKeys: se_TagKeyListForUntag(input.TagKeys, context) }),
628
- };
629
- };
630
- const de_ComplianceDetails = (output, context) => {
631
- return {
632
- ComplianceStatus: (0, smithy_client_1.expectBoolean)(output.ComplianceStatus),
633
- KeysWithNoncompliantValues: output.KeysWithNoncompliantValues != null ? de_TagKeyList(output.KeysWithNoncompliantValues, context) : undefined,
634
- NoncompliantKeys: output.NoncompliantKeys != null ? de_TagKeyList(output.NoncompliantKeys, context) : undefined,
635
- };
636
- };
637
- const de_ConcurrentModificationException = (output, context) => {
638
- return {
639
- Message: (0, smithy_client_1.expectString)(output.Message),
640
- };
641
- };
642
- const de_ConstraintViolationException = (output, context) => {
643
- return {
644
- Message: (0, smithy_client_1.expectString)(output.Message),
645
- };
646
- };
647
- const de_DescribeReportCreationOutput = (output, context) => {
648
- return {
649
- ErrorMessage: (0, smithy_client_1.expectString)(output.ErrorMessage),
650
- S3Location: (0, smithy_client_1.expectString)(output.S3Location),
651
- StartDate: (0, smithy_client_1.expectString)(output.StartDate),
652
- Status: (0, smithy_client_1.expectString)(output.Status),
653
- };
654
- };
655
- const de_FailedResourcesMap = (output, context) => {
656
- return Object.entries(output).reduce((acc, [key, value]) => {
657
- if (value === null) {
658
- return acc;
659
- }
660
- acc[key] = de_FailureInfo(value, context);
661
- return acc;
662
- }, {});
663
- };
664
- const de_FailureInfo = (output, context) => {
665
- return {
666
- ErrorCode: (0, smithy_client_1.expectString)(output.ErrorCode),
667
- ErrorMessage: (0, smithy_client_1.expectString)(output.ErrorMessage),
668
- StatusCode: (0, smithy_client_1.expectInt32)(output.StatusCode),
669
- };
670
- };
671
- const de_GetComplianceSummaryOutput = (output, context) => {
672
- return {
673
- PaginationToken: (0, smithy_client_1.expectString)(output.PaginationToken),
674
- SummaryList: output.SummaryList != null ? de_SummaryList(output.SummaryList, context) : undefined,
675
- };
676
- };
677
- const de_GetResourcesOutput = (output, context) => {
678
- return {
679
- PaginationToken: (0, smithy_client_1.expectString)(output.PaginationToken),
680
- ResourceTagMappingList: output.ResourceTagMappingList != null
681
- ? de_ResourceTagMappingList(output.ResourceTagMappingList, context)
682
- : undefined,
683
- };
684
- };
685
- const de_GetTagKeysOutput = (output, context) => {
686
- return {
687
- PaginationToken: (0, smithy_client_1.expectString)(output.PaginationToken),
688
- TagKeys: output.TagKeys != null ? de_TagKeyList(output.TagKeys, context) : undefined,
689
- };
690
- };
691
- const de_GetTagValuesOutput = (output, context) => {
692
- return {
693
- PaginationToken: (0, smithy_client_1.expectString)(output.PaginationToken),
694
- TagValues: output.TagValues != null ? de_TagValuesOutputList(output.TagValues, context) : undefined,
695
- };
696
- };
697
- const de_InternalServiceException = (output, context) => {
698
- return {
699
- Message: (0, smithy_client_1.expectString)(output.Message),
700
- };
701
- };
702
- const de_InvalidParameterException = (output, context) => {
703
- return {
704
- Message: (0, smithy_client_1.expectString)(output.Message),
705
- };
706
- };
707
- const de_PaginationTokenExpiredException = (output, context) => {
708
- return {
709
- Message: (0, smithy_client_1.expectString)(output.Message),
710
- };
711
- };
712
- const de_ResourceTagMapping = (output, context) => {
713
- return {
714
- ComplianceDetails: output.ComplianceDetails != null ? de_ComplianceDetails(output.ComplianceDetails, context) : undefined,
715
- ResourceARN: (0, smithy_client_1.expectString)(output.ResourceARN),
716
- Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined,
717
- };
718
- };
719
- const de_ResourceTagMappingList = (output, context) => {
720
- const retVal = (output || [])
721
- .filter((e) => e != null)
722
- .map((entry) => {
723
- if (entry === null) {
724
- return null;
725
- }
726
- return de_ResourceTagMapping(entry, context);
727
- });
728
- return retVal;
729
- };
730
- const de_StartReportCreationOutput = (output, context) => {
731
- return {};
732
- };
733
- const de_Summary = (output, context) => {
734
- return {
735
- LastUpdated: (0, smithy_client_1.expectString)(output.LastUpdated),
736
- NonCompliantResources: (0, smithy_client_1.expectLong)(output.NonCompliantResources),
737
- Region: (0, smithy_client_1.expectString)(output.Region),
738
- ResourceType: (0, smithy_client_1.expectString)(output.ResourceType),
739
- TargetId: (0, smithy_client_1.expectString)(output.TargetId),
740
- TargetIdType: (0, smithy_client_1.expectString)(output.TargetIdType),
741
- };
742
- };
743
- const de_SummaryList = (output, context) => {
744
- const retVal = (output || [])
745
- .filter((e) => e != null)
746
- .map((entry) => {
747
- if (entry === null) {
748
- return null;
749
- }
750
- return de_Summary(entry, context);
751
- });
752
- return retVal;
753
- };
754
- const de_Tag = (output, context) => {
755
- return {
756
- Key: (0, smithy_client_1.expectString)(output.Key),
757
- Value: (0, smithy_client_1.expectString)(output.Value),
758
- };
759
- };
760
- const de_TagKeyList = (output, context) => {
761
- const retVal = (output || [])
762
- .filter((e) => e != null)
763
- .map((entry) => {
764
- if (entry === null) {
765
- return null;
766
- }
767
- return (0, smithy_client_1.expectString)(entry);
768
- });
769
- return retVal;
770
- };
771
- const de_TagList = (output, context) => {
772
- const retVal = (output || [])
773
- .filter((e) => e != null)
774
- .map((entry) => {
775
- if (entry === null) {
776
- return null;
777
- }
778
- return de_Tag(entry, context);
779
- });
780
- return retVal;
781
- };
782
- const de_TagResourcesOutput = (output, context) => {
783
- return {
784
- FailedResourcesMap: output.FailedResourcesMap != null ? de_FailedResourcesMap(output.FailedResourcesMap, context) : undefined,
785
- };
786
- };
787
- const de_TagValuesOutputList = (output, context) => {
788
- const retVal = (output || [])
789
- .filter((e) => e != null)
790
- .map((entry) => {
791
- if (entry === null) {
792
- return null;
793
- }
794
- return (0, smithy_client_1.expectString)(entry);
795
- });
796
- return retVal;
797
- };
798
- const de_ThrottledException = (output, context) => {
799
- return {
800
- Message: (0, smithy_client_1.expectString)(output.Message),
801
- };
802
- };
803
- const de_UntagResourcesOutput = (output, context) => {
804
- return {
805
- FailedResourcesMap: output.FailedResourcesMap != null ? de_FailedResourcesMap(output.FailedResourcesMap, context) : undefined,
806
- };
807
- };
808
451
  const deserializeMetadata = (output) => ({
809
452
  httpStatusCode: output.statusCode,
810
453
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
@@ -818,6 +461,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
818
461
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
819
462
  };
820
463
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
464
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(ResourceGroupsTaggingAPIServiceException_1.ResourceGroupsTaggingAPIServiceException);
821
465
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
822
466
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
823
467
  const contents = {
@@ -836,6 +480,12 @@ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, bod
836
480
  }
837
481
  return new protocol_http_1.HttpRequest(contents);
838
482
  };
483
+ function sharedHeaders(operation) {
484
+ return {
485
+ "content-type": "application/x-amz-json-1.1",
486
+ "x-amz-target": `ResourceGroupsTaggingAPI_20170126.${operation}`,
487
+ };
488
+ }
839
489
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
840
490
  if (encoded.length) {
841
491
  return JSON.parse(encoded);