@aws-sdk/client-clouddirectory 3.118.0 → 3.127.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.
@@ -17,16 +17,13 @@ const serializeAws_restJson1AddFacetToObjectCommand = async (input, context) =>
17
17
  "/amazonclouddirectory/2017-01-11/object/facets";
18
18
  let body;
19
19
  body = JSON.stringify({
20
- ...(input.ObjectAttributeList !== undefined &&
21
- input.ObjectAttributeList !== null && {
20
+ ...(input.ObjectAttributeList != null && {
22
21
  ObjectAttributeList: serializeAws_restJson1AttributeKeyAndValueList(input.ObjectAttributeList, context),
23
22
  }),
24
- ...(input.ObjectReference !== undefined &&
25
- input.ObjectReference !== null && {
23
+ ...(input.ObjectReference != null && {
26
24
  ObjectReference: serializeAws_restJson1ObjectReference(input.ObjectReference, context),
27
25
  }),
28
- ...(input.SchemaFacet !== undefined &&
29
- input.SchemaFacet !== null && { SchemaFacet: serializeAws_restJson1SchemaFacet(input.SchemaFacet, context) }),
26
+ ...(input.SchemaFacet != null && { SchemaFacet: serializeAws_restJson1SchemaFacet(input.SchemaFacet, context) }),
30
27
  });
31
28
  return new protocol_http_1.HttpRequest({
32
29
  protocol,
@@ -49,8 +46,7 @@ const serializeAws_restJson1ApplySchemaCommand = async (input, context) => {
49
46
  "/amazonclouddirectory/2017-01-11/schema/apply";
50
47
  let body;
51
48
  body = JSON.stringify({
52
- ...(input.PublishedSchemaArn !== undefined &&
53
- input.PublishedSchemaArn !== null && { PublishedSchemaArn: input.PublishedSchemaArn }),
49
+ ...(input.PublishedSchemaArn != null && { PublishedSchemaArn: input.PublishedSchemaArn }),
54
50
  });
55
51
  return new protocol_http_1.HttpRequest({
56
52
  protocol,
@@ -73,13 +69,11 @@ const serializeAws_restJson1AttachObjectCommand = async (input, context) => {
73
69
  "/amazonclouddirectory/2017-01-11/object/attach";
74
70
  let body;
75
71
  body = JSON.stringify({
76
- ...(input.ChildReference !== undefined &&
77
- input.ChildReference !== null && {
72
+ ...(input.ChildReference != null && {
78
73
  ChildReference: serializeAws_restJson1ObjectReference(input.ChildReference, context),
79
74
  }),
80
- ...(input.LinkName !== undefined && input.LinkName !== null && { LinkName: input.LinkName }),
81
- ...(input.ParentReference !== undefined &&
82
- input.ParentReference !== null && {
75
+ ...(input.LinkName != null && { LinkName: input.LinkName }),
76
+ ...(input.ParentReference != null && {
83
77
  ParentReference: serializeAws_restJson1ObjectReference(input.ParentReference, context),
84
78
  }),
85
79
  });
@@ -104,12 +98,10 @@ const serializeAws_restJson1AttachPolicyCommand = async (input, context) => {
104
98
  "/amazonclouddirectory/2017-01-11/policy/attach";
105
99
  let body;
106
100
  body = JSON.stringify({
107
- ...(input.ObjectReference !== undefined &&
108
- input.ObjectReference !== null && {
101
+ ...(input.ObjectReference != null && {
109
102
  ObjectReference: serializeAws_restJson1ObjectReference(input.ObjectReference, context),
110
103
  }),
111
- ...(input.PolicyReference !== undefined &&
112
- input.PolicyReference !== null && {
104
+ ...(input.PolicyReference != null && {
113
105
  PolicyReference: serializeAws_restJson1ObjectReference(input.PolicyReference, context),
114
106
  }),
115
107
  });
@@ -134,12 +126,10 @@ const serializeAws_restJson1AttachToIndexCommand = async (input, context) => {
134
126
  "/amazonclouddirectory/2017-01-11/index/attach";
135
127
  let body;
136
128
  body = JSON.stringify({
137
- ...(input.IndexReference !== undefined &&
138
- input.IndexReference !== null && {
129
+ ...(input.IndexReference != null && {
139
130
  IndexReference: serializeAws_restJson1ObjectReference(input.IndexReference, context),
140
131
  }),
141
- ...(input.TargetReference !== undefined &&
142
- input.TargetReference !== null && {
132
+ ...(input.TargetReference != null && {
143
133
  TargetReference: serializeAws_restJson1ObjectReference(input.TargetReference, context),
144
134
  }),
145
135
  });
@@ -164,20 +154,16 @@ const serializeAws_restJson1AttachTypedLinkCommand = async (input, context) => {
164
154
  "/amazonclouddirectory/2017-01-11/typedlink/attach";
165
155
  let body;
166
156
  body = JSON.stringify({
167
- ...(input.Attributes !== undefined &&
168
- input.Attributes !== null && {
157
+ ...(input.Attributes != null && {
169
158
  Attributes: serializeAws_restJson1AttributeNameAndValueList(input.Attributes, context),
170
159
  }),
171
- ...(input.SourceObjectReference !== undefined &&
172
- input.SourceObjectReference !== null && {
160
+ ...(input.SourceObjectReference != null && {
173
161
  SourceObjectReference: serializeAws_restJson1ObjectReference(input.SourceObjectReference, context),
174
162
  }),
175
- ...(input.TargetObjectReference !== undefined &&
176
- input.TargetObjectReference !== null && {
163
+ ...(input.TargetObjectReference != null && {
177
164
  TargetObjectReference: serializeAws_restJson1ObjectReference(input.TargetObjectReference, context),
178
165
  }),
179
- ...(input.TypedLinkFacet !== undefined &&
180
- input.TypedLinkFacet !== null && {
166
+ ...(input.TypedLinkFacet != null && {
181
167
  TypedLinkFacet: serializeAws_restJson1TypedLinkSchemaAndFacetName(input.TypedLinkFacet, context),
182
168
  }),
183
169
  });
@@ -203,8 +189,7 @@ const serializeAws_restJson1BatchReadCommand = async (input, context) => {
203
189
  "/amazonclouddirectory/2017-01-11/batchread";
204
190
  let body;
205
191
  body = JSON.stringify({
206
- ...(input.Operations !== undefined &&
207
- input.Operations !== null && {
192
+ ...(input.Operations != null && {
208
193
  Operations: serializeAws_restJson1BatchReadOperationList(input.Operations, context),
209
194
  }),
210
195
  });
@@ -229,8 +214,7 @@ const serializeAws_restJson1BatchWriteCommand = async (input, context) => {
229
214
  "/amazonclouddirectory/2017-01-11/batchwrite";
230
215
  let body;
231
216
  body = JSON.stringify({
232
- ...(input.Operations !== undefined &&
233
- input.Operations !== null && {
217
+ ...(input.Operations != null && {
234
218
  Operations: serializeAws_restJson1BatchWriteOperationList(input.Operations, context),
235
219
  }),
236
220
  });
@@ -255,7 +239,7 @@ const serializeAws_restJson1CreateDirectoryCommand = async (input, context) => {
255
239
  "/amazonclouddirectory/2017-01-11/directory/create";
256
240
  let body;
257
241
  body = JSON.stringify({
258
- ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
242
+ ...(input.Name != null && { Name: input.Name }),
259
243
  });
260
244
  return new protocol_http_1.HttpRequest({
261
245
  protocol,
@@ -278,11 +262,12 @@ const serializeAws_restJson1CreateFacetCommand = async (input, context) => {
278
262
  "/amazonclouddirectory/2017-01-11/facet/create";
279
263
  let body;
280
264
  body = JSON.stringify({
281
- ...(input.Attributes !== undefined &&
282
- input.Attributes !== null && { Attributes: serializeAws_restJson1FacetAttributeList(input.Attributes, context) }),
283
- ...(input.FacetStyle !== undefined && input.FacetStyle !== null && { FacetStyle: input.FacetStyle }),
284
- ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
285
- ...(input.ObjectType !== undefined && input.ObjectType !== null && { ObjectType: input.ObjectType }),
265
+ ...(input.Attributes != null && {
266
+ Attributes: serializeAws_restJson1FacetAttributeList(input.Attributes, context),
267
+ }),
268
+ ...(input.FacetStyle != null && { FacetStyle: input.FacetStyle }),
269
+ ...(input.Name != null && { Name: input.Name }),
270
+ ...(input.ObjectType != null && { ObjectType: input.ObjectType }),
286
271
  });
287
272
  return new protocol_http_1.HttpRequest({
288
273
  protocol,
@@ -304,14 +289,12 @@ const serializeAws_restJson1CreateIndexCommand = async (input, context) => {
304
289
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/index";
305
290
  let body;
306
291
  body = JSON.stringify({
307
- ...(input.IsUnique !== undefined && input.IsUnique !== null && { IsUnique: input.IsUnique }),
308
- ...(input.LinkName !== undefined && input.LinkName !== null && { LinkName: input.LinkName }),
309
- ...(input.OrderedIndexedAttributeList !== undefined &&
310
- input.OrderedIndexedAttributeList !== null && {
292
+ ...(input.IsUnique != null && { IsUnique: input.IsUnique }),
293
+ ...(input.LinkName != null && { LinkName: input.LinkName }),
294
+ ...(input.OrderedIndexedAttributeList != null && {
311
295
  OrderedIndexedAttributeList: serializeAws_restJson1AttributeKeyList(input.OrderedIndexedAttributeList, context),
312
296
  }),
313
- ...(input.ParentReference !== undefined &&
314
- input.ParentReference !== null && {
297
+ ...(input.ParentReference != null && {
315
298
  ParentReference: serializeAws_restJson1ObjectReference(input.ParentReference, context),
316
299
  }),
317
300
  });
@@ -335,17 +318,14 @@ const serializeAws_restJson1CreateObjectCommand = async (input, context) => {
335
318
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/object";
336
319
  let body;
337
320
  body = JSON.stringify({
338
- ...(input.LinkName !== undefined && input.LinkName !== null && { LinkName: input.LinkName }),
339
- ...(input.ObjectAttributeList !== undefined &&
340
- input.ObjectAttributeList !== null && {
321
+ ...(input.LinkName != null && { LinkName: input.LinkName }),
322
+ ...(input.ObjectAttributeList != null && {
341
323
  ObjectAttributeList: serializeAws_restJson1AttributeKeyAndValueList(input.ObjectAttributeList, context),
342
324
  }),
343
- ...(input.ParentReference !== undefined &&
344
- input.ParentReference !== null && {
325
+ ...(input.ParentReference != null && {
345
326
  ParentReference: serializeAws_restJson1ObjectReference(input.ParentReference, context),
346
327
  }),
347
- ...(input.SchemaFacets !== undefined &&
348
- input.SchemaFacets !== null && {
328
+ ...(input.SchemaFacets != null && {
349
329
  SchemaFacets: serializeAws_restJson1SchemaFacetList(input.SchemaFacets, context),
350
330
  }),
351
331
  });
@@ -369,7 +349,7 @@ const serializeAws_restJson1CreateSchemaCommand = async (input, context) => {
369
349
  "/amazonclouddirectory/2017-01-11/schema/create";
370
350
  let body;
371
351
  body = JSON.stringify({
372
- ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
352
+ ...(input.Name != null && { Name: input.Name }),
373
353
  });
374
354
  return new protocol_http_1.HttpRequest({
375
355
  protocol,
@@ -392,8 +372,7 @@ const serializeAws_restJson1CreateTypedLinkFacetCommand = async (input, context)
392
372
  "/amazonclouddirectory/2017-01-11/typedlink/facet/create";
393
373
  let body;
394
374
  body = JSON.stringify({
395
- ...(input.Facet !== undefined &&
396
- input.Facet !== null && { Facet: serializeAws_restJson1TypedLinkFacet(input.Facet, context) }),
375
+ ...(input.Facet != null && { Facet: serializeAws_restJson1TypedLinkFacet(input.Facet, context) }),
397
376
  });
398
377
  return new protocol_http_1.HttpRequest({
399
378
  protocol,
@@ -435,7 +414,7 @@ const serializeAws_restJson1DeleteFacetCommand = async (input, context) => {
435
414
  "/amazonclouddirectory/2017-01-11/facet/delete";
436
415
  let body;
437
416
  body = JSON.stringify({
438
- ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
417
+ ...(input.Name != null && { Name: input.Name }),
439
418
  });
440
419
  return new protocol_http_1.HttpRequest({
441
420
  protocol,
@@ -458,8 +437,7 @@ const serializeAws_restJson1DeleteObjectCommand = async (input, context) => {
458
437
  "/amazonclouddirectory/2017-01-11/object/delete";
459
438
  let body;
460
439
  body = JSON.stringify({
461
- ...(input.ObjectReference !== undefined &&
462
- input.ObjectReference !== null && {
440
+ ...(input.ObjectReference != null && {
463
441
  ObjectReference: serializeAws_restJson1ObjectReference(input.ObjectReference, context),
464
442
  }),
465
443
  });
@@ -502,7 +480,7 @@ const serializeAws_restJson1DeleteTypedLinkFacetCommand = async (input, context)
502
480
  "/amazonclouddirectory/2017-01-11/typedlink/facet/delete";
503
481
  let body;
504
482
  body = JSON.stringify({
505
- ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
483
+ ...(input.Name != null && { Name: input.Name }),
506
484
  });
507
485
  return new protocol_http_1.HttpRequest({
508
486
  protocol,
@@ -525,12 +503,10 @@ const serializeAws_restJson1DetachFromIndexCommand = async (input, context) => {
525
503
  "/amazonclouddirectory/2017-01-11/index/detach";
526
504
  let body;
527
505
  body = JSON.stringify({
528
- ...(input.IndexReference !== undefined &&
529
- input.IndexReference !== null && {
506
+ ...(input.IndexReference != null && {
530
507
  IndexReference: serializeAws_restJson1ObjectReference(input.IndexReference, context),
531
508
  }),
532
- ...(input.TargetReference !== undefined &&
533
- input.TargetReference !== null && {
509
+ ...(input.TargetReference != null && {
534
510
  TargetReference: serializeAws_restJson1ObjectReference(input.TargetReference, context),
535
511
  }),
536
512
  });
@@ -555,9 +531,8 @@ const serializeAws_restJson1DetachObjectCommand = async (input, context) => {
555
531
  "/amazonclouddirectory/2017-01-11/object/detach";
556
532
  let body;
557
533
  body = JSON.stringify({
558
- ...(input.LinkName !== undefined && input.LinkName !== null && { LinkName: input.LinkName }),
559
- ...(input.ParentReference !== undefined &&
560
- input.ParentReference !== null && {
534
+ ...(input.LinkName != null && { LinkName: input.LinkName }),
535
+ ...(input.ParentReference != null && {
561
536
  ParentReference: serializeAws_restJson1ObjectReference(input.ParentReference, context),
562
537
  }),
563
538
  });
@@ -582,12 +557,10 @@ const serializeAws_restJson1DetachPolicyCommand = async (input, context) => {
582
557
  "/amazonclouddirectory/2017-01-11/policy/detach";
583
558
  let body;
584
559
  body = JSON.stringify({
585
- ...(input.ObjectReference !== undefined &&
586
- input.ObjectReference !== null && {
560
+ ...(input.ObjectReference != null && {
587
561
  ObjectReference: serializeAws_restJson1ObjectReference(input.ObjectReference, context),
588
562
  }),
589
- ...(input.PolicyReference !== undefined &&
590
- input.PolicyReference !== null && {
563
+ ...(input.PolicyReference != null && {
591
564
  PolicyReference: serializeAws_restJson1ObjectReference(input.PolicyReference, context),
592
565
  }),
593
566
  });
@@ -612,8 +585,7 @@ const serializeAws_restJson1DetachTypedLinkCommand = async (input, context) => {
612
585
  "/amazonclouddirectory/2017-01-11/typedlink/detach";
613
586
  let body;
614
587
  body = JSON.stringify({
615
- ...(input.TypedLinkSpecifier !== undefined &&
616
- input.TypedLinkSpecifier !== null && {
588
+ ...(input.TypedLinkSpecifier != null && {
617
589
  TypedLinkSpecifier: serializeAws_restJson1TypedLinkSpecifier(input.TypedLinkSpecifier, context),
618
590
  }),
619
591
  });
@@ -675,7 +647,7 @@ const serializeAws_restJson1GetAppliedSchemaVersionCommand = async (input, conte
675
647
  "/amazonclouddirectory/2017-01-11/schema/getappliedschema";
676
648
  let body;
677
649
  body = JSON.stringify({
678
- ...(input.SchemaArn !== undefined && input.SchemaArn !== null && { SchemaArn: input.SchemaArn }),
650
+ ...(input.SchemaArn != null && { SchemaArn: input.SchemaArn }),
679
651
  });
680
652
  return new protocol_http_1.HttpRequest({
681
653
  protocol,
@@ -716,7 +688,7 @@ const serializeAws_restJson1GetFacetCommand = async (input, context) => {
716
688
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/facet";
717
689
  let body;
718
690
  body = JSON.stringify({
719
- ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
691
+ ...(input.Name != null && { Name: input.Name }),
720
692
  });
721
693
  return new protocol_http_1.HttpRequest({
722
694
  protocol,
@@ -739,14 +711,11 @@ const serializeAws_restJson1GetLinkAttributesCommand = async (input, context) =>
739
711
  "/amazonclouddirectory/2017-01-11/typedlink/attributes/get";
740
712
  let body;
741
713
  body = JSON.stringify({
742
- ...(input.AttributeNames !== undefined &&
743
- input.AttributeNames !== null && {
714
+ ...(input.AttributeNames != null && {
744
715
  AttributeNames: serializeAws_restJson1AttributeNameList(input.AttributeNames, context),
745
716
  }),
746
- ...(input.ConsistencyLevel !== undefined &&
747
- input.ConsistencyLevel !== null && { ConsistencyLevel: input.ConsistencyLevel }),
748
- ...(input.TypedLinkSpecifier !== undefined &&
749
- input.TypedLinkSpecifier !== null && {
717
+ ...(input.ConsistencyLevel != null && { ConsistencyLevel: input.ConsistencyLevel }),
718
+ ...(input.TypedLinkSpecifier != null && {
750
719
  TypedLinkSpecifier: serializeAws_restJson1TypedLinkSpecifier(input.TypedLinkSpecifier, context),
751
720
  }),
752
721
  });
@@ -772,16 +741,13 @@ const serializeAws_restJson1GetObjectAttributesCommand = async (input, context)
772
741
  "/amazonclouddirectory/2017-01-11/object/attributes/get";
773
742
  let body;
774
743
  body = JSON.stringify({
775
- ...(input.AttributeNames !== undefined &&
776
- input.AttributeNames !== null && {
744
+ ...(input.AttributeNames != null && {
777
745
  AttributeNames: serializeAws_restJson1AttributeNameList(input.AttributeNames, context),
778
746
  }),
779
- ...(input.ObjectReference !== undefined &&
780
- input.ObjectReference !== null && {
747
+ ...(input.ObjectReference != null && {
781
748
  ObjectReference: serializeAws_restJson1ObjectReference(input.ObjectReference, context),
782
749
  }),
783
- ...(input.SchemaFacet !== undefined &&
784
- input.SchemaFacet !== null && { SchemaFacet: serializeAws_restJson1SchemaFacet(input.SchemaFacet, context) }),
750
+ ...(input.SchemaFacet != null && { SchemaFacet: serializeAws_restJson1SchemaFacet(input.SchemaFacet, context) }),
785
751
  });
786
752
  return new protocol_http_1.HttpRequest({
787
753
  protocol,
@@ -805,8 +771,7 @@ const serializeAws_restJson1GetObjectInformationCommand = async (input, context)
805
771
  "/amazonclouddirectory/2017-01-11/object/information";
806
772
  let body;
807
773
  body = JSON.stringify({
808
- ...(input.ObjectReference !== undefined &&
809
- input.ObjectReference !== null && {
774
+ ...(input.ObjectReference != null && {
810
775
  ObjectReference: serializeAws_restJson1ObjectReference(input.ObjectReference, context),
811
776
  }),
812
777
  });
@@ -850,7 +815,7 @@ const serializeAws_restJson1GetTypedLinkFacetInformationCommand = async (input,
850
815
  "/amazonclouddirectory/2017-01-11/typedlink/facet/get";
851
816
  let body;
852
817
  body = JSON.stringify({
853
- ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
818
+ ...(input.Name != null && { Name: input.Name }),
854
819
  });
855
820
  return new protocol_http_1.HttpRequest({
856
821
  protocol,
@@ -872,10 +837,10 @@ const serializeAws_restJson1ListAppliedSchemaArnsCommand = async (input, context
872
837
  "/amazonclouddirectory/2017-01-11/schema/applied";
873
838
  let body;
874
839
  body = JSON.stringify({
875
- ...(input.DirectoryArn !== undefined && input.DirectoryArn !== null && { DirectoryArn: input.DirectoryArn }),
876
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
877
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
878
- ...(input.SchemaArn !== undefined && input.SchemaArn !== null && { SchemaArn: input.SchemaArn }),
840
+ ...(input.DirectoryArn != null && { DirectoryArn: input.DirectoryArn }),
841
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
842
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
843
+ ...(input.SchemaArn != null && { SchemaArn: input.SchemaArn }),
879
844
  });
880
845
  return new protocol_http_1.HttpRequest({
881
846
  protocol,
@@ -899,10 +864,9 @@ const serializeAws_restJson1ListAttachedIndicesCommand = async (input, context)
899
864
  "/amazonclouddirectory/2017-01-11/object/indices";
900
865
  let body;
901
866
  body = JSON.stringify({
902
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
903
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
904
- ...(input.TargetReference !== undefined &&
905
- input.TargetReference !== null && {
867
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
868
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
869
+ ...(input.TargetReference != null && {
906
870
  TargetReference: serializeAws_restJson1ObjectReference(input.TargetReference, context),
907
871
  }),
908
872
  });
@@ -926,8 +890,8 @@ const serializeAws_restJson1ListDevelopmentSchemaArnsCommand = async (input, con
926
890
  "/amazonclouddirectory/2017-01-11/schema/development";
927
891
  let body;
928
892
  body = JSON.stringify({
929
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
930
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
893
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
894
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
931
895
  });
932
896
  return new protocol_http_1.HttpRequest({
933
897
  protocol,
@@ -949,9 +913,9 @@ const serializeAws_restJson1ListDirectoriesCommand = async (input, context) => {
949
913
  "/amazonclouddirectory/2017-01-11/directory/list";
950
914
  let body;
951
915
  body = JSON.stringify({
952
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
953
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
954
- ...(input.state !== undefined && input.state !== null && { state: input.state }),
916
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
917
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
918
+ ...(input.state != null && { state: input.state }),
955
919
  });
956
920
  return new protocol_http_1.HttpRequest({
957
921
  protocol,
@@ -974,9 +938,9 @@ const serializeAws_restJson1ListFacetAttributesCommand = async (input, context)
974
938
  "/amazonclouddirectory/2017-01-11/facet/attributes";
975
939
  let body;
976
940
  body = JSON.stringify({
977
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
978
- ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
979
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
941
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
942
+ ...(input.Name != null && { Name: input.Name }),
943
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
980
944
  });
981
945
  return new protocol_http_1.HttpRequest({
982
946
  protocol,
@@ -999,8 +963,8 @@ const serializeAws_restJson1ListFacetNamesCommand = async (input, context) => {
999
963
  "/amazonclouddirectory/2017-01-11/facet/list";
1000
964
  let body;
1001
965
  body = JSON.stringify({
1002
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
1003
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
966
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
967
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
1004
968
  });
1005
969
  return new protocol_http_1.HttpRequest({
1006
970
  protocol,
@@ -1023,20 +987,16 @@ const serializeAws_restJson1ListIncomingTypedLinksCommand = async (input, contex
1023
987
  "/amazonclouddirectory/2017-01-11/typedlink/incoming";
1024
988
  let body;
1025
989
  body = JSON.stringify({
1026
- ...(input.ConsistencyLevel !== undefined &&
1027
- input.ConsistencyLevel !== null && { ConsistencyLevel: input.ConsistencyLevel }),
1028
- ...(input.FilterAttributeRanges !== undefined &&
1029
- input.FilterAttributeRanges !== null && {
990
+ ...(input.ConsistencyLevel != null && { ConsistencyLevel: input.ConsistencyLevel }),
991
+ ...(input.FilterAttributeRanges != null && {
1030
992
  FilterAttributeRanges: serializeAws_restJson1TypedLinkAttributeRangeList(input.FilterAttributeRanges, context),
1031
993
  }),
1032
- ...(input.FilterTypedLink !== undefined &&
1033
- input.FilterTypedLink !== null && {
994
+ ...(input.FilterTypedLink != null && {
1034
995
  FilterTypedLink: serializeAws_restJson1TypedLinkSchemaAndFacetName(input.FilterTypedLink, context),
1035
996
  }),
1036
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
1037
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
1038
- ...(input.ObjectReference !== undefined &&
1039
- input.ObjectReference !== null && {
997
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
998
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
999
+ ...(input.ObjectReference != null && {
1040
1000
  ObjectReference: serializeAws_restJson1ObjectReference(input.ObjectReference, context),
1041
1001
  }),
1042
1002
  });
@@ -1062,14 +1022,12 @@ const serializeAws_restJson1ListIndexCommand = async (input, context) => {
1062
1022
  "/amazonclouddirectory/2017-01-11/index/targets";
1063
1023
  let body;
1064
1024
  body = JSON.stringify({
1065
- ...(input.IndexReference !== undefined &&
1066
- input.IndexReference !== null && {
1025
+ ...(input.IndexReference != null && {
1067
1026
  IndexReference: serializeAws_restJson1ObjectReference(input.IndexReference, context),
1068
1027
  }),
1069
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
1070
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
1071
- ...(input.RangesOnIndexedValues !== undefined &&
1072
- input.RangesOnIndexedValues !== null && {
1028
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1029
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
1030
+ ...(input.RangesOnIndexedValues != null && {
1073
1031
  RangesOnIndexedValues: serializeAws_restJson1ObjectAttributeRangeList(input.RangesOnIndexedValues, context),
1074
1032
  }),
1075
1033
  });
@@ -1093,9 +1051,9 @@ const serializeAws_restJson1ListManagedSchemaArnsCommand = async (input, context
1093
1051
  "/amazonclouddirectory/2017-01-11/schema/managed";
1094
1052
  let body;
1095
1053
  body = JSON.stringify({
1096
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
1097
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
1098
- ...(input.SchemaArn !== undefined && input.SchemaArn !== null && { SchemaArn: input.SchemaArn }),
1054
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1055
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
1056
+ ...(input.SchemaArn != null && { SchemaArn: input.SchemaArn }),
1099
1057
  });
1100
1058
  return new protocol_http_1.HttpRequest({
1101
1059
  protocol,
@@ -1119,12 +1077,10 @@ const serializeAws_restJson1ListObjectAttributesCommand = async (input, context)
1119
1077
  "/amazonclouddirectory/2017-01-11/object/attributes";
1120
1078
  let body;
1121
1079
  body = JSON.stringify({
1122
- ...(input.FacetFilter !== undefined &&
1123
- input.FacetFilter !== null && { FacetFilter: serializeAws_restJson1SchemaFacet(input.FacetFilter, context) }),
1124
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
1125
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
1126
- ...(input.ObjectReference !== undefined &&
1127
- input.ObjectReference !== null && {
1080
+ ...(input.FacetFilter != null && { FacetFilter: serializeAws_restJson1SchemaFacet(input.FacetFilter, context) }),
1081
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1082
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
1083
+ ...(input.ObjectReference != null && {
1128
1084
  ObjectReference: serializeAws_restJson1ObjectReference(input.ObjectReference, context),
1129
1085
  }),
1130
1086
  });
@@ -1150,10 +1106,9 @@ const serializeAws_restJson1ListObjectChildrenCommand = async (input, context) =
1150
1106
  "/amazonclouddirectory/2017-01-11/object/children";
1151
1107
  let body;
1152
1108
  body = JSON.stringify({
1153
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
1154
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
1155
- ...(input.ObjectReference !== undefined &&
1156
- input.ObjectReference !== null && {
1109
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1110
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
1111
+ ...(input.ObjectReference != null && {
1157
1112
  ObjectReference: serializeAws_restJson1ObjectReference(input.ObjectReference, context),
1158
1113
  }),
1159
1114
  });
@@ -1178,10 +1133,9 @@ const serializeAws_restJson1ListObjectParentPathsCommand = async (input, context
1178
1133
  "/amazonclouddirectory/2017-01-11/object/parentpaths";
1179
1134
  let body;
1180
1135
  body = JSON.stringify({
1181
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
1182
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
1183
- ...(input.ObjectReference !== undefined &&
1184
- input.ObjectReference !== null && {
1136
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1137
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
1138
+ ...(input.ObjectReference != null && {
1185
1139
  ObjectReference: serializeAws_restJson1ObjectReference(input.ObjectReference, context),
1186
1140
  }),
1187
1141
  });
@@ -1207,12 +1161,12 @@ const serializeAws_restJson1ListObjectParentsCommand = async (input, context) =>
1207
1161
  "/amazonclouddirectory/2017-01-11/object/parent";
1208
1162
  let body;
1209
1163
  body = JSON.stringify({
1210
- ...(input.IncludeAllLinksToEachParent !== undefined &&
1211
- input.IncludeAllLinksToEachParent !== null && { IncludeAllLinksToEachParent: input.IncludeAllLinksToEachParent }),
1212
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
1213
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
1214
- ...(input.ObjectReference !== undefined &&
1215
- input.ObjectReference !== null && {
1164
+ ...(input.IncludeAllLinksToEachParent != null && {
1165
+ IncludeAllLinksToEachParent: input.IncludeAllLinksToEachParent,
1166
+ }),
1167
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1168
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
1169
+ ...(input.ObjectReference != null && {
1216
1170
  ObjectReference: serializeAws_restJson1ObjectReference(input.ObjectReference, context),
1217
1171
  }),
1218
1172
  });
@@ -1238,10 +1192,9 @@ const serializeAws_restJson1ListObjectPoliciesCommand = async (input, context) =
1238
1192
  "/amazonclouddirectory/2017-01-11/object/policy";
1239
1193
  let body;
1240
1194
  body = JSON.stringify({
1241
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
1242
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
1243
- ...(input.ObjectReference !== undefined &&
1244
- input.ObjectReference !== null && {
1195
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1196
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
1197
+ ...(input.ObjectReference != null && {
1245
1198
  ObjectReference: serializeAws_restJson1ObjectReference(input.ObjectReference, context),
1246
1199
  }),
1247
1200
  });
@@ -1266,20 +1219,16 @@ const serializeAws_restJson1ListOutgoingTypedLinksCommand = async (input, contex
1266
1219
  "/amazonclouddirectory/2017-01-11/typedlink/outgoing";
1267
1220
  let body;
1268
1221
  body = JSON.stringify({
1269
- ...(input.ConsistencyLevel !== undefined &&
1270
- input.ConsistencyLevel !== null && { ConsistencyLevel: input.ConsistencyLevel }),
1271
- ...(input.FilterAttributeRanges !== undefined &&
1272
- input.FilterAttributeRanges !== null && {
1222
+ ...(input.ConsistencyLevel != null && { ConsistencyLevel: input.ConsistencyLevel }),
1223
+ ...(input.FilterAttributeRanges != null && {
1273
1224
  FilterAttributeRanges: serializeAws_restJson1TypedLinkAttributeRangeList(input.FilterAttributeRanges, context),
1274
1225
  }),
1275
- ...(input.FilterTypedLink !== undefined &&
1276
- input.FilterTypedLink !== null && {
1226
+ ...(input.FilterTypedLink != null && {
1277
1227
  FilterTypedLink: serializeAws_restJson1TypedLinkSchemaAndFacetName(input.FilterTypedLink, context),
1278
1228
  }),
1279
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
1280
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
1281
- ...(input.ObjectReference !== undefined &&
1282
- input.ObjectReference !== null && {
1229
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1230
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
1231
+ ...(input.ObjectReference != null && {
1283
1232
  ObjectReference: serializeAws_restJson1ObjectReference(input.ObjectReference, context),
1284
1233
  }),
1285
1234
  });
@@ -1305,10 +1254,9 @@ const serializeAws_restJson1ListPolicyAttachmentsCommand = async (input, context
1305
1254
  "/amazonclouddirectory/2017-01-11/policy/attachment";
1306
1255
  let body;
1307
1256
  body = JSON.stringify({
1308
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
1309
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
1310
- ...(input.PolicyReference !== undefined &&
1311
- input.PolicyReference !== null && {
1257
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1258
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
1259
+ ...(input.PolicyReference != null && {
1312
1260
  PolicyReference: serializeAws_restJson1ObjectReference(input.PolicyReference, context),
1313
1261
  }),
1314
1262
  });
@@ -1332,9 +1280,9 @@ const serializeAws_restJson1ListPublishedSchemaArnsCommand = async (input, conte
1332
1280
  "/amazonclouddirectory/2017-01-11/schema/published";
1333
1281
  let body;
1334
1282
  body = JSON.stringify({
1335
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
1336
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
1337
- ...(input.SchemaArn !== undefined && input.SchemaArn !== null && { SchemaArn: input.SchemaArn }),
1283
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1284
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
1285
+ ...(input.SchemaArn != null && { SchemaArn: input.SchemaArn }),
1338
1286
  });
1339
1287
  return new protocol_http_1.HttpRequest({
1340
1288
  protocol,
@@ -1355,9 +1303,9 @@ const serializeAws_restJson1ListTagsForResourceCommand = async (input, context)
1355
1303
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/tags";
1356
1304
  let body;
1357
1305
  body = JSON.stringify({
1358
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
1359
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
1360
- ...(input.ResourceArn !== undefined && input.ResourceArn !== null && { ResourceArn: input.ResourceArn }),
1306
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1307
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
1308
+ ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
1361
1309
  });
1362
1310
  return new protocol_http_1.HttpRequest({
1363
1311
  protocol,
@@ -1380,9 +1328,9 @@ const serializeAws_restJson1ListTypedLinkFacetAttributesCommand = async (input,
1380
1328
  "/amazonclouddirectory/2017-01-11/typedlink/facet/attributes";
1381
1329
  let body;
1382
1330
  body = JSON.stringify({
1383
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
1384
- ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
1385
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
1331
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1332
+ ...(input.Name != null && { Name: input.Name }),
1333
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
1386
1334
  });
1387
1335
  return new protocol_http_1.HttpRequest({
1388
1336
  protocol,
@@ -1405,8 +1353,8 @@ const serializeAws_restJson1ListTypedLinkFacetNamesCommand = async (input, conte
1405
1353
  "/amazonclouddirectory/2017-01-11/typedlink/facet/list";
1406
1354
  let body;
1407
1355
  body = JSON.stringify({
1408
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
1409
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
1356
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1357
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
1410
1358
  });
1411
1359
  return new protocol_http_1.HttpRequest({
1412
1360
  protocol,
@@ -1429,10 +1377,9 @@ const serializeAws_restJson1LookupPolicyCommand = async (input, context) => {
1429
1377
  "/amazonclouddirectory/2017-01-11/policy/lookup";
1430
1378
  let body;
1431
1379
  body = JSON.stringify({
1432
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
1433
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
1434
- ...(input.ObjectReference !== undefined &&
1435
- input.ObjectReference !== null && {
1380
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1381
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
1382
+ ...(input.ObjectReference != null && {
1436
1383
  ObjectReference: serializeAws_restJson1ObjectReference(input.ObjectReference, context),
1437
1384
  }),
1438
1385
  });
@@ -1459,9 +1406,9 @@ const serializeAws_restJson1PublishSchemaCommand = async (input, context) => {
1459
1406
  "/amazonclouddirectory/2017-01-11/schema/publish";
1460
1407
  let body;
1461
1408
  body = JSON.stringify({
1462
- ...(input.MinorVersion !== undefined && input.MinorVersion !== null && { MinorVersion: input.MinorVersion }),
1463
- ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
1464
- ...(input.Version !== undefined && input.Version !== null && { Version: input.Version }),
1409
+ ...(input.MinorVersion != null && { MinorVersion: input.MinorVersion }),
1410
+ ...(input.Name != null && { Name: input.Name }),
1411
+ ...(input.Version != null && { Version: input.Version }),
1465
1412
  });
1466
1413
  return new protocol_http_1.HttpRequest({
1467
1414
  protocol,
@@ -1484,7 +1431,7 @@ const serializeAws_restJson1PutSchemaFromJsonCommand = async (input, context) =>
1484
1431
  "/amazonclouddirectory/2017-01-11/schema/json";
1485
1432
  let body;
1486
1433
  body = JSON.stringify({
1487
- ...(input.Document !== undefined && input.Document !== null && { Document: input.Document }),
1434
+ ...(input.Document != null && { Document: input.Document }),
1488
1435
  });
1489
1436
  return new protocol_http_1.HttpRequest({
1490
1437
  protocol,
@@ -1507,12 +1454,10 @@ const serializeAws_restJson1RemoveFacetFromObjectCommand = async (input, context
1507
1454
  "/amazonclouddirectory/2017-01-11/object/facets/delete";
1508
1455
  let body;
1509
1456
  body = JSON.stringify({
1510
- ...(input.ObjectReference !== undefined &&
1511
- input.ObjectReference !== null && {
1457
+ ...(input.ObjectReference != null && {
1512
1458
  ObjectReference: serializeAws_restJson1ObjectReference(input.ObjectReference, context),
1513
1459
  }),
1514
- ...(input.SchemaFacet !== undefined &&
1515
- input.SchemaFacet !== null && { SchemaFacet: serializeAws_restJson1SchemaFacet(input.SchemaFacet, context) }),
1460
+ ...(input.SchemaFacet != null && { SchemaFacet: serializeAws_restJson1SchemaFacet(input.SchemaFacet, context) }),
1516
1461
  });
1517
1462
  return new protocol_http_1.HttpRequest({
1518
1463
  protocol,
@@ -1533,9 +1478,8 @@ const serializeAws_restJson1TagResourceCommand = async (input, context) => {
1533
1478
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/tags/add";
1534
1479
  let body;
1535
1480
  body = JSON.stringify({
1536
- ...(input.ResourceArn !== undefined && input.ResourceArn !== null && { ResourceArn: input.ResourceArn }),
1537
- ...(input.Tags !== undefined &&
1538
- input.Tags !== null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
1481
+ ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
1482
+ ...(input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
1539
1483
  });
1540
1484
  return new protocol_http_1.HttpRequest({
1541
1485
  protocol,
@@ -1557,9 +1501,8 @@ const serializeAws_restJson1UntagResourceCommand = async (input, context) => {
1557
1501
  "/amazonclouddirectory/2017-01-11/tags/remove";
1558
1502
  let body;
1559
1503
  body = JSON.stringify({
1560
- ...(input.ResourceArn !== undefined && input.ResourceArn !== null && { ResourceArn: input.ResourceArn }),
1561
- ...(input.TagKeys !== undefined &&
1562
- input.TagKeys !== null && { TagKeys: serializeAws_restJson1TagKeyList(input.TagKeys, context) }),
1504
+ ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
1505
+ ...(input.TagKeys != null && { TagKeys: serializeAws_restJson1TagKeyList(input.TagKeys, context) }),
1563
1506
  });
1564
1507
  return new protocol_http_1.HttpRequest({
1565
1508
  protocol,
@@ -1581,12 +1524,11 @@ const serializeAws_restJson1UpdateFacetCommand = async (input, context) => {
1581
1524
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/facet";
1582
1525
  let body;
1583
1526
  body = JSON.stringify({
1584
- ...(input.AttributeUpdates !== undefined &&
1585
- input.AttributeUpdates !== null && {
1527
+ ...(input.AttributeUpdates != null && {
1586
1528
  AttributeUpdates: serializeAws_restJson1FacetAttributeUpdateList(input.AttributeUpdates, context),
1587
1529
  }),
1588
- ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
1589
- ...(input.ObjectType !== undefined && input.ObjectType !== null && { ObjectType: input.ObjectType }),
1530
+ ...(input.Name != null && { Name: input.Name }),
1531
+ ...(input.ObjectType != null && { ObjectType: input.ObjectType }),
1590
1532
  });
1591
1533
  return new protocol_http_1.HttpRequest({
1592
1534
  protocol,
@@ -1609,12 +1551,10 @@ const serializeAws_restJson1UpdateLinkAttributesCommand = async (input, context)
1609
1551
  "/amazonclouddirectory/2017-01-11/typedlink/attributes/update";
1610
1552
  let body;
1611
1553
  body = JSON.stringify({
1612
- ...(input.AttributeUpdates !== undefined &&
1613
- input.AttributeUpdates !== null && {
1554
+ ...(input.AttributeUpdates != null && {
1614
1555
  AttributeUpdates: serializeAws_restJson1LinkAttributeUpdateList(input.AttributeUpdates, context),
1615
1556
  }),
1616
- ...(input.TypedLinkSpecifier !== undefined &&
1617
- input.TypedLinkSpecifier !== null && {
1557
+ ...(input.TypedLinkSpecifier != null && {
1618
1558
  TypedLinkSpecifier: serializeAws_restJson1TypedLinkSpecifier(input.TypedLinkSpecifier, context),
1619
1559
  }),
1620
1560
  });
@@ -1639,12 +1579,10 @@ const serializeAws_restJson1UpdateObjectAttributesCommand = async (input, contex
1639
1579
  "/amazonclouddirectory/2017-01-11/object/update";
1640
1580
  let body;
1641
1581
  body = JSON.stringify({
1642
- ...(input.AttributeUpdates !== undefined &&
1643
- input.AttributeUpdates !== null && {
1582
+ ...(input.AttributeUpdates != null && {
1644
1583
  AttributeUpdates: serializeAws_restJson1ObjectAttributeUpdateList(input.AttributeUpdates, context),
1645
1584
  }),
1646
- ...(input.ObjectReference !== undefined &&
1647
- input.ObjectReference !== null && {
1585
+ ...(input.ObjectReference != null && {
1648
1586
  ObjectReference: serializeAws_restJson1ObjectReference(input.ObjectReference, context),
1649
1587
  }),
1650
1588
  });
@@ -1669,7 +1607,7 @@ const serializeAws_restJson1UpdateSchemaCommand = async (input, context) => {
1669
1607
  "/amazonclouddirectory/2017-01-11/schema/update";
1670
1608
  let body;
1671
1609
  body = JSON.stringify({
1672
- ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
1610
+ ...(input.Name != null && { Name: input.Name }),
1673
1611
  });
1674
1612
  return new protocol_http_1.HttpRequest({
1675
1613
  protocol,
@@ -1692,15 +1630,13 @@ const serializeAws_restJson1UpdateTypedLinkFacetCommand = async (input, context)
1692
1630
  "/amazonclouddirectory/2017-01-11/typedlink/facet";
1693
1631
  let body;
1694
1632
  body = JSON.stringify({
1695
- ...(input.AttributeUpdates !== undefined &&
1696
- input.AttributeUpdates !== null && {
1633
+ ...(input.AttributeUpdates != null && {
1697
1634
  AttributeUpdates: serializeAws_restJson1TypedLinkFacetAttributeUpdateList(input.AttributeUpdates, context),
1698
1635
  }),
1699
- ...(input.IdentityAttributeOrder !== undefined &&
1700
- input.IdentityAttributeOrder !== null && {
1636
+ ...(input.IdentityAttributeOrder != null && {
1701
1637
  IdentityAttributeOrder: serializeAws_restJson1AttributeNameList(input.IdentityAttributeOrder, context),
1702
1638
  }),
1703
- ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
1639
+ ...(input.Name != null && { Name: input.Name }),
1704
1640
  });
1705
1641
  return new protocol_http_1.HttpRequest({
1706
1642
  protocol,
@@ -1722,10 +1658,9 @@ const serializeAws_restJson1UpgradeAppliedSchemaCommand = async (input, context)
1722
1658
  "/amazonclouddirectory/2017-01-11/schema/upgradeapplied";
1723
1659
  let body;
1724
1660
  body = JSON.stringify({
1725
- ...(input.DirectoryArn !== undefined && input.DirectoryArn !== null && { DirectoryArn: input.DirectoryArn }),
1726
- ...(input.DryRun !== undefined && input.DryRun !== null && { DryRun: input.DryRun }),
1727
- ...(input.PublishedSchemaArn !== undefined &&
1728
- input.PublishedSchemaArn !== null && { PublishedSchemaArn: input.PublishedSchemaArn }),
1661
+ ...(input.DirectoryArn != null && { DirectoryArn: input.DirectoryArn }),
1662
+ ...(input.DryRun != null && { DryRun: input.DryRun }),
1663
+ ...(input.PublishedSchemaArn != null && { PublishedSchemaArn: input.PublishedSchemaArn }),
1729
1664
  });
1730
1665
  return new protocol_http_1.HttpRequest({
1731
1666
  protocol,
@@ -1747,12 +1682,10 @@ const serializeAws_restJson1UpgradePublishedSchemaCommand = async (input, contex
1747
1682
  "/amazonclouddirectory/2017-01-11/schema/upgradepublished";
1748
1683
  let body;
1749
1684
  body = JSON.stringify({
1750
- ...(input.DevelopmentSchemaArn !== undefined &&
1751
- input.DevelopmentSchemaArn !== null && { DevelopmentSchemaArn: input.DevelopmentSchemaArn }),
1752
- ...(input.DryRun !== undefined && input.DryRun !== null && { DryRun: input.DryRun }),
1753
- ...(input.MinorVersion !== undefined && input.MinorVersion !== null && { MinorVersion: input.MinorVersion }),
1754
- ...(input.PublishedSchemaArn !== undefined &&
1755
- input.PublishedSchemaArn !== null && { PublishedSchemaArn: input.PublishedSchemaArn }),
1685
+ ...(input.DevelopmentSchemaArn != null && { DevelopmentSchemaArn: input.DevelopmentSchemaArn }),
1686
+ ...(input.DryRun != null && { DryRun: input.DryRun }),
1687
+ ...(input.MinorVersion != null && { MinorVersion: input.MinorVersion }),
1688
+ ...(input.PublishedSchemaArn != null && { PublishedSchemaArn: input.PublishedSchemaArn }),
1756
1689
  });
1757
1690
  return new protocol_http_1.HttpRequest({
1758
1691
  protocol,
@@ -1782,8 +1715,7 @@ const deserializeAws_restJson1AddFacetToObjectCommandError = async (output, cont
1782
1715
  body: await parseBody(output.body, context),
1783
1716
  };
1784
1717
  let response;
1785
- let errorCode = "UnknownError";
1786
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1718
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1787
1719
  switch (errorCode) {
1788
1720
  case "AccessDeniedException":
1789
1721
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -1814,10 +1746,12 @@ const deserializeAws_restJson1AddFacetToObjectCommandError = async (output, cont
1814
1746
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1815
1747
  default:
1816
1748
  const parsedBody = parsedOutput.body;
1749
+ const $metadata = deserializeMetadata(output);
1750
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1817
1751
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
1818
- name: parsedBody.code || parsedBody.Code || errorCode,
1752
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1819
1753
  $fault: "client",
1820
- $metadata: deserializeMetadata(output),
1754
+ $metadata,
1821
1755
  });
1822
1756
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1823
1757
  }
@@ -1847,8 +1781,7 @@ const deserializeAws_restJson1ApplySchemaCommandError = async (output, context)
1847
1781
  body: await parseBody(output.body, context),
1848
1782
  };
1849
1783
  let response;
1850
- let errorCode = "UnknownError";
1851
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1784
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1852
1785
  switch (errorCode) {
1853
1786
  case "AccessDeniedException":
1854
1787
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -1879,10 +1812,12 @@ const deserializeAws_restJson1ApplySchemaCommandError = async (output, context)
1879
1812
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1880
1813
  default:
1881
1814
  const parsedBody = parsedOutput.body;
1815
+ const $metadata = deserializeMetadata(output);
1816
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1882
1817
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
1883
- name: parsedBody.code || parsedBody.Code || errorCode,
1818
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1884
1819
  $fault: "client",
1885
- $metadata: deserializeMetadata(output),
1820
+ $metadata,
1886
1821
  });
1887
1822
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1888
1823
  }
@@ -1908,8 +1843,7 @@ const deserializeAws_restJson1AttachObjectCommandError = async (output, context)
1908
1843
  body: await parseBody(output.body, context),
1909
1844
  };
1910
1845
  let response;
1911
- let errorCode = "UnknownError";
1912
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1846
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1913
1847
  switch (errorCode) {
1914
1848
  case "AccessDeniedException":
1915
1849
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -1946,10 +1880,12 @@ const deserializeAws_restJson1AttachObjectCommandError = async (output, context)
1946
1880
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1947
1881
  default:
1948
1882
  const parsedBody = parsedOutput.body;
1883
+ const $metadata = deserializeMetadata(output);
1884
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1949
1885
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
1950
- name: parsedBody.code || parsedBody.Code || errorCode,
1886
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1951
1887
  $fault: "client",
1952
- $metadata: deserializeMetadata(output),
1888
+ $metadata,
1953
1889
  });
1954
1890
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1955
1891
  }
@@ -1971,8 +1907,7 @@ const deserializeAws_restJson1AttachPolicyCommandError = async (output, context)
1971
1907
  body: await parseBody(output.body, context),
1972
1908
  };
1973
1909
  let response;
1974
- let errorCode = "UnknownError";
1975
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1910
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1976
1911
  switch (errorCode) {
1977
1912
  case "AccessDeniedException":
1978
1913
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -2003,10 +1938,12 @@ const deserializeAws_restJson1AttachPolicyCommandError = async (output, context)
2003
1938
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2004
1939
  default:
2005
1940
  const parsedBody = parsedOutput.body;
1941
+ const $metadata = deserializeMetadata(output);
1942
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2006
1943
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
2007
- name: parsedBody.code || parsedBody.Code || errorCode,
1944
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2008
1945
  $fault: "client",
2009
- $metadata: deserializeMetadata(output),
1946
+ $metadata,
2010
1947
  });
2011
1948
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2012
1949
  }
@@ -2032,8 +1969,7 @@ const deserializeAws_restJson1AttachToIndexCommandError = async (output, context
2032
1969
  body: await parseBody(output.body, context),
2033
1970
  };
2034
1971
  let response;
2035
- let errorCode = "UnknownError";
2036
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1972
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2037
1973
  switch (errorCode) {
2038
1974
  case "AccessDeniedException":
2039
1975
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -2073,10 +2009,12 @@ const deserializeAws_restJson1AttachToIndexCommandError = async (output, context
2073
2009
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2074
2010
  default:
2075
2011
  const parsedBody = parsedOutput.body;
2012
+ const $metadata = deserializeMetadata(output);
2013
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2076
2014
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
2077
- name: parsedBody.code || parsedBody.Code || errorCode,
2015
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2078
2016
  $fault: "client",
2079
- $metadata: deserializeMetadata(output),
2017
+ $metadata,
2080
2018
  });
2081
2019
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2082
2020
  }
@@ -2102,8 +2040,7 @@ const deserializeAws_restJson1AttachTypedLinkCommandError = async (output, conte
2102
2040
  body: await parseBody(output.body, context),
2103
2041
  };
2104
2042
  let response;
2105
- let errorCode = "UnknownError";
2106
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2043
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2107
2044
  switch (errorCode) {
2108
2045
  case "AccessDeniedException":
2109
2046
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -2137,10 +2074,12 @@ const deserializeAws_restJson1AttachTypedLinkCommandError = async (output, conte
2137
2074
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2138
2075
  default:
2139
2076
  const parsedBody = parsedOutput.body;
2077
+ const $metadata = deserializeMetadata(output);
2078
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2140
2079
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
2141
- name: parsedBody.code || parsedBody.Code || errorCode,
2080
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2142
2081
  $fault: "client",
2143
- $metadata: deserializeMetadata(output),
2082
+ $metadata,
2144
2083
  });
2145
2084
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2146
2085
  }
@@ -2166,8 +2105,7 @@ const deserializeAws_restJson1BatchReadCommandError = async (output, context) =>
2166
2105
  body: await parseBody(output.body, context),
2167
2106
  };
2168
2107
  let response;
2169
- let errorCode = "UnknownError";
2170
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2108
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2171
2109
  switch (errorCode) {
2172
2110
  case "AccessDeniedException":
2173
2111
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -2192,10 +2130,12 @@ const deserializeAws_restJson1BatchReadCommandError = async (output, context) =>
2192
2130
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2193
2131
  default:
2194
2132
  const parsedBody = parsedOutput.body;
2133
+ const $metadata = deserializeMetadata(output);
2134
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2195
2135
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
2196
- name: parsedBody.code || parsedBody.Code || errorCode,
2136
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2197
2137
  $fault: "client",
2198
- $metadata: deserializeMetadata(output),
2138
+ $metadata,
2199
2139
  });
2200
2140
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2201
2141
  }
@@ -2221,8 +2161,7 @@ const deserializeAws_restJson1BatchWriteCommandError = async (output, context) =
2221
2161
  body: await parseBody(output.body, context),
2222
2162
  };
2223
2163
  let response;
2224
- let errorCode = "UnknownError";
2225
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2164
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2226
2165
  switch (errorCode) {
2227
2166
  case "AccessDeniedException":
2228
2167
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -2250,10 +2189,12 @@ const deserializeAws_restJson1BatchWriteCommandError = async (output, context) =
2250
2189
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2251
2190
  default:
2252
2191
  const parsedBody = parsedOutput.body;
2192
+ const $metadata = deserializeMetadata(output);
2193
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2253
2194
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
2254
- name: parsedBody.code || parsedBody.Code || errorCode,
2195
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2255
2196
  $fault: "client",
2256
- $metadata: deserializeMetadata(output),
2197
+ $metadata,
2257
2198
  });
2258
2199
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2259
2200
  }
@@ -2291,8 +2232,7 @@ const deserializeAws_restJson1CreateDirectoryCommandError = async (output, conte
2291
2232
  body: await parseBody(output.body, context),
2292
2233
  };
2293
2234
  let response;
2294
- let errorCode = "UnknownError";
2295
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2235
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2296
2236
  switch (errorCode) {
2297
2237
  case "AccessDeniedException":
2298
2238
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -2320,10 +2260,12 @@ const deserializeAws_restJson1CreateDirectoryCommandError = async (output, conte
2320
2260
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2321
2261
  default:
2322
2262
  const parsedBody = parsedOutput.body;
2263
+ const $metadata = deserializeMetadata(output);
2264
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2323
2265
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
2324
- name: parsedBody.code || parsedBody.Code || errorCode,
2266
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2325
2267
  $fault: "client",
2326
- $metadata: deserializeMetadata(output),
2268
+ $metadata,
2327
2269
  });
2328
2270
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2329
2271
  }
@@ -2345,8 +2287,7 @@ const deserializeAws_restJson1CreateFacetCommandError = async (output, context)
2345
2287
  body: await parseBody(output.body, context),
2346
2288
  };
2347
2289
  let response;
2348
- let errorCode = "UnknownError";
2349
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2290
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2350
2291
  switch (errorCode) {
2351
2292
  case "AccessDeniedException":
2352
2293
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -2380,10 +2321,12 @@ const deserializeAws_restJson1CreateFacetCommandError = async (output, context)
2380
2321
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2381
2322
  default:
2382
2323
  const parsedBody = parsedOutput.body;
2324
+ const $metadata = deserializeMetadata(output);
2325
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2383
2326
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
2384
- name: parsedBody.code || parsedBody.Code || errorCode,
2327
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2385
2328
  $fault: "client",
2386
- $metadata: deserializeMetadata(output),
2329
+ $metadata,
2387
2330
  });
2388
2331
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2389
2332
  }
@@ -2409,8 +2352,7 @@ const deserializeAws_restJson1CreateIndexCommandError = async (output, context)
2409
2352
  body: await parseBody(output.body, context),
2410
2353
  };
2411
2354
  let response;
2412
- let errorCode = "UnknownError";
2413
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2355
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2414
2356
  switch (errorCode) {
2415
2357
  case "AccessDeniedException":
2416
2358
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -2447,10 +2389,12 @@ const deserializeAws_restJson1CreateIndexCommandError = async (output, context)
2447
2389
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2448
2390
  default:
2449
2391
  const parsedBody = parsedOutput.body;
2392
+ const $metadata = deserializeMetadata(output);
2393
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2450
2394
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
2451
- name: parsedBody.code || parsedBody.Code || errorCode,
2395
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2452
2396
  $fault: "client",
2453
- $metadata: deserializeMetadata(output),
2397
+ $metadata,
2454
2398
  });
2455
2399
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2456
2400
  }
@@ -2476,8 +2420,7 @@ const deserializeAws_restJson1CreateObjectCommandError = async (output, context)
2476
2420
  body: await parseBody(output.body, context),
2477
2421
  };
2478
2422
  let response;
2479
- let errorCode = "UnknownError";
2480
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2423
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2481
2424
  switch (errorCode) {
2482
2425
  case "AccessDeniedException":
2483
2426
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -2514,10 +2457,12 @@ const deserializeAws_restJson1CreateObjectCommandError = async (output, context)
2514
2457
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2515
2458
  default:
2516
2459
  const parsedBody = parsedOutput.body;
2460
+ const $metadata = deserializeMetadata(output);
2461
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2517
2462
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
2518
- name: parsedBody.code || parsedBody.Code || errorCode,
2463
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2519
2464
  $fault: "client",
2520
- $metadata: deserializeMetadata(output),
2465
+ $metadata,
2521
2466
  });
2522
2467
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2523
2468
  }
@@ -2543,8 +2488,7 @@ const deserializeAws_restJson1CreateSchemaCommandError = async (output, context)
2543
2488
  body: await parseBody(output.body, context),
2544
2489
  };
2545
2490
  let response;
2546
- let errorCode = "UnknownError";
2547
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2491
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2548
2492
  switch (errorCode) {
2549
2493
  case "AccessDeniedException":
2550
2494
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -2569,10 +2513,12 @@ const deserializeAws_restJson1CreateSchemaCommandError = async (output, context)
2569
2513
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2570
2514
  default:
2571
2515
  const parsedBody = parsedOutput.body;
2516
+ const $metadata = deserializeMetadata(output);
2517
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2572
2518
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
2573
- name: parsedBody.code || parsedBody.Code || errorCode,
2519
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2574
2520
  $fault: "client",
2575
- $metadata: deserializeMetadata(output),
2521
+ $metadata,
2576
2522
  });
2577
2523
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2578
2524
  }
@@ -2594,8 +2540,7 @@ const deserializeAws_restJson1CreateTypedLinkFacetCommandError = async (output,
2594
2540
  body: await parseBody(output.body, context),
2595
2541
  };
2596
2542
  let response;
2597
- let errorCode = "UnknownError";
2598
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2543
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2599
2544
  switch (errorCode) {
2600
2545
  case "AccessDeniedException":
2601
2546
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -2629,10 +2574,12 @@ const deserializeAws_restJson1CreateTypedLinkFacetCommandError = async (output,
2629
2574
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2630
2575
  default:
2631
2576
  const parsedBody = parsedOutput.body;
2577
+ const $metadata = deserializeMetadata(output);
2578
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2632
2579
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
2633
- name: parsedBody.code || parsedBody.Code || errorCode,
2580
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2634
2581
  $fault: "client",
2635
- $metadata: deserializeMetadata(output),
2582
+ $metadata,
2636
2583
  });
2637
2584
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2638
2585
  }
@@ -2658,8 +2605,7 @@ const deserializeAws_restJson1DeleteDirectoryCommandError = async (output, conte
2658
2605
  body: await parseBody(output.body, context),
2659
2606
  };
2660
2607
  let response;
2661
- let errorCode = "UnknownError";
2662
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2608
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2663
2609
  switch (errorCode) {
2664
2610
  case "AccessDeniedException":
2665
2611
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -2690,10 +2636,12 @@ const deserializeAws_restJson1DeleteDirectoryCommandError = async (output, conte
2690
2636
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2691
2637
  default:
2692
2638
  const parsedBody = parsedOutput.body;
2639
+ const $metadata = deserializeMetadata(output);
2640
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2693
2641
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
2694
- name: parsedBody.code || parsedBody.Code || errorCode,
2642
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2695
2643
  $fault: "client",
2696
- $metadata: deserializeMetadata(output),
2644
+ $metadata,
2697
2645
  });
2698
2646
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2699
2647
  }
@@ -2715,8 +2663,7 @@ const deserializeAws_restJson1DeleteFacetCommandError = async (output, context)
2715
2663
  body: await parseBody(output.body, context),
2716
2664
  };
2717
2665
  let response;
2718
- let errorCode = "UnknownError";
2719
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2666
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2720
2667
  switch (errorCode) {
2721
2668
  case "AccessDeniedException":
2722
2669
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -2747,10 +2694,12 @@ const deserializeAws_restJson1DeleteFacetCommandError = async (output, context)
2747
2694
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2748
2695
  default:
2749
2696
  const parsedBody = parsedOutput.body;
2697
+ const $metadata = deserializeMetadata(output);
2698
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2750
2699
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
2751
- name: parsedBody.code || parsedBody.Code || errorCode,
2700
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2752
2701
  $fault: "client",
2753
- $metadata: deserializeMetadata(output),
2702
+ $metadata,
2754
2703
  });
2755
2704
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2756
2705
  }
@@ -2772,8 +2721,7 @@ const deserializeAws_restJson1DeleteObjectCommandError = async (output, context)
2772
2721
  body: await parseBody(output.body, context),
2773
2722
  };
2774
2723
  let response;
2775
- let errorCode = "UnknownError";
2776
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2724
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2777
2725
  switch (errorCode) {
2778
2726
  case "AccessDeniedException":
2779
2727
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -2804,10 +2752,12 @@ const deserializeAws_restJson1DeleteObjectCommandError = async (output, context)
2804
2752
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2805
2753
  default:
2806
2754
  const parsedBody = parsedOutput.body;
2755
+ const $metadata = deserializeMetadata(output);
2756
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2807
2757
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
2808
- name: parsedBody.code || parsedBody.Code || errorCode,
2758
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2809
2759
  $fault: "client",
2810
- $metadata: deserializeMetadata(output),
2760
+ $metadata,
2811
2761
  });
2812
2762
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2813
2763
  }
@@ -2833,8 +2783,7 @@ const deserializeAws_restJson1DeleteSchemaCommandError = async (output, context)
2833
2783
  body: await parseBody(output.body, context),
2834
2784
  };
2835
2785
  let response;
2836
- let errorCode = "UnknownError";
2837
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2786
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2838
2787
  switch (errorCode) {
2839
2788
  case "AccessDeniedException":
2840
2789
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -2862,10 +2811,12 @@ const deserializeAws_restJson1DeleteSchemaCommandError = async (output, context)
2862
2811
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2863
2812
  default:
2864
2813
  const parsedBody = parsedOutput.body;
2814
+ const $metadata = deserializeMetadata(output);
2815
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2865
2816
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
2866
- name: parsedBody.code || parsedBody.Code || errorCode,
2817
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2867
2818
  $fault: "client",
2868
- $metadata: deserializeMetadata(output),
2819
+ $metadata,
2869
2820
  });
2870
2821
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2871
2822
  }
@@ -2887,8 +2838,7 @@ const deserializeAws_restJson1DeleteTypedLinkFacetCommandError = async (output,
2887
2838
  body: await parseBody(output.body, context),
2888
2839
  };
2889
2840
  let response;
2890
- let errorCode = "UnknownError";
2891
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2841
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2892
2842
  switch (errorCode) {
2893
2843
  case "AccessDeniedException":
2894
2844
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -2916,10 +2866,12 @@ const deserializeAws_restJson1DeleteTypedLinkFacetCommandError = async (output,
2916
2866
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2917
2867
  default:
2918
2868
  const parsedBody = parsedOutput.body;
2869
+ const $metadata = deserializeMetadata(output);
2870
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2919
2871
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
2920
- name: parsedBody.code || parsedBody.Code || errorCode,
2872
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2921
2873
  $fault: "client",
2922
- $metadata: deserializeMetadata(output),
2874
+ $metadata,
2923
2875
  });
2924
2876
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2925
2877
  }
@@ -2945,8 +2897,7 @@ const deserializeAws_restJson1DetachFromIndexCommandError = async (output, conte
2945
2897
  body: await parseBody(output.body, context),
2946
2898
  };
2947
2899
  let response;
2948
- let errorCode = "UnknownError";
2949
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2900
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2950
2901
  switch (errorCode) {
2951
2902
  case "AccessDeniedException":
2952
2903
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -2980,10 +2931,12 @@ const deserializeAws_restJson1DetachFromIndexCommandError = async (output, conte
2980
2931
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2981
2932
  default:
2982
2933
  const parsedBody = parsedOutput.body;
2934
+ const $metadata = deserializeMetadata(output);
2935
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2983
2936
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
2984
- name: parsedBody.code || parsedBody.Code || errorCode,
2937
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2985
2938
  $fault: "client",
2986
- $metadata: deserializeMetadata(output),
2939
+ $metadata,
2987
2940
  });
2988
2941
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2989
2942
  }
@@ -3009,8 +2962,7 @@ const deserializeAws_restJson1DetachObjectCommandError = async (output, context)
3009
2962
  body: await parseBody(output.body, context),
3010
2963
  };
3011
2964
  let response;
3012
- let errorCode = "UnknownError";
3013
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2965
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3014
2966
  switch (errorCode) {
3015
2967
  case "AccessDeniedException":
3016
2968
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -3041,10 +2993,12 @@ const deserializeAws_restJson1DetachObjectCommandError = async (output, context)
3041
2993
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
3042
2994
  default:
3043
2995
  const parsedBody = parsedOutput.body;
2996
+ const $metadata = deserializeMetadata(output);
2997
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3044
2998
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
3045
- name: parsedBody.code || parsedBody.Code || errorCode,
2999
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3046
3000
  $fault: "client",
3047
- $metadata: deserializeMetadata(output),
3001
+ $metadata,
3048
3002
  });
3049
3003
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3050
3004
  }
@@ -3066,8 +3020,7 @@ const deserializeAws_restJson1DetachPolicyCommandError = async (output, context)
3066
3020
  body: await parseBody(output.body, context),
3067
3021
  };
3068
3022
  let response;
3069
- let errorCode = "UnknownError";
3070
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3023
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3071
3024
  switch (errorCode) {
3072
3025
  case "AccessDeniedException":
3073
3026
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -3098,10 +3051,12 @@ const deserializeAws_restJson1DetachPolicyCommandError = async (output, context)
3098
3051
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
3099
3052
  default:
3100
3053
  const parsedBody = parsedOutput.body;
3054
+ const $metadata = deserializeMetadata(output);
3055
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3101
3056
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
3102
- name: parsedBody.code || parsedBody.Code || errorCode,
3057
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3103
3058
  $fault: "client",
3104
- $metadata: deserializeMetadata(output),
3059
+ $metadata,
3105
3060
  });
3106
3061
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3107
3062
  }
@@ -3123,8 +3078,7 @@ const deserializeAws_restJson1DetachTypedLinkCommandError = async (output, conte
3123
3078
  body: await parseBody(output.body, context),
3124
3079
  };
3125
3080
  let response;
3126
- let errorCode = "UnknownError";
3127
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3081
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3128
3082
  switch (errorCode) {
3129
3083
  case "AccessDeniedException":
3130
3084
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -3155,10 +3109,12 @@ const deserializeAws_restJson1DetachTypedLinkCommandError = async (output, conte
3155
3109
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
3156
3110
  default:
3157
3111
  const parsedBody = parsedOutput.body;
3112
+ const $metadata = deserializeMetadata(output);
3113
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3158
3114
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
3159
- name: parsedBody.code || parsedBody.Code || errorCode,
3115
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3160
3116
  $fault: "client",
3161
- $metadata: deserializeMetadata(output),
3117
+ $metadata,
3162
3118
  });
3163
3119
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3164
3120
  }
@@ -3184,8 +3140,7 @@ const deserializeAws_restJson1DisableDirectoryCommandError = async (output, cont
3184
3140
  body: await parseBody(output.body, context),
3185
3141
  };
3186
3142
  let response;
3187
- let errorCode = "UnknownError";
3188
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3143
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3189
3144
  switch (errorCode) {
3190
3145
  case "AccessDeniedException":
3191
3146
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -3213,10 +3168,12 @@ const deserializeAws_restJson1DisableDirectoryCommandError = async (output, cont
3213
3168
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
3214
3169
  default:
3215
3170
  const parsedBody = parsedOutput.body;
3171
+ const $metadata = deserializeMetadata(output);
3172
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3216
3173
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
3217
- name: parsedBody.code || parsedBody.Code || errorCode,
3174
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3218
3175
  $fault: "client",
3219
- $metadata: deserializeMetadata(output),
3176
+ $metadata,
3220
3177
  });
3221
3178
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3222
3179
  }
@@ -3242,8 +3199,7 @@ const deserializeAws_restJson1EnableDirectoryCommandError = async (output, conte
3242
3199
  body: await parseBody(output.body, context),
3243
3200
  };
3244
3201
  let response;
3245
- let errorCode = "UnknownError";
3246
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3202
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3247
3203
  switch (errorCode) {
3248
3204
  case "AccessDeniedException":
3249
3205
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -3271,10 +3227,12 @@ const deserializeAws_restJson1EnableDirectoryCommandError = async (output, conte
3271
3227
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
3272
3228
  default:
3273
3229
  const parsedBody = parsedOutput.body;
3230
+ const $metadata = deserializeMetadata(output);
3231
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3274
3232
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
3275
- name: parsedBody.code || parsedBody.Code || errorCode,
3233
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3276
3234
  $fault: "client",
3277
- $metadata: deserializeMetadata(output),
3235
+ $metadata,
3278
3236
  });
3279
3237
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3280
3238
  }
@@ -3300,8 +3258,7 @@ const deserializeAws_restJson1GetAppliedSchemaVersionCommandError = async (outpu
3300
3258
  body: await parseBody(output.body, context),
3301
3259
  };
3302
3260
  let response;
3303
- let errorCode = "UnknownError";
3304
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3261
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3305
3262
  switch (errorCode) {
3306
3263
  case "AccessDeniedException":
3307
3264
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -3326,10 +3283,12 @@ const deserializeAws_restJson1GetAppliedSchemaVersionCommandError = async (outpu
3326
3283
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
3327
3284
  default:
3328
3285
  const parsedBody = parsedOutput.body;
3286
+ const $metadata = deserializeMetadata(output);
3287
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3329
3288
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
3330
- name: parsedBody.code || parsedBody.Code || errorCode,
3289
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3331
3290
  $fault: "client",
3332
- $metadata: deserializeMetadata(output),
3291
+ $metadata,
3333
3292
  });
3334
3293
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3335
3294
  }
@@ -3355,8 +3314,7 @@ const deserializeAws_restJson1GetDirectoryCommandError = async (output, context)
3355
3314
  body: await parseBody(output.body, context),
3356
3315
  };
3357
3316
  let response;
3358
- let errorCode = "UnknownError";
3359
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3317
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3360
3318
  switch (errorCode) {
3361
3319
  case "AccessDeniedException":
3362
3320
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -3378,10 +3336,12 @@ const deserializeAws_restJson1GetDirectoryCommandError = async (output, context)
3378
3336
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
3379
3337
  default:
3380
3338
  const parsedBody = parsedOutput.body;
3339
+ const $metadata = deserializeMetadata(output);
3340
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3381
3341
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
3382
- name: parsedBody.code || parsedBody.Code || errorCode,
3342
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3383
3343
  $fault: "client",
3384
- $metadata: deserializeMetadata(output),
3344
+ $metadata,
3385
3345
  });
3386
3346
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3387
3347
  }
@@ -3407,8 +3367,7 @@ const deserializeAws_restJson1GetFacetCommandError = async (output, context) =>
3407
3367
  body: await parseBody(output.body, context),
3408
3368
  };
3409
3369
  let response;
3410
- let errorCode = "UnknownError";
3411
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3370
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3412
3371
  switch (errorCode) {
3413
3372
  case "AccessDeniedException":
3414
3373
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -3436,10 +3395,12 @@ const deserializeAws_restJson1GetFacetCommandError = async (output, context) =>
3436
3395
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
3437
3396
  default:
3438
3397
  const parsedBody = parsedOutput.body;
3398
+ const $metadata = deserializeMetadata(output);
3399
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3439
3400
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
3440
- name: parsedBody.code || parsedBody.Code || errorCode,
3401
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3441
3402
  $fault: "client",
3442
- $metadata: deserializeMetadata(output),
3403
+ $metadata,
3443
3404
  });
3444
3405
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3445
3406
  }
@@ -3465,8 +3426,7 @@ const deserializeAws_restJson1GetLinkAttributesCommandError = async (output, con
3465
3426
  body: await parseBody(output.body, context),
3466
3427
  };
3467
3428
  let response;
3468
- let errorCode = "UnknownError";
3469
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3429
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3470
3430
  switch (errorCode) {
3471
3431
  case "AccessDeniedException":
3472
3432
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -3497,10 +3457,12 @@ const deserializeAws_restJson1GetLinkAttributesCommandError = async (output, con
3497
3457
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
3498
3458
  default:
3499
3459
  const parsedBody = parsedOutput.body;
3460
+ const $metadata = deserializeMetadata(output);
3461
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3500
3462
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
3501
- name: parsedBody.code || parsedBody.Code || errorCode,
3463
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3502
3464
  $fault: "client",
3503
- $metadata: deserializeMetadata(output),
3465
+ $metadata,
3504
3466
  });
3505
3467
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3506
3468
  }
@@ -3526,8 +3488,7 @@ const deserializeAws_restJson1GetObjectAttributesCommandError = async (output, c
3526
3488
  body: await parseBody(output.body, context),
3527
3489
  };
3528
3490
  let response;
3529
- let errorCode = "UnknownError";
3530
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3491
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3531
3492
  switch (errorCode) {
3532
3493
  case "AccessDeniedException":
3533
3494
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -3558,10 +3519,12 @@ const deserializeAws_restJson1GetObjectAttributesCommandError = async (output, c
3558
3519
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
3559
3520
  default:
3560
3521
  const parsedBody = parsedOutput.body;
3522
+ const $metadata = deserializeMetadata(output);
3523
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3561
3524
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
3562
- name: parsedBody.code || parsedBody.Code || errorCode,
3525
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3563
3526
  $fault: "client",
3564
- $metadata: deserializeMetadata(output),
3527
+ $metadata,
3565
3528
  });
3566
3529
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3567
3530
  }
@@ -3591,8 +3554,7 @@ const deserializeAws_restJson1GetObjectInformationCommandError = async (output,
3591
3554
  body: await parseBody(output.body, context),
3592
3555
  };
3593
3556
  let response;
3594
- let errorCode = "UnknownError";
3595
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3557
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3596
3558
  switch (errorCode) {
3597
3559
  case "AccessDeniedException":
3598
3560
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -3620,10 +3582,12 @@ const deserializeAws_restJson1GetObjectInformationCommandError = async (output,
3620
3582
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
3621
3583
  default:
3622
3584
  const parsedBody = parsedOutput.body;
3585
+ const $metadata = deserializeMetadata(output);
3586
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3623
3587
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
3624
- name: parsedBody.code || parsedBody.Code || errorCode,
3588
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3625
3589
  $fault: "client",
3626
- $metadata: deserializeMetadata(output),
3590
+ $metadata,
3627
3591
  });
3628
3592
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3629
3593
  }
@@ -3653,8 +3617,7 @@ const deserializeAws_restJson1GetSchemaAsJsonCommandError = async (output, conte
3653
3617
  body: await parseBody(output.body, context),
3654
3618
  };
3655
3619
  let response;
3656
- let errorCode = "UnknownError";
3657
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3620
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3658
3621
  switch (errorCode) {
3659
3622
  case "AccessDeniedException":
3660
3623
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -3679,10 +3642,12 @@ const deserializeAws_restJson1GetSchemaAsJsonCommandError = async (output, conte
3679
3642
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
3680
3643
  default:
3681
3644
  const parsedBody = parsedOutput.body;
3645
+ const $metadata = deserializeMetadata(output);
3646
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3682
3647
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
3683
- name: parsedBody.code || parsedBody.Code || errorCode,
3648
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3684
3649
  $fault: "client",
3685
- $metadata: deserializeMetadata(output),
3650
+ $metadata,
3686
3651
  });
3687
3652
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3688
3653
  }
@@ -3708,8 +3673,7 @@ const deserializeAws_restJson1GetTypedLinkFacetInformationCommandError = async (
3708
3673
  body: await parseBody(output.body, context),
3709
3674
  };
3710
3675
  let response;
3711
- let errorCode = "UnknownError";
3712
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3676
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3713
3677
  switch (errorCode) {
3714
3678
  case "AccessDeniedException":
3715
3679
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -3740,10 +3704,12 @@ const deserializeAws_restJson1GetTypedLinkFacetInformationCommandError = async (
3740
3704
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
3741
3705
  default:
3742
3706
  const parsedBody = parsedOutput.body;
3707
+ const $metadata = deserializeMetadata(output);
3708
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3743
3709
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
3744
- name: parsedBody.code || parsedBody.Code || errorCode,
3710
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3745
3711
  $fault: "client",
3746
- $metadata: deserializeMetadata(output),
3712
+ $metadata,
3747
3713
  });
3748
3714
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3749
3715
  }
@@ -3773,8 +3739,7 @@ const deserializeAws_restJson1ListAppliedSchemaArnsCommandError = async (output,
3773
3739
  body: await parseBody(output.body, context),
3774
3740
  };
3775
3741
  let response;
3776
- let errorCode = "UnknownError";
3777
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3742
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3778
3743
  switch (errorCode) {
3779
3744
  case "AccessDeniedException":
3780
3745
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -3802,10 +3767,12 @@ const deserializeAws_restJson1ListAppliedSchemaArnsCommandError = async (output,
3802
3767
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
3803
3768
  default:
3804
3769
  const parsedBody = parsedOutput.body;
3770
+ const $metadata = deserializeMetadata(output);
3771
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3805
3772
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
3806
- name: parsedBody.code || parsedBody.Code || errorCode,
3773
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3807
3774
  $fault: "client",
3808
- $metadata: deserializeMetadata(output),
3775
+ $metadata,
3809
3776
  });
3810
3777
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3811
3778
  }
@@ -3835,8 +3802,7 @@ const deserializeAws_restJson1ListAttachedIndicesCommandError = async (output, c
3835
3802
  body: await parseBody(output.body, context),
3836
3803
  };
3837
3804
  let response;
3838
- let errorCode = "UnknownError";
3839
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3805
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3840
3806
  switch (errorCode) {
3841
3807
  case "AccessDeniedException":
3842
3808
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -3864,10 +3830,12 @@ const deserializeAws_restJson1ListAttachedIndicesCommandError = async (output, c
3864
3830
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
3865
3831
  default:
3866
3832
  const parsedBody = parsedOutput.body;
3833
+ const $metadata = deserializeMetadata(output);
3834
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3867
3835
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
3868
- name: parsedBody.code || parsedBody.Code || errorCode,
3836
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3869
3837
  $fault: "client",
3870
- $metadata: deserializeMetadata(output),
3838
+ $metadata,
3871
3839
  });
3872
3840
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3873
3841
  }
@@ -3897,8 +3865,7 @@ const deserializeAws_restJson1ListDevelopmentSchemaArnsCommandError = async (out
3897
3865
  body: await parseBody(output.body, context),
3898
3866
  };
3899
3867
  let response;
3900
- let errorCode = "UnknownError";
3901
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3868
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3902
3869
  switch (errorCode) {
3903
3870
  case "AccessDeniedException":
3904
3871
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -3926,10 +3893,12 @@ const deserializeAws_restJson1ListDevelopmentSchemaArnsCommandError = async (out
3926
3893
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
3927
3894
  default:
3928
3895
  const parsedBody = parsedOutput.body;
3896
+ const $metadata = deserializeMetadata(output);
3897
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3929
3898
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
3930
- name: parsedBody.code || parsedBody.Code || errorCode,
3899
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3931
3900
  $fault: "client",
3932
- $metadata: deserializeMetadata(output),
3901
+ $metadata,
3933
3902
  });
3934
3903
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3935
3904
  }
@@ -3959,8 +3928,7 @@ const deserializeAws_restJson1ListDirectoriesCommandError = async (output, conte
3959
3928
  body: await parseBody(output.body, context),
3960
3929
  };
3961
3930
  let response;
3962
- let errorCode = "UnknownError";
3963
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3931
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3964
3932
  switch (errorCode) {
3965
3933
  case "AccessDeniedException":
3966
3934
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -3985,10 +3953,12 @@ const deserializeAws_restJson1ListDirectoriesCommandError = async (output, conte
3985
3953
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
3986
3954
  default:
3987
3955
  const parsedBody = parsedOutput.body;
3956
+ const $metadata = deserializeMetadata(output);
3957
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3988
3958
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
3989
- name: parsedBody.code || parsedBody.Code || errorCode,
3959
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3990
3960
  $fault: "client",
3991
- $metadata: deserializeMetadata(output),
3961
+ $metadata,
3992
3962
  });
3993
3963
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3994
3964
  }
@@ -4018,8 +3988,7 @@ const deserializeAws_restJson1ListFacetAttributesCommandError = async (output, c
4018
3988
  body: await parseBody(output.body, context),
4019
3989
  };
4020
3990
  let response;
4021
- let errorCode = "UnknownError";
4022
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3991
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4023
3992
  switch (errorCode) {
4024
3993
  case "AccessDeniedException":
4025
3994
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -4050,10 +4019,12 @@ const deserializeAws_restJson1ListFacetAttributesCommandError = async (output, c
4050
4019
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
4051
4020
  default:
4052
4021
  const parsedBody = parsedOutput.body;
4022
+ const $metadata = deserializeMetadata(output);
4023
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4053
4024
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
4054
- name: parsedBody.code || parsedBody.Code || errorCode,
4025
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4055
4026
  $fault: "client",
4056
- $metadata: deserializeMetadata(output),
4027
+ $metadata,
4057
4028
  });
4058
4029
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4059
4030
  }
@@ -4083,8 +4054,7 @@ const deserializeAws_restJson1ListFacetNamesCommandError = async (output, contex
4083
4054
  body: await parseBody(output.body, context),
4084
4055
  };
4085
4056
  let response;
4086
- let errorCode = "UnknownError";
4087
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4057
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4088
4058
  switch (errorCode) {
4089
4059
  case "AccessDeniedException":
4090
4060
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -4112,10 +4082,12 @@ const deserializeAws_restJson1ListFacetNamesCommandError = async (output, contex
4112
4082
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
4113
4083
  default:
4114
4084
  const parsedBody = parsedOutput.body;
4085
+ const $metadata = deserializeMetadata(output);
4086
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4115
4087
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
4116
- name: parsedBody.code || parsedBody.Code || errorCode,
4088
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4117
4089
  $fault: "client",
4118
- $metadata: deserializeMetadata(output),
4090
+ $metadata,
4119
4091
  });
4120
4092
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4121
4093
  }
@@ -4145,8 +4117,7 @@ const deserializeAws_restJson1ListIncomingTypedLinksCommandError = async (output
4145
4117
  body: await parseBody(output.body, context),
4146
4118
  };
4147
4119
  let response;
4148
- let errorCode = "UnknownError";
4149
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4120
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4150
4121
  switch (errorCode) {
4151
4122
  case "AccessDeniedException":
4152
4123
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -4180,10 +4151,12 @@ const deserializeAws_restJson1ListIncomingTypedLinksCommandError = async (output
4180
4151
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
4181
4152
  default:
4182
4153
  const parsedBody = parsedOutput.body;
4154
+ const $metadata = deserializeMetadata(output);
4155
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4183
4156
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
4184
- name: parsedBody.code || parsedBody.Code || errorCode,
4157
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4185
4158
  $fault: "client",
4186
- $metadata: deserializeMetadata(output),
4159
+ $metadata,
4187
4160
  });
4188
4161
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4189
4162
  }
@@ -4213,8 +4186,7 @@ const deserializeAws_restJson1ListIndexCommandError = async (output, context) =>
4213
4186
  body: await parseBody(output.body, context),
4214
4187
  };
4215
4188
  let response;
4216
- let errorCode = "UnknownError";
4217
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4189
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4218
4190
  switch (errorCode) {
4219
4191
  case "AccessDeniedException":
4220
4192
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -4251,10 +4223,12 @@ const deserializeAws_restJson1ListIndexCommandError = async (output, context) =>
4251
4223
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
4252
4224
  default:
4253
4225
  const parsedBody = parsedOutput.body;
4226
+ const $metadata = deserializeMetadata(output);
4227
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4254
4228
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
4255
- name: parsedBody.code || parsedBody.Code || errorCode,
4229
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4256
4230
  $fault: "client",
4257
- $metadata: deserializeMetadata(output),
4231
+ $metadata,
4258
4232
  });
4259
4233
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4260
4234
  }
@@ -4284,8 +4258,7 @@ const deserializeAws_restJson1ListManagedSchemaArnsCommandError = async (output,
4284
4258
  body: await parseBody(output.body, context),
4285
4259
  };
4286
4260
  let response;
4287
- let errorCode = "UnknownError";
4288
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4261
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4289
4262
  switch (errorCode) {
4290
4263
  case "AccessDeniedException":
4291
4264
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -4307,10 +4280,12 @@ const deserializeAws_restJson1ListManagedSchemaArnsCommandError = async (output,
4307
4280
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
4308
4281
  default:
4309
4282
  const parsedBody = parsedOutput.body;
4283
+ const $metadata = deserializeMetadata(output);
4284
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4310
4285
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
4311
- name: parsedBody.code || parsedBody.Code || errorCode,
4286
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4312
4287
  $fault: "client",
4313
- $metadata: deserializeMetadata(output),
4288
+ $metadata,
4314
4289
  });
4315
4290
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4316
4291
  }
@@ -4340,8 +4315,7 @@ const deserializeAws_restJson1ListObjectAttributesCommandError = async (output,
4340
4315
  body: await parseBody(output.body, context),
4341
4316
  };
4342
4317
  let response;
4343
- let errorCode = "UnknownError";
4344
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4318
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4345
4319
  switch (errorCode) {
4346
4320
  case "AccessDeniedException":
4347
4321
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -4375,10 +4349,12 @@ const deserializeAws_restJson1ListObjectAttributesCommandError = async (output,
4375
4349
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
4376
4350
  default:
4377
4351
  const parsedBody = parsedOutput.body;
4352
+ const $metadata = deserializeMetadata(output);
4353
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4378
4354
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
4379
- name: parsedBody.code || parsedBody.Code || errorCode,
4355
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4380
4356
  $fault: "client",
4381
- $metadata: deserializeMetadata(output),
4357
+ $metadata,
4382
4358
  });
4383
4359
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4384
4360
  }
@@ -4408,8 +4384,7 @@ const deserializeAws_restJson1ListObjectChildrenCommandError = async (output, co
4408
4384
  body: await parseBody(output.body, context),
4409
4385
  };
4410
4386
  let response;
4411
- let errorCode = "UnknownError";
4412
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4387
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4413
4388
  switch (errorCode) {
4414
4389
  case "AccessDeniedException":
4415
4390
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -4443,10 +4418,12 @@ const deserializeAws_restJson1ListObjectChildrenCommandError = async (output, co
4443
4418
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
4444
4419
  default:
4445
4420
  const parsedBody = parsedOutput.body;
4421
+ const $metadata = deserializeMetadata(output);
4422
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4446
4423
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
4447
- name: parsedBody.code || parsedBody.Code || errorCode,
4424
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4448
4425
  $fault: "client",
4449
- $metadata: deserializeMetadata(output),
4426
+ $metadata,
4450
4427
  });
4451
4428
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4452
4429
  }
@@ -4476,8 +4453,7 @@ const deserializeAws_restJson1ListObjectParentPathsCommandError = async (output,
4476
4453
  body: await parseBody(output.body, context),
4477
4454
  };
4478
4455
  let response;
4479
- let errorCode = "UnknownError";
4480
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4456
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4481
4457
  switch (errorCode) {
4482
4458
  case "AccessDeniedException":
4483
4459
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -4508,10 +4484,12 @@ const deserializeAws_restJson1ListObjectParentPathsCommandError = async (output,
4508
4484
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
4509
4485
  default:
4510
4486
  const parsedBody = parsedOutput.body;
4487
+ const $metadata = deserializeMetadata(output);
4488
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4511
4489
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
4512
- name: parsedBody.code || parsedBody.Code || errorCode,
4490
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4513
4491
  $fault: "client",
4514
- $metadata: deserializeMetadata(output),
4492
+ $metadata,
4515
4493
  });
4516
4494
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4517
4495
  }
@@ -4545,8 +4523,7 @@ const deserializeAws_restJson1ListObjectParentsCommandError = async (output, con
4545
4523
  body: await parseBody(output.body, context),
4546
4524
  };
4547
4525
  let response;
4548
- let errorCode = "UnknownError";
4549
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4526
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4550
4527
  switch (errorCode) {
4551
4528
  case "AccessDeniedException":
4552
4529
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -4580,10 +4557,12 @@ const deserializeAws_restJson1ListObjectParentsCommandError = async (output, con
4580
4557
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
4581
4558
  default:
4582
4559
  const parsedBody = parsedOutput.body;
4560
+ const $metadata = deserializeMetadata(output);
4561
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4583
4562
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
4584
- name: parsedBody.code || parsedBody.Code || errorCode,
4563
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4585
4564
  $fault: "client",
4586
- $metadata: deserializeMetadata(output),
4565
+ $metadata,
4587
4566
  });
4588
4567
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4589
4568
  }
@@ -4613,8 +4592,7 @@ const deserializeAws_restJson1ListObjectPoliciesCommandError = async (output, co
4613
4592
  body: await parseBody(output.body, context),
4614
4593
  };
4615
4594
  let response;
4616
- let errorCode = "UnknownError";
4617
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4595
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4618
4596
  switch (errorCode) {
4619
4597
  case "AccessDeniedException":
4620
4598
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -4645,10 +4623,12 @@ const deserializeAws_restJson1ListObjectPoliciesCommandError = async (output, co
4645
4623
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
4646
4624
  default:
4647
4625
  const parsedBody = parsedOutput.body;
4626
+ const $metadata = deserializeMetadata(output);
4627
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4648
4628
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
4649
- name: parsedBody.code || parsedBody.Code || errorCode,
4629
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4650
4630
  $fault: "client",
4651
- $metadata: deserializeMetadata(output),
4631
+ $metadata,
4652
4632
  });
4653
4633
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4654
4634
  }
@@ -4678,8 +4658,7 @@ const deserializeAws_restJson1ListOutgoingTypedLinksCommandError = async (output
4678
4658
  body: await parseBody(output.body, context),
4679
4659
  };
4680
4660
  let response;
4681
- let errorCode = "UnknownError";
4682
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4661
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4683
4662
  switch (errorCode) {
4684
4663
  case "AccessDeniedException":
4685
4664
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -4713,10 +4692,12 @@ const deserializeAws_restJson1ListOutgoingTypedLinksCommandError = async (output
4713
4692
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
4714
4693
  default:
4715
4694
  const parsedBody = parsedOutput.body;
4695
+ const $metadata = deserializeMetadata(output);
4696
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4716
4697
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
4717
- name: parsedBody.code || parsedBody.Code || errorCode,
4698
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4718
4699
  $fault: "client",
4719
- $metadata: deserializeMetadata(output),
4700
+ $metadata,
4720
4701
  });
4721
4702
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4722
4703
  }
@@ -4746,8 +4727,7 @@ const deserializeAws_restJson1ListPolicyAttachmentsCommandError = async (output,
4746
4727
  body: await parseBody(output.body, context),
4747
4728
  };
4748
4729
  let response;
4749
- let errorCode = "UnknownError";
4750
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4730
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4751
4731
  switch (errorCode) {
4752
4732
  case "AccessDeniedException":
4753
4733
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -4781,10 +4761,12 @@ const deserializeAws_restJson1ListPolicyAttachmentsCommandError = async (output,
4781
4761
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
4782
4762
  default:
4783
4763
  const parsedBody = parsedOutput.body;
4764
+ const $metadata = deserializeMetadata(output);
4765
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4784
4766
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
4785
- name: parsedBody.code || parsedBody.Code || errorCode,
4767
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4786
4768
  $fault: "client",
4787
- $metadata: deserializeMetadata(output),
4769
+ $metadata,
4788
4770
  });
4789
4771
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4790
4772
  }
@@ -4814,8 +4796,7 @@ const deserializeAws_restJson1ListPublishedSchemaArnsCommandError = async (outpu
4814
4796
  body: await parseBody(output.body, context),
4815
4797
  };
4816
4798
  let response;
4817
- let errorCode = "UnknownError";
4818
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4799
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4819
4800
  switch (errorCode) {
4820
4801
  case "AccessDeniedException":
4821
4802
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -4843,10 +4824,12 @@ const deserializeAws_restJson1ListPublishedSchemaArnsCommandError = async (outpu
4843
4824
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
4844
4825
  default:
4845
4826
  const parsedBody = parsedOutput.body;
4827
+ const $metadata = deserializeMetadata(output);
4828
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4846
4829
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
4847
- name: parsedBody.code || parsedBody.Code || errorCode,
4830
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4848
4831
  $fault: "client",
4849
- $metadata: deserializeMetadata(output),
4832
+ $metadata,
4850
4833
  });
4851
4834
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4852
4835
  }
@@ -4876,8 +4859,7 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
4876
4859
  body: await parseBody(output.body, context),
4877
4860
  };
4878
4861
  let response;
4879
- let errorCode = "UnknownError";
4880
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4862
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4881
4863
  switch (errorCode) {
4882
4864
  case "AccessDeniedException":
4883
4865
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -4905,10 +4887,12 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
4905
4887
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
4906
4888
  default:
4907
4889
  const parsedBody = parsedOutput.body;
4890
+ const $metadata = deserializeMetadata(output);
4891
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4908
4892
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
4909
- name: parsedBody.code || parsedBody.Code || errorCode,
4893
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4910
4894
  $fault: "client",
4911
- $metadata: deserializeMetadata(output),
4895
+ $metadata,
4912
4896
  });
4913
4897
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4914
4898
  }
@@ -4938,8 +4922,7 @@ const deserializeAws_restJson1ListTypedLinkFacetAttributesCommandError = async (
4938
4922
  body: await parseBody(output.body, context),
4939
4923
  };
4940
4924
  let response;
4941
- let errorCode = "UnknownError";
4942
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4925
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4943
4926
  switch (errorCode) {
4944
4927
  case "AccessDeniedException":
4945
4928
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -4970,10 +4953,12 @@ const deserializeAws_restJson1ListTypedLinkFacetAttributesCommandError = async (
4970
4953
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
4971
4954
  default:
4972
4955
  const parsedBody = parsedOutput.body;
4956
+ const $metadata = deserializeMetadata(output);
4957
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4973
4958
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
4974
- name: parsedBody.code || parsedBody.Code || errorCode,
4959
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4975
4960
  $fault: "client",
4976
- $metadata: deserializeMetadata(output),
4961
+ $metadata,
4977
4962
  });
4978
4963
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4979
4964
  }
@@ -5003,8 +4988,7 @@ const deserializeAws_restJson1ListTypedLinkFacetNamesCommandError = async (outpu
5003
4988
  body: await parseBody(output.body, context),
5004
4989
  };
5005
4990
  let response;
5006
- let errorCode = "UnknownError";
5007
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4991
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5008
4992
  switch (errorCode) {
5009
4993
  case "AccessDeniedException":
5010
4994
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -5032,10 +5016,12 @@ const deserializeAws_restJson1ListTypedLinkFacetNamesCommandError = async (outpu
5032
5016
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
5033
5017
  default:
5034
5018
  const parsedBody = parsedOutput.body;
5019
+ const $metadata = deserializeMetadata(output);
5020
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5035
5021
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
5036
- name: parsedBody.code || parsedBody.Code || errorCode,
5022
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5037
5023
  $fault: "client",
5038
- $metadata: deserializeMetadata(output),
5024
+ $metadata,
5039
5025
  });
5040
5026
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5041
5027
  }
@@ -5065,8 +5051,7 @@ const deserializeAws_restJson1LookupPolicyCommandError = async (output, context)
5065
5051
  body: await parseBody(output.body, context),
5066
5052
  };
5067
5053
  let response;
5068
- let errorCode = "UnknownError";
5069
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5054
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5070
5055
  switch (errorCode) {
5071
5056
  case "AccessDeniedException":
5072
5057
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -5097,10 +5082,12 @@ const deserializeAws_restJson1LookupPolicyCommandError = async (output, context)
5097
5082
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
5098
5083
  default:
5099
5084
  const parsedBody = parsedOutput.body;
5085
+ const $metadata = deserializeMetadata(output);
5086
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5100
5087
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
5101
- name: parsedBody.code || parsedBody.Code || errorCode,
5088
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5102
5089
  $fault: "client",
5103
- $metadata: deserializeMetadata(output),
5090
+ $metadata,
5104
5091
  });
5105
5092
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5106
5093
  }
@@ -5126,8 +5113,7 @@ const deserializeAws_restJson1PublishSchemaCommandError = async (output, context
5126
5113
  body: await parseBody(output.body, context),
5127
5114
  };
5128
5115
  let response;
5129
- let errorCode = "UnknownError";
5130
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5116
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5131
5117
  switch (errorCode) {
5132
5118
  case "AccessDeniedException":
5133
5119
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -5155,10 +5141,12 @@ const deserializeAws_restJson1PublishSchemaCommandError = async (output, context
5155
5141
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
5156
5142
  default:
5157
5143
  const parsedBody = parsedOutput.body;
5144
+ const $metadata = deserializeMetadata(output);
5145
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5158
5146
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
5159
- name: parsedBody.code || parsedBody.Code || errorCode,
5147
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5160
5148
  $fault: "client",
5161
- $metadata: deserializeMetadata(output),
5149
+ $metadata,
5162
5150
  });
5163
5151
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5164
5152
  }
@@ -5184,8 +5172,7 @@ const deserializeAws_restJson1PutSchemaFromJsonCommandError = async (output, con
5184
5172
  body: await parseBody(output.body, context),
5185
5173
  };
5186
5174
  let response;
5187
- let errorCode = "UnknownError";
5188
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5175
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5189
5176
  switch (errorCode) {
5190
5177
  case "AccessDeniedException":
5191
5178
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -5213,10 +5200,12 @@ const deserializeAws_restJson1PutSchemaFromJsonCommandError = async (output, con
5213
5200
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
5214
5201
  default:
5215
5202
  const parsedBody = parsedOutput.body;
5203
+ const $metadata = deserializeMetadata(output);
5204
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5216
5205
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
5217
- name: parsedBody.code || parsedBody.Code || errorCode,
5206
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5218
5207
  $fault: "client",
5219
- $metadata: deserializeMetadata(output),
5208
+ $metadata,
5220
5209
  });
5221
5210
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5222
5211
  }
@@ -5238,8 +5227,7 @@ const deserializeAws_restJson1RemoveFacetFromObjectCommandError = async (output,
5238
5227
  body: await parseBody(output.body, context),
5239
5228
  };
5240
5229
  let response;
5241
- let errorCode = "UnknownError";
5242
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5230
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5243
5231
  switch (errorCode) {
5244
5232
  case "AccessDeniedException":
5245
5233
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -5270,10 +5258,12 @@ const deserializeAws_restJson1RemoveFacetFromObjectCommandError = async (output,
5270
5258
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
5271
5259
  default:
5272
5260
  const parsedBody = parsedOutput.body;
5261
+ const $metadata = deserializeMetadata(output);
5262
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5273
5263
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
5274
- name: parsedBody.code || parsedBody.Code || errorCode,
5264
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5275
5265
  $fault: "client",
5276
- $metadata: deserializeMetadata(output),
5266
+ $metadata,
5277
5267
  });
5278
5268
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5279
5269
  }
@@ -5295,8 +5285,7 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
5295
5285
  body: await parseBody(output.body, context),
5296
5286
  };
5297
5287
  let response;
5298
- let errorCode = "UnknownError";
5299
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5288
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5300
5289
  switch (errorCode) {
5301
5290
  case "AccessDeniedException":
5302
5291
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -5324,10 +5313,12 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
5324
5313
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
5325
5314
  default:
5326
5315
  const parsedBody = parsedOutput.body;
5316
+ const $metadata = deserializeMetadata(output);
5317
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5327
5318
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
5328
- name: parsedBody.code || parsedBody.Code || errorCode,
5319
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5329
5320
  $fault: "client",
5330
- $metadata: deserializeMetadata(output),
5321
+ $metadata,
5331
5322
  });
5332
5323
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5333
5324
  }
@@ -5349,8 +5340,7 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
5349
5340
  body: await parseBody(output.body, context),
5350
5341
  };
5351
5342
  let response;
5352
- let errorCode = "UnknownError";
5353
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5343
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5354
5344
  switch (errorCode) {
5355
5345
  case "AccessDeniedException":
5356
5346
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -5378,10 +5368,12 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
5378
5368
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
5379
5369
  default:
5380
5370
  const parsedBody = parsedOutput.body;
5371
+ const $metadata = deserializeMetadata(output);
5372
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5381
5373
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
5382
- name: parsedBody.code || parsedBody.Code || errorCode,
5374
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5383
5375
  $fault: "client",
5384
- $metadata: deserializeMetadata(output),
5376
+ $metadata,
5385
5377
  });
5386
5378
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5387
5379
  }
@@ -5403,8 +5395,7 @@ const deserializeAws_restJson1UpdateFacetCommandError = async (output, context)
5403
5395
  body: await parseBody(output.body, context),
5404
5396
  };
5405
5397
  let response;
5406
- let errorCode = "UnknownError";
5407
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5398
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5408
5399
  switch (errorCode) {
5409
5400
  case "AccessDeniedException":
5410
5401
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -5441,10 +5432,12 @@ const deserializeAws_restJson1UpdateFacetCommandError = async (output, context)
5441
5432
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
5442
5433
  default:
5443
5434
  const parsedBody = parsedOutput.body;
5435
+ const $metadata = deserializeMetadata(output);
5436
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5444
5437
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
5445
- name: parsedBody.code || parsedBody.Code || errorCode,
5438
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5446
5439
  $fault: "client",
5447
- $metadata: deserializeMetadata(output),
5440
+ $metadata,
5448
5441
  });
5449
5442
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5450
5443
  }
@@ -5466,8 +5459,7 @@ const deserializeAws_restJson1UpdateLinkAttributesCommandError = async (output,
5466
5459
  body: await parseBody(output.body, context),
5467
5460
  };
5468
5461
  let response;
5469
- let errorCode = "UnknownError";
5470
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5462
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5471
5463
  switch (errorCode) {
5472
5464
  case "AccessDeniedException":
5473
5465
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -5498,10 +5490,12 @@ const deserializeAws_restJson1UpdateLinkAttributesCommandError = async (output,
5498
5490
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
5499
5491
  default:
5500
5492
  const parsedBody = parsedOutput.body;
5493
+ const $metadata = deserializeMetadata(output);
5494
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5501
5495
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
5502
- name: parsedBody.code || parsedBody.Code || errorCode,
5496
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5503
5497
  $fault: "client",
5504
- $metadata: deserializeMetadata(output),
5498
+ $metadata,
5505
5499
  });
5506
5500
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5507
5501
  }
@@ -5527,8 +5521,7 @@ const deserializeAws_restJson1UpdateObjectAttributesCommandError = async (output
5527
5521
  body: await parseBody(output.body, context),
5528
5522
  };
5529
5523
  let response;
5530
- let errorCode = "UnknownError";
5531
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5524
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5532
5525
  switch (errorCode) {
5533
5526
  case "AccessDeniedException":
5534
5527
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -5562,10 +5555,12 @@ const deserializeAws_restJson1UpdateObjectAttributesCommandError = async (output
5562
5555
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
5563
5556
  default:
5564
5557
  const parsedBody = parsedOutput.body;
5558
+ const $metadata = deserializeMetadata(output);
5559
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5565
5560
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
5566
- name: parsedBody.code || parsedBody.Code || errorCode,
5561
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5567
5562
  $fault: "client",
5568
- $metadata: deserializeMetadata(output),
5563
+ $metadata,
5569
5564
  });
5570
5565
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5571
5566
  }
@@ -5591,8 +5586,7 @@ const deserializeAws_restJson1UpdateSchemaCommandError = async (output, context)
5591
5586
  body: await parseBody(output.body, context),
5592
5587
  };
5593
5588
  let response;
5594
- let errorCode = "UnknownError";
5595
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5589
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5596
5590
  switch (errorCode) {
5597
5591
  case "AccessDeniedException":
5598
5592
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -5617,10 +5611,12 @@ const deserializeAws_restJson1UpdateSchemaCommandError = async (output, context)
5617
5611
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
5618
5612
  default:
5619
5613
  const parsedBody = parsedOutput.body;
5614
+ const $metadata = deserializeMetadata(output);
5615
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5620
5616
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
5621
- name: parsedBody.code || parsedBody.Code || errorCode,
5617
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5622
5618
  $fault: "client",
5623
- $metadata: deserializeMetadata(output),
5619
+ $metadata,
5624
5620
  });
5625
5621
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5626
5622
  }
@@ -5642,8 +5638,7 @@ const deserializeAws_restJson1UpdateTypedLinkFacetCommandError = async (output,
5642
5638
  body: await parseBody(output.body, context),
5643
5639
  };
5644
5640
  let response;
5645
- let errorCode = "UnknownError";
5646
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5641
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5647
5642
  switch (errorCode) {
5648
5643
  case "AccessDeniedException":
5649
5644
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -5680,10 +5675,12 @@ const deserializeAws_restJson1UpdateTypedLinkFacetCommandError = async (output,
5680
5675
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
5681
5676
  default:
5682
5677
  const parsedBody = parsedOutput.body;
5678
+ const $metadata = deserializeMetadata(output);
5679
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5683
5680
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
5684
- name: parsedBody.code || parsedBody.Code || errorCode,
5681
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5685
5682
  $fault: "client",
5686
- $metadata: deserializeMetadata(output),
5683
+ $metadata,
5687
5684
  });
5688
5685
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5689
5686
  }
@@ -5713,8 +5710,7 @@ const deserializeAws_restJson1UpgradeAppliedSchemaCommandError = async (output,
5713
5710
  body: await parseBody(output.body, context),
5714
5711
  };
5715
5712
  let response;
5716
- let errorCode = "UnknownError";
5717
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5713
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5718
5714
  switch (errorCode) {
5719
5715
  case "AccessDeniedException":
5720
5716
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -5745,10 +5741,12 @@ const deserializeAws_restJson1UpgradeAppliedSchemaCommandError = async (output,
5745
5741
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
5746
5742
  default:
5747
5743
  const parsedBody = parsedOutput.body;
5744
+ const $metadata = deserializeMetadata(output);
5745
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5748
5746
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
5749
- name: parsedBody.code || parsedBody.Code || errorCode,
5747
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5750
5748
  $fault: "client",
5751
- $metadata: deserializeMetadata(output),
5749
+ $metadata,
5752
5750
  });
5753
5751
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5754
5752
  }
@@ -5774,8 +5772,7 @@ const deserializeAws_restJson1UpgradePublishedSchemaCommandError = async (output
5774
5772
  body: await parseBody(output.body, context),
5775
5773
  };
5776
5774
  let response;
5777
- let errorCode = "UnknownError";
5778
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5775
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5779
5776
  switch (errorCode) {
5780
5777
  case "AccessDeniedException":
5781
5778
  case "com.amazonaws.clouddirectory#AccessDeniedException":
@@ -5806,10 +5803,12 @@ const deserializeAws_restJson1UpgradePublishedSchemaCommandError = async (output
5806
5803
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
5807
5804
  default:
5808
5805
  const parsedBody = parsedOutput.body;
5806
+ const $metadata = deserializeMetadata(output);
5807
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5809
5808
  response = new CloudDirectoryServiceException_1.CloudDirectoryServiceException({
5810
- name: parsedBody.code || parsedBody.Code || errorCode,
5809
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5811
5810
  $fault: "client",
5812
- $metadata: deserializeMetadata(output),
5811
+ $metadata,
5813
5812
  });
5814
5813
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5815
5814
  }
@@ -6242,17 +6241,15 @@ const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput,
6242
6241
  };
6243
6242
  const serializeAws_restJson1AttributeKey = (input, context) => {
6244
6243
  return {
6245
- ...(input.FacetName !== undefined && input.FacetName !== null && { FacetName: input.FacetName }),
6246
- ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
6247
- ...(input.SchemaArn !== undefined && input.SchemaArn !== null && { SchemaArn: input.SchemaArn }),
6244
+ ...(input.FacetName != null && { FacetName: input.FacetName }),
6245
+ ...(input.Name != null && { Name: input.Name }),
6246
+ ...(input.SchemaArn != null && { SchemaArn: input.SchemaArn }),
6248
6247
  };
6249
6248
  };
6250
6249
  const serializeAws_restJson1AttributeKeyAndValue = (input, context) => {
6251
6250
  return {
6252
- ...(input.Key !== undefined &&
6253
- input.Key !== null && { Key: serializeAws_restJson1AttributeKey(input.Key, context) }),
6254
- ...(input.Value !== undefined &&
6255
- input.Value !== null && { Value: serializeAws_restJson1TypedAttributeValue(input.Value, context) }),
6251
+ ...(input.Key != null && { Key: serializeAws_restJson1AttributeKey(input.Key, context) }),
6252
+ ...(input.Value != null && { Value: serializeAws_restJson1TypedAttributeValue(input.Value, context) }),
6256
6253
  };
6257
6254
  };
6258
6255
  const serializeAws_restJson1AttributeKeyAndValueList = (input, context) => {
@@ -6277,9 +6274,8 @@ const serializeAws_restJson1AttributeKeyList = (input, context) => {
6277
6274
  };
6278
6275
  const serializeAws_restJson1AttributeNameAndValue = (input, context) => {
6279
6276
  return {
6280
- ...(input.AttributeName !== undefined && input.AttributeName !== null && { AttributeName: input.AttributeName }),
6281
- ...(input.Value !== undefined &&
6282
- input.Value !== null && { Value: serializeAws_restJson1TypedAttributeValue(input.Value, context) }),
6277
+ ...(input.AttributeName != null && { AttributeName: input.AttributeName }),
6278
+ ...(input.Value != null && { Value: serializeAws_restJson1TypedAttributeValue(input.Value, context) }),
6283
6279
  };
6284
6280
  };
6285
6281
  const serializeAws_restJson1AttributeNameAndValueList = (input, context) => {
@@ -6304,379 +6300,316 @@ const serializeAws_restJson1AttributeNameList = (input, context) => {
6304
6300
  };
6305
6301
  const serializeAws_restJson1BatchAddFacetToObject = (input, context) => {
6306
6302
  return {
6307
- ...(input.ObjectAttributeList !== undefined &&
6308
- input.ObjectAttributeList !== null && {
6303
+ ...(input.ObjectAttributeList != null && {
6309
6304
  ObjectAttributeList: serializeAws_restJson1AttributeKeyAndValueList(input.ObjectAttributeList, context),
6310
6305
  }),
6311
- ...(input.ObjectReference !== undefined &&
6312
- input.ObjectReference !== null && {
6306
+ ...(input.ObjectReference != null && {
6313
6307
  ObjectReference: serializeAws_restJson1ObjectReference(input.ObjectReference, context),
6314
6308
  }),
6315
- ...(input.SchemaFacet !== undefined &&
6316
- input.SchemaFacet !== null && { SchemaFacet: serializeAws_restJson1SchemaFacet(input.SchemaFacet, context) }),
6309
+ ...(input.SchemaFacet != null && { SchemaFacet: serializeAws_restJson1SchemaFacet(input.SchemaFacet, context) }),
6317
6310
  };
6318
6311
  };
6319
6312
  const serializeAws_restJson1BatchAttachObject = (input, context) => {
6320
6313
  return {
6321
- ...(input.ChildReference !== undefined &&
6322
- input.ChildReference !== null && {
6314
+ ...(input.ChildReference != null && {
6323
6315
  ChildReference: serializeAws_restJson1ObjectReference(input.ChildReference, context),
6324
6316
  }),
6325
- ...(input.LinkName !== undefined && input.LinkName !== null && { LinkName: input.LinkName }),
6326
- ...(input.ParentReference !== undefined &&
6327
- input.ParentReference !== null && {
6317
+ ...(input.LinkName != null && { LinkName: input.LinkName }),
6318
+ ...(input.ParentReference != null && {
6328
6319
  ParentReference: serializeAws_restJson1ObjectReference(input.ParentReference, context),
6329
6320
  }),
6330
6321
  };
6331
6322
  };
6332
6323
  const serializeAws_restJson1BatchAttachPolicy = (input, context) => {
6333
6324
  return {
6334
- ...(input.ObjectReference !== undefined &&
6335
- input.ObjectReference !== null && {
6325
+ ...(input.ObjectReference != null && {
6336
6326
  ObjectReference: serializeAws_restJson1ObjectReference(input.ObjectReference, context),
6337
6327
  }),
6338
- ...(input.PolicyReference !== undefined &&
6339
- input.PolicyReference !== null && {
6328
+ ...(input.PolicyReference != null && {
6340
6329
  PolicyReference: serializeAws_restJson1ObjectReference(input.PolicyReference, context),
6341
6330
  }),
6342
6331
  };
6343
6332
  };
6344
6333
  const serializeAws_restJson1BatchAttachToIndex = (input, context) => {
6345
6334
  return {
6346
- ...(input.IndexReference !== undefined &&
6347
- input.IndexReference !== null && {
6335
+ ...(input.IndexReference != null && {
6348
6336
  IndexReference: serializeAws_restJson1ObjectReference(input.IndexReference, context),
6349
6337
  }),
6350
- ...(input.TargetReference !== undefined &&
6351
- input.TargetReference !== null && {
6338
+ ...(input.TargetReference != null && {
6352
6339
  TargetReference: serializeAws_restJson1ObjectReference(input.TargetReference, context),
6353
6340
  }),
6354
6341
  };
6355
6342
  };
6356
6343
  const serializeAws_restJson1BatchAttachTypedLink = (input, context) => {
6357
6344
  return {
6358
- ...(input.Attributes !== undefined &&
6359
- input.Attributes !== null && {
6345
+ ...(input.Attributes != null && {
6360
6346
  Attributes: serializeAws_restJson1AttributeNameAndValueList(input.Attributes, context),
6361
6347
  }),
6362
- ...(input.SourceObjectReference !== undefined &&
6363
- input.SourceObjectReference !== null && {
6348
+ ...(input.SourceObjectReference != null && {
6364
6349
  SourceObjectReference: serializeAws_restJson1ObjectReference(input.SourceObjectReference, context),
6365
6350
  }),
6366
- ...(input.TargetObjectReference !== undefined &&
6367
- input.TargetObjectReference !== null && {
6351
+ ...(input.TargetObjectReference != null && {
6368
6352
  TargetObjectReference: serializeAws_restJson1ObjectReference(input.TargetObjectReference, context),
6369
6353
  }),
6370
- ...(input.TypedLinkFacet !== undefined &&
6371
- input.TypedLinkFacet !== null && {
6354
+ ...(input.TypedLinkFacet != null && {
6372
6355
  TypedLinkFacet: serializeAws_restJson1TypedLinkSchemaAndFacetName(input.TypedLinkFacet, context),
6373
6356
  }),
6374
6357
  };
6375
6358
  };
6376
6359
  const serializeAws_restJson1BatchCreateIndex = (input, context) => {
6377
6360
  return {
6378
- ...(input.BatchReferenceName !== undefined &&
6379
- input.BatchReferenceName !== null && { BatchReferenceName: input.BatchReferenceName }),
6380
- ...(input.IsUnique !== undefined && input.IsUnique !== null && { IsUnique: input.IsUnique }),
6381
- ...(input.LinkName !== undefined && input.LinkName !== null && { LinkName: input.LinkName }),
6382
- ...(input.OrderedIndexedAttributeList !== undefined &&
6383
- input.OrderedIndexedAttributeList !== null && {
6361
+ ...(input.BatchReferenceName != null && { BatchReferenceName: input.BatchReferenceName }),
6362
+ ...(input.IsUnique != null && { IsUnique: input.IsUnique }),
6363
+ ...(input.LinkName != null && { LinkName: input.LinkName }),
6364
+ ...(input.OrderedIndexedAttributeList != null && {
6384
6365
  OrderedIndexedAttributeList: serializeAws_restJson1AttributeKeyList(input.OrderedIndexedAttributeList, context),
6385
6366
  }),
6386
- ...(input.ParentReference !== undefined &&
6387
- input.ParentReference !== null && {
6367
+ ...(input.ParentReference != null && {
6388
6368
  ParentReference: serializeAws_restJson1ObjectReference(input.ParentReference, context),
6389
6369
  }),
6390
6370
  };
6391
6371
  };
6392
6372
  const serializeAws_restJson1BatchCreateObject = (input, context) => {
6393
6373
  return {
6394
- ...(input.BatchReferenceName !== undefined &&
6395
- input.BatchReferenceName !== null && { BatchReferenceName: input.BatchReferenceName }),
6396
- ...(input.LinkName !== undefined && input.LinkName !== null && { LinkName: input.LinkName }),
6397
- ...(input.ObjectAttributeList !== undefined &&
6398
- input.ObjectAttributeList !== null && {
6374
+ ...(input.BatchReferenceName != null && { BatchReferenceName: input.BatchReferenceName }),
6375
+ ...(input.LinkName != null && { LinkName: input.LinkName }),
6376
+ ...(input.ObjectAttributeList != null && {
6399
6377
  ObjectAttributeList: serializeAws_restJson1AttributeKeyAndValueList(input.ObjectAttributeList, context),
6400
6378
  }),
6401
- ...(input.ParentReference !== undefined &&
6402
- input.ParentReference !== null && {
6379
+ ...(input.ParentReference != null && {
6403
6380
  ParentReference: serializeAws_restJson1ObjectReference(input.ParentReference, context),
6404
6381
  }),
6405
- ...(input.SchemaFacet !== undefined &&
6406
- input.SchemaFacet !== null && { SchemaFacet: serializeAws_restJson1SchemaFacetList(input.SchemaFacet, context) }),
6382
+ ...(input.SchemaFacet != null && {
6383
+ SchemaFacet: serializeAws_restJson1SchemaFacetList(input.SchemaFacet, context),
6384
+ }),
6407
6385
  };
6408
6386
  };
6409
6387
  const serializeAws_restJson1BatchDeleteObject = (input, context) => {
6410
6388
  return {
6411
- ...(input.ObjectReference !== undefined &&
6412
- input.ObjectReference !== null && {
6389
+ ...(input.ObjectReference != null && {
6413
6390
  ObjectReference: serializeAws_restJson1ObjectReference(input.ObjectReference, context),
6414
6391
  }),
6415
6392
  };
6416
6393
  };
6417
6394
  const serializeAws_restJson1BatchDetachFromIndex = (input, context) => {
6418
6395
  return {
6419
- ...(input.IndexReference !== undefined &&
6420
- input.IndexReference !== null && {
6396
+ ...(input.IndexReference != null && {
6421
6397
  IndexReference: serializeAws_restJson1ObjectReference(input.IndexReference, context),
6422
6398
  }),
6423
- ...(input.TargetReference !== undefined &&
6424
- input.TargetReference !== null && {
6399
+ ...(input.TargetReference != null && {
6425
6400
  TargetReference: serializeAws_restJson1ObjectReference(input.TargetReference, context),
6426
6401
  }),
6427
6402
  };
6428
6403
  };
6429
6404
  const serializeAws_restJson1BatchDetachObject = (input, context) => {
6430
6405
  return {
6431
- ...(input.BatchReferenceName !== undefined &&
6432
- input.BatchReferenceName !== null && { BatchReferenceName: input.BatchReferenceName }),
6433
- ...(input.LinkName !== undefined && input.LinkName !== null && { LinkName: input.LinkName }),
6434
- ...(input.ParentReference !== undefined &&
6435
- input.ParentReference !== null && {
6406
+ ...(input.BatchReferenceName != null && { BatchReferenceName: input.BatchReferenceName }),
6407
+ ...(input.LinkName != null && { LinkName: input.LinkName }),
6408
+ ...(input.ParentReference != null && {
6436
6409
  ParentReference: serializeAws_restJson1ObjectReference(input.ParentReference, context),
6437
6410
  }),
6438
6411
  };
6439
6412
  };
6440
6413
  const serializeAws_restJson1BatchDetachPolicy = (input, context) => {
6441
6414
  return {
6442
- ...(input.ObjectReference !== undefined &&
6443
- input.ObjectReference !== null && {
6415
+ ...(input.ObjectReference != null && {
6444
6416
  ObjectReference: serializeAws_restJson1ObjectReference(input.ObjectReference, context),
6445
6417
  }),
6446
- ...(input.PolicyReference !== undefined &&
6447
- input.PolicyReference !== null && {
6418
+ ...(input.PolicyReference != null && {
6448
6419
  PolicyReference: serializeAws_restJson1ObjectReference(input.PolicyReference, context),
6449
6420
  }),
6450
6421
  };
6451
6422
  };
6452
6423
  const serializeAws_restJson1BatchDetachTypedLink = (input, context) => {
6453
6424
  return {
6454
- ...(input.TypedLinkSpecifier !== undefined &&
6455
- input.TypedLinkSpecifier !== null && {
6425
+ ...(input.TypedLinkSpecifier != null && {
6456
6426
  TypedLinkSpecifier: serializeAws_restJson1TypedLinkSpecifier(input.TypedLinkSpecifier, context),
6457
6427
  }),
6458
6428
  };
6459
6429
  };
6460
6430
  const serializeAws_restJson1BatchGetLinkAttributes = (input, context) => {
6461
6431
  return {
6462
- ...(input.AttributeNames !== undefined &&
6463
- input.AttributeNames !== null && {
6432
+ ...(input.AttributeNames != null && {
6464
6433
  AttributeNames: serializeAws_restJson1AttributeNameList(input.AttributeNames, context),
6465
6434
  }),
6466
- ...(input.TypedLinkSpecifier !== undefined &&
6467
- input.TypedLinkSpecifier !== null && {
6435
+ ...(input.TypedLinkSpecifier != null && {
6468
6436
  TypedLinkSpecifier: serializeAws_restJson1TypedLinkSpecifier(input.TypedLinkSpecifier, context),
6469
6437
  }),
6470
6438
  };
6471
6439
  };
6472
6440
  const serializeAws_restJson1BatchGetObjectAttributes = (input, context) => {
6473
6441
  return {
6474
- ...(input.AttributeNames !== undefined &&
6475
- input.AttributeNames !== null && {
6442
+ ...(input.AttributeNames != null && {
6476
6443
  AttributeNames: serializeAws_restJson1AttributeNameList(input.AttributeNames, context),
6477
6444
  }),
6478
- ...(input.ObjectReference !== undefined &&
6479
- input.ObjectReference !== null && {
6445
+ ...(input.ObjectReference != null && {
6480
6446
  ObjectReference: serializeAws_restJson1ObjectReference(input.ObjectReference, context),
6481
6447
  }),
6482
- ...(input.SchemaFacet !== undefined &&
6483
- input.SchemaFacet !== null && { SchemaFacet: serializeAws_restJson1SchemaFacet(input.SchemaFacet, context) }),
6448
+ ...(input.SchemaFacet != null && { SchemaFacet: serializeAws_restJson1SchemaFacet(input.SchemaFacet, context) }),
6484
6449
  };
6485
6450
  };
6486
6451
  const serializeAws_restJson1BatchGetObjectInformation = (input, context) => {
6487
6452
  return {
6488
- ...(input.ObjectReference !== undefined &&
6489
- input.ObjectReference !== null && {
6453
+ ...(input.ObjectReference != null && {
6490
6454
  ObjectReference: serializeAws_restJson1ObjectReference(input.ObjectReference, context),
6491
6455
  }),
6492
6456
  };
6493
6457
  };
6494
6458
  const serializeAws_restJson1BatchListAttachedIndices = (input, context) => {
6495
6459
  return {
6496
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
6497
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
6498
- ...(input.TargetReference !== undefined &&
6499
- input.TargetReference !== null && {
6460
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
6461
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
6462
+ ...(input.TargetReference != null && {
6500
6463
  TargetReference: serializeAws_restJson1ObjectReference(input.TargetReference, context),
6501
6464
  }),
6502
6465
  };
6503
6466
  };
6504
6467
  const serializeAws_restJson1BatchListIncomingTypedLinks = (input, context) => {
6505
6468
  return {
6506
- ...(input.FilterAttributeRanges !== undefined &&
6507
- input.FilterAttributeRanges !== null && {
6469
+ ...(input.FilterAttributeRanges != null && {
6508
6470
  FilterAttributeRanges: serializeAws_restJson1TypedLinkAttributeRangeList(input.FilterAttributeRanges, context),
6509
6471
  }),
6510
- ...(input.FilterTypedLink !== undefined &&
6511
- input.FilterTypedLink !== null && {
6472
+ ...(input.FilterTypedLink != null && {
6512
6473
  FilterTypedLink: serializeAws_restJson1TypedLinkSchemaAndFacetName(input.FilterTypedLink, context),
6513
6474
  }),
6514
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
6515
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
6516
- ...(input.ObjectReference !== undefined &&
6517
- input.ObjectReference !== null && {
6475
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
6476
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
6477
+ ...(input.ObjectReference != null && {
6518
6478
  ObjectReference: serializeAws_restJson1ObjectReference(input.ObjectReference, context),
6519
6479
  }),
6520
6480
  };
6521
6481
  };
6522
6482
  const serializeAws_restJson1BatchListIndex = (input, context) => {
6523
6483
  return {
6524
- ...(input.IndexReference !== undefined &&
6525
- input.IndexReference !== null && {
6484
+ ...(input.IndexReference != null && {
6526
6485
  IndexReference: serializeAws_restJson1ObjectReference(input.IndexReference, context),
6527
6486
  }),
6528
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
6529
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
6530
- ...(input.RangesOnIndexedValues !== undefined &&
6531
- input.RangesOnIndexedValues !== null && {
6487
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
6488
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
6489
+ ...(input.RangesOnIndexedValues != null && {
6532
6490
  RangesOnIndexedValues: serializeAws_restJson1ObjectAttributeRangeList(input.RangesOnIndexedValues, context),
6533
6491
  }),
6534
6492
  };
6535
6493
  };
6536
6494
  const serializeAws_restJson1BatchListObjectAttributes = (input, context) => {
6537
6495
  return {
6538
- ...(input.FacetFilter !== undefined &&
6539
- input.FacetFilter !== null && { FacetFilter: serializeAws_restJson1SchemaFacet(input.FacetFilter, context) }),
6540
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
6541
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
6542
- ...(input.ObjectReference !== undefined &&
6543
- input.ObjectReference !== null && {
6496
+ ...(input.FacetFilter != null && { FacetFilter: serializeAws_restJson1SchemaFacet(input.FacetFilter, context) }),
6497
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
6498
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
6499
+ ...(input.ObjectReference != null && {
6544
6500
  ObjectReference: serializeAws_restJson1ObjectReference(input.ObjectReference, context),
6545
6501
  }),
6546
6502
  };
6547
6503
  };
6548
6504
  const serializeAws_restJson1BatchListObjectChildren = (input, context) => {
6549
6505
  return {
6550
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
6551
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
6552
- ...(input.ObjectReference !== undefined &&
6553
- input.ObjectReference !== null && {
6506
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
6507
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
6508
+ ...(input.ObjectReference != null && {
6554
6509
  ObjectReference: serializeAws_restJson1ObjectReference(input.ObjectReference, context),
6555
6510
  }),
6556
6511
  };
6557
6512
  };
6558
6513
  const serializeAws_restJson1BatchListObjectParentPaths = (input, context) => {
6559
6514
  return {
6560
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
6561
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
6562
- ...(input.ObjectReference !== undefined &&
6563
- input.ObjectReference !== null && {
6515
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
6516
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
6517
+ ...(input.ObjectReference != null && {
6564
6518
  ObjectReference: serializeAws_restJson1ObjectReference(input.ObjectReference, context),
6565
6519
  }),
6566
6520
  };
6567
6521
  };
6568
6522
  const serializeAws_restJson1BatchListObjectParents = (input, context) => {
6569
6523
  return {
6570
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
6571
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
6572
- ...(input.ObjectReference !== undefined &&
6573
- input.ObjectReference !== null && {
6524
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
6525
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
6526
+ ...(input.ObjectReference != null && {
6574
6527
  ObjectReference: serializeAws_restJson1ObjectReference(input.ObjectReference, context),
6575
6528
  }),
6576
6529
  };
6577
6530
  };
6578
6531
  const serializeAws_restJson1BatchListObjectPolicies = (input, context) => {
6579
6532
  return {
6580
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
6581
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
6582
- ...(input.ObjectReference !== undefined &&
6583
- input.ObjectReference !== null && {
6533
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
6534
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
6535
+ ...(input.ObjectReference != null && {
6584
6536
  ObjectReference: serializeAws_restJson1ObjectReference(input.ObjectReference, context),
6585
6537
  }),
6586
6538
  };
6587
6539
  };
6588
6540
  const serializeAws_restJson1BatchListOutgoingTypedLinks = (input, context) => {
6589
6541
  return {
6590
- ...(input.FilterAttributeRanges !== undefined &&
6591
- input.FilterAttributeRanges !== null && {
6542
+ ...(input.FilterAttributeRanges != null && {
6592
6543
  FilterAttributeRanges: serializeAws_restJson1TypedLinkAttributeRangeList(input.FilterAttributeRanges, context),
6593
6544
  }),
6594
- ...(input.FilterTypedLink !== undefined &&
6595
- input.FilterTypedLink !== null && {
6545
+ ...(input.FilterTypedLink != null && {
6596
6546
  FilterTypedLink: serializeAws_restJson1TypedLinkSchemaAndFacetName(input.FilterTypedLink, context),
6597
6547
  }),
6598
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
6599
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
6600
- ...(input.ObjectReference !== undefined &&
6601
- input.ObjectReference !== null && {
6548
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
6549
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
6550
+ ...(input.ObjectReference != null && {
6602
6551
  ObjectReference: serializeAws_restJson1ObjectReference(input.ObjectReference, context),
6603
6552
  }),
6604
6553
  };
6605
6554
  };
6606
6555
  const serializeAws_restJson1BatchListPolicyAttachments = (input, context) => {
6607
6556
  return {
6608
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
6609
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
6610
- ...(input.PolicyReference !== undefined &&
6611
- input.PolicyReference !== null && {
6557
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
6558
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
6559
+ ...(input.PolicyReference != null && {
6612
6560
  PolicyReference: serializeAws_restJson1ObjectReference(input.PolicyReference, context),
6613
6561
  }),
6614
6562
  };
6615
6563
  };
6616
6564
  const serializeAws_restJson1BatchLookupPolicy = (input, context) => {
6617
6565
  return {
6618
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
6619
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
6620
- ...(input.ObjectReference !== undefined &&
6621
- input.ObjectReference !== null && {
6566
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
6567
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
6568
+ ...(input.ObjectReference != null && {
6622
6569
  ObjectReference: serializeAws_restJson1ObjectReference(input.ObjectReference, context),
6623
6570
  }),
6624
6571
  };
6625
6572
  };
6626
6573
  const serializeAws_restJson1BatchReadOperation = (input, context) => {
6627
6574
  return {
6628
- ...(input.GetLinkAttributes !== undefined &&
6629
- input.GetLinkAttributes !== null && {
6575
+ ...(input.GetLinkAttributes != null && {
6630
6576
  GetLinkAttributes: serializeAws_restJson1BatchGetLinkAttributes(input.GetLinkAttributes, context),
6631
6577
  }),
6632
- ...(input.GetObjectAttributes !== undefined &&
6633
- input.GetObjectAttributes !== null && {
6578
+ ...(input.GetObjectAttributes != null && {
6634
6579
  GetObjectAttributes: serializeAws_restJson1BatchGetObjectAttributes(input.GetObjectAttributes, context),
6635
6580
  }),
6636
- ...(input.GetObjectInformation !== undefined &&
6637
- input.GetObjectInformation !== null && {
6581
+ ...(input.GetObjectInformation != null && {
6638
6582
  GetObjectInformation: serializeAws_restJson1BatchGetObjectInformation(input.GetObjectInformation, context),
6639
6583
  }),
6640
- ...(input.ListAttachedIndices !== undefined &&
6641
- input.ListAttachedIndices !== null && {
6584
+ ...(input.ListAttachedIndices != null && {
6642
6585
  ListAttachedIndices: serializeAws_restJson1BatchListAttachedIndices(input.ListAttachedIndices, context),
6643
6586
  }),
6644
- ...(input.ListIncomingTypedLinks !== undefined &&
6645
- input.ListIncomingTypedLinks !== null && {
6587
+ ...(input.ListIncomingTypedLinks != null && {
6646
6588
  ListIncomingTypedLinks: serializeAws_restJson1BatchListIncomingTypedLinks(input.ListIncomingTypedLinks, context),
6647
6589
  }),
6648
- ...(input.ListIndex !== undefined &&
6649
- input.ListIndex !== null && { ListIndex: serializeAws_restJson1BatchListIndex(input.ListIndex, context) }),
6650
- ...(input.ListObjectAttributes !== undefined &&
6651
- input.ListObjectAttributes !== null && {
6590
+ ...(input.ListIndex != null && { ListIndex: serializeAws_restJson1BatchListIndex(input.ListIndex, context) }),
6591
+ ...(input.ListObjectAttributes != null && {
6652
6592
  ListObjectAttributes: serializeAws_restJson1BatchListObjectAttributes(input.ListObjectAttributes, context),
6653
6593
  }),
6654
- ...(input.ListObjectChildren !== undefined &&
6655
- input.ListObjectChildren !== null && {
6594
+ ...(input.ListObjectChildren != null && {
6656
6595
  ListObjectChildren: serializeAws_restJson1BatchListObjectChildren(input.ListObjectChildren, context),
6657
6596
  }),
6658
- ...(input.ListObjectParentPaths !== undefined &&
6659
- input.ListObjectParentPaths !== null && {
6597
+ ...(input.ListObjectParentPaths != null && {
6660
6598
  ListObjectParentPaths: serializeAws_restJson1BatchListObjectParentPaths(input.ListObjectParentPaths, context),
6661
6599
  }),
6662
- ...(input.ListObjectParents !== undefined &&
6663
- input.ListObjectParents !== null && {
6600
+ ...(input.ListObjectParents != null && {
6664
6601
  ListObjectParents: serializeAws_restJson1BatchListObjectParents(input.ListObjectParents, context),
6665
6602
  }),
6666
- ...(input.ListObjectPolicies !== undefined &&
6667
- input.ListObjectPolicies !== null && {
6603
+ ...(input.ListObjectPolicies != null && {
6668
6604
  ListObjectPolicies: serializeAws_restJson1BatchListObjectPolicies(input.ListObjectPolicies, context),
6669
6605
  }),
6670
- ...(input.ListOutgoingTypedLinks !== undefined &&
6671
- input.ListOutgoingTypedLinks !== null && {
6606
+ ...(input.ListOutgoingTypedLinks != null && {
6672
6607
  ListOutgoingTypedLinks: serializeAws_restJson1BatchListOutgoingTypedLinks(input.ListOutgoingTypedLinks, context),
6673
6608
  }),
6674
- ...(input.ListPolicyAttachments !== undefined &&
6675
- input.ListPolicyAttachments !== null && {
6609
+ ...(input.ListPolicyAttachments != null && {
6676
6610
  ListPolicyAttachments: serializeAws_restJson1BatchListPolicyAttachments(input.ListPolicyAttachments, context),
6677
6611
  }),
6678
- ...(input.LookupPolicy !== undefined &&
6679
- input.LookupPolicy !== null && {
6612
+ ...(input.LookupPolicy != null && {
6680
6613
  LookupPolicy: serializeAws_restJson1BatchLookupPolicy(input.LookupPolicy, context),
6681
6614
  }),
6682
6615
  };
@@ -6693,98 +6626,77 @@ const serializeAws_restJson1BatchReadOperationList = (input, context) => {
6693
6626
  };
6694
6627
  const serializeAws_restJson1BatchRemoveFacetFromObject = (input, context) => {
6695
6628
  return {
6696
- ...(input.ObjectReference !== undefined &&
6697
- input.ObjectReference !== null && {
6629
+ ...(input.ObjectReference != null && {
6698
6630
  ObjectReference: serializeAws_restJson1ObjectReference(input.ObjectReference, context),
6699
6631
  }),
6700
- ...(input.SchemaFacet !== undefined &&
6701
- input.SchemaFacet !== null && { SchemaFacet: serializeAws_restJson1SchemaFacet(input.SchemaFacet, context) }),
6632
+ ...(input.SchemaFacet != null && { SchemaFacet: serializeAws_restJson1SchemaFacet(input.SchemaFacet, context) }),
6702
6633
  };
6703
6634
  };
6704
6635
  const serializeAws_restJson1BatchUpdateLinkAttributes = (input, context) => {
6705
6636
  return {
6706
- ...(input.AttributeUpdates !== undefined &&
6707
- input.AttributeUpdates !== null && {
6637
+ ...(input.AttributeUpdates != null && {
6708
6638
  AttributeUpdates: serializeAws_restJson1LinkAttributeUpdateList(input.AttributeUpdates, context),
6709
6639
  }),
6710
- ...(input.TypedLinkSpecifier !== undefined &&
6711
- input.TypedLinkSpecifier !== null && {
6640
+ ...(input.TypedLinkSpecifier != null && {
6712
6641
  TypedLinkSpecifier: serializeAws_restJson1TypedLinkSpecifier(input.TypedLinkSpecifier, context),
6713
6642
  }),
6714
6643
  };
6715
6644
  };
6716
6645
  const serializeAws_restJson1BatchUpdateObjectAttributes = (input, context) => {
6717
6646
  return {
6718
- ...(input.AttributeUpdates !== undefined &&
6719
- input.AttributeUpdates !== null && {
6647
+ ...(input.AttributeUpdates != null && {
6720
6648
  AttributeUpdates: serializeAws_restJson1ObjectAttributeUpdateList(input.AttributeUpdates, context),
6721
6649
  }),
6722
- ...(input.ObjectReference !== undefined &&
6723
- input.ObjectReference !== null && {
6650
+ ...(input.ObjectReference != null && {
6724
6651
  ObjectReference: serializeAws_restJson1ObjectReference(input.ObjectReference, context),
6725
6652
  }),
6726
6653
  };
6727
6654
  };
6728
6655
  const serializeAws_restJson1BatchWriteOperation = (input, context) => {
6729
6656
  return {
6730
- ...(input.AddFacetToObject !== undefined &&
6731
- input.AddFacetToObject !== null && {
6657
+ ...(input.AddFacetToObject != null && {
6732
6658
  AddFacetToObject: serializeAws_restJson1BatchAddFacetToObject(input.AddFacetToObject, context),
6733
6659
  }),
6734
- ...(input.AttachObject !== undefined &&
6735
- input.AttachObject !== null && {
6660
+ ...(input.AttachObject != null && {
6736
6661
  AttachObject: serializeAws_restJson1BatchAttachObject(input.AttachObject, context),
6737
6662
  }),
6738
- ...(input.AttachPolicy !== undefined &&
6739
- input.AttachPolicy !== null && {
6663
+ ...(input.AttachPolicy != null && {
6740
6664
  AttachPolicy: serializeAws_restJson1BatchAttachPolicy(input.AttachPolicy, context),
6741
6665
  }),
6742
- ...(input.AttachToIndex !== undefined &&
6743
- input.AttachToIndex !== null && {
6666
+ ...(input.AttachToIndex != null && {
6744
6667
  AttachToIndex: serializeAws_restJson1BatchAttachToIndex(input.AttachToIndex, context),
6745
6668
  }),
6746
- ...(input.AttachTypedLink !== undefined &&
6747
- input.AttachTypedLink !== null && {
6669
+ ...(input.AttachTypedLink != null && {
6748
6670
  AttachTypedLink: serializeAws_restJson1BatchAttachTypedLink(input.AttachTypedLink, context),
6749
6671
  }),
6750
- ...(input.CreateIndex !== undefined &&
6751
- input.CreateIndex !== null && {
6672
+ ...(input.CreateIndex != null && {
6752
6673
  CreateIndex: serializeAws_restJson1BatchCreateIndex(input.CreateIndex, context),
6753
6674
  }),
6754
- ...(input.CreateObject !== undefined &&
6755
- input.CreateObject !== null && {
6675
+ ...(input.CreateObject != null && {
6756
6676
  CreateObject: serializeAws_restJson1BatchCreateObject(input.CreateObject, context),
6757
6677
  }),
6758
- ...(input.DeleteObject !== undefined &&
6759
- input.DeleteObject !== null && {
6678
+ ...(input.DeleteObject != null && {
6760
6679
  DeleteObject: serializeAws_restJson1BatchDeleteObject(input.DeleteObject, context),
6761
6680
  }),
6762
- ...(input.DetachFromIndex !== undefined &&
6763
- input.DetachFromIndex !== null && {
6681
+ ...(input.DetachFromIndex != null && {
6764
6682
  DetachFromIndex: serializeAws_restJson1BatchDetachFromIndex(input.DetachFromIndex, context),
6765
6683
  }),
6766
- ...(input.DetachObject !== undefined &&
6767
- input.DetachObject !== null && {
6684
+ ...(input.DetachObject != null && {
6768
6685
  DetachObject: serializeAws_restJson1BatchDetachObject(input.DetachObject, context),
6769
6686
  }),
6770
- ...(input.DetachPolicy !== undefined &&
6771
- input.DetachPolicy !== null && {
6687
+ ...(input.DetachPolicy != null && {
6772
6688
  DetachPolicy: serializeAws_restJson1BatchDetachPolicy(input.DetachPolicy, context),
6773
6689
  }),
6774
- ...(input.DetachTypedLink !== undefined &&
6775
- input.DetachTypedLink !== null && {
6690
+ ...(input.DetachTypedLink != null && {
6776
6691
  DetachTypedLink: serializeAws_restJson1BatchDetachTypedLink(input.DetachTypedLink, context),
6777
6692
  }),
6778
- ...(input.RemoveFacetFromObject !== undefined &&
6779
- input.RemoveFacetFromObject !== null && {
6693
+ ...(input.RemoveFacetFromObject != null && {
6780
6694
  RemoveFacetFromObject: serializeAws_restJson1BatchRemoveFacetFromObject(input.RemoveFacetFromObject, context),
6781
6695
  }),
6782
- ...(input.UpdateLinkAttributes !== undefined &&
6783
- input.UpdateLinkAttributes !== null && {
6696
+ ...(input.UpdateLinkAttributes != null && {
6784
6697
  UpdateLinkAttributes: serializeAws_restJson1BatchUpdateLinkAttributes(input.UpdateLinkAttributes, context),
6785
6698
  }),
6786
- ...(input.UpdateObjectAttributes !== undefined &&
6787
- input.UpdateObjectAttributes !== null && {
6699
+ ...(input.UpdateObjectAttributes != null && {
6788
6700
  UpdateObjectAttributes: serializeAws_restJson1BatchUpdateObjectAttributes(input.UpdateObjectAttributes, context),
6789
6701
  }),
6790
6702
  };
@@ -6801,29 +6713,24 @@ const serializeAws_restJson1BatchWriteOperationList = (input, context) => {
6801
6713
  };
6802
6714
  const serializeAws_restJson1FacetAttribute = (input, context) => {
6803
6715
  return {
6804
- ...(input.AttributeDefinition !== undefined &&
6805
- input.AttributeDefinition !== null && {
6716
+ ...(input.AttributeDefinition != null && {
6806
6717
  AttributeDefinition: serializeAws_restJson1FacetAttributeDefinition(input.AttributeDefinition, context),
6807
6718
  }),
6808
- ...(input.AttributeReference !== undefined &&
6809
- input.AttributeReference !== null && {
6719
+ ...(input.AttributeReference != null && {
6810
6720
  AttributeReference: serializeAws_restJson1FacetAttributeReference(input.AttributeReference, context),
6811
6721
  }),
6812
- ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
6813
- ...(input.RequiredBehavior !== undefined &&
6814
- input.RequiredBehavior !== null && { RequiredBehavior: input.RequiredBehavior }),
6722
+ ...(input.Name != null && { Name: input.Name }),
6723
+ ...(input.RequiredBehavior != null && { RequiredBehavior: input.RequiredBehavior }),
6815
6724
  };
6816
6725
  };
6817
6726
  const serializeAws_restJson1FacetAttributeDefinition = (input, context) => {
6818
6727
  return {
6819
- ...(input.DefaultValue !== undefined &&
6820
- input.DefaultValue !== null && {
6728
+ ...(input.DefaultValue != null && {
6821
6729
  DefaultValue: serializeAws_restJson1TypedAttributeValue(input.DefaultValue, context),
6822
6730
  }),
6823
- ...(input.IsImmutable !== undefined && input.IsImmutable !== null && { IsImmutable: input.IsImmutable }),
6824
- ...(input.Rules !== undefined &&
6825
- input.Rules !== null && { Rules: serializeAws_restJson1RuleMap(input.Rules, context) }),
6826
- ...(input.Type !== undefined && input.Type !== null && { Type: input.Type }),
6731
+ ...(input.IsImmutable != null && { IsImmutable: input.IsImmutable }),
6732
+ ...(input.Rules != null && { Rules: serializeAws_restJson1RuleMap(input.Rules, context) }),
6733
+ ...(input.Type != null && { Type: input.Type }),
6827
6734
  };
6828
6735
  };
6829
6736
  const serializeAws_restJson1FacetAttributeList = (input, context) => {
@@ -6838,17 +6745,14 @@ const serializeAws_restJson1FacetAttributeList = (input, context) => {
6838
6745
  };
6839
6746
  const serializeAws_restJson1FacetAttributeReference = (input, context) => {
6840
6747
  return {
6841
- ...(input.TargetAttributeName !== undefined &&
6842
- input.TargetAttributeName !== null && { TargetAttributeName: input.TargetAttributeName }),
6843
- ...(input.TargetFacetName !== undefined &&
6844
- input.TargetFacetName !== null && { TargetFacetName: input.TargetFacetName }),
6748
+ ...(input.TargetAttributeName != null && { TargetAttributeName: input.TargetAttributeName }),
6749
+ ...(input.TargetFacetName != null && { TargetFacetName: input.TargetFacetName }),
6845
6750
  };
6846
6751
  };
6847
6752
  const serializeAws_restJson1FacetAttributeUpdate = (input, context) => {
6848
6753
  return {
6849
- ...(input.Action !== undefined && input.Action !== null && { Action: input.Action }),
6850
- ...(input.Attribute !== undefined &&
6851
- input.Attribute !== null && { Attribute: serializeAws_restJson1FacetAttribute(input.Attribute, context) }),
6754
+ ...(input.Action != null && { Action: input.Action }),
6755
+ ...(input.Attribute != null && { Attribute: serializeAws_restJson1FacetAttribute(input.Attribute, context) }),
6852
6756
  };
6853
6757
  };
6854
6758
  const serializeAws_restJson1FacetAttributeUpdateList = (input, context) => {
@@ -6863,22 +6767,20 @@ const serializeAws_restJson1FacetAttributeUpdateList = (input, context) => {
6863
6767
  };
6864
6768
  const serializeAws_restJson1LinkAttributeAction = (input, context) => {
6865
6769
  return {
6866
- ...(input.AttributeActionType !== undefined &&
6867
- input.AttributeActionType !== null && { AttributeActionType: input.AttributeActionType }),
6868
- ...(input.AttributeUpdateValue !== undefined &&
6869
- input.AttributeUpdateValue !== null && {
6770
+ ...(input.AttributeActionType != null && { AttributeActionType: input.AttributeActionType }),
6771
+ ...(input.AttributeUpdateValue != null && {
6870
6772
  AttributeUpdateValue: serializeAws_restJson1TypedAttributeValue(input.AttributeUpdateValue, context),
6871
6773
  }),
6872
6774
  };
6873
6775
  };
6874
6776
  const serializeAws_restJson1LinkAttributeUpdate = (input, context) => {
6875
6777
  return {
6876
- ...(input.AttributeAction !== undefined &&
6877
- input.AttributeAction !== null && {
6778
+ ...(input.AttributeAction != null && {
6878
6779
  AttributeAction: serializeAws_restJson1LinkAttributeAction(input.AttributeAction, context),
6879
6780
  }),
6880
- ...(input.AttributeKey !== undefined &&
6881
- input.AttributeKey !== null && { AttributeKey: serializeAws_restJson1AttributeKey(input.AttributeKey, context) }),
6781
+ ...(input.AttributeKey != null && {
6782
+ AttributeKey: serializeAws_restJson1AttributeKey(input.AttributeKey, context),
6783
+ }),
6882
6784
  };
6883
6785
  };
6884
6786
  const serializeAws_restJson1LinkAttributeUpdateList = (input, context) => {
@@ -6893,20 +6795,18 @@ const serializeAws_restJson1LinkAttributeUpdateList = (input, context) => {
6893
6795
  };
6894
6796
  const serializeAws_restJson1ObjectAttributeAction = (input, context) => {
6895
6797
  return {
6896
- ...(input.ObjectAttributeActionType !== undefined &&
6897
- input.ObjectAttributeActionType !== null && { ObjectAttributeActionType: input.ObjectAttributeActionType }),
6898
- ...(input.ObjectAttributeUpdateValue !== undefined &&
6899
- input.ObjectAttributeUpdateValue !== null && {
6798
+ ...(input.ObjectAttributeActionType != null && { ObjectAttributeActionType: input.ObjectAttributeActionType }),
6799
+ ...(input.ObjectAttributeUpdateValue != null && {
6900
6800
  ObjectAttributeUpdateValue: serializeAws_restJson1TypedAttributeValue(input.ObjectAttributeUpdateValue, context),
6901
6801
  }),
6902
6802
  };
6903
6803
  };
6904
6804
  const serializeAws_restJson1ObjectAttributeRange = (input, context) => {
6905
6805
  return {
6906
- ...(input.AttributeKey !== undefined &&
6907
- input.AttributeKey !== null && { AttributeKey: serializeAws_restJson1AttributeKey(input.AttributeKey, context) }),
6908
- ...(input.Range !== undefined &&
6909
- input.Range !== null && { Range: serializeAws_restJson1TypedAttributeValueRange(input.Range, context) }),
6806
+ ...(input.AttributeKey != null && {
6807
+ AttributeKey: serializeAws_restJson1AttributeKey(input.AttributeKey, context),
6808
+ }),
6809
+ ...(input.Range != null && { Range: serializeAws_restJson1TypedAttributeValueRange(input.Range, context) }),
6910
6810
  };
6911
6811
  };
6912
6812
  const serializeAws_restJson1ObjectAttributeRangeList = (input, context) => {
@@ -6921,12 +6821,10 @@ const serializeAws_restJson1ObjectAttributeRangeList = (input, context) => {
6921
6821
  };
6922
6822
  const serializeAws_restJson1ObjectAttributeUpdate = (input, context) => {
6923
6823
  return {
6924
- ...(input.ObjectAttributeAction !== undefined &&
6925
- input.ObjectAttributeAction !== null && {
6824
+ ...(input.ObjectAttributeAction != null && {
6926
6825
  ObjectAttributeAction: serializeAws_restJson1ObjectAttributeAction(input.ObjectAttributeAction, context),
6927
6826
  }),
6928
- ...(input.ObjectAttributeKey !== undefined &&
6929
- input.ObjectAttributeKey !== null && {
6827
+ ...(input.ObjectAttributeKey != null && {
6930
6828
  ObjectAttributeKey: serializeAws_restJson1AttributeKey(input.ObjectAttributeKey, context),
6931
6829
  }),
6932
6830
  };
@@ -6943,14 +6841,13 @@ const serializeAws_restJson1ObjectAttributeUpdateList = (input, context) => {
6943
6841
  };
6944
6842
  const serializeAws_restJson1ObjectReference = (input, context) => {
6945
6843
  return {
6946
- ...(input.Selector !== undefined && input.Selector !== null && { Selector: input.Selector }),
6844
+ ...(input.Selector != null && { Selector: input.Selector }),
6947
6845
  };
6948
6846
  };
6949
6847
  const serializeAws_restJson1Rule = (input, context) => {
6950
6848
  return {
6951
- ...(input.Parameters !== undefined &&
6952
- input.Parameters !== null && { Parameters: serializeAws_restJson1RuleParameterMap(input.Parameters, context) }),
6953
- ...(input.Type !== undefined && input.Type !== null && { Type: input.Type }),
6849
+ ...(input.Parameters != null && { Parameters: serializeAws_restJson1RuleParameterMap(input.Parameters, context) }),
6850
+ ...(input.Type != null && { Type: input.Type }),
6954
6851
  };
6955
6852
  };
6956
6853
  const serializeAws_restJson1RuleMap = (input, context) => {
@@ -6977,8 +6874,8 @@ const serializeAws_restJson1RuleParameterMap = (input, context) => {
6977
6874
  };
6978
6875
  const serializeAws_restJson1SchemaFacet = (input, context) => {
6979
6876
  return {
6980
- ...(input.FacetName !== undefined && input.FacetName !== null && { FacetName: input.FacetName }),
6981
- ...(input.SchemaArn !== undefined && input.SchemaArn !== null && { SchemaArn: input.SchemaArn }),
6877
+ ...(input.FacetName != null && { FacetName: input.FacetName }),
6878
+ ...(input.SchemaArn != null && { SchemaArn: input.SchemaArn }),
6982
6879
  };
6983
6880
  };
6984
6881
  const serializeAws_restJson1SchemaFacetList = (input, context) => {
@@ -6993,8 +6890,8 @@ const serializeAws_restJson1SchemaFacetList = (input, context) => {
6993
6890
  };
6994
6891
  const serializeAws_restJson1Tag = (input, context) => {
6995
6892
  return {
6996
- ...(input.Key !== undefined && input.Key !== null && { Key: input.Key }),
6997
- ...(input.Value !== undefined && input.Value !== null && { Value: input.Value }),
6893
+ ...(input.Key != null && { Key: input.Key }),
6894
+ ...(input.Value != null && { Value: input.Value }),
6998
6895
  };
6999
6896
  };
7000
6897
  const serializeAws_restJson1TagKeyList = (input, context) => {
@@ -7029,29 +6926,24 @@ const serializeAws_restJson1TypedAttributeValue = (input, context) => {
7029
6926
  };
7030
6927
  const serializeAws_restJson1TypedAttributeValueRange = (input, context) => {
7031
6928
  return {
7032
- ...(input.EndMode !== undefined && input.EndMode !== null && { EndMode: input.EndMode }),
7033
- ...(input.EndValue !== undefined &&
7034
- input.EndValue !== null && { EndValue: serializeAws_restJson1TypedAttributeValue(input.EndValue, context) }),
7035
- ...(input.StartMode !== undefined && input.StartMode !== null && { StartMode: input.StartMode }),
7036
- ...(input.StartValue !== undefined &&
7037
- input.StartValue !== null && {
6929
+ ...(input.EndMode != null && { EndMode: input.EndMode }),
6930
+ ...(input.EndValue != null && { EndValue: serializeAws_restJson1TypedAttributeValue(input.EndValue, context) }),
6931
+ ...(input.StartMode != null && { StartMode: input.StartMode }),
6932
+ ...(input.StartValue != null && {
7038
6933
  StartValue: serializeAws_restJson1TypedAttributeValue(input.StartValue, context),
7039
6934
  }),
7040
6935
  };
7041
6936
  };
7042
6937
  const serializeAws_restJson1TypedLinkAttributeDefinition = (input, context) => {
7043
6938
  return {
7044
- ...(input.DefaultValue !== undefined &&
7045
- input.DefaultValue !== null && {
6939
+ ...(input.DefaultValue != null && {
7046
6940
  DefaultValue: serializeAws_restJson1TypedAttributeValue(input.DefaultValue, context),
7047
6941
  }),
7048
- ...(input.IsImmutable !== undefined && input.IsImmutable !== null && { IsImmutable: input.IsImmutable }),
7049
- ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
7050
- ...(input.RequiredBehavior !== undefined &&
7051
- input.RequiredBehavior !== null && { RequiredBehavior: input.RequiredBehavior }),
7052
- ...(input.Rules !== undefined &&
7053
- input.Rules !== null && { Rules: serializeAws_restJson1RuleMap(input.Rules, context) }),
7054
- ...(input.Type !== undefined && input.Type !== null && { Type: input.Type }),
6942
+ ...(input.IsImmutable != null && { IsImmutable: input.IsImmutable }),
6943
+ ...(input.Name != null && { Name: input.Name }),
6944
+ ...(input.RequiredBehavior != null && { RequiredBehavior: input.RequiredBehavior }),
6945
+ ...(input.Rules != null && { Rules: serializeAws_restJson1RuleMap(input.Rules, context) }),
6946
+ ...(input.Type != null && { Type: input.Type }),
7055
6947
  };
7056
6948
  };
7057
6949
  const serializeAws_restJson1TypedLinkAttributeDefinitionList = (input, context) => {
@@ -7066,9 +6958,8 @@ const serializeAws_restJson1TypedLinkAttributeDefinitionList = (input, context)
7066
6958
  };
7067
6959
  const serializeAws_restJson1TypedLinkAttributeRange = (input, context) => {
7068
6960
  return {
7069
- ...(input.AttributeName !== undefined && input.AttributeName !== null && { AttributeName: input.AttributeName }),
7070
- ...(input.Range !== undefined &&
7071
- input.Range !== null && { Range: serializeAws_restJson1TypedAttributeValueRange(input.Range, context) }),
6961
+ ...(input.AttributeName != null && { AttributeName: input.AttributeName }),
6962
+ ...(input.Range != null && { Range: serializeAws_restJson1TypedAttributeValueRange(input.Range, context) }),
7072
6963
  };
7073
6964
  };
7074
6965
  const serializeAws_restJson1TypedLinkAttributeRangeList = (input, context) => {
@@ -7083,22 +6974,19 @@ const serializeAws_restJson1TypedLinkAttributeRangeList = (input, context) => {
7083
6974
  };
7084
6975
  const serializeAws_restJson1TypedLinkFacet = (input, context) => {
7085
6976
  return {
7086
- ...(input.Attributes !== undefined &&
7087
- input.Attributes !== null && {
6977
+ ...(input.Attributes != null && {
7088
6978
  Attributes: serializeAws_restJson1TypedLinkAttributeDefinitionList(input.Attributes, context),
7089
6979
  }),
7090
- ...(input.IdentityAttributeOrder !== undefined &&
7091
- input.IdentityAttributeOrder !== null && {
6980
+ ...(input.IdentityAttributeOrder != null && {
7092
6981
  IdentityAttributeOrder: serializeAws_restJson1AttributeNameList(input.IdentityAttributeOrder, context),
7093
6982
  }),
7094
- ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
6983
+ ...(input.Name != null && { Name: input.Name }),
7095
6984
  };
7096
6985
  };
7097
6986
  const serializeAws_restJson1TypedLinkFacetAttributeUpdate = (input, context) => {
7098
6987
  return {
7099
- ...(input.Action !== undefined && input.Action !== null && { Action: input.Action }),
7100
- ...(input.Attribute !== undefined &&
7101
- input.Attribute !== null && {
6988
+ ...(input.Action != null && { Action: input.Action }),
6989
+ ...(input.Attribute != null && {
7102
6990
  Attribute: serializeAws_restJson1TypedLinkAttributeDefinition(input.Attribute, context),
7103
6991
  }),
7104
6992
  };
@@ -7115,26 +7003,22 @@ const serializeAws_restJson1TypedLinkFacetAttributeUpdateList = (input, context)
7115
7003
  };
7116
7004
  const serializeAws_restJson1TypedLinkSchemaAndFacetName = (input, context) => {
7117
7005
  return {
7118
- ...(input.SchemaArn !== undefined && input.SchemaArn !== null && { SchemaArn: input.SchemaArn }),
7119
- ...(input.TypedLinkName !== undefined && input.TypedLinkName !== null && { TypedLinkName: input.TypedLinkName }),
7006
+ ...(input.SchemaArn != null && { SchemaArn: input.SchemaArn }),
7007
+ ...(input.TypedLinkName != null && { TypedLinkName: input.TypedLinkName }),
7120
7008
  };
7121
7009
  };
7122
7010
  const serializeAws_restJson1TypedLinkSpecifier = (input, context) => {
7123
7011
  return {
7124
- ...(input.IdentityAttributeValues !== undefined &&
7125
- input.IdentityAttributeValues !== null && {
7012
+ ...(input.IdentityAttributeValues != null && {
7126
7013
  IdentityAttributeValues: serializeAws_restJson1AttributeNameAndValueList(input.IdentityAttributeValues, context),
7127
7014
  }),
7128
- ...(input.SourceObjectReference !== undefined &&
7129
- input.SourceObjectReference !== null && {
7015
+ ...(input.SourceObjectReference != null && {
7130
7016
  SourceObjectReference: serializeAws_restJson1ObjectReference(input.SourceObjectReference, context),
7131
7017
  }),
7132
- ...(input.TargetObjectReference !== undefined &&
7133
- input.TargetObjectReference !== null && {
7018
+ ...(input.TargetObjectReference != null && {
7134
7019
  TargetObjectReference: serializeAws_restJson1ObjectReference(input.TargetObjectReference, context),
7135
7020
  }),
7136
- ...(input.TypedLinkFacet !== undefined &&
7137
- input.TypedLinkFacet !== null && {
7021
+ ...(input.TypedLinkFacet != null && {
7138
7022
  TypedLinkFacet: serializeAws_restJson1TypedLinkSchemaAndFacetName(input.TypedLinkFacet, context),
7139
7023
  }),
7140
7024
  };
@@ -7159,10 +7043,8 @@ const deserializeAws_restJson1AttributeKey = (output, context) => {
7159
7043
  };
7160
7044
  const deserializeAws_restJson1AttributeKeyAndValue = (output, context) => {
7161
7045
  return {
7162
- Key: output.Key !== undefined && output.Key !== null
7163
- ? deserializeAws_restJson1AttributeKey(output.Key, context)
7164
- : undefined,
7165
- Value: output.Value !== undefined && output.Value !== null
7046
+ Key: output.Key != null ? deserializeAws_restJson1AttributeKey(output.Key, context) : undefined,
7047
+ Value: output.Value != null
7166
7048
  ? deserializeAws_restJson1TypedAttributeValue((0, smithy_client_1.expectUnion)(output.Value), context)
7167
7049
  : undefined,
7168
7050
  };
@@ -7181,7 +7063,7 @@ const deserializeAws_restJson1AttributeKeyAndValueList = (output, context) => {
7181
7063
  const deserializeAws_restJson1AttributeNameAndValue = (output, context) => {
7182
7064
  return {
7183
7065
  AttributeName: (0, smithy_client_1.expectString)(output.AttributeName),
7184
- Value: output.Value !== undefined && output.Value !== null
7066
+ Value: output.Value != null
7185
7067
  ? deserializeAws_restJson1TypedAttributeValue((0, smithy_client_1.expectUnion)(output.Value), context)
7186
7068
  : undefined,
7187
7069
  };
@@ -7226,7 +7108,7 @@ const deserializeAws_restJson1BatchAttachToIndexResponse = (output, context) =>
7226
7108
  };
7227
7109
  const deserializeAws_restJson1BatchAttachTypedLinkResponse = (output, context) => {
7228
7110
  return {
7229
- TypedLinkSpecifier: output.TypedLinkSpecifier !== undefined && output.TypedLinkSpecifier !== null
7111
+ TypedLinkSpecifier: output.TypedLinkSpecifier != null
7230
7112
  ? deserializeAws_restJson1TypedLinkSpecifier(output.TypedLinkSpecifier, context)
7231
7113
  : undefined,
7232
7114
  };
@@ -7262,14 +7144,14 @@ const deserializeAws_restJson1BatchDetachTypedLinkResponse = (output, context) =
7262
7144
  };
7263
7145
  const deserializeAws_restJson1BatchGetLinkAttributesResponse = (output, context) => {
7264
7146
  return {
7265
- Attributes: output.Attributes !== undefined && output.Attributes !== null
7147
+ Attributes: output.Attributes != null
7266
7148
  ? deserializeAws_restJson1AttributeKeyAndValueList(output.Attributes, context)
7267
7149
  : undefined,
7268
7150
  };
7269
7151
  };
7270
7152
  const deserializeAws_restJson1BatchGetObjectAttributesResponse = (output, context) => {
7271
7153
  return {
7272
- Attributes: output.Attributes !== undefined && output.Attributes !== null
7154
+ Attributes: output.Attributes != null
7273
7155
  ? deserializeAws_restJson1AttributeKeyAndValueList(output.Attributes, context)
7274
7156
  : undefined,
7275
7157
  };
@@ -7277,14 +7159,12 @@ const deserializeAws_restJson1BatchGetObjectAttributesResponse = (output, contex
7277
7159
  const deserializeAws_restJson1BatchGetObjectInformationResponse = (output, context) => {
7278
7160
  return {
7279
7161
  ObjectIdentifier: (0, smithy_client_1.expectString)(output.ObjectIdentifier),
7280
- SchemaFacets: output.SchemaFacets !== undefined && output.SchemaFacets !== null
7281
- ? deserializeAws_restJson1SchemaFacetList(output.SchemaFacets, context)
7282
- : undefined,
7162
+ SchemaFacets: output.SchemaFacets != null ? deserializeAws_restJson1SchemaFacetList(output.SchemaFacets, context) : undefined,
7283
7163
  };
7284
7164
  };
7285
7165
  const deserializeAws_restJson1BatchListAttachedIndicesResponse = (output, context) => {
7286
7166
  return {
7287
- IndexAttachments: output.IndexAttachments !== undefined && output.IndexAttachments !== null
7167
+ IndexAttachments: output.IndexAttachments != null
7288
7168
  ? deserializeAws_restJson1IndexAttachmentList(output.IndexAttachments, context)
7289
7169
  : undefined,
7290
7170
  NextToken: (0, smithy_client_1.expectString)(output.NextToken),
@@ -7292,7 +7172,7 @@ const deserializeAws_restJson1BatchListAttachedIndicesResponse = (output, contex
7292
7172
  };
7293
7173
  const deserializeAws_restJson1BatchListIncomingTypedLinksResponse = (output, context) => {
7294
7174
  return {
7295
- LinkSpecifiers: output.LinkSpecifiers !== undefined && output.LinkSpecifiers !== null
7175
+ LinkSpecifiers: output.LinkSpecifiers != null
7296
7176
  ? deserializeAws_restJson1TypedLinkSpecifierList(output.LinkSpecifiers, context)
7297
7177
  : undefined,
7298
7178
  NextToken: (0, smithy_client_1.expectString)(output.NextToken),
@@ -7300,7 +7180,7 @@ const deserializeAws_restJson1BatchListIncomingTypedLinksResponse = (output, con
7300
7180
  };
7301
7181
  const deserializeAws_restJson1BatchListIndexResponse = (output, context) => {
7302
7182
  return {
7303
- IndexAttachments: output.IndexAttachments !== undefined && output.IndexAttachments !== null
7183
+ IndexAttachments: output.IndexAttachments != null
7304
7184
  ? deserializeAws_restJson1IndexAttachmentList(output.IndexAttachments, context)
7305
7185
  : undefined,
7306
7186
  NextToken: (0, smithy_client_1.expectString)(output.NextToken),
@@ -7308,7 +7188,7 @@ const deserializeAws_restJson1BatchListIndexResponse = (output, context) => {
7308
7188
  };
7309
7189
  const deserializeAws_restJson1BatchListObjectAttributesResponse = (output, context) => {
7310
7190
  return {
7311
- Attributes: output.Attributes !== undefined && output.Attributes !== null
7191
+ Attributes: output.Attributes != null
7312
7192
  ? deserializeAws_restJson1AttributeKeyAndValueList(output.Attributes, context)
7313
7193
  : undefined,
7314
7194
  NextToken: (0, smithy_client_1.expectString)(output.NextToken),
@@ -7316,7 +7196,7 @@ const deserializeAws_restJson1BatchListObjectAttributesResponse = (output, conte
7316
7196
  };
7317
7197
  const deserializeAws_restJson1BatchListObjectChildrenResponse = (output, context) => {
7318
7198
  return {
7319
- Children: output.Children !== undefined && output.Children !== null
7199
+ Children: output.Children != null
7320
7200
  ? deserializeAws_restJson1LinkNameToObjectIdentifierMap(output.Children, context)
7321
7201
  : undefined,
7322
7202
  NextToken: (0, smithy_client_1.expectString)(output.NextToken),
@@ -7325,7 +7205,7 @@ const deserializeAws_restJson1BatchListObjectChildrenResponse = (output, context
7325
7205
  const deserializeAws_restJson1BatchListObjectParentPathsResponse = (output, context) => {
7326
7206
  return {
7327
7207
  NextToken: (0, smithy_client_1.expectString)(output.NextToken),
7328
- PathToObjectIdentifiersList: output.PathToObjectIdentifiersList !== undefined && output.PathToObjectIdentifiersList !== null
7208
+ PathToObjectIdentifiersList: output.PathToObjectIdentifiersList != null
7329
7209
  ? deserializeAws_restJson1PathToObjectIdentifiersList(output.PathToObjectIdentifiersList, context)
7330
7210
  : undefined,
7331
7211
  };
@@ -7333,14 +7213,14 @@ const deserializeAws_restJson1BatchListObjectParentPathsResponse = (output, cont
7333
7213
  const deserializeAws_restJson1BatchListObjectParentsResponse = (output, context) => {
7334
7214
  return {
7335
7215
  NextToken: (0, smithy_client_1.expectString)(output.NextToken),
7336
- ParentLinks: output.ParentLinks !== undefined && output.ParentLinks !== null
7216
+ ParentLinks: output.ParentLinks != null
7337
7217
  ? deserializeAws_restJson1ObjectIdentifierAndLinkNameList(output.ParentLinks, context)
7338
7218
  : undefined,
7339
7219
  };
7340
7220
  };
7341
7221
  const deserializeAws_restJson1BatchListObjectPoliciesResponse = (output, context) => {
7342
7222
  return {
7343
- AttachedPolicyIds: output.AttachedPolicyIds !== undefined && output.AttachedPolicyIds !== null
7223
+ AttachedPolicyIds: output.AttachedPolicyIds != null
7344
7224
  ? deserializeAws_restJson1ObjectIdentifierList(output.AttachedPolicyIds, context)
7345
7225
  : undefined,
7346
7226
  NextToken: (0, smithy_client_1.expectString)(output.NextToken),
@@ -7349,7 +7229,7 @@ const deserializeAws_restJson1BatchListObjectPoliciesResponse = (output, context
7349
7229
  const deserializeAws_restJson1BatchListOutgoingTypedLinksResponse = (output, context) => {
7350
7230
  return {
7351
7231
  NextToken: (0, smithy_client_1.expectString)(output.NextToken),
7352
- TypedLinkSpecifiers: output.TypedLinkSpecifiers !== undefined && output.TypedLinkSpecifiers !== null
7232
+ TypedLinkSpecifiers: output.TypedLinkSpecifiers != null
7353
7233
  ? deserializeAws_restJson1TypedLinkSpecifierList(output.TypedLinkSpecifiers, context)
7354
7234
  : undefined,
7355
7235
  };
@@ -7357,7 +7237,7 @@ const deserializeAws_restJson1BatchListOutgoingTypedLinksResponse = (output, con
7357
7237
  const deserializeAws_restJson1BatchListPolicyAttachmentsResponse = (output, context) => {
7358
7238
  return {
7359
7239
  NextToken: (0, smithy_client_1.expectString)(output.NextToken),
7360
- ObjectIdentifiers: output.ObjectIdentifiers !== undefined && output.ObjectIdentifiers !== null
7240
+ ObjectIdentifiers: output.ObjectIdentifiers != null
7361
7241
  ? deserializeAws_restJson1ObjectIdentifierList(output.ObjectIdentifiers, context)
7362
7242
  : undefined,
7363
7243
  };
@@ -7365,7 +7245,7 @@ const deserializeAws_restJson1BatchListPolicyAttachmentsResponse = (output, cont
7365
7245
  const deserializeAws_restJson1BatchLookupPolicyResponse = (output, context) => {
7366
7246
  return {
7367
7247
  NextToken: (0, smithy_client_1.expectString)(output.NextToken),
7368
- PolicyToPathList: output.PolicyToPathList !== undefined && output.PolicyToPathList !== null
7248
+ PolicyToPathList: output.PolicyToPathList != null
7369
7249
  ? deserializeAws_restJson1PolicyToPathList(output.PolicyToPathList, context)
7370
7250
  : undefined,
7371
7251
  };
@@ -7378,10 +7258,10 @@ const deserializeAws_restJson1BatchReadException = (output, context) => {
7378
7258
  };
7379
7259
  const deserializeAws_restJson1BatchReadOperationResponse = (output, context) => {
7380
7260
  return {
7381
- ExceptionResponse: output.ExceptionResponse !== undefined && output.ExceptionResponse !== null
7261
+ ExceptionResponse: output.ExceptionResponse != null
7382
7262
  ? deserializeAws_restJson1BatchReadException(output.ExceptionResponse, context)
7383
7263
  : undefined,
7384
- SuccessfulResponse: output.SuccessfulResponse !== undefined && output.SuccessfulResponse !== null
7264
+ SuccessfulResponse: output.SuccessfulResponse != null
7385
7265
  ? deserializeAws_restJson1BatchReadSuccessfulResponse(output.SuccessfulResponse, context)
7386
7266
  : undefined,
7387
7267
  };
@@ -7399,46 +7279,44 @@ const deserializeAws_restJson1BatchReadOperationResponseList = (output, context)
7399
7279
  };
7400
7280
  const deserializeAws_restJson1BatchReadSuccessfulResponse = (output, context) => {
7401
7281
  return {
7402
- GetLinkAttributes: output.GetLinkAttributes !== undefined && output.GetLinkAttributes !== null
7282
+ GetLinkAttributes: output.GetLinkAttributes != null
7403
7283
  ? deserializeAws_restJson1BatchGetLinkAttributesResponse(output.GetLinkAttributes, context)
7404
7284
  : undefined,
7405
- GetObjectAttributes: output.GetObjectAttributes !== undefined && output.GetObjectAttributes !== null
7285
+ GetObjectAttributes: output.GetObjectAttributes != null
7406
7286
  ? deserializeAws_restJson1BatchGetObjectAttributesResponse(output.GetObjectAttributes, context)
7407
7287
  : undefined,
7408
- GetObjectInformation: output.GetObjectInformation !== undefined && output.GetObjectInformation !== null
7288
+ GetObjectInformation: output.GetObjectInformation != null
7409
7289
  ? deserializeAws_restJson1BatchGetObjectInformationResponse(output.GetObjectInformation, context)
7410
7290
  : undefined,
7411
- ListAttachedIndices: output.ListAttachedIndices !== undefined && output.ListAttachedIndices !== null
7291
+ ListAttachedIndices: output.ListAttachedIndices != null
7412
7292
  ? deserializeAws_restJson1BatchListAttachedIndicesResponse(output.ListAttachedIndices, context)
7413
7293
  : undefined,
7414
- ListIncomingTypedLinks: output.ListIncomingTypedLinks !== undefined && output.ListIncomingTypedLinks !== null
7294
+ ListIncomingTypedLinks: output.ListIncomingTypedLinks != null
7415
7295
  ? deserializeAws_restJson1BatchListIncomingTypedLinksResponse(output.ListIncomingTypedLinks, context)
7416
7296
  : undefined,
7417
- ListIndex: output.ListIndex !== undefined && output.ListIndex !== null
7418
- ? deserializeAws_restJson1BatchListIndexResponse(output.ListIndex, context)
7419
- : undefined,
7420
- ListObjectAttributes: output.ListObjectAttributes !== undefined && output.ListObjectAttributes !== null
7297
+ ListIndex: output.ListIndex != null ? deserializeAws_restJson1BatchListIndexResponse(output.ListIndex, context) : undefined,
7298
+ ListObjectAttributes: output.ListObjectAttributes != null
7421
7299
  ? deserializeAws_restJson1BatchListObjectAttributesResponse(output.ListObjectAttributes, context)
7422
7300
  : undefined,
7423
- ListObjectChildren: output.ListObjectChildren !== undefined && output.ListObjectChildren !== null
7301
+ ListObjectChildren: output.ListObjectChildren != null
7424
7302
  ? deserializeAws_restJson1BatchListObjectChildrenResponse(output.ListObjectChildren, context)
7425
7303
  : undefined,
7426
- ListObjectParentPaths: output.ListObjectParentPaths !== undefined && output.ListObjectParentPaths !== null
7304
+ ListObjectParentPaths: output.ListObjectParentPaths != null
7427
7305
  ? deserializeAws_restJson1BatchListObjectParentPathsResponse(output.ListObjectParentPaths, context)
7428
7306
  : undefined,
7429
- ListObjectParents: output.ListObjectParents !== undefined && output.ListObjectParents !== null
7307
+ ListObjectParents: output.ListObjectParents != null
7430
7308
  ? deserializeAws_restJson1BatchListObjectParentsResponse(output.ListObjectParents, context)
7431
7309
  : undefined,
7432
- ListObjectPolicies: output.ListObjectPolicies !== undefined && output.ListObjectPolicies !== null
7310
+ ListObjectPolicies: output.ListObjectPolicies != null
7433
7311
  ? deserializeAws_restJson1BatchListObjectPoliciesResponse(output.ListObjectPolicies, context)
7434
7312
  : undefined,
7435
- ListOutgoingTypedLinks: output.ListOutgoingTypedLinks !== undefined && output.ListOutgoingTypedLinks !== null
7313
+ ListOutgoingTypedLinks: output.ListOutgoingTypedLinks != null
7436
7314
  ? deserializeAws_restJson1BatchListOutgoingTypedLinksResponse(output.ListOutgoingTypedLinks, context)
7437
7315
  : undefined,
7438
- ListPolicyAttachments: output.ListPolicyAttachments !== undefined && output.ListPolicyAttachments !== null
7316
+ ListPolicyAttachments: output.ListPolicyAttachments != null
7439
7317
  ? deserializeAws_restJson1BatchListPolicyAttachmentsResponse(output.ListPolicyAttachments, context)
7440
7318
  : undefined,
7441
- LookupPolicy: output.LookupPolicy !== undefined && output.LookupPolicy !== null
7319
+ LookupPolicy: output.LookupPolicy != null
7442
7320
  ? deserializeAws_restJson1BatchLookupPolicyResponse(output.LookupPolicy, context)
7443
7321
  : undefined,
7444
7322
  };
@@ -7456,49 +7334,49 @@ const deserializeAws_restJson1BatchUpdateObjectAttributesResponse = (output, con
7456
7334
  };
7457
7335
  const deserializeAws_restJson1BatchWriteOperationResponse = (output, context) => {
7458
7336
  return {
7459
- AddFacetToObject: output.AddFacetToObject !== undefined && output.AddFacetToObject !== null
7337
+ AddFacetToObject: output.AddFacetToObject != null
7460
7338
  ? deserializeAws_restJson1BatchAddFacetToObjectResponse(output.AddFacetToObject, context)
7461
7339
  : undefined,
7462
- AttachObject: output.AttachObject !== undefined && output.AttachObject !== null
7340
+ AttachObject: output.AttachObject != null
7463
7341
  ? deserializeAws_restJson1BatchAttachObjectResponse(output.AttachObject, context)
7464
7342
  : undefined,
7465
- AttachPolicy: output.AttachPolicy !== undefined && output.AttachPolicy !== null
7343
+ AttachPolicy: output.AttachPolicy != null
7466
7344
  ? deserializeAws_restJson1BatchAttachPolicyResponse(output.AttachPolicy, context)
7467
7345
  : undefined,
7468
- AttachToIndex: output.AttachToIndex !== undefined && output.AttachToIndex !== null
7346
+ AttachToIndex: output.AttachToIndex != null
7469
7347
  ? deserializeAws_restJson1BatchAttachToIndexResponse(output.AttachToIndex, context)
7470
7348
  : undefined,
7471
- AttachTypedLink: output.AttachTypedLink !== undefined && output.AttachTypedLink !== null
7349
+ AttachTypedLink: output.AttachTypedLink != null
7472
7350
  ? deserializeAws_restJson1BatchAttachTypedLinkResponse(output.AttachTypedLink, context)
7473
7351
  : undefined,
7474
- CreateIndex: output.CreateIndex !== undefined && output.CreateIndex !== null
7352
+ CreateIndex: output.CreateIndex != null
7475
7353
  ? deserializeAws_restJson1BatchCreateIndexResponse(output.CreateIndex, context)
7476
7354
  : undefined,
7477
- CreateObject: output.CreateObject !== undefined && output.CreateObject !== null
7355
+ CreateObject: output.CreateObject != null
7478
7356
  ? deserializeAws_restJson1BatchCreateObjectResponse(output.CreateObject, context)
7479
7357
  : undefined,
7480
- DeleteObject: output.DeleteObject !== undefined && output.DeleteObject !== null
7358
+ DeleteObject: output.DeleteObject != null
7481
7359
  ? deserializeAws_restJson1BatchDeleteObjectResponse(output.DeleteObject, context)
7482
7360
  : undefined,
7483
- DetachFromIndex: output.DetachFromIndex !== undefined && output.DetachFromIndex !== null
7361
+ DetachFromIndex: output.DetachFromIndex != null
7484
7362
  ? deserializeAws_restJson1BatchDetachFromIndexResponse(output.DetachFromIndex, context)
7485
7363
  : undefined,
7486
- DetachObject: output.DetachObject !== undefined && output.DetachObject !== null
7364
+ DetachObject: output.DetachObject != null
7487
7365
  ? deserializeAws_restJson1BatchDetachObjectResponse(output.DetachObject, context)
7488
7366
  : undefined,
7489
- DetachPolicy: output.DetachPolicy !== undefined && output.DetachPolicy !== null
7367
+ DetachPolicy: output.DetachPolicy != null
7490
7368
  ? deserializeAws_restJson1BatchDetachPolicyResponse(output.DetachPolicy, context)
7491
7369
  : undefined,
7492
- DetachTypedLink: output.DetachTypedLink !== undefined && output.DetachTypedLink !== null
7370
+ DetachTypedLink: output.DetachTypedLink != null
7493
7371
  ? deserializeAws_restJson1BatchDetachTypedLinkResponse(output.DetachTypedLink, context)
7494
7372
  : undefined,
7495
- RemoveFacetFromObject: output.RemoveFacetFromObject !== undefined && output.RemoveFacetFromObject !== null
7373
+ RemoveFacetFromObject: output.RemoveFacetFromObject != null
7496
7374
  ? deserializeAws_restJson1BatchRemoveFacetFromObjectResponse(output.RemoveFacetFromObject, context)
7497
7375
  : undefined,
7498
- UpdateLinkAttributes: output.UpdateLinkAttributes !== undefined && output.UpdateLinkAttributes !== null
7376
+ UpdateLinkAttributes: output.UpdateLinkAttributes != null
7499
7377
  ? deserializeAws_restJson1BatchUpdateLinkAttributesResponse(output.UpdateLinkAttributes, context)
7500
7378
  : undefined,
7501
- UpdateObjectAttributes: output.UpdateObjectAttributes !== undefined && output.UpdateObjectAttributes !== null
7379
+ UpdateObjectAttributes: output.UpdateObjectAttributes != null
7502
7380
  ? deserializeAws_restJson1BatchUpdateObjectAttributesResponse(output.UpdateObjectAttributes, context)
7503
7381
  : undefined,
7504
7382
  };
@@ -7516,7 +7394,7 @@ const deserializeAws_restJson1BatchWriteOperationResponseList = (output, context
7516
7394
  };
7517
7395
  const deserializeAws_restJson1Directory = (output, context) => {
7518
7396
  return {
7519
- CreationDateTime: output.CreationDateTime !== undefined && output.CreationDateTime !== null
7397
+ CreationDateTime: output.CreationDateTime != null
7520
7398
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreationDateTime)))
7521
7399
  : undefined,
7522
7400
  DirectoryArn: (0, smithy_client_1.expectString)(output.DirectoryArn),
@@ -7544,10 +7422,10 @@ const deserializeAws_restJson1Facet = (output, context) => {
7544
7422
  };
7545
7423
  const deserializeAws_restJson1FacetAttribute = (output, context) => {
7546
7424
  return {
7547
- AttributeDefinition: output.AttributeDefinition !== undefined && output.AttributeDefinition !== null
7425
+ AttributeDefinition: output.AttributeDefinition != null
7548
7426
  ? deserializeAws_restJson1FacetAttributeDefinition(output.AttributeDefinition, context)
7549
7427
  : undefined,
7550
- AttributeReference: output.AttributeReference !== undefined && output.AttributeReference !== null
7428
+ AttributeReference: output.AttributeReference != null
7551
7429
  ? deserializeAws_restJson1FacetAttributeReference(output.AttributeReference, context)
7552
7430
  : undefined,
7553
7431
  Name: (0, smithy_client_1.expectString)(output.Name),
@@ -7556,13 +7434,11 @@ const deserializeAws_restJson1FacetAttribute = (output, context) => {
7556
7434
  };
7557
7435
  const deserializeAws_restJson1FacetAttributeDefinition = (output, context) => {
7558
7436
  return {
7559
- DefaultValue: output.DefaultValue !== undefined && output.DefaultValue !== null
7437
+ DefaultValue: output.DefaultValue != null
7560
7438
  ? deserializeAws_restJson1TypedAttributeValue((0, smithy_client_1.expectUnion)(output.DefaultValue), context)
7561
7439
  : undefined,
7562
7440
  IsImmutable: (0, smithy_client_1.expectBoolean)(output.IsImmutable),
7563
- Rules: output.Rules !== undefined && output.Rules !== null
7564
- ? deserializeAws_restJson1RuleMap(output.Rules, context)
7565
- : undefined,
7441
+ Rules: output.Rules != null ? deserializeAws_restJson1RuleMap(output.Rules, context) : undefined,
7566
7442
  Type: (0, smithy_client_1.expectString)(output.Type),
7567
7443
  };
7568
7444
  };
@@ -7596,7 +7472,7 @@ const deserializeAws_restJson1FacetNameList = (output, context) => {
7596
7472
  };
7597
7473
  const deserializeAws_restJson1IndexAttachment = (output, context) => {
7598
7474
  return {
7599
- IndexedAttributes: output.IndexedAttributes !== undefined && output.IndexedAttributes !== null
7475
+ IndexedAttributes: output.IndexedAttributes != null
7600
7476
  ? deserializeAws_restJson1AttributeKeyAndValueList(output.IndexedAttributes, context)
7601
7477
  : undefined,
7602
7478
  ObjectIdentifier: (0, smithy_client_1.expectString)(output.ObjectIdentifier),
@@ -7670,7 +7546,7 @@ const deserializeAws_restJson1ObjectReference = (output, context) => {
7670
7546
  };
7671
7547
  const deserializeAws_restJson1PathToObjectIdentifiers = (output, context) => {
7672
7548
  return {
7673
- ObjectIdentifiers: output.ObjectIdentifiers !== undefined && output.ObjectIdentifiers !== null
7549
+ ObjectIdentifiers: output.ObjectIdentifiers != null
7674
7550
  ? deserializeAws_restJson1ObjectIdentifierList(output.ObjectIdentifiers, context)
7675
7551
  : undefined,
7676
7552
  Path: (0, smithy_client_1.expectString)(output.Path),
@@ -7708,9 +7584,7 @@ const deserializeAws_restJson1PolicyAttachmentList = (output, context) => {
7708
7584
  const deserializeAws_restJson1PolicyToPath = (output, context) => {
7709
7585
  return {
7710
7586
  Path: (0, smithy_client_1.expectString)(output.Path),
7711
- Policies: output.Policies !== undefined && output.Policies !== null
7712
- ? deserializeAws_restJson1PolicyAttachmentList(output.Policies, context)
7713
- : undefined,
7587
+ Policies: output.Policies != null ? deserializeAws_restJson1PolicyAttachmentList(output.Policies, context) : undefined,
7714
7588
  };
7715
7589
  };
7716
7590
  const deserializeAws_restJson1PolicyToPathList = (output, context) => {
@@ -7726,9 +7600,7 @@ const deserializeAws_restJson1PolicyToPathList = (output, context) => {
7726
7600
  };
7727
7601
  const deserializeAws_restJson1Rule = (output, context) => {
7728
7602
  return {
7729
- Parameters: output.Parameters !== undefined && output.Parameters !== null
7730
- ? deserializeAws_restJson1RuleParameterMap(output.Parameters, context)
7731
- : undefined,
7603
+ Parameters: output.Parameters != null ? deserializeAws_restJson1RuleParameterMap(output.Parameters, context) : undefined,
7732
7604
  Type: (0, smithy_client_1.expectString)(output.Type),
7733
7605
  };
7734
7606
  };
@@ -7812,15 +7684,13 @@ const deserializeAws_restJson1TypedAttributeValue = (output, context) => {
7812
7684
  };
7813
7685
  const deserializeAws_restJson1TypedLinkAttributeDefinition = (output, context) => {
7814
7686
  return {
7815
- DefaultValue: output.DefaultValue !== undefined && output.DefaultValue !== null
7687
+ DefaultValue: output.DefaultValue != null
7816
7688
  ? deserializeAws_restJson1TypedAttributeValue((0, smithy_client_1.expectUnion)(output.DefaultValue), context)
7817
7689
  : undefined,
7818
7690
  IsImmutable: (0, smithy_client_1.expectBoolean)(output.IsImmutable),
7819
7691
  Name: (0, smithy_client_1.expectString)(output.Name),
7820
7692
  RequiredBehavior: (0, smithy_client_1.expectString)(output.RequiredBehavior),
7821
- Rules: output.Rules !== undefined && output.Rules !== null
7822
- ? deserializeAws_restJson1RuleMap(output.Rules, context)
7823
- : undefined,
7693
+ Rules: output.Rules != null ? deserializeAws_restJson1RuleMap(output.Rules, context) : undefined,
7824
7694
  Type: (0, smithy_client_1.expectString)(output.Type),
7825
7695
  };
7826
7696
  };
@@ -7854,16 +7724,16 @@ const deserializeAws_restJson1TypedLinkSchemaAndFacetName = (output, context) =>
7854
7724
  };
7855
7725
  const deserializeAws_restJson1TypedLinkSpecifier = (output, context) => {
7856
7726
  return {
7857
- IdentityAttributeValues: output.IdentityAttributeValues !== undefined && output.IdentityAttributeValues !== null
7727
+ IdentityAttributeValues: output.IdentityAttributeValues != null
7858
7728
  ? deserializeAws_restJson1AttributeNameAndValueList(output.IdentityAttributeValues, context)
7859
7729
  : undefined,
7860
- SourceObjectReference: output.SourceObjectReference !== undefined && output.SourceObjectReference !== null
7730
+ SourceObjectReference: output.SourceObjectReference != null
7861
7731
  ? deserializeAws_restJson1ObjectReference(output.SourceObjectReference, context)
7862
7732
  : undefined,
7863
- TargetObjectReference: output.TargetObjectReference !== undefined && output.TargetObjectReference !== null
7733
+ TargetObjectReference: output.TargetObjectReference != null
7864
7734
  ? deserializeAws_restJson1ObjectReference(output.TargetObjectReference, context)
7865
7735
  : undefined,
7866
- TypedLinkFacet: output.TypedLinkFacet !== undefined && output.TypedLinkFacet !== null
7736
+ TypedLinkFacet: output.TypedLinkFacet != null
7867
7737
  ? deserializeAws_restJson1TypedLinkSchemaAndFacetName(output.TypedLinkFacet, context)
7868
7738
  : undefined,
7869
7739
  };
@@ -7928,5 +7798,4 @@ const loadRestJsonErrorCode = (output, data) => {
7928
7798
  if (data["__type"] !== undefined) {
7929
7799
  return sanitizeErrorCode(data["__type"]);
7930
7800
  }
7931
- return "";
7932
7801
  };