@aws-sdk/client-servicediscovery 3.312.0 → 3.316.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.
@@ -38,28 +38,28 @@ exports.se_CreateServiceCommand = se_CreateServiceCommand;
38
38
  const se_DeleteNamespaceCommand = async (input, context) => {
39
39
  const headers = sharedHeaders("DeleteNamespace");
40
40
  let body;
41
- body = JSON.stringify(se_DeleteNamespaceRequest(input, context));
41
+ body = JSON.stringify((0, smithy_client_1._json)(input));
42
42
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
43
43
  };
44
44
  exports.se_DeleteNamespaceCommand = se_DeleteNamespaceCommand;
45
45
  const se_DeleteServiceCommand = async (input, context) => {
46
46
  const headers = sharedHeaders("DeleteService");
47
47
  let body;
48
- body = JSON.stringify(se_DeleteServiceRequest(input, context));
48
+ body = JSON.stringify((0, smithy_client_1._json)(input));
49
49
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
50
50
  };
51
51
  exports.se_DeleteServiceCommand = se_DeleteServiceCommand;
52
52
  const se_DeregisterInstanceCommand = async (input, context) => {
53
53
  const headers = sharedHeaders("DeregisterInstance");
54
54
  let body;
55
- body = JSON.stringify(se_DeregisterInstanceRequest(input, context));
55
+ body = JSON.stringify((0, smithy_client_1._json)(input));
56
56
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
57
57
  };
58
58
  exports.se_DeregisterInstanceCommand = se_DeregisterInstanceCommand;
59
59
  const se_DiscoverInstancesCommand = async (input, context) => {
60
60
  const headers = sharedHeaders("DiscoverInstances");
61
61
  let body;
62
- body = JSON.stringify(se_DiscoverInstancesRequest(input, context));
62
+ body = JSON.stringify((0, smithy_client_1._json)(input));
63
63
  let { hostname: resolvedHostname } = await context.endpoint();
64
64
  if (context.disableHostPrefix !== true) {
65
65
  resolvedHostname = "data-" + resolvedHostname;
@@ -73,70 +73,70 @@ exports.se_DiscoverInstancesCommand = se_DiscoverInstancesCommand;
73
73
  const se_GetInstanceCommand = async (input, context) => {
74
74
  const headers = sharedHeaders("GetInstance");
75
75
  let body;
76
- body = JSON.stringify(se_GetInstanceRequest(input, context));
76
+ body = JSON.stringify((0, smithy_client_1._json)(input));
77
77
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
78
78
  };
79
79
  exports.se_GetInstanceCommand = se_GetInstanceCommand;
80
80
  const se_GetInstancesHealthStatusCommand = async (input, context) => {
81
81
  const headers = sharedHeaders("GetInstancesHealthStatus");
82
82
  let body;
83
- body = JSON.stringify(se_GetInstancesHealthStatusRequest(input, context));
83
+ body = JSON.stringify((0, smithy_client_1._json)(input));
84
84
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
85
85
  };
86
86
  exports.se_GetInstancesHealthStatusCommand = se_GetInstancesHealthStatusCommand;
87
87
  const se_GetNamespaceCommand = async (input, context) => {
88
88
  const headers = sharedHeaders("GetNamespace");
89
89
  let body;
90
- body = JSON.stringify(se_GetNamespaceRequest(input, context));
90
+ body = JSON.stringify((0, smithy_client_1._json)(input));
91
91
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
92
92
  };
93
93
  exports.se_GetNamespaceCommand = se_GetNamespaceCommand;
94
94
  const se_GetOperationCommand = async (input, context) => {
95
95
  const headers = sharedHeaders("GetOperation");
96
96
  let body;
97
- body = JSON.stringify(se_GetOperationRequest(input, context));
97
+ body = JSON.stringify((0, smithy_client_1._json)(input));
98
98
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
99
99
  };
100
100
  exports.se_GetOperationCommand = se_GetOperationCommand;
101
101
  const se_GetServiceCommand = async (input, context) => {
102
102
  const headers = sharedHeaders("GetService");
103
103
  let body;
104
- body = JSON.stringify(se_GetServiceRequest(input, context));
104
+ body = JSON.stringify((0, smithy_client_1._json)(input));
105
105
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
106
106
  };
107
107
  exports.se_GetServiceCommand = se_GetServiceCommand;
108
108
  const se_ListInstancesCommand = async (input, context) => {
109
109
  const headers = sharedHeaders("ListInstances");
110
110
  let body;
111
- body = JSON.stringify(se_ListInstancesRequest(input, context));
111
+ body = JSON.stringify((0, smithy_client_1._json)(input));
112
112
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
113
113
  };
114
114
  exports.se_ListInstancesCommand = se_ListInstancesCommand;
115
115
  const se_ListNamespacesCommand = async (input, context) => {
116
116
  const headers = sharedHeaders("ListNamespaces");
117
117
  let body;
118
- body = JSON.stringify(se_ListNamespacesRequest(input, context));
118
+ body = JSON.stringify((0, smithy_client_1._json)(input));
119
119
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
120
120
  };
121
121
  exports.se_ListNamespacesCommand = se_ListNamespacesCommand;
122
122
  const se_ListOperationsCommand = async (input, context) => {
123
123
  const headers = sharedHeaders("ListOperations");
124
124
  let body;
125
- body = JSON.stringify(se_ListOperationsRequest(input, context));
125
+ body = JSON.stringify((0, smithy_client_1._json)(input));
126
126
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
127
127
  };
128
128
  exports.se_ListOperationsCommand = se_ListOperationsCommand;
129
129
  const se_ListServicesCommand = async (input, context) => {
130
130
  const headers = sharedHeaders("ListServices");
131
131
  let body;
132
- body = JSON.stringify(se_ListServicesRequest(input, context));
132
+ body = JSON.stringify((0, smithy_client_1._json)(input));
133
133
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
134
134
  };
135
135
  exports.se_ListServicesCommand = se_ListServicesCommand;
136
136
  const se_ListTagsForResourceCommand = async (input, context) => {
137
137
  const headers = sharedHeaders("ListTagsForResource");
138
138
  let body;
139
- body = JSON.stringify(se_ListTagsForResourceRequest(input, context));
139
+ body = JSON.stringify((0, smithy_client_1._json)(input));
140
140
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
141
141
  };
142
142
  exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
@@ -150,14 +150,14 @@ exports.se_RegisterInstanceCommand = se_RegisterInstanceCommand;
150
150
  const se_TagResourceCommand = async (input, context) => {
151
151
  const headers = sharedHeaders("TagResource");
152
152
  let body;
153
- body = JSON.stringify(se_TagResourceRequest(input, context));
153
+ body = JSON.stringify((0, smithy_client_1._json)(input));
154
154
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
155
155
  };
156
156
  exports.se_TagResourceCommand = se_TagResourceCommand;
157
157
  const se_UntagResourceCommand = async (input, context) => {
158
158
  const headers = sharedHeaders("UntagResource");
159
159
  let body;
160
- body = JSON.stringify(se_UntagResourceRequest(input, context));
160
+ body = JSON.stringify((0, smithy_client_1._json)(input));
161
161
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
162
162
  };
163
163
  exports.se_UntagResourceCommand = se_UntagResourceCommand;
@@ -171,7 +171,7 @@ exports.se_UpdateHttpNamespaceCommand = se_UpdateHttpNamespaceCommand;
171
171
  const se_UpdateInstanceCustomHealthStatusCommand = async (input, context) => {
172
172
  const headers = sharedHeaders("UpdateInstanceCustomHealthStatus");
173
173
  let body;
174
- body = JSON.stringify(se_UpdateInstanceCustomHealthStatusRequest(input, context));
174
+ body = JSON.stringify((0, smithy_client_1._json)(input));
175
175
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
176
176
  };
177
177
  exports.se_UpdateInstanceCustomHealthStatusCommand = se_UpdateInstanceCustomHealthStatusCommand;
@@ -192,7 +192,7 @@ exports.se_UpdatePublicDnsNamespaceCommand = se_UpdatePublicDnsNamespaceCommand;
192
192
  const se_UpdateServiceCommand = async (input, context) => {
193
193
  const headers = sharedHeaders("UpdateService");
194
194
  let body;
195
- body = JSON.stringify(se_UpdateServiceRequest(input, context));
195
+ body = JSON.stringify((0, smithy_client_1._json)(input));
196
196
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
197
197
  };
198
198
  exports.se_UpdateServiceCommand = se_UpdateServiceCommand;
@@ -202,12 +202,12 @@ const de_CreateHttpNamespaceCommand = async (output, context) => {
202
202
  }
203
203
  const data = await parseBody(output.body, context);
204
204
  let contents = {};
205
- contents = de_CreateHttpNamespaceResponse(data, context);
205
+ contents = (0, smithy_client_1._json)(data);
206
206
  const response = {
207
207
  $metadata: deserializeMetadata(output),
208
208
  ...contents,
209
209
  };
210
- return Promise.resolve(response);
210
+ return response;
211
211
  };
212
212
  exports.de_CreateHttpNamespaceCommand = de_CreateHttpNamespaceCommand;
213
213
  const de_CreateHttpNamespaceCommandError = async (output, context) => {
@@ -234,10 +234,9 @@ const de_CreateHttpNamespaceCommandError = async (output, context) => {
234
234
  throw await de_TooManyTagsExceptionRes(parsedOutput, context);
235
235
  default:
236
236
  const parsedBody = parsedOutput.body;
237
- (0, smithy_client_1.throwDefaultError)({
237
+ return throwDefaultError({
238
238
  output,
239
239
  parsedBody,
240
- exceptionCtor: ServiceDiscoveryServiceException_1.ServiceDiscoveryServiceException,
241
240
  errorCode,
242
241
  });
243
242
  }
@@ -248,12 +247,12 @@ const de_CreatePrivateDnsNamespaceCommand = async (output, context) => {
248
247
  }
249
248
  const data = await parseBody(output.body, context);
250
249
  let contents = {};
251
- contents = de_CreatePrivateDnsNamespaceResponse(data, context);
250
+ contents = (0, smithy_client_1._json)(data);
252
251
  const response = {
253
252
  $metadata: deserializeMetadata(output),
254
253
  ...contents,
255
254
  };
256
- return Promise.resolve(response);
255
+ return response;
257
256
  };
258
257
  exports.de_CreatePrivateDnsNamespaceCommand = de_CreatePrivateDnsNamespaceCommand;
259
258
  const de_CreatePrivateDnsNamespaceCommandError = async (output, context) => {
@@ -280,10 +279,9 @@ const de_CreatePrivateDnsNamespaceCommandError = async (output, context) => {
280
279
  throw await de_TooManyTagsExceptionRes(parsedOutput, context);
281
280
  default:
282
281
  const parsedBody = parsedOutput.body;
283
- (0, smithy_client_1.throwDefaultError)({
282
+ return throwDefaultError({
284
283
  output,
285
284
  parsedBody,
286
- exceptionCtor: ServiceDiscoveryServiceException_1.ServiceDiscoveryServiceException,
287
285
  errorCode,
288
286
  });
289
287
  }
@@ -294,12 +292,12 @@ const de_CreatePublicDnsNamespaceCommand = async (output, context) => {
294
292
  }
295
293
  const data = await parseBody(output.body, context);
296
294
  let contents = {};
297
- contents = de_CreatePublicDnsNamespaceResponse(data, context);
295
+ contents = (0, smithy_client_1._json)(data);
298
296
  const response = {
299
297
  $metadata: deserializeMetadata(output),
300
298
  ...contents,
301
299
  };
302
- return Promise.resolve(response);
300
+ return response;
303
301
  };
304
302
  exports.de_CreatePublicDnsNamespaceCommand = de_CreatePublicDnsNamespaceCommand;
305
303
  const de_CreatePublicDnsNamespaceCommandError = async (output, context) => {
@@ -326,10 +324,9 @@ const de_CreatePublicDnsNamespaceCommandError = async (output, context) => {
326
324
  throw await de_TooManyTagsExceptionRes(parsedOutput, context);
327
325
  default:
328
326
  const parsedBody = parsedOutput.body;
329
- (0, smithy_client_1.throwDefaultError)({
327
+ return throwDefaultError({
330
328
  output,
331
329
  parsedBody,
332
- exceptionCtor: ServiceDiscoveryServiceException_1.ServiceDiscoveryServiceException,
333
330
  errorCode,
334
331
  });
335
332
  }
@@ -345,7 +342,7 @@ const de_CreateServiceCommand = async (output, context) => {
345
342
  $metadata: deserializeMetadata(output),
346
343
  ...contents,
347
344
  };
348
- return Promise.resolve(response);
345
+ return response;
349
346
  };
350
347
  exports.de_CreateServiceCommand = de_CreateServiceCommand;
351
348
  const de_CreateServiceCommandError = async (output, context) => {
@@ -372,10 +369,9 @@ const de_CreateServiceCommandError = async (output, context) => {
372
369
  throw await de_TooManyTagsExceptionRes(parsedOutput, context);
373
370
  default:
374
371
  const parsedBody = parsedOutput.body;
375
- (0, smithy_client_1.throwDefaultError)({
372
+ return throwDefaultError({
376
373
  output,
377
374
  parsedBody,
378
- exceptionCtor: ServiceDiscoveryServiceException_1.ServiceDiscoveryServiceException,
379
375
  errorCode,
380
376
  });
381
377
  }
@@ -386,12 +382,12 @@ const de_DeleteNamespaceCommand = async (output, context) => {
386
382
  }
387
383
  const data = await parseBody(output.body, context);
388
384
  let contents = {};
389
- contents = de_DeleteNamespaceResponse(data, context);
385
+ contents = (0, smithy_client_1._json)(data);
390
386
  const response = {
391
387
  $metadata: deserializeMetadata(output),
392
388
  ...contents,
393
389
  };
394
- return Promise.resolve(response);
390
+ return response;
395
391
  };
396
392
  exports.de_DeleteNamespaceCommand = de_DeleteNamespaceCommand;
397
393
  const de_DeleteNamespaceCommandError = async (output, context) => {
@@ -415,10 +411,9 @@ const de_DeleteNamespaceCommandError = async (output, context) => {
415
411
  throw await de_ResourceInUseRes(parsedOutput, context);
416
412
  default:
417
413
  const parsedBody = parsedOutput.body;
418
- (0, smithy_client_1.throwDefaultError)({
414
+ return throwDefaultError({
419
415
  output,
420
416
  parsedBody,
421
- exceptionCtor: ServiceDiscoveryServiceException_1.ServiceDiscoveryServiceException,
422
417
  errorCode,
423
418
  });
424
419
  }
@@ -429,12 +424,12 @@ const de_DeleteServiceCommand = async (output, context) => {
429
424
  }
430
425
  const data = await parseBody(output.body, context);
431
426
  let contents = {};
432
- contents = de_DeleteServiceResponse(data, context);
427
+ contents = (0, smithy_client_1._json)(data);
433
428
  const response = {
434
429
  $metadata: deserializeMetadata(output),
435
430
  ...contents,
436
431
  };
437
- return Promise.resolve(response);
432
+ return response;
438
433
  };
439
434
  exports.de_DeleteServiceCommand = de_DeleteServiceCommand;
440
435
  const de_DeleteServiceCommandError = async (output, context) => {
@@ -455,10 +450,9 @@ const de_DeleteServiceCommandError = async (output, context) => {
455
450
  throw await de_ServiceNotFoundRes(parsedOutput, context);
456
451
  default:
457
452
  const parsedBody = parsedOutput.body;
458
- (0, smithy_client_1.throwDefaultError)({
453
+ return throwDefaultError({
459
454
  output,
460
455
  parsedBody,
461
- exceptionCtor: ServiceDiscoveryServiceException_1.ServiceDiscoveryServiceException,
462
456
  errorCode,
463
457
  });
464
458
  }
@@ -469,12 +463,12 @@ const de_DeregisterInstanceCommand = async (output, context) => {
469
463
  }
470
464
  const data = await parseBody(output.body, context);
471
465
  let contents = {};
472
- contents = de_DeregisterInstanceResponse(data, context);
466
+ contents = (0, smithy_client_1._json)(data);
473
467
  const response = {
474
468
  $metadata: deserializeMetadata(output),
475
469
  ...contents,
476
470
  };
477
- return Promise.resolve(response);
471
+ return response;
478
472
  };
479
473
  exports.de_DeregisterInstanceCommand = de_DeregisterInstanceCommand;
480
474
  const de_DeregisterInstanceCommandError = async (output, context) => {
@@ -501,10 +495,9 @@ const de_DeregisterInstanceCommandError = async (output, context) => {
501
495
  throw await de_ServiceNotFoundRes(parsedOutput, context);
502
496
  default:
503
497
  const parsedBody = parsedOutput.body;
504
- (0, smithy_client_1.throwDefaultError)({
498
+ return throwDefaultError({
505
499
  output,
506
500
  parsedBody,
507
- exceptionCtor: ServiceDiscoveryServiceException_1.ServiceDiscoveryServiceException,
508
501
  errorCode,
509
502
  });
510
503
  }
@@ -515,12 +508,12 @@ const de_DiscoverInstancesCommand = async (output, context) => {
515
508
  }
516
509
  const data = await parseBody(output.body, context);
517
510
  let contents = {};
518
- contents = de_DiscoverInstancesResponse(data, context);
511
+ contents = (0, smithy_client_1._json)(data);
519
512
  const response = {
520
513
  $metadata: deserializeMetadata(output),
521
514
  ...contents,
522
515
  };
523
- return Promise.resolve(response);
516
+ return response;
524
517
  };
525
518
  exports.de_DiscoverInstancesCommand = de_DiscoverInstancesCommand;
526
519
  const de_DiscoverInstancesCommandError = async (output, context) => {
@@ -544,10 +537,9 @@ const de_DiscoverInstancesCommandError = async (output, context) => {
544
537
  throw await de_ServiceNotFoundRes(parsedOutput, context);
545
538
  default:
546
539
  const parsedBody = parsedOutput.body;
547
- (0, smithy_client_1.throwDefaultError)({
540
+ return throwDefaultError({
548
541
  output,
549
542
  parsedBody,
550
- exceptionCtor: ServiceDiscoveryServiceException_1.ServiceDiscoveryServiceException,
551
543
  errorCode,
552
544
  });
553
545
  }
@@ -558,12 +550,12 @@ const de_GetInstanceCommand = async (output, context) => {
558
550
  }
559
551
  const data = await parseBody(output.body, context);
560
552
  let contents = {};
561
- contents = de_GetInstanceResponse(data, context);
553
+ contents = (0, smithy_client_1._json)(data);
562
554
  const response = {
563
555
  $metadata: deserializeMetadata(output),
564
556
  ...contents,
565
557
  };
566
- return Promise.resolve(response);
558
+ return response;
567
559
  };
568
560
  exports.de_GetInstanceCommand = de_GetInstanceCommand;
569
561
  const de_GetInstanceCommandError = async (output, context) => {
@@ -584,10 +576,9 @@ const de_GetInstanceCommandError = async (output, context) => {
584
576
  throw await de_ServiceNotFoundRes(parsedOutput, context);
585
577
  default:
586
578
  const parsedBody = parsedOutput.body;
587
- (0, smithy_client_1.throwDefaultError)({
579
+ return throwDefaultError({
588
580
  output,
589
581
  parsedBody,
590
- exceptionCtor: ServiceDiscoveryServiceException_1.ServiceDiscoveryServiceException,
591
582
  errorCode,
592
583
  });
593
584
  }
@@ -598,12 +589,12 @@ const de_GetInstancesHealthStatusCommand = async (output, context) => {
598
589
  }
599
590
  const data = await parseBody(output.body, context);
600
591
  let contents = {};
601
- contents = de_GetInstancesHealthStatusResponse(data, context);
592
+ contents = (0, smithy_client_1._json)(data);
602
593
  const response = {
603
594
  $metadata: deserializeMetadata(output),
604
595
  ...contents,
605
596
  };
606
- return Promise.resolve(response);
597
+ return response;
607
598
  };
608
599
  exports.de_GetInstancesHealthStatusCommand = de_GetInstancesHealthStatusCommand;
609
600
  const de_GetInstancesHealthStatusCommandError = async (output, context) => {
@@ -624,10 +615,9 @@ const de_GetInstancesHealthStatusCommandError = async (output, context) => {
624
615
  throw await de_ServiceNotFoundRes(parsedOutput, context);
625
616
  default:
626
617
  const parsedBody = parsedOutput.body;
627
- (0, smithy_client_1.throwDefaultError)({
618
+ return throwDefaultError({
628
619
  output,
629
620
  parsedBody,
630
- exceptionCtor: ServiceDiscoveryServiceException_1.ServiceDiscoveryServiceException,
631
621
  errorCode,
632
622
  });
633
623
  }
@@ -643,7 +633,7 @@ const de_GetNamespaceCommand = async (output, context) => {
643
633
  $metadata: deserializeMetadata(output),
644
634
  ...contents,
645
635
  };
646
- return Promise.resolve(response);
636
+ return response;
647
637
  };
648
638
  exports.de_GetNamespaceCommand = de_GetNamespaceCommand;
649
639
  const de_GetNamespaceCommandError = async (output, context) => {
@@ -661,10 +651,9 @@ const de_GetNamespaceCommandError = async (output, context) => {
661
651
  throw await de_NamespaceNotFoundRes(parsedOutput, context);
662
652
  default:
663
653
  const parsedBody = parsedOutput.body;
664
- (0, smithy_client_1.throwDefaultError)({
654
+ return throwDefaultError({
665
655
  output,
666
656
  parsedBody,
667
- exceptionCtor: ServiceDiscoveryServiceException_1.ServiceDiscoveryServiceException,
668
657
  errorCode,
669
658
  });
670
659
  }
@@ -680,7 +669,7 @@ const de_GetOperationCommand = async (output, context) => {
680
669
  $metadata: deserializeMetadata(output),
681
670
  ...contents,
682
671
  };
683
- return Promise.resolve(response);
672
+ return response;
684
673
  };
685
674
  exports.de_GetOperationCommand = de_GetOperationCommand;
686
675
  const de_GetOperationCommandError = async (output, context) => {
@@ -698,10 +687,9 @@ const de_GetOperationCommandError = async (output, context) => {
698
687
  throw await de_OperationNotFoundRes(parsedOutput, context);
699
688
  default:
700
689
  const parsedBody = parsedOutput.body;
701
- (0, smithy_client_1.throwDefaultError)({
690
+ return throwDefaultError({
702
691
  output,
703
692
  parsedBody,
704
- exceptionCtor: ServiceDiscoveryServiceException_1.ServiceDiscoveryServiceException,
705
693
  errorCode,
706
694
  });
707
695
  }
@@ -717,7 +705,7 @@ const de_GetServiceCommand = async (output, context) => {
717
705
  $metadata: deserializeMetadata(output),
718
706
  ...contents,
719
707
  };
720
- return Promise.resolve(response);
708
+ return response;
721
709
  };
722
710
  exports.de_GetServiceCommand = de_GetServiceCommand;
723
711
  const de_GetServiceCommandError = async (output, context) => {
@@ -735,10 +723,9 @@ const de_GetServiceCommandError = async (output, context) => {
735
723
  throw await de_ServiceNotFoundRes(parsedOutput, context);
736
724
  default:
737
725
  const parsedBody = parsedOutput.body;
738
- (0, smithy_client_1.throwDefaultError)({
726
+ return throwDefaultError({
739
727
  output,
740
728
  parsedBody,
741
- exceptionCtor: ServiceDiscoveryServiceException_1.ServiceDiscoveryServiceException,
742
729
  errorCode,
743
730
  });
744
731
  }
@@ -749,12 +736,12 @@ const de_ListInstancesCommand = async (output, context) => {
749
736
  }
750
737
  const data = await parseBody(output.body, context);
751
738
  let contents = {};
752
- contents = de_ListInstancesResponse(data, context);
739
+ contents = (0, smithy_client_1._json)(data);
753
740
  const response = {
754
741
  $metadata: deserializeMetadata(output),
755
742
  ...contents,
756
743
  };
757
- return Promise.resolve(response);
744
+ return response;
758
745
  };
759
746
  exports.de_ListInstancesCommand = de_ListInstancesCommand;
760
747
  const de_ListInstancesCommandError = async (output, context) => {
@@ -772,10 +759,9 @@ const de_ListInstancesCommandError = async (output, context) => {
772
759
  throw await de_ServiceNotFoundRes(parsedOutput, context);
773
760
  default:
774
761
  const parsedBody = parsedOutput.body;
775
- (0, smithy_client_1.throwDefaultError)({
762
+ return throwDefaultError({
776
763
  output,
777
764
  parsedBody,
778
- exceptionCtor: ServiceDiscoveryServiceException_1.ServiceDiscoveryServiceException,
779
765
  errorCode,
780
766
  });
781
767
  }
@@ -791,7 +777,7 @@ const de_ListNamespacesCommand = async (output, context) => {
791
777
  $metadata: deserializeMetadata(output),
792
778
  ...contents,
793
779
  };
794
- return Promise.resolve(response);
780
+ return response;
795
781
  };
796
782
  exports.de_ListNamespacesCommand = de_ListNamespacesCommand;
797
783
  const de_ListNamespacesCommandError = async (output, context) => {
@@ -806,10 +792,9 @@ const de_ListNamespacesCommandError = async (output, context) => {
806
792
  throw await de_InvalidInputRes(parsedOutput, context);
807
793
  default:
808
794
  const parsedBody = parsedOutput.body;
809
- (0, smithy_client_1.throwDefaultError)({
795
+ return throwDefaultError({
810
796
  output,
811
797
  parsedBody,
812
- exceptionCtor: ServiceDiscoveryServiceException_1.ServiceDiscoveryServiceException,
813
798
  errorCode,
814
799
  });
815
800
  }
@@ -820,12 +805,12 @@ const de_ListOperationsCommand = async (output, context) => {
820
805
  }
821
806
  const data = await parseBody(output.body, context);
822
807
  let contents = {};
823
- contents = de_ListOperationsResponse(data, context);
808
+ contents = (0, smithy_client_1._json)(data);
824
809
  const response = {
825
810
  $metadata: deserializeMetadata(output),
826
811
  ...contents,
827
812
  };
828
- return Promise.resolve(response);
813
+ return response;
829
814
  };
830
815
  exports.de_ListOperationsCommand = de_ListOperationsCommand;
831
816
  const de_ListOperationsCommandError = async (output, context) => {
@@ -840,10 +825,9 @@ const de_ListOperationsCommandError = async (output, context) => {
840
825
  throw await de_InvalidInputRes(parsedOutput, context);
841
826
  default:
842
827
  const parsedBody = parsedOutput.body;
843
- (0, smithy_client_1.throwDefaultError)({
828
+ return throwDefaultError({
844
829
  output,
845
830
  parsedBody,
846
- exceptionCtor: ServiceDiscoveryServiceException_1.ServiceDiscoveryServiceException,
847
831
  errorCode,
848
832
  });
849
833
  }
@@ -859,7 +843,7 @@ const de_ListServicesCommand = async (output, context) => {
859
843
  $metadata: deserializeMetadata(output),
860
844
  ...contents,
861
845
  };
862
- return Promise.resolve(response);
846
+ return response;
863
847
  };
864
848
  exports.de_ListServicesCommand = de_ListServicesCommand;
865
849
  const de_ListServicesCommandError = async (output, context) => {
@@ -874,10 +858,9 @@ const de_ListServicesCommandError = async (output, context) => {
874
858
  throw await de_InvalidInputRes(parsedOutput, context);
875
859
  default:
876
860
  const parsedBody = parsedOutput.body;
877
- (0, smithy_client_1.throwDefaultError)({
861
+ return throwDefaultError({
878
862
  output,
879
863
  parsedBody,
880
- exceptionCtor: ServiceDiscoveryServiceException_1.ServiceDiscoveryServiceException,
881
864
  errorCode,
882
865
  });
883
866
  }
@@ -888,12 +871,12 @@ const de_ListTagsForResourceCommand = async (output, context) => {
888
871
  }
889
872
  const data = await parseBody(output.body, context);
890
873
  let contents = {};
891
- contents = de_ListTagsForResourceResponse(data, context);
874
+ contents = (0, smithy_client_1._json)(data);
892
875
  const response = {
893
876
  $metadata: deserializeMetadata(output),
894
877
  ...contents,
895
878
  };
896
- return Promise.resolve(response);
879
+ return response;
897
880
  };
898
881
  exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
899
882
  const de_ListTagsForResourceCommandError = async (output, context) => {
@@ -911,10 +894,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
911
894
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
912
895
  default:
913
896
  const parsedBody = parsedOutput.body;
914
- (0, smithy_client_1.throwDefaultError)({
897
+ return throwDefaultError({
915
898
  output,
916
899
  parsedBody,
917
- exceptionCtor: ServiceDiscoveryServiceException_1.ServiceDiscoveryServiceException,
918
900
  errorCode,
919
901
  });
920
902
  }
@@ -925,12 +907,12 @@ const de_RegisterInstanceCommand = async (output, context) => {
925
907
  }
926
908
  const data = await parseBody(output.body, context);
927
909
  let contents = {};
928
- contents = de_RegisterInstanceResponse(data, context);
910
+ contents = (0, smithy_client_1._json)(data);
929
911
  const response = {
930
912
  $metadata: deserializeMetadata(output),
931
913
  ...contents,
932
914
  };
933
- return Promise.resolve(response);
915
+ return response;
934
916
  };
935
917
  exports.de_RegisterInstanceCommand = de_RegisterInstanceCommand;
936
918
  const de_RegisterInstanceCommandError = async (output, context) => {
@@ -957,10 +939,9 @@ const de_RegisterInstanceCommandError = async (output, context) => {
957
939
  throw await de_ServiceNotFoundRes(parsedOutput, context);
958
940
  default:
959
941
  const parsedBody = parsedOutput.body;
960
- (0, smithy_client_1.throwDefaultError)({
942
+ return throwDefaultError({
961
943
  output,
962
944
  parsedBody,
963
- exceptionCtor: ServiceDiscoveryServiceException_1.ServiceDiscoveryServiceException,
964
945
  errorCode,
965
946
  });
966
947
  }
@@ -971,12 +952,12 @@ const de_TagResourceCommand = async (output, context) => {
971
952
  }
972
953
  const data = await parseBody(output.body, context);
973
954
  let contents = {};
974
- contents = de_TagResourceResponse(data, context);
955
+ contents = (0, smithy_client_1._json)(data);
975
956
  const response = {
976
957
  $metadata: deserializeMetadata(output),
977
958
  ...contents,
978
959
  };
979
- return Promise.resolve(response);
960
+ return response;
980
961
  };
981
962
  exports.de_TagResourceCommand = de_TagResourceCommand;
982
963
  const de_TagResourceCommandError = async (output, context) => {
@@ -997,10 +978,9 @@ const de_TagResourceCommandError = async (output, context) => {
997
978
  throw await de_TooManyTagsExceptionRes(parsedOutput, context);
998
979
  default:
999
980
  const parsedBody = parsedOutput.body;
1000
- (0, smithy_client_1.throwDefaultError)({
981
+ return throwDefaultError({
1001
982
  output,
1002
983
  parsedBody,
1003
- exceptionCtor: ServiceDiscoveryServiceException_1.ServiceDiscoveryServiceException,
1004
984
  errorCode,
1005
985
  });
1006
986
  }
@@ -1011,12 +991,12 @@ const de_UntagResourceCommand = async (output, context) => {
1011
991
  }
1012
992
  const data = await parseBody(output.body, context);
1013
993
  let contents = {};
1014
- contents = de_UntagResourceResponse(data, context);
994
+ contents = (0, smithy_client_1._json)(data);
1015
995
  const response = {
1016
996
  $metadata: deserializeMetadata(output),
1017
997
  ...contents,
1018
998
  };
1019
- return Promise.resolve(response);
999
+ return response;
1020
1000
  };
1021
1001
  exports.de_UntagResourceCommand = de_UntagResourceCommand;
1022
1002
  const de_UntagResourceCommandError = async (output, context) => {
@@ -1034,10 +1014,9 @@ const de_UntagResourceCommandError = async (output, context) => {
1034
1014
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1035
1015
  default:
1036
1016
  const parsedBody = parsedOutput.body;
1037
- (0, smithy_client_1.throwDefaultError)({
1017
+ return throwDefaultError({
1038
1018
  output,
1039
1019
  parsedBody,
1040
- exceptionCtor: ServiceDiscoveryServiceException_1.ServiceDiscoveryServiceException,
1041
1020
  errorCode,
1042
1021
  });
1043
1022
  }
@@ -1048,12 +1027,12 @@ const de_UpdateHttpNamespaceCommand = async (output, context) => {
1048
1027
  }
1049
1028
  const data = await parseBody(output.body, context);
1050
1029
  let contents = {};
1051
- contents = de_UpdateHttpNamespaceResponse(data, context);
1030
+ contents = (0, smithy_client_1._json)(data);
1052
1031
  const response = {
1053
1032
  $metadata: deserializeMetadata(output),
1054
1033
  ...contents,
1055
1034
  };
1056
- return Promise.resolve(response);
1035
+ return response;
1057
1036
  };
1058
1037
  exports.de_UpdateHttpNamespaceCommand = de_UpdateHttpNamespaceCommand;
1059
1038
  const de_UpdateHttpNamespaceCommandError = async (output, context) => {
@@ -1077,10 +1056,9 @@ const de_UpdateHttpNamespaceCommandError = async (output, context) => {
1077
1056
  throw await de_ResourceInUseRes(parsedOutput, context);
1078
1057
  default:
1079
1058
  const parsedBody = parsedOutput.body;
1080
- (0, smithy_client_1.throwDefaultError)({
1059
+ return throwDefaultError({
1081
1060
  output,
1082
1061
  parsedBody,
1083
- exceptionCtor: ServiceDiscoveryServiceException_1.ServiceDiscoveryServiceException,
1084
1062
  errorCode,
1085
1063
  });
1086
1064
  }
@@ -1093,7 +1071,7 @@ const de_UpdateInstanceCustomHealthStatusCommand = async (output, context) => {
1093
1071
  const response = {
1094
1072
  $metadata: deserializeMetadata(output),
1095
1073
  };
1096
- return Promise.resolve(response);
1074
+ return response;
1097
1075
  };
1098
1076
  exports.de_UpdateInstanceCustomHealthStatusCommand = de_UpdateInstanceCustomHealthStatusCommand;
1099
1077
  const de_UpdateInstanceCustomHealthStatusCommandError = async (output, context) => {
@@ -1117,10 +1095,9 @@ const de_UpdateInstanceCustomHealthStatusCommandError = async (output, context)
1117
1095
  throw await de_ServiceNotFoundRes(parsedOutput, context);
1118
1096
  default:
1119
1097
  const parsedBody = parsedOutput.body;
1120
- (0, smithy_client_1.throwDefaultError)({
1098
+ return throwDefaultError({
1121
1099
  output,
1122
1100
  parsedBody,
1123
- exceptionCtor: ServiceDiscoveryServiceException_1.ServiceDiscoveryServiceException,
1124
1101
  errorCode,
1125
1102
  });
1126
1103
  }
@@ -1131,12 +1108,12 @@ const de_UpdatePrivateDnsNamespaceCommand = async (output, context) => {
1131
1108
  }
1132
1109
  const data = await parseBody(output.body, context);
1133
1110
  let contents = {};
1134
- contents = de_UpdatePrivateDnsNamespaceResponse(data, context);
1111
+ contents = (0, smithy_client_1._json)(data);
1135
1112
  const response = {
1136
1113
  $metadata: deserializeMetadata(output),
1137
1114
  ...contents,
1138
1115
  };
1139
- return Promise.resolve(response);
1116
+ return response;
1140
1117
  };
1141
1118
  exports.de_UpdatePrivateDnsNamespaceCommand = de_UpdatePrivateDnsNamespaceCommand;
1142
1119
  const de_UpdatePrivateDnsNamespaceCommandError = async (output, context) => {
@@ -1160,10 +1137,9 @@ const de_UpdatePrivateDnsNamespaceCommandError = async (output, context) => {
1160
1137
  throw await de_ResourceInUseRes(parsedOutput, context);
1161
1138
  default:
1162
1139
  const parsedBody = parsedOutput.body;
1163
- (0, smithy_client_1.throwDefaultError)({
1140
+ return throwDefaultError({
1164
1141
  output,
1165
1142
  parsedBody,
1166
- exceptionCtor: ServiceDiscoveryServiceException_1.ServiceDiscoveryServiceException,
1167
1143
  errorCode,
1168
1144
  });
1169
1145
  }
@@ -1174,12 +1150,12 @@ const de_UpdatePublicDnsNamespaceCommand = async (output, context) => {
1174
1150
  }
1175
1151
  const data = await parseBody(output.body, context);
1176
1152
  let contents = {};
1177
- contents = de_UpdatePublicDnsNamespaceResponse(data, context);
1153
+ contents = (0, smithy_client_1._json)(data);
1178
1154
  const response = {
1179
1155
  $metadata: deserializeMetadata(output),
1180
1156
  ...contents,
1181
1157
  };
1182
- return Promise.resolve(response);
1158
+ return response;
1183
1159
  };
1184
1160
  exports.de_UpdatePublicDnsNamespaceCommand = de_UpdatePublicDnsNamespaceCommand;
1185
1161
  const de_UpdatePublicDnsNamespaceCommandError = async (output, context) => {
@@ -1203,10 +1179,9 @@ const de_UpdatePublicDnsNamespaceCommandError = async (output, context) => {
1203
1179
  throw await de_ResourceInUseRes(parsedOutput, context);
1204
1180
  default:
1205
1181
  const parsedBody = parsedOutput.body;
1206
- (0, smithy_client_1.throwDefaultError)({
1182
+ return throwDefaultError({
1207
1183
  output,
1208
1184
  parsedBody,
1209
- exceptionCtor: ServiceDiscoveryServiceException_1.ServiceDiscoveryServiceException,
1210
1185
  errorCode,
1211
1186
  });
1212
1187
  }
@@ -1217,12 +1192,12 @@ const de_UpdateServiceCommand = async (output, context) => {
1217
1192
  }
1218
1193
  const data = await parseBody(output.body, context);
1219
1194
  let contents = {};
1220
- contents = de_UpdateServiceResponse(data, context);
1195
+ contents = (0, smithy_client_1._json)(data);
1221
1196
  const response = {
1222
1197
  $metadata: deserializeMetadata(output),
1223
1198
  ...contents,
1224
1199
  };
1225
- return Promise.resolve(response);
1200
+ return response;
1226
1201
  };
1227
1202
  exports.de_UpdateServiceCommand = de_UpdateServiceCommand;
1228
1203
  const de_UpdateServiceCommandError = async (output, context) => {
@@ -1243,17 +1218,16 @@ const de_UpdateServiceCommandError = async (output, context) => {
1243
1218
  throw await de_ServiceNotFoundRes(parsedOutput, context);
1244
1219
  default:
1245
1220
  const parsedBody = parsedOutput.body;
1246
- (0, smithy_client_1.throwDefaultError)({
1221
+ return throwDefaultError({
1247
1222
  output,
1248
1223
  parsedBody,
1249
- exceptionCtor: ServiceDiscoveryServiceException_1.ServiceDiscoveryServiceException,
1250
1224
  errorCode,
1251
1225
  });
1252
1226
  }
1253
1227
  };
1254
1228
  const de_CustomHealthNotFoundRes = async (parsedOutput, context) => {
1255
1229
  const body = parsedOutput.body;
1256
- const deserialized = de_CustomHealthNotFound(body, context);
1230
+ const deserialized = (0, smithy_client_1._json)(body);
1257
1231
  const exception = new models_0_1.CustomHealthNotFound({
1258
1232
  $metadata: deserializeMetadata(parsedOutput),
1259
1233
  ...deserialized,
@@ -1262,7 +1236,7 @@ const de_CustomHealthNotFoundRes = async (parsedOutput, context) => {
1262
1236
  };
1263
1237
  const de_DuplicateRequestRes = async (parsedOutput, context) => {
1264
1238
  const body = parsedOutput.body;
1265
- const deserialized = de_DuplicateRequest(body, context);
1239
+ const deserialized = (0, smithy_client_1._json)(body);
1266
1240
  const exception = new models_0_1.DuplicateRequest({
1267
1241
  $metadata: deserializeMetadata(parsedOutput),
1268
1242
  ...deserialized,
@@ -1271,7 +1245,7 @@ const de_DuplicateRequestRes = async (parsedOutput, context) => {
1271
1245
  };
1272
1246
  const de_InstanceNotFoundRes = async (parsedOutput, context) => {
1273
1247
  const body = parsedOutput.body;
1274
- const deserialized = de_InstanceNotFound(body, context);
1248
+ const deserialized = (0, smithy_client_1._json)(body);
1275
1249
  const exception = new models_0_1.InstanceNotFound({
1276
1250
  $metadata: deserializeMetadata(parsedOutput),
1277
1251
  ...deserialized,
@@ -1280,7 +1254,7 @@ const de_InstanceNotFoundRes = async (parsedOutput, context) => {
1280
1254
  };
1281
1255
  const de_InvalidInputRes = async (parsedOutput, context) => {
1282
1256
  const body = parsedOutput.body;
1283
- const deserialized = de_InvalidInput(body, context);
1257
+ const deserialized = (0, smithy_client_1._json)(body);
1284
1258
  const exception = new models_0_1.InvalidInput({
1285
1259
  $metadata: deserializeMetadata(parsedOutput),
1286
1260
  ...deserialized,
@@ -1289,7 +1263,7 @@ const de_InvalidInputRes = async (parsedOutput, context) => {
1289
1263
  };
1290
1264
  const de_NamespaceAlreadyExistsRes = async (parsedOutput, context) => {
1291
1265
  const body = parsedOutput.body;
1292
- const deserialized = de_NamespaceAlreadyExists(body, context);
1266
+ const deserialized = (0, smithy_client_1._json)(body);
1293
1267
  const exception = new models_0_1.NamespaceAlreadyExists({
1294
1268
  $metadata: deserializeMetadata(parsedOutput),
1295
1269
  ...deserialized,
@@ -1298,7 +1272,7 @@ const de_NamespaceAlreadyExistsRes = async (parsedOutput, context) => {
1298
1272
  };
1299
1273
  const de_NamespaceNotFoundRes = async (parsedOutput, context) => {
1300
1274
  const body = parsedOutput.body;
1301
- const deserialized = de_NamespaceNotFound(body, context);
1275
+ const deserialized = (0, smithy_client_1._json)(body);
1302
1276
  const exception = new models_0_1.NamespaceNotFound({
1303
1277
  $metadata: deserializeMetadata(parsedOutput),
1304
1278
  ...deserialized,
@@ -1307,7 +1281,7 @@ const de_NamespaceNotFoundRes = async (parsedOutput, context) => {
1307
1281
  };
1308
1282
  const de_OperationNotFoundRes = async (parsedOutput, context) => {
1309
1283
  const body = parsedOutput.body;
1310
- const deserialized = de_OperationNotFound(body, context);
1284
+ const deserialized = (0, smithy_client_1._json)(body);
1311
1285
  const exception = new models_0_1.OperationNotFound({
1312
1286
  $metadata: deserializeMetadata(parsedOutput),
1313
1287
  ...deserialized,
@@ -1316,7 +1290,7 @@ const de_OperationNotFoundRes = async (parsedOutput, context) => {
1316
1290
  };
1317
1291
  const de_RequestLimitExceededRes = async (parsedOutput, context) => {
1318
1292
  const body = parsedOutput.body;
1319
- const deserialized = de_RequestLimitExceeded(body, context);
1293
+ const deserialized = (0, smithy_client_1._json)(body);
1320
1294
  const exception = new models_0_1.RequestLimitExceeded({
1321
1295
  $metadata: deserializeMetadata(parsedOutput),
1322
1296
  ...deserialized,
@@ -1325,7 +1299,7 @@ const de_RequestLimitExceededRes = async (parsedOutput, context) => {
1325
1299
  };
1326
1300
  const de_ResourceInUseRes = async (parsedOutput, context) => {
1327
1301
  const body = parsedOutput.body;
1328
- const deserialized = de_ResourceInUse(body, context);
1302
+ const deserialized = (0, smithy_client_1._json)(body);
1329
1303
  const exception = new models_0_1.ResourceInUse({
1330
1304
  $metadata: deserializeMetadata(parsedOutput),
1331
1305
  ...deserialized,
@@ -1334,7 +1308,7 @@ const de_ResourceInUseRes = async (parsedOutput, context) => {
1334
1308
  };
1335
1309
  const de_ResourceLimitExceededRes = async (parsedOutput, context) => {
1336
1310
  const body = parsedOutput.body;
1337
- const deserialized = de_ResourceLimitExceeded(body, context);
1311
+ const deserialized = (0, smithy_client_1._json)(body);
1338
1312
  const exception = new models_0_1.ResourceLimitExceeded({
1339
1313
  $metadata: deserializeMetadata(parsedOutput),
1340
1314
  ...deserialized,
@@ -1343,7 +1317,7 @@ const de_ResourceLimitExceededRes = async (parsedOutput, context) => {
1343
1317
  };
1344
1318
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1345
1319
  const body = parsedOutput.body;
1346
- const deserialized = de_ResourceNotFoundException(body, context);
1320
+ const deserialized = (0, smithy_client_1._json)(body);
1347
1321
  const exception = new models_0_1.ResourceNotFoundException({
1348
1322
  $metadata: deserializeMetadata(parsedOutput),
1349
1323
  ...deserialized,
@@ -1352,7 +1326,7 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1352
1326
  };
1353
1327
  const de_ServiceAlreadyExistsRes = async (parsedOutput, context) => {
1354
1328
  const body = parsedOutput.body;
1355
- const deserialized = de_ServiceAlreadyExists(body, context);
1329
+ const deserialized = (0, smithy_client_1._json)(body);
1356
1330
  const exception = new models_0_1.ServiceAlreadyExists({
1357
1331
  $metadata: deserializeMetadata(parsedOutput),
1358
1332
  ...deserialized,
@@ -1361,7 +1335,7 @@ const de_ServiceAlreadyExistsRes = async (parsedOutput, context) => {
1361
1335
  };
1362
1336
  const de_ServiceNotFoundRes = async (parsedOutput, context) => {
1363
1337
  const body = parsedOutput.body;
1364
- const deserialized = de_ServiceNotFound(body, context);
1338
+ const deserialized = (0, smithy_client_1._json)(body);
1365
1339
  const exception = new models_0_1.ServiceNotFound({
1366
1340
  $metadata: deserializeMetadata(parsedOutput),
1367
1341
  ...deserialized,
@@ -1370,856 +1344,196 @@ const de_ServiceNotFoundRes = async (parsedOutput, context) => {
1370
1344
  };
1371
1345
  const de_TooManyTagsExceptionRes = async (parsedOutput, context) => {
1372
1346
  const body = parsedOutput.body;
1373
- const deserialized = de_TooManyTagsException(body, context);
1347
+ const deserialized = (0, smithy_client_1._json)(body);
1374
1348
  const exception = new models_0_1.TooManyTagsException({
1375
1349
  $metadata: deserializeMetadata(parsedOutput),
1376
1350
  ...deserialized,
1377
1351
  });
1378
1352
  return (0, smithy_client_1.decorateServiceException)(exception, body);
1379
1353
  };
1380
- const se_Attributes = (input, context) => {
1381
- return Object.entries(input).reduce((acc, [key, value]) => {
1382
- if (value === null) {
1383
- return acc;
1384
- }
1385
- acc[key] = value;
1386
- return acc;
1387
- }, {});
1388
- };
1389
1354
  const se_CreateHttpNamespaceRequest = (input, context) => {
1390
- return {
1391
- CreatorRequestId: input.CreatorRequestId ?? (0, uuid_1.v4)(),
1392
- ...(input.Description != null && { Description: input.Description }),
1393
- ...(input.Name != null && { Name: input.Name }),
1394
- ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }),
1395
- };
1396
- };
1397
- const se_CreatePrivateDnsNamespaceRequest = (input, context) => {
1398
- return {
1399
- CreatorRequestId: input.CreatorRequestId ?? (0, uuid_1.v4)(),
1400
- ...(input.Description != null && { Description: input.Description }),
1401
- ...(input.Name != null && { Name: input.Name }),
1402
- ...(input.Properties != null && { Properties: se_PrivateDnsNamespaceProperties(input.Properties, context) }),
1403
- ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }),
1404
- ...(input.Vpc != null && { Vpc: input.Vpc }),
1405
- };
1406
- };
1407
- const se_CreatePublicDnsNamespaceRequest = (input, context) => {
1408
- return {
1409
- CreatorRequestId: input.CreatorRequestId ?? (0, uuid_1.v4)(),
1410
- ...(input.Description != null && { Description: input.Description }),
1411
- ...(input.Name != null && { Name: input.Name }),
1412
- ...(input.Properties != null && { Properties: se_PublicDnsNamespaceProperties(input.Properties, context) }),
1413
- ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }),
1414
- };
1415
- };
1416
- const se_CreateServiceRequest = (input, context) => {
1417
- return {
1418
- CreatorRequestId: input.CreatorRequestId ?? (0, uuid_1.v4)(),
1419
- ...(input.Description != null && { Description: input.Description }),
1420
- ...(input.DnsConfig != null && { DnsConfig: se_DnsConfig(input.DnsConfig, context) }),
1421
- ...(input.HealthCheckConfig != null && {
1422
- HealthCheckConfig: se_HealthCheckConfig(input.HealthCheckConfig, context),
1423
- }),
1424
- ...(input.HealthCheckCustomConfig != null && {
1425
- HealthCheckCustomConfig: se_HealthCheckCustomConfig(input.HealthCheckCustomConfig, context),
1426
- }),
1427
- ...(input.Name != null && { Name: input.Name }),
1428
- ...(input.NamespaceId != null && { NamespaceId: input.NamespaceId }),
1429
- ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }),
1430
- ...(input.Type != null && { Type: input.Type }),
1431
- };
1432
- };
1433
- const se_DeleteNamespaceRequest = (input, context) => {
1434
- return {
1435
- ...(input.Id != null && { Id: input.Id }),
1436
- };
1437
- };
1438
- const se_DeleteServiceRequest = (input, context) => {
1439
- return {
1440
- ...(input.Id != null && { Id: input.Id }),
1441
- };
1442
- };
1443
- const se_DeregisterInstanceRequest = (input, context) => {
1444
- return {
1445
- ...(input.InstanceId != null && { InstanceId: input.InstanceId }),
1446
- ...(input.ServiceId != null && { ServiceId: input.ServiceId }),
1447
- };
1448
- };
1449
- const se_DiscoverInstancesRequest = (input, context) => {
1450
- return {
1451
- ...(input.HealthStatus != null && { HealthStatus: input.HealthStatus }),
1452
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1453
- ...(input.NamespaceName != null && { NamespaceName: input.NamespaceName }),
1454
- ...(input.OptionalParameters != null && { OptionalParameters: se_Attributes(input.OptionalParameters, context) }),
1455
- ...(input.QueryParameters != null && { QueryParameters: se_Attributes(input.QueryParameters, context) }),
1456
- ...(input.ServiceName != null && { ServiceName: input.ServiceName }),
1457
- };
1458
- };
1459
- const se_DnsConfig = (input, context) => {
1460
- return {
1461
- ...(input.DnsRecords != null && { DnsRecords: se_DnsRecordList(input.DnsRecords, context) }),
1462
- ...(input.NamespaceId != null && { NamespaceId: input.NamespaceId }),
1463
- ...(input.RoutingPolicy != null && { RoutingPolicy: input.RoutingPolicy }),
1464
- };
1465
- };
1466
- const se_DnsConfigChange = (input, context) => {
1467
- return {
1468
- ...(input.DnsRecords != null && { DnsRecords: se_DnsRecordList(input.DnsRecords, context) }),
1469
- };
1470
- };
1471
- const se_DnsRecord = (input, context) => {
1472
- return {
1473
- ...(input.TTL != null && { TTL: input.TTL }),
1474
- ...(input.Type != null && { Type: input.Type }),
1475
- };
1476
- };
1477
- const se_DnsRecordList = (input, context) => {
1478
- return input
1479
- .filter((e) => e != null)
1480
- .map((entry) => {
1481
- return se_DnsRecord(entry, context);
1482
- });
1483
- };
1484
- const se_FilterValues = (input, context) => {
1485
- return input
1486
- .filter((e) => e != null)
1487
- .map((entry) => {
1488
- return entry;
1355
+ return (0, smithy_client_1.take)(input, {
1356
+ CreatorRequestId: [true, (_) => _ ?? (0, uuid_1.v4)()],
1357
+ Description: [],
1358
+ Name: [],
1359
+ Tags: smithy_client_1._json,
1489
1360
  });
1490
1361
  };
1491
- const se_GetInstanceRequest = (input, context) => {
1492
- return {
1493
- ...(input.InstanceId != null && { InstanceId: input.InstanceId }),
1494
- ...(input.ServiceId != null && { ServiceId: input.ServiceId }),
1495
- };
1496
- };
1497
- const se_GetInstancesHealthStatusRequest = (input, context) => {
1498
- return {
1499
- ...(input.Instances != null && { Instances: se_InstanceIdList(input.Instances, context) }),
1500
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1501
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1502
- ...(input.ServiceId != null && { ServiceId: input.ServiceId }),
1503
- };
1504
- };
1505
- const se_GetNamespaceRequest = (input, context) => {
1506
- return {
1507
- ...(input.Id != null && { Id: input.Id }),
1508
- };
1509
- };
1510
- const se_GetOperationRequest = (input, context) => {
1511
- return {
1512
- ...(input.OperationId != null && { OperationId: input.OperationId }),
1513
- };
1514
- };
1515
- const se_GetServiceRequest = (input, context) => {
1516
- return {
1517
- ...(input.Id != null && { Id: input.Id }),
1518
- };
1519
- };
1520
- const se_HealthCheckConfig = (input, context) => {
1521
- return {
1522
- ...(input.FailureThreshold != null && { FailureThreshold: input.FailureThreshold }),
1523
- ...(input.ResourcePath != null && { ResourcePath: input.ResourcePath }),
1524
- ...(input.Type != null && { Type: input.Type }),
1525
- };
1526
- };
1527
- const se_HealthCheckCustomConfig = (input, context) => {
1528
- return {
1529
- ...(input.FailureThreshold != null && { FailureThreshold: input.FailureThreshold }),
1530
- };
1531
- };
1532
- const se_HttpNamespaceChange = (input, context) => {
1533
- return {
1534
- ...(input.Description != null && { Description: input.Description }),
1535
- };
1536
- };
1537
- const se_InstanceIdList = (input, context) => {
1538
- return input
1539
- .filter((e) => e != null)
1540
- .map((entry) => {
1541
- return entry;
1362
+ const se_CreatePrivateDnsNamespaceRequest = (input, context) => {
1363
+ return (0, smithy_client_1.take)(input, {
1364
+ CreatorRequestId: [true, (_) => _ ?? (0, uuid_1.v4)()],
1365
+ Description: [],
1366
+ Name: [],
1367
+ Properties: smithy_client_1._json,
1368
+ Tags: smithy_client_1._json,
1369
+ Vpc: [],
1542
1370
  });
1543
1371
  };
1544
- const se_ListInstancesRequest = (input, context) => {
1545
- return {
1546
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1547
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1548
- ...(input.ServiceId != null && { ServiceId: input.ServiceId }),
1549
- };
1550
- };
1551
- const se_ListNamespacesRequest = (input, context) => {
1552
- return {
1553
- ...(input.Filters != null && { Filters: se_NamespaceFilters(input.Filters, context) }),
1554
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1555
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1556
- };
1557
- };
1558
- const se_ListOperationsRequest = (input, context) => {
1559
- return {
1560
- ...(input.Filters != null && { Filters: se_OperationFilters(input.Filters, context) }),
1561
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1562
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1563
- };
1564
- };
1565
- const se_ListServicesRequest = (input, context) => {
1566
- return {
1567
- ...(input.Filters != null && { Filters: se_ServiceFilters(input.Filters, context) }),
1568
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1569
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1570
- };
1571
- };
1572
- const se_ListTagsForResourceRequest = (input, context) => {
1573
- return {
1574
- ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
1575
- };
1576
- };
1577
- const se_NamespaceFilter = (input, context) => {
1578
- return {
1579
- ...(input.Condition != null && { Condition: input.Condition }),
1580
- ...(input.Name != null && { Name: input.Name }),
1581
- ...(input.Values != null && { Values: se_FilterValues(input.Values, context) }),
1582
- };
1583
- };
1584
- const se_NamespaceFilters = (input, context) => {
1585
- return input
1586
- .filter((e) => e != null)
1587
- .map((entry) => {
1588
- return se_NamespaceFilter(entry, context);
1372
+ const se_CreatePublicDnsNamespaceRequest = (input, context) => {
1373
+ return (0, smithy_client_1.take)(input, {
1374
+ CreatorRequestId: [true, (_) => _ ?? (0, uuid_1.v4)()],
1375
+ Description: [],
1376
+ Name: [],
1377
+ Properties: smithy_client_1._json,
1378
+ Tags: smithy_client_1._json,
1589
1379
  });
1590
1380
  };
1591
- const se_OperationFilter = (input, context) => {
1592
- return {
1593
- ...(input.Condition != null && { Condition: input.Condition }),
1594
- ...(input.Name != null && { Name: input.Name }),
1595
- ...(input.Values != null && { Values: se_FilterValues(input.Values, context) }),
1596
- };
1597
- };
1598
- const se_OperationFilters = (input, context) => {
1599
- return input
1600
- .filter((e) => e != null)
1601
- .map((entry) => {
1602
- return se_OperationFilter(entry, context);
1381
+ const se_CreateServiceRequest = (input, context) => {
1382
+ return (0, smithy_client_1.take)(input, {
1383
+ CreatorRequestId: [true, (_) => _ ?? (0, uuid_1.v4)()],
1384
+ Description: [],
1385
+ DnsConfig: smithy_client_1._json,
1386
+ HealthCheckConfig: smithy_client_1._json,
1387
+ HealthCheckCustomConfig: smithy_client_1._json,
1388
+ Name: [],
1389
+ NamespaceId: [],
1390
+ Tags: smithy_client_1._json,
1391
+ Type: [],
1603
1392
  });
1604
1393
  };
1605
- const se_PrivateDnsNamespaceChange = (input, context) => {
1606
- return {
1607
- ...(input.Description != null && { Description: input.Description }),
1608
- ...(input.Properties != null && { Properties: se_PrivateDnsNamespacePropertiesChange(input.Properties, context) }),
1609
- };
1610
- };
1611
- const se_PrivateDnsNamespaceProperties = (input, context) => {
1612
- return {
1613
- ...(input.DnsProperties != null && { DnsProperties: se_PrivateDnsPropertiesMutable(input.DnsProperties, context) }),
1614
- };
1615
- };
1616
- const se_PrivateDnsNamespacePropertiesChange = (input, context) => {
1617
- return {
1618
- ...(input.DnsProperties != null && {
1619
- DnsProperties: se_PrivateDnsPropertiesMutableChange(input.DnsProperties, context),
1620
- }),
1621
- };
1622
- };
1623
- const se_PrivateDnsPropertiesMutable = (input, context) => {
1624
- return {
1625
- ...(input.SOA != null && { SOA: se_SOA(input.SOA, context) }),
1626
- };
1627
- };
1628
- const se_PrivateDnsPropertiesMutableChange = (input, context) => {
1629
- return {
1630
- ...(input.SOA != null && { SOA: se_SOAChange(input.SOA, context) }),
1631
- };
1632
- };
1633
- const se_PublicDnsNamespaceChange = (input, context) => {
1634
- return {
1635
- ...(input.Description != null && { Description: input.Description }),
1636
- ...(input.Properties != null && { Properties: se_PublicDnsNamespacePropertiesChange(input.Properties, context) }),
1637
- };
1638
- };
1639
- const se_PublicDnsNamespaceProperties = (input, context) => {
1640
- return {
1641
- ...(input.DnsProperties != null && { DnsProperties: se_PublicDnsPropertiesMutable(input.DnsProperties, context) }),
1642
- };
1643
- };
1644
- const se_PublicDnsNamespacePropertiesChange = (input, context) => {
1645
- return {
1646
- ...(input.DnsProperties != null && {
1647
- DnsProperties: se_PublicDnsPropertiesMutableChange(input.DnsProperties, context),
1648
- }),
1649
- };
1650
- };
1651
- const se_PublicDnsPropertiesMutable = (input, context) => {
1652
- return {
1653
- ...(input.SOA != null && { SOA: se_SOA(input.SOA, context) }),
1654
- };
1655
- };
1656
- const se_PublicDnsPropertiesMutableChange = (input, context) => {
1657
- return {
1658
- ...(input.SOA != null && { SOA: se_SOAChange(input.SOA, context) }),
1659
- };
1660
- };
1661
1394
  const se_RegisterInstanceRequest = (input, context) => {
1662
- return {
1663
- ...(input.Attributes != null && { Attributes: se_Attributes(input.Attributes, context) }),
1664
- CreatorRequestId: input.CreatorRequestId ?? (0, uuid_1.v4)(),
1665
- ...(input.InstanceId != null && { InstanceId: input.InstanceId }),
1666
- ...(input.ServiceId != null && { ServiceId: input.ServiceId }),
1667
- };
1668
- };
1669
- const se_ServiceChange = (input, context) => {
1670
- return {
1671
- ...(input.Description != null && { Description: input.Description }),
1672
- ...(input.DnsConfig != null && { DnsConfig: se_DnsConfigChange(input.DnsConfig, context) }),
1673
- ...(input.HealthCheckConfig != null && {
1674
- HealthCheckConfig: se_HealthCheckConfig(input.HealthCheckConfig, context),
1675
- }),
1676
- };
1677
- };
1678
- const se_ServiceFilter = (input, context) => {
1679
- return {
1680
- ...(input.Condition != null && { Condition: input.Condition }),
1681
- ...(input.Name != null && { Name: input.Name }),
1682
- ...(input.Values != null && { Values: se_FilterValues(input.Values, context) }),
1683
- };
1684
- };
1685
- const se_ServiceFilters = (input, context) => {
1686
- return input
1687
- .filter((e) => e != null)
1688
- .map((entry) => {
1689
- return se_ServiceFilter(entry, context);
1395
+ return (0, smithy_client_1.take)(input, {
1396
+ Attributes: smithy_client_1._json,
1397
+ CreatorRequestId: [true, (_) => _ ?? (0, uuid_1.v4)()],
1398
+ InstanceId: [],
1399
+ ServiceId: [],
1690
1400
  });
1691
1401
  };
1692
- const se_SOA = (input, context) => {
1693
- return {
1694
- ...(input.TTL != null && { TTL: input.TTL }),
1695
- };
1696
- };
1697
- const se_SOAChange = (input, context) => {
1698
- return {
1699
- ...(input.TTL != null && { TTL: input.TTL }),
1700
- };
1701
- };
1702
- const se_Tag = (input, context) => {
1703
- return {
1704
- ...(input.Key != null && { Key: input.Key }),
1705
- ...(input.Value != null && { Value: input.Value }),
1706
- };
1707
- };
1708
- const se_TagKeyList = (input, context) => {
1709
- return input
1710
- .filter((e) => e != null)
1711
- .map((entry) => {
1712
- return entry;
1713
- });
1714
- };
1715
- const se_TagList = (input, context) => {
1716
- return input
1717
- .filter((e) => e != null)
1718
- .map((entry) => {
1719
- return se_Tag(entry, context);
1720
- });
1721
- };
1722
- const se_TagResourceRequest = (input, context) => {
1723
- return {
1724
- ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
1725
- ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }),
1726
- };
1727
- };
1728
- const se_UntagResourceRequest = (input, context) => {
1729
- return {
1730
- ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
1731
- ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }),
1732
- };
1733
- };
1734
1402
  const se_UpdateHttpNamespaceRequest = (input, context) => {
1735
- return {
1736
- ...(input.Id != null && { Id: input.Id }),
1737
- ...(input.Namespace != null && { Namespace: se_HttpNamespaceChange(input.Namespace, context) }),
1738
- UpdaterRequestId: input.UpdaterRequestId ?? (0, uuid_1.v4)(),
1739
- };
1740
- };
1741
- const se_UpdateInstanceCustomHealthStatusRequest = (input, context) => {
1742
- return {
1743
- ...(input.InstanceId != null && { InstanceId: input.InstanceId }),
1744
- ...(input.ServiceId != null && { ServiceId: input.ServiceId }),
1745
- ...(input.Status != null && { Status: input.Status }),
1746
- };
1403
+ return (0, smithy_client_1.take)(input, {
1404
+ Id: [],
1405
+ Namespace: smithy_client_1._json,
1406
+ UpdaterRequestId: [true, (_) => _ ?? (0, uuid_1.v4)()],
1407
+ });
1747
1408
  };
1748
1409
  const se_UpdatePrivateDnsNamespaceRequest = (input, context) => {
1749
- return {
1750
- ...(input.Id != null && { Id: input.Id }),
1751
- ...(input.Namespace != null && { Namespace: se_PrivateDnsNamespaceChange(input.Namespace, context) }),
1752
- UpdaterRequestId: input.UpdaterRequestId ?? (0, uuid_1.v4)(),
1753
- };
1410
+ return (0, smithy_client_1.take)(input, {
1411
+ Id: [],
1412
+ Namespace: smithy_client_1._json,
1413
+ UpdaterRequestId: [true, (_) => _ ?? (0, uuid_1.v4)()],
1414
+ });
1754
1415
  };
1755
1416
  const se_UpdatePublicDnsNamespaceRequest = (input, context) => {
1756
- return {
1757
- ...(input.Id != null && { Id: input.Id }),
1758
- ...(input.Namespace != null && { Namespace: se_PublicDnsNamespaceChange(input.Namespace, context) }),
1759
- UpdaterRequestId: input.UpdaterRequestId ?? (0, uuid_1.v4)(),
1760
- };
1761
- };
1762
- const se_UpdateServiceRequest = (input, context) => {
1763
- return {
1764
- ...(input.Id != null && { Id: input.Id }),
1765
- ...(input.Service != null && { Service: se_ServiceChange(input.Service, context) }),
1766
- };
1767
- };
1768
- const de_Attributes = (output, context) => {
1769
- return Object.entries(output).reduce((acc, [key, value]) => {
1770
- if (value === null) {
1771
- return acc;
1772
- }
1773
- acc[key] = (0, smithy_client_1.expectString)(value);
1774
- return acc;
1775
- }, {});
1776
- };
1777
- const de_CreateHttpNamespaceResponse = (output, context) => {
1778
- return {
1779
- OperationId: (0, smithy_client_1.expectString)(output.OperationId),
1780
- };
1781
- };
1782
- const de_CreatePrivateDnsNamespaceResponse = (output, context) => {
1783
- return {
1784
- OperationId: (0, smithy_client_1.expectString)(output.OperationId),
1785
- };
1786
- };
1787
- const de_CreatePublicDnsNamespaceResponse = (output, context) => {
1788
- return {
1789
- OperationId: (0, smithy_client_1.expectString)(output.OperationId),
1790
- };
1417
+ return (0, smithy_client_1.take)(input, {
1418
+ Id: [],
1419
+ Namespace: smithy_client_1._json,
1420
+ UpdaterRequestId: [true, (_) => _ ?? (0, uuid_1.v4)()],
1421
+ });
1791
1422
  };
1792
1423
  const de_CreateServiceResponse = (output, context) => {
1793
- return {
1794
- Service: output.Service != null ? de_Service(output.Service, context) : undefined,
1795
- };
1796
- };
1797
- const de_CustomHealthNotFound = (output, context) => {
1798
- return {
1799
- Message: (0, smithy_client_1.expectString)(output.Message),
1800
- };
1801
- };
1802
- const de_DeleteNamespaceResponse = (output, context) => {
1803
- return {
1804
- OperationId: (0, smithy_client_1.expectString)(output.OperationId),
1805
- };
1806
- };
1807
- const de_DeleteServiceResponse = (output, context) => {
1808
- return {};
1809
- };
1810
- const de_DeregisterInstanceResponse = (output, context) => {
1811
- return {
1812
- OperationId: (0, smithy_client_1.expectString)(output.OperationId),
1813
- };
1814
- };
1815
- const de_DiscoverInstancesResponse = (output, context) => {
1816
- return {
1817
- Instances: output.Instances != null ? de_HttpInstanceSummaryList(output.Instances, context) : undefined,
1818
- };
1819
- };
1820
- const de_DnsConfig = (output, context) => {
1821
- return {
1822
- DnsRecords: output.DnsRecords != null ? de_DnsRecordList(output.DnsRecords, context) : undefined,
1823
- NamespaceId: (0, smithy_client_1.expectString)(output.NamespaceId),
1824
- RoutingPolicy: (0, smithy_client_1.expectString)(output.RoutingPolicy),
1825
- };
1826
- };
1827
- const de_DnsProperties = (output, context) => {
1828
- return {
1829
- HostedZoneId: (0, smithy_client_1.expectString)(output.HostedZoneId),
1830
- SOA: output.SOA != null ? de_SOA(output.SOA, context) : undefined,
1831
- };
1832
- };
1833
- const de_DnsRecord = (output, context) => {
1834
- return {
1835
- TTL: (0, smithy_client_1.expectLong)(output.TTL),
1836
- Type: (0, smithy_client_1.expectString)(output.Type),
1837
- };
1838
- };
1839
- const de_DnsRecordList = (output, context) => {
1840
- const retVal = (output || [])
1841
- .filter((e) => e != null)
1842
- .map((entry) => {
1843
- if (entry === null) {
1844
- return null;
1845
- }
1846
- return de_DnsRecord(entry, context);
1424
+ return (0, smithy_client_1.take)(output, {
1425
+ Service: (_) => de_Service(_, context),
1847
1426
  });
1848
- return retVal;
1849
- };
1850
- const de_DuplicateRequest = (output, context) => {
1851
- return {
1852
- DuplicateOperationId: (0, smithy_client_1.expectString)(output.DuplicateOperationId),
1853
- Message: (0, smithy_client_1.expectString)(output.Message),
1854
- };
1855
- };
1856
- const de_GetInstanceResponse = (output, context) => {
1857
- return {
1858
- Instance: output.Instance != null ? de_Instance(output.Instance, context) : undefined,
1859
- };
1860
- };
1861
- const de_GetInstancesHealthStatusResponse = (output, context) => {
1862
- return {
1863
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
1864
- Status: output.Status != null ? de_InstanceHealthStatusMap(output.Status, context) : undefined,
1865
- };
1866
1427
  };
1867
1428
  const de_GetNamespaceResponse = (output, context) => {
1868
- return {
1869
- Namespace: output.Namespace != null ? de_Namespace(output.Namespace, context) : undefined,
1870
- };
1429
+ return (0, smithy_client_1.take)(output, {
1430
+ Namespace: (_) => de_Namespace(_, context),
1431
+ });
1871
1432
  };
1872
1433
  const de_GetOperationResponse = (output, context) => {
1873
- return {
1874
- Operation: output.Operation != null ? de_Operation(output.Operation, context) : undefined,
1875
- };
1876
- };
1877
- const de_GetServiceResponse = (output, context) => {
1878
- return {
1879
- Service: output.Service != null ? de_Service(output.Service, context) : undefined,
1880
- };
1881
- };
1882
- const de_HealthCheckConfig = (output, context) => {
1883
- return {
1884
- FailureThreshold: (0, smithy_client_1.expectInt32)(output.FailureThreshold),
1885
- ResourcePath: (0, smithy_client_1.expectString)(output.ResourcePath),
1886
- Type: (0, smithy_client_1.expectString)(output.Type),
1887
- };
1888
- };
1889
- const de_HealthCheckCustomConfig = (output, context) => {
1890
- return {
1891
- FailureThreshold: (0, smithy_client_1.expectInt32)(output.FailureThreshold),
1892
- };
1893
- };
1894
- const de_HttpInstanceSummary = (output, context) => {
1895
- return {
1896
- Attributes: output.Attributes != null ? de_Attributes(output.Attributes, context) : undefined,
1897
- HealthStatus: (0, smithy_client_1.expectString)(output.HealthStatus),
1898
- InstanceId: (0, smithy_client_1.expectString)(output.InstanceId),
1899
- NamespaceName: (0, smithy_client_1.expectString)(output.NamespaceName),
1900
- ServiceName: (0, smithy_client_1.expectString)(output.ServiceName),
1901
- };
1902
- };
1903
- const de_HttpInstanceSummaryList = (output, context) => {
1904
- const retVal = (output || [])
1905
- .filter((e) => e != null)
1906
- .map((entry) => {
1907
- if (entry === null) {
1908
- return null;
1909
- }
1910
- return de_HttpInstanceSummary(entry, context);
1434
+ return (0, smithy_client_1.take)(output, {
1435
+ Operation: (_) => de_Operation(_, context),
1911
1436
  });
1912
- return retVal;
1913
- };
1914
- const de_HttpProperties = (output, context) => {
1915
- return {
1916
- HttpName: (0, smithy_client_1.expectString)(output.HttpName),
1917
- };
1918
- };
1919
- const de_Instance = (output, context) => {
1920
- return {
1921
- Attributes: output.Attributes != null ? de_Attributes(output.Attributes, context) : undefined,
1922
- CreatorRequestId: (0, smithy_client_1.expectString)(output.CreatorRequestId),
1923
- Id: (0, smithy_client_1.expectString)(output.Id),
1924
- };
1925
- };
1926
- const de_InstanceHealthStatusMap = (output, context) => {
1927
- return Object.entries(output).reduce((acc, [key, value]) => {
1928
- if (value === null) {
1929
- return acc;
1930
- }
1931
- acc[key] = (0, smithy_client_1.expectString)(value);
1932
- return acc;
1933
- }, {});
1934
1437
  };
1935
- const de_InstanceNotFound = (output, context) => {
1936
- return {
1937
- Message: (0, smithy_client_1.expectString)(output.Message),
1938
- };
1939
- };
1940
- const de_InstanceSummary = (output, context) => {
1941
- return {
1942
- Attributes: output.Attributes != null ? de_Attributes(output.Attributes, context) : undefined,
1943
- Id: (0, smithy_client_1.expectString)(output.Id),
1944
- };
1945
- };
1946
- const de_InstanceSummaryList = (output, context) => {
1947
- const retVal = (output || [])
1948
- .filter((e) => e != null)
1949
- .map((entry) => {
1950
- if (entry === null) {
1951
- return null;
1952
- }
1953
- return de_InstanceSummary(entry, context);
1438
+ const de_GetServiceResponse = (output, context) => {
1439
+ return (0, smithy_client_1.take)(output, {
1440
+ Service: (_) => de_Service(_, context),
1954
1441
  });
1955
- return retVal;
1956
- };
1957
- const de_InvalidInput = (output, context) => {
1958
- return {
1959
- Message: (0, smithy_client_1.expectString)(output.Message),
1960
- };
1961
- };
1962
- const de_ListInstancesResponse = (output, context) => {
1963
- return {
1964
- Instances: output.Instances != null ? de_InstanceSummaryList(output.Instances, context) : undefined,
1965
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
1966
- };
1967
1442
  };
1968
1443
  const de_ListNamespacesResponse = (output, context) => {
1969
- return {
1970
- Namespaces: output.Namespaces != null ? de_NamespaceSummariesList(output.Namespaces, context) : undefined,
1971
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
1972
- };
1973
- };
1974
- const de_ListOperationsResponse = (output, context) => {
1975
- return {
1976
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
1977
- Operations: output.Operations != null ? de_OperationSummaryList(output.Operations, context) : undefined,
1978
- };
1444
+ return (0, smithy_client_1.take)(output, {
1445
+ Namespaces: (_) => de_NamespaceSummariesList(_, context),
1446
+ NextToken: smithy_client_1.expectString,
1447
+ });
1979
1448
  };
1980
1449
  const de_ListServicesResponse = (output, context) => {
1981
- return {
1982
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
1983
- Services: output.Services != null ? de_ServiceSummariesList(output.Services, context) : undefined,
1984
- };
1985
- };
1986
- const de_ListTagsForResourceResponse = (output, context) => {
1987
- return {
1988
- Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined,
1989
- };
1450
+ return (0, smithy_client_1.take)(output, {
1451
+ NextToken: smithy_client_1.expectString,
1452
+ Services: (_) => de_ServiceSummariesList(_, context),
1453
+ });
1990
1454
  };
1991
1455
  const de_Namespace = (output, context) => {
1992
- return {
1993
- Arn: (0, smithy_client_1.expectString)(output.Arn),
1994
- CreateDate: output.CreateDate != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreateDate))) : undefined,
1995
- CreatorRequestId: (0, smithy_client_1.expectString)(output.CreatorRequestId),
1996
- Description: (0, smithy_client_1.expectString)(output.Description),
1997
- Id: (0, smithy_client_1.expectString)(output.Id),
1998
- Name: (0, smithy_client_1.expectString)(output.Name),
1999
- Properties: output.Properties != null ? de_NamespaceProperties(output.Properties, context) : undefined,
2000
- ServiceCount: (0, smithy_client_1.expectInt32)(output.ServiceCount),
2001
- Type: (0, smithy_client_1.expectString)(output.Type),
2002
- };
2003
- };
2004
- const de_NamespaceAlreadyExists = (output, context) => {
2005
- return {
2006
- CreatorRequestId: (0, smithy_client_1.expectString)(output.CreatorRequestId),
2007
- Message: (0, smithy_client_1.expectString)(output.Message),
2008
- NamespaceId: (0, smithy_client_1.expectString)(output.NamespaceId),
2009
- };
2010
- };
2011
- const de_NamespaceNotFound = (output, context) => {
2012
- return {
2013
- Message: (0, smithy_client_1.expectString)(output.Message),
2014
- };
2015
- };
2016
- const de_NamespaceProperties = (output, context) => {
2017
- return {
2018
- DnsProperties: output.DnsProperties != null ? de_DnsProperties(output.DnsProperties, context) : undefined,
2019
- HttpProperties: output.HttpProperties != null ? de_HttpProperties(output.HttpProperties, context) : undefined,
2020
- };
1456
+ return (0, smithy_client_1.take)(output, {
1457
+ Arn: smithy_client_1.expectString,
1458
+ CreateDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1459
+ CreatorRequestId: smithy_client_1.expectString,
1460
+ Description: smithy_client_1.expectString,
1461
+ Id: smithy_client_1.expectString,
1462
+ Name: smithy_client_1.expectString,
1463
+ Properties: smithy_client_1._json,
1464
+ ServiceCount: smithy_client_1.expectInt32,
1465
+ Type: smithy_client_1.expectString,
1466
+ });
2021
1467
  };
2022
1468
  const de_NamespaceSummariesList = (output, context) => {
2023
1469
  const retVal = (output || [])
2024
1470
  .filter((e) => e != null)
2025
1471
  .map((entry) => {
2026
- if (entry === null) {
2027
- return null;
2028
- }
2029
1472
  return de_NamespaceSummary(entry, context);
2030
1473
  });
2031
1474
  return retVal;
2032
1475
  };
2033
1476
  const de_NamespaceSummary = (output, context) => {
2034
- return {
2035
- Arn: (0, smithy_client_1.expectString)(output.Arn),
2036
- CreateDate: output.CreateDate != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreateDate))) : undefined,
2037
- Description: (0, smithy_client_1.expectString)(output.Description),
2038
- Id: (0, smithy_client_1.expectString)(output.Id),
2039
- Name: (0, smithy_client_1.expectString)(output.Name),
2040
- Properties: output.Properties != null ? de_NamespaceProperties(output.Properties, context) : undefined,
2041
- ServiceCount: (0, smithy_client_1.expectInt32)(output.ServiceCount),
2042
- Type: (0, smithy_client_1.expectString)(output.Type),
2043
- };
1477
+ return (0, smithy_client_1.take)(output, {
1478
+ Arn: smithy_client_1.expectString,
1479
+ CreateDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1480
+ Description: smithy_client_1.expectString,
1481
+ Id: smithy_client_1.expectString,
1482
+ Name: smithy_client_1.expectString,
1483
+ Properties: smithy_client_1._json,
1484
+ ServiceCount: smithy_client_1.expectInt32,
1485
+ Type: smithy_client_1.expectString,
1486
+ });
2044
1487
  };
2045
1488
  const de_Operation = (output, context) => {
2046
- return {
2047
- CreateDate: output.CreateDate != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreateDate))) : undefined,
2048
- ErrorCode: (0, smithy_client_1.expectString)(output.ErrorCode),
2049
- ErrorMessage: (0, smithy_client_1.expectString)(output.ErrorMessage),
2050
- Id: (0, smithy_client_1.expectString)(output.Id),
2051
- Status: (0, smithy_client_1.expectString)(output.Status),
2052
- Targets: output.Targets != null ? de_OperationTargetsMap(output.Targets, context) : undefined,
2053
- Type: (0, smithy_client_1.expectString)(output.Type),
2054
- UpdateDate: output.UpdateDate != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.UpdateDate))) : undefined,
2055
- };
2056
- };
2057
- const de_OperationNotFound = (output, context) => {
2058
- return {
2059
- Message: (0, smithy_client_1.expectString)(output.Message),
2060
- };
2061
- };
2062
- const de_OperationSummary = (output, context) => {
2063
- return {
2064
- Id: (0, smithy_client_1.expectString)(output.Id),
2065
- Status: (0, smithy_client_1.expectString)(output.Status),
2066
- };
2067
- };
2068
- const de_OperationSummaryList = (output, context) => {
2069
- const retVal = (output || [])
2070
- .filter((e) => e != null)
2071
- .map((entry) => {
2072
- if (entry === null) {
2073
- return null;
2074
- }
2075
- return de_OperationSummary(entry, context);
1489
+ return (0, smithy_client_1.take)(output, {
1490
+ CreateDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1491
+ ErrorCode: smithy_client_1.expectString,
1492
+ ErrorMessage: smithy_client_1.expectString,
1493
+ Id: smithy_client_1.expectString,
1494
+ Status: smithy_client_1.expectString,
1495
+ Targets: smithy_client_1._json,
1496
+ Type: smithy_client_1.expectString,
1497
+ UpdateDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2076
1498
  });
2077
- return retVal;
2078
- };
2079
- const de_OperationTargetsMap = (output, context) => {
2080
- return Object.entries(output).reduce((acc, [key, value]) => {
2081
- if (value === null) {
2082
- return acc;
2083
- }
2084
- acc[key] = (0, smithy_client_1.expectString)(value);
2085
- return acc;
2086
- }, {});
2087
- };
2088
- const de_RegisterInstanceResponse = (output, context) => {
2089
- return {
2090
- OperationId: (0, smithy_client_1.expectString)(output.OperationId),
2091
- };
2092
- };
2093
- const de_RequestLimitExceeded = (output, context) => {
2094
- return {
2095
- Message: (0, smithy_client_1.expectString)(output.Message),
2096
- };
2097
- };
2098
- const de_ResourceInUse = (output, context) => {
2099
- return {
2100
- Message: (0, smithy_client_1.expectString)(output.Message),
2101
- };
2102
- };
2103
- const de_ResourceLimitExceeded = (output, context) => {
2104
- return {
2105
- Message: (0, smithy_client_1.expectString)(output.Message),
2106
- };
2107
- };
2108
- const de_ResourceNotFoundException = (output, context) => {
2109
- return {
2110
- Message: (0, smithy_client_1.expectString)(output.Message),
2111
- };
2112
1499
  };
2113
1500
  const de_Service = (output, context) => {
2114
- return {
2115
- Arn: (0, smithy_client_1.expectString)(output.Arn),
2116
- CreateDate: output.CreateDate != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreateDate))) : undefined,
2117
- CreatorRequestId: (0, smithy_client_1.expectString)(output.CreatorRequestId),
2118
- Description: (0, smithy_client_1.expectString)(output.Description),
2119
- DnsConfig: output.DnsConfig != null ? de_DnsConfig(output.DnsConfig, context) : undefined,
2120
- HealthCheckConfig: output.HealthCheckConfig != null ? de_HealthCheckConfig(output.HealthCheckConfig, context) : undefined,
2121
- HealthCheckCustomConfig: output.HealthCheckCustomConfig != null
2122
- ? de_HealthCheckCustomConfig(output.HealthCheckCustomConfig, context)
2123
- : undefined,
2124
- Id: (0, smithy_client_1.expectString)(output.Id),
2125
- InstanceCount: (0, smithy_client_1.expectInt32)(output.InstanceCount),
2126
- Name: (0, smithy_client_1.expectString)(output.Name),
2127
- NamespaceId: (0, smithy_client_1.expectString)(output.NamespaceId),
2128
- Type: (0, smithy_client_1.expectString)(output.Type),
2129
- };
2130
- };
2131
- const de_ServiceAlreadyExists = (output, context) => {
2132
- return {
2133
- CreatorRequestId: (0, smithy_client_1.expectString)(output.CreatorRequestId),
2134
- Message: (0, smithy_client_1.expectString)(output.Message),
2135
- ServiceId: (0, smithy_client_1.expectString)(output.ServiceId),
2136
- };
2137
- };
2138
- const de_ServiceNotFound = (output, context) => {
2139
- return {
2140
- Message: (0, smithy_client_1.expectString)(output.Message),
2141
- };
1501
+ return (0, smithy_client_1.take)(output, {
1502
+ Arn: smithy_client_1.expectString,
1503
+ CreateDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1504
+ CreatorRequestId: smithy_client_1.expectString,
1505
+ Description: smithy_client_1.expectString,
1506
+ DnsConfig: smithy_client_1._json,
1507
+ HealthCheckConfig: smithy_client_1._json,
1508
+ HealthCheckCustomConfig: smithy_client_1._json,
1509
+ Id: smithy_client_1.expectString,
1510
+ InstanceCount: smithy_client_1.expectInt32,
1511
+ Name: smithy_client_1.expectString,
1512
+ NamespaceId: smithy_client_1.expectString,
1513
+ Type: smithy_client_1.expectString,
1514
+ });
2142
1515
  };
2143
1516
  const de_ServiceSummariesList = (output, context) => {
2144
1517
  const retVal = (output || [])
2145
1518
  .filter((e) => e != null)
2146
1519
  .map((entry) => {
2147
- if (entry === null) {
2148
- return null;
2149
- }
2150
1520
  return de_ServiceSummary(entry, context);
2151
1521
  });
2152
1522
  return retVal;
2153
1523
  };
2154
1524
  const de_ServiceSummary = (output, context) => {
2155
- return {
2156
- Arn: (0, smithy_client_1.expectString)(output.Arn),
2157
- CreateDate: output.CreateDate != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreateDate))) : undefined,
2158
- Description: (0, smithy_client_1.expectString)(output.Description),
2159
- DnsConfig: output.DnsConfig != null ? de_DnsConfig(output.DnsConfig, context) : undefined,
2160
- HealthCheckConfig: output.HealthCheckConfig != null ? de_HealthCheckConfig(output.HealthCheckConfig, context) : undefined,
2161
- HealthCheckCustomConfig: output.HealthCheckCustomConfig != null
2162
- ? de_HealthCheckCustomConfig(output.HealthCheckCustomConfig, context)
2163
- : undefined,
2164
- Id: (0, smithy_client_1.expectString)(output.Id),
2165
- InstanceCount: (0, smithy_client_1.expectInt32)(output.InstanceCount),
2166
- Name: (0, smithy_client_1.expectString)(output.Name),
2167
- Type: (0, smithy_client_1.expectString)(output.Type),
2168
- };
2169
- };
2170
- const de_SOA = (output, context) => {
2171
- return {
2172
- TTL: (0, smithy_client_1.expectLong)(output.TTL),
2173
- };
2174
- };
2175
- const de_Tag = (output, context) => {
2176
- return {
2177
- Key: (0, smithy_client_1.expectString)(output.Key),
2178
- Value: (0, smithy_client_1.expectString)(output.Value),
2179
- };
2180
- };
2181
- const de_TagList = (output, context) => {
2182
- const retVal = (output || [])
2183
- .filter((e) => e != null)
2184
- .map((entry) => {
2185
- if (entry === null) {
2186
- return null;
2187
- }
2188
- return de_Tag(entry, context);
1525
+ return (0, smithy_client_1.take)(output, {
1526
+ Arn: smithy_client_1.expectString,
1527
+ CreateDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1528
+ Description: smithy_client_1.expectString,
1529
+ DnsConfig: smithy_client_1._json,
1530
+ HealthCheckConfig: smithy_client_1._json,
1531
+ HealthCheckCustomConfig: smithy_client_1._json,
1532
+ Id: smithy_client_1.expectString,
1533
+ InstanceCount: smithy_client_1.expectInt32,
1534
+ Name: smithy_client_1.expectString,
1535
+ Type: smithy_client_1.expectString,
2189
1536
  });
2190
- return retVal;
2191
- };
2192
- const de_TagResourceResponse = (output, context) => {
2193
- return {};
2194
- };
2195
- const de_TooManyTagsException = (output, context) => {
2196
- return {
2197
- Message: (0, smithy_client_1.expectString)(output.Message),
2198
- ResourceName: (0, smithy_client_1.expectString)(output.ResourceName),
2199
- };
2200
- };
2201
- const de_UntagResourceResponse = (output, context) => {
2202
- return {};
2203
- };
2204
- const de_UpdateHttpNamespaceResponse = (output, context) => {
2205
- return {
2206
- OperationId: (0, smithy_client_1.expectString)(output.OperationId),
2207
- };
2208
- };
2209
- const de_UpdatePrivateDnsNamespaceResponse = (output, context) => {
2210
- return {
2211
- OperationId: (0, smithy_client_1.expectString)(output.OperationId),
2212
- };
2213
- };
2214
- const de_UpdatePublicDnsNamespaceResponse = (output, context) => {
2215
- return {
2216
- OperationId: (0, smithy_client_1.expectString)(output.OperationId),
2217
- };
2218
- };
2219
- const de_UpdateServiceResponse = (output, context) => {
2220
- return {
2221
- OperationId: (0, smithy_client_1.expectString)(output.OperationId),
2222
- };
2223
1537
  };
2224
1538
  const deserializeMetadata = (output) => ({
2225
1539
  httpStatusCode: output.statusCode,
@@ -2234,6 +1548,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
2234
1548
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
2235
1549
  };
2236
1550
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
1551
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(ServiceDiscoveryServiceException_1.ServiceDiscoveryServiceException);
2237
1552
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
2238
1553
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2239
1554
  const contents = {