@aws-sdk/client-ram 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.
@@ -13,9 +13,8 @@ const serializeAws_restJson1AcceptResourceShareInvitationCommand = async (input,
13
13
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/acceptresourceshareinvitation";
14
14
  let body;
15
15
  body = JSON.stringify({
16
- ...(input.clientToken !== undefined && input.clientToken !== null && { clientToken: input.clientToken }),
17
- ...(input.resourceShareInvitationArn !== undefined &&
18
- input.resourceShareInvitationArn !== null && { resourceShareInvitationArn: input.resourceShareInvitationArn }),
16
+ ...(input.clientToken != null && { clientToken: input.clientToken }),
17
+ ...(input.resourceShareInvitationArn != null && { resourceShareInvitationArn: input.resourceShareInvitationArn }),
19
18
  });
20
19
  return new protocol_http_1.HttpRequest({
21
20
  protocol,
@@ -36,17 +35,14 @@ const serializeAws_restJson1AssociateResourceShareCommand = async (input, contex
36
35
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/associateresourceshare";
37
36
  let body;
38
37
  body = JSON.stringify({
39
- ...(input.clientToken !== undefined && input.clientToken !== null && { clientToken: input.clientToken }),
40
- ...(input.principals !== undefined &&
41
- input.principals !== null && {
38
+ ...(input.clientToken != null && { clientToken: input.clientToken }),
39
+ ...(input.principals != null && {
42
40
  principals: serializeAws_restJson1PrincipalArnOrIdList(input.principals, context),
43
41
  }),
44
- ...(input.resourceArns !== undefined &&
45
- input.resourceArns !== null && {
42
+ ...(input.resourceArns != null && {
46
43
  resourceArns: serializeAws_restJson1ResourceArnList(input.resourceArns, context),
47
44
  }),
48
- ...(input.resourceShareArn !== undefined &&
49
- input.resourceShareArn !== null && { resourceShareArn: input.resourceShareArn }),
45
+ ...(input.resourceShareArn != null && { resourceShareArn: input.resourceShareArn }),
50
46
  });
51
47
  return new protocol_http_1.HttpRequest({
52
48
  protocol,
@@ -67,13 +63,11 @@ const serializeAws_restJson1AssociateResourceSharePermissionCommand = async (inp
67
63
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/associateresourcesharepermission";
68
64
  let body;
69
65
  body = JSON.stringify({
70
- ...(input.clientToken !== undefined && input.clientToken !== null && { clientToken: input.clientToken }),
71
- ...(input.permissionArn !== undefined && input.permissionArn !== null && { permissionArn: input.permissionArn }),
72
- ...(input.permissionVersion !== undefined &&
73
- input.permissionVersion !== null && { permissionVersion: input.permissionVersion }),
74
- ...(input.replace !== undefined && input.replace !== null && { replace: input.replace }),
75
- ...(input.resourceShareArn !== undefined &&
76
- input.resourceShareArn !== null && { resourceShareArn: input.resourceShareArn }),
66
+ ...(input.clientToken != null && { clientToken: input.clientToken }),
67
+ ...(input.permissionArn != null && { permissionArn: input.permissionArn }),
68
+ ...(input.permissionVersion != null && { permissionVersion: input.permissionVersion }),
69
+ ...(input.replace != null && { replace: input.replace }),
70
+ ...(input.resourceShareArn != null && { resourceShareArn: input.resourceShareArn }),
77
71
  });
78
72
  return new protocol_http_1.HttpRequest({
79
73
  protocol,
@@ -94,24 +88,19 @@ const serializeAws_restJson1CreateResourceShareCommand = async (input, context)
94
88
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/createresourceshare";
95
89
  let body;
96
90
  body = JSON.stringify({
97
- ...(input.allowExternalPrincipals !== undefined &&
98
- input.allowExternalPrincipals !== null && { allowExternalPrincipals: input.allowExternalPrincipals }),
99
- ...(input.clientToken !== undefined && input.clientToken !== null && { clientToken: input.clientToken }),
100
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
101
- ...(input.permissionArns !== undefined &&
102
- input.permissionArns !== null && {
91
+ ...(input.allowExternalPrincipals != null && { allowExternalPrincipals: input.allowExternalPrincipals }),
92
+ ...(input.clientToken != null && { clientToken: input.clientToken }),
93
+ ...(input.name != null && { name: input.name }),
94
+ ...(input.permissionArns != null && {
103
95
  permissionArns: serializeAws_restJson1PermissionArnList(input.permissionArns, context),
104
96
  }),
105
- ...(input.principals !== undefined &&
106
- input.principals !== null && {
97
+ ...(input.principals != null && {
107
98
  principals: serializeAws_restJson1PrincipalArnOrIdList(input.principals, context),
108
99
  }),
109
- ...(input.resourceArns !== undefined &&
110
- input.resourceArns !== null && {
100
+ ...(input.resourceArns != null && {
111
101
  resourceArns: serializeAws_restJson1ResourceArnList(input.resourceArns, context),
112
102
  }),
113
- ...(input.tags !== undefined &&
114
- input.tags !== null && { tags: serializeAws_restJson1TagList(input.tags, context) }),
103
+ ...(input.tags != null && { tags: serializeAws_restJson1TagList(input.tags, context) }),
115
104
  });
116
105
  return new protocol_http_1.HttpRequest({
117
106
  protocol,
@@ -153,17 +142,14 @@ const serializeAws_restJson1DisassociateResourceShareCommand = async (input, con
153
142
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/disassociateresourceshare";
154
143
  let body;
155
144
  body = JSON.stringify({
156
- ...(input.clientToken !== undefined && input.clientToken !== null && { clientToken: input.clientToken }),
157
- ...(input.principals !== undefined &&
158
- input.principals !== null && {
145
+ ...(input.clientToken != null && { clientToken: input.clientToken }),
146
+ ...(input.principals != null && {
159
147
  principals: serializeAws_restJson1PrincipalArnOrIdList(input.principals, context),
160
148
  }),
161
- ...(input.resourceArns !== undefined &&
162
- input.resourceArns !== null && {
149
+ ...(input.resourceArns != null && {
163
150
  resourceArns: serializeAws_restJson1ResourceArnList(input.resourceArns, context),
164
151
  }),
165
- ...(input.resourceShareArn !== undefined &&
166
- input.resourceShareArn !== null && { resourceShareArn: input.resourceShareArn }),
152
+ ...(input.resourceShareArn != null && { resourceShareArn: input.resourceShareArn }),
167
153
  });
168
154
  return new protocol_http_1.HttpRequest({
169
155
  protocol,
@@ -184,10 +170,9 @@ const serializeAws_restJson1DisassociateResourceSharePermissionCommand = async (
184
170
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/disassociateresourcesharepermission";
185
171
  let body;
186
172
  body = JSON.stringify({
187
- ...(input.clientToken !== undefined && input.clientToken !== null && { clientToken: input.clientToken }),
188
- ...(input.permissionArn !== undefined && input.permissionArn !== null && { permissionArn: input.permissionArn }),
189
- ...(input.resourceShareArn !== undefined &&
190
- input.resourceShareArn !== null && { resourceShareArn: input.resourceShareArn }),
173
+ ...(input.clientToken != null && { clientToken: input.clientToken }),
174
+ ...(input.permissionArn != null && { permissionArn: input.permissionArn }),
175
+ ...(input.resourceShareArn != null && { resourceShareArn: input.resourceShareArn }),
191
176
  });
192
177
  return new protocol_http_1.HttpRequest({
193
178
  protocol,
@@ -227,9 +212,8 @@ const serializeAws_restJson1GetPermissionCommand = async (input, context) => {
227
212
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/getpermission";
228
213
  let body;
229
214
  body = JSON.stringify({
230
- ...(input.permissionArn !== undefined && input.permissionArn !== null && { permissionArn: input.permissionArn }),
231
- ...(input.permissionVersion !== undefined &&
232
- input.permissionVersion !== null && { permissionVersion: input.permissionVersion }),
215
+ ...(input.permissionArn != null && { permissionArn: input.permissionArn }),
216
+ ...(input.permissionVersion != null && { permissionVersion: input.permissionVersion }),
233
217
  });
234
218
  return new protocol_http_1.HttpRequest({
235
219
  protocol,
@@ -250,11 +234,10 @@ const serializeAws_restJson1GetResourcePoliciesCommand = async (input, context)
250
234
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/getresourcepolicies";
251
235
  let body;
252
236
  body = JSON.stringify({
253
- ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
254
- ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
255
- ...(input.principal !== undefined && input.principal !== null && { principal: input.principal }),
256
- ...(input.resourceArns !== undefined &&
257
- input.resourceArns !== null && {
237
+ ...(input.maxResults != null && { maxResults: input.maxResults }),
238
+ ...(input.nextToken != null && { nextToken: input.nextToken }),
239
+ ...(input.principal != null && { principal: input.principal }),
240
+ ...(input.resourceArns != null && {
258
241
  resourceArns: serializeAws_restJson1ResourceArnList(input.resourceArns, context),
259
242
  }),
260
243
  });
@@ -277,16 +260,13 @@ const serializeAws_restJson1GetResourceShareAssociationsCommand = async (input,
277
260
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/getresourceshareassociations";
278
261
  let body;
279
262
  body = JSON.stringify({
280
- ...(input.associationStatus !== undefined &&
281
- input.associationStatus !== null && { associationStatus: input.associationStatus }),
282
- ...(input.associationType !== undefined &&
283
- input.associationType !== null && { associationType: input.associationType }),
284
- ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
285
- ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
286
- ...(input.principal !== undefined && input.principal !== null && { principal: input.principal }),
287
- ...(input.resourceArn !== undefined && input.resourceArn !== null && { resourceArn: input.resourceArn }),
288
- ...(input.resourceShareArns !== undefined &&
289
- input.resourceShareArns !== null && {
263
+ ...(input.associationStatus != null && { associationStatus: input.associationStatus }),
264
+ ...(input.associationType != null && { associationType: input.associationType }),
265
+ ...(input.maxResults != null && { maxResults: input.maxResults }),
266
+ ...(input.nextToken != null && { nextToken: input.nextToken }),
267
+ ...(input.principal != null && { principal: input.principal }),
268
+ ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
269
+ ...(input.resourceShareArns != null && {
290
270
  resourceShareArns: serializeAws_restJson1ResourceShareArnList(input.resourceShareArns, context),
291
271
  }),
292
272
  });
@@ -309,14 +289,12 @@ const serializeAws_restJson1GetResourceShareInvitationsCommand = async (input, c
309
289
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/getresourceshareinvitations";
310
290
  let body;
311
291
  body = JSON.stringify({
312
- ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
313
- ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
314
- ...(input.resourceShareArns !== undefined &&
315
- input.resourceShareArns !== null && {
292
+ ...(input.maxResults != null && { maxResults: input.maxResults }),
293
+ ...(input.nextToken != null && { nextToken: input.nextToken }),
294
+ ...(input.resourceShareArns != null && {
316
295
  resourceShareArns: serializeAws_restJson1ResourceShareArnList(input.resourceShareArns, context),
317
296
  }),
318
- ...(input.resourceShareInvitationArns !== undefined &&
319
- input.resourceShareInvitationArns !== null && {
297
+ ...(input.resourceShareInvitationArns != null && {
320
298
  resourceShareInvitationArns: serializeAws_restJson1ResourceShareInvitationArnList(input.resourceShareInvitationArns, context),
321
299
  }),
322
300
  });
@@ -339,19 +317,16 @@ const serializeAws_restJson1GetResourceSharesCommand = async (input, context) =>
339
317
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/getresourceshares";
340
318
  let body;
341
319
  body = JSON.stringify({
342
- ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
343
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
344
- ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
345
- ...(input.permissionArn !== undefined && input.permissionArn !== null && { permissionArn: input.permissionArn }),
346
- ...(input.resourceOwner !== undefined && input.resourceOwner !== null && { resourceOwner: input.resourceOwner }),
347
- ...(input.resourceShareArns !== undefined &&
348
- input.resourceShareArns !== null && {
320
+ ...(input.maxResults != null && { maxResults: input.maxResults }),
321
+ ...(input.name != null && { name: input.name }),
322
+ ...(input.nextToken != null && { nextToken: input.nextToken }),
323
+ ...(input.permissionArn != null && { permissionArn: input.permissionArn }),
324
+ ...(input.resourceOwner != null && { resourceOwner: input.resourceOwner }),
325
+ ...(input.resourceShareArns != null && {
349
326
  resourceShareArns: serializeAws_restJson1ResourceShareArnList(input.resourceShareArns, context),
350
327
  }),
351
- ...(input.resourceShareStatus !== undefined &&
352
- input.resourceShareStatus !== null && { resourceShareStatus: input.resourceShareStatus }),
353
- ...(input.tagFilters !== undefined &&
354
- input.tagFilters !== null && { tagFilters: serializeAws_restJson1TagFilters(input.tagFilters, context) }),
328
+ ...(input.resourceShareStatus != null && { resourceShareStatus: input.resourceShareStatus }),
329
+ ...(input.tagFilters != null && { tagFilters: serializeAws_restJson1TagFilters(input.tagFilters, context) }),
355
330
  });
356
331
  return new protocol_http_1.HttpRequest({
357
332
  protocol,
@@ -372,12 +347,10 @@ const serializeAws_restJson1ListPendingInvitationResourcesCommand = async (input
372
347
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/listpendinginvitationresources";
373
348
  let body;
374
349
  body = JSON.stringify({
375
- ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
376
- ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
377
- ...(input.resourceRegionScope !== undefined &&
378
- input.resourceRegionScope !== null && { resourceRegionScope: input.resourceRegionScope }),
379
- ...(input.resourceShareInvitationArn !== undefined &&
380
- input.resourceShareInvitationArn !== null && { resourceShareInvitationArn: input.resourceShareInvitationArn }),
350
+ ...(input.maxResults != null && { maxResults: input.maxResults }),
351
+ ...(input.nextToken != null && { nextToken: input.nextToken }),
352
+ ...(input.resourceRegionScope != null && { resourceRegionScope: input.resourceRegionScope }),
353
+ ...(input.resourceShareInvitationArn != null && { resourceShareInvitationArn: input.resourceShareInvitationArn }),
381
354
  });
382
355
  return new protocol_http_1.HttpRequest({
383
356
  protocol,
@@ -398,9 +371,9 @@ const serializeAws_restJson1ListPermissionsCommand = async (input, context) => {
398
371
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/listpermissions";
399
372
  let body;
400
373
  body = JSON.stringify({
401
- ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
402
- ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
403
- ...(input.resourceType !== undefined && input.resourceType !== null && { resourceType: input.resourceType }),
374
+ ...(input.maxResults != null && { maxResults: input.maxResults }),
375
+ ...(input.nextToken != null && { nextToken: input.nextToken }),
376
+ ...(input.resourceType != null && { resourceType: input.resourceType }),
404
377
  });
405
378
  return new protocol_http_1.HttpRequest({
406
379
  protocol,
@@ -421,9 +394,9 @@ const serializeAws_restJson1ListPermissionVersionsCommand = async (input, contex
421
394
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/listpermissionversions";
422
395
  let body;
423
396
  body = JSON.stringify({
424
- ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
425
- ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
426
- ...(input.permissionArn !== undefined && input.permissionArn !== null && { permissionArn: input.permissionArn }),
397
+ ...(input.maxResults != null && { maxResults: input.maxResults }),
398
+ ...(input.nextToken != null && { nextToken: input.nextToken }),
399
+ ...(input.permissionArn != null && { permissionArn: input.permissionArn }),
427
400
  });
428
401
  return new protocol_http_1.HttpRequest({
429
402
  protocol,
@@ -444,19 +417,17 @@ const serializeAws_restJson1ListPrincipalsCommand = async (input, context) => {
444
417
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/listprincipals";
445
418
  let body;
446
419
  body = JSON.stringify({
447
- ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
448
- ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
449
- ...(input.principals !== undefined &&
450
- input.principals !== null && {
420
+ ...(input.maxResults != null && { maxResults: input.maxResults }),
421
+ ...(input.nextToken != null && { nextToken: input.nextToken }),
422
+ ...(input.principals != null && {
451
423
  principals: serializeAws_restJson1PrincipalArnOrIdList(input.principals, context),
452
424
  }),
453
- ...(input.resourceArn !== undefined && input.resourceArn !== null && { resourceArn: input.resourceArn }),
454
- ...(input.resourceOwner !== undefined && input.resourceOwner !== null && { resourceOwner: input.resourceOwner }),
455
- ...(input.resourceShareArns !== undefined &&
456
- input.resourceShareArns !== null && {
425
+ ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
426
+ ...(input.resourceOwner != null && { resourceOwner: input.resourceOwner }),
427
+ ...(input.resourceShareArns != null && {
457
428
  resourceShareArns: serializeAws_restJson1ResourceShareArnList(input.resourceShareArns, context),
458
429
  }),
459
- ...(input.resourceType !== undefined && input.resourceType !== null && { resourceType: input.resourceType }),
430
+ ...(input.resourceType != null && { resourceType: input.resourceType }),
460
431
  });
461
432
  return new protocol_http_1.HttpRequest({
462
433
  protocol,
@@ -477,21 +448,18 @@ const serializeAws_restJson1ListResourcesCommand = async (input, context) => {
477
448
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/listresources";
478
449
  let body;
479
450
  body = JSON.stringify({
480
- ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
481
- ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
482
- ...(input.principal !== undefined && input.principal !== null && { principal: input.principal }),
483
- ...(input.resourceArns !== undefined &&
484
- input.resourceArns !== null && {
451
+ ...(input.maxResults != null && { maxResults: input.maxResults }),
452
+ ...(input.nextToken != null && { nextToken: input.nextToken }),
453
+ ...(input.principal != null && { principal: input.principal }),
454
+ ...(input.resourceArns != null && {
485
455
  resourceArns: serializeAws_restJson1ResourceArnList(input.resourceArns, context),
486
456
  }),
487
- ...(input.resourceOwner !== undefined && input.resourceOwner !== null && { resourceOwner: input.resourceOwner }),
488
- ...(input.resourceRegionScope !== undefined &&
489
- input.resourceRegionScope !== null && { resourceRegionScope: input.resourceRegionScope }),
490
- ...(input.resourceShareArns !== undefined &&
491
- input.resourceShareArns !== null && {
457
+ ...(input.resourceOwner != null && { resourceOwner: input.resourceOwner }),
458
+ ...(input.resourceRegionScope != null && { resourceRegionScope: input.resourceRegionScope }),
459
+ ...(input.resourceShareArns != null && {
492
460
  resourceShareArns: serializeAws_restJson1ResourceShareArnList(input.resourceShareArns, context),
493
461
  }),
494
- ...(input.resourceType !== undefined && input.resourceType !== null && { resourceType: input.resourceType }),
462
+ ...(input.resourceType != null && { resourceType: input.resourceType }),
495
463
  });
496
464
  return new protocol_http_1.HttpRequest({
497
465
  protocol,
@@ -512,10 +480,9 @@ const serializeAws_restJson1ListResourceSharePermissionsCommand = async (input,
512
480
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/listresourcesharepermissions";
513
481
  let body;
514
482
  body = JSON.stringify({
515
- ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
516
- ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
517
- ...(input.resourceShareArn !== undefined &&
518
- input.resourceShareArn !== null && { resourceShareArn: input.resourceShareArn }),
483
+ ...(input.maxResults != null && { maxResults: input.maxResults }),
484
+ ...(input.nextToken != null && { nextToken: input.nextToken }),
485
+ ...(input.resourceShareArn != null && { resourceShareArn: input.resourceShareArn }),
519
486
  });
520
487
  return new protocol_http_1.HttpRequest({
521
488
  protocol,
@@ -536,10 +503,9 @@ const serializeAws_restJson1ListResourceTypesCommand = async (input, context) =>
536
503
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/listresourcetypes";
537
504
  let body;
538
505
  body = JSON.stringify({
539
- ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
540
- ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
541
- ...(input.resourceRegionScope !== undefined &&
542
- input.resourceRegionScope !== null && { resourceRegionScope: input.resourceRegionScope }),
506
+ ...(input.maxResults != null && { maxResults: input.maxResults }),
507
+ ...(input.nextToken != null && { nextToken: input.nextToken }),
508
+ ...(input.resourceRegionScope != null && { resourceRegionScope: input.resourceRegionScope }),
543
509
  });
544
510
  return new protocol_http_1.HttpRequest({
545
511
  protocol,
@@ -580,9 +546,8 @@ const serializeAws_restJson1RejectResourceShareInvitationCommand = async (input,
580
546
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/rejectresourceshareinvitation";
581
547
  let body;
582
548
  body = JSON.stringify({
583
- ...(input.clientToken !== undefined && input.clientToken !== null && { clientToken: input.clientToken }),
584
- ...(input.resourceShareInvitationArn !== undefined &&
585
- input.resourceShareInvitationArn !== null && { resourceShareInvitationArn: input.resourceShareInvitationArn }),
549
+ ...(input.clientToken != null && { clientToken: input.clientToken }),
550
+ ...(input.resourceShareInvitationArn != null && { resourceShareInvitationArn: input.resourceShareInvitationArn }),
586
551
  });
587
552
  return new protocol_http_1.HttpRequest({
588
553
  protocol,
@@ -603,10 +568,8 @@ const serializeAws_restJson1TagResourceCommand = async (input, context) => {
603
568
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/tagresource";
604
569
  let body;
605
570
  body = JSON.stringify({
606
- ...(input.resourceShareArn !== undefined &&
607
- input.resourceShareArn !== null && { resourceShareArn: input.resourceShareArn }),
608
- ...(input.tags !== undefined &&
609
- input.tags !== null && { tags: serializeAws_restJson1TagList(input.tags, context) }),
571
+ ...(input.resourceShareArn != null && { resourceShareArn: input.resourceShareArn }),
572
+ ...(input.tags != null && { tags: serializeAws_restJson1TagList(input.tags, context) }),
610
573
  });
611
574
  return new protocol_http_1.HttpRequest({
612
575
  protocol,
@@ -627,10 +590,8 @@ const serializeAws_restJson1UntagResourceCommand = async (input, context) => {
627
590
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/untagresource";
628
591
  let body;
629
592
  body = JSON.stringify({
630
- ...(input.resourceShareArn !== undefined &&
631
- input.resourceShareArn !== null && { resourceShareArn: input.resourceShareArn }),
632
- ...(input.tagKeys !== undefined &&
633
- input.tagKeys !== null && { tagKeys: serializeAws_restJson1TagKeyList(input.tagKeys, context) }),
593
+ ...(input.resourceShareArn != null && { resourceShareArn: input.resourceShareArn }),
594
+ ...(input.tagKeys != null && { tagKeys: serializeAws_restJson1TagKeyList(input.tagKeys, context) }),
634
595
  });
635
596
  return new protocol_http_1.HttpRequest({
636
597
  protocol,
@@ -651,12 +612,10 @@ const serializeAws_restJson1UpdateResourceShareCommand = async (input, context)
651
612
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/updateresourceshare";
652
613
  let body;
653
614
  body = JSON.stringify({
654
- ...(input.allowExternalPrincipals !== undefined &&
655
- input.allowExternalPrincipals !== null && { allowExternalPrincipals: input.allowExternalPrincipals }),
656
- ...(input.clientToken !== undefined && input.clientToken !== null && { clientToken: input.clientToken }),
657
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
658
- ...(input.resourceShareArn !== undefined &&
659
- input.resourceShareArn !== null && { resourceShareArn: input.resourceShareArn }),
615
+ ...(input.allowExternalPrincipals != null && { allowExternalPrincipals: input.allowExternalPrincipals }),
616
+ ...(input.clientToken != null && { clientToken: input.clientToken }),
617
+ ...(input.name != null && { name: input.name }),
618
+ ...(input.resourceShareArn != null && { resourceShareArn: input.resourceShareArn }),
660
619
  });
661
620
  return new protocol_http_1.HttpRequest({
662
621
  protocol,
@@ -694,8 +653,7 @@ const deserializeAws_restJson1AcceptResourceShareInvitationCommandError = async
694
653
  body: await parseBody(output.body, context),
695
654
  };
696
655
  let response;
697
- let errorCode = "UnknownError";
698
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
656
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
699
657
  switch (errorCode) {
700
658
  case "IdempotentParameterMismatchException":
701
659
  case "com.amazonaws.ram#IdempotentParameterMismatchException":
@@ -729,10 +687,12 @@ const deserializeAws_restJson1AcceptResourceShareInvitationCommandError = async
729
687
  throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
730
688
  default:
731
689
  const parsedBody = parsedOutput.body;
690
+ const $metadata = deserializeMetadata(output);
691
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
732
692
  response = new RAMServiceException_1.RAMServiceException({
733
- name: parsedBody.code || parsedBody.Code || errorCode,
693
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
734
694
  $fault: "client",
735
- $metadata: deserializeMetadata(output),
695
+ $metadata,
736
696
  });
737
697
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
738
698
  }
@@ -762,8 +722,7 @@ const deserializeAws_restJson1AssociateResourceShareCommandError = async (output
762
722
  body: await parseBody(output.body, context),
763
723
  };
764
724
  let response;
765
- let errorCode = "UnknownError";
766
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
725
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
767
726
  switch (errorCode) {
768
727
  case "IdempotentParameterMismatchException":
769
728
  case "com.amazonaws.ram#IdempotentParameterMismatchException":
@@ -800,10 +759,12 @@ const deserializeAws_restJson1AssociateResourceShareCommandError = async (output
800
759
  throw await deserializeAws_restJson1UnknownResourceExceptionResponse(parsedOutput, context);
801
760
  default:
802
761
  const parsedBody = parsedOutput.body;
762
+ const $metadata = deserializeMetadata(output);
763
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
803
764
  response = new RAMServiceException_1.RAMServiceException({
804
- name: parsedBody.code || parsedBody.Code || errorCode,
765
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
805
766
  $fault: "client",
806
- $metadata: deserializeMetadata(output),
767
+ $metadata,
807
768
  });
808
769
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
809
770
  }
@@ -833,8 +794,7 @@ const deserializeAws_restJson1AssociateResourceSharePermissionCommandError = asy
833
794
  body: await parseBody(output.body, context),
834
795
  };
835
796
  let response;
836
- let errorCode = "UnknownError";
837
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
797
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
838
798
  switch (errorCode) {
839
799
  case "InvalidClientTokenException":
840
800
  case "com.amazonaws.ram#InvalidClientTokenException":
@@ -859,10 +819,12 @@ const deserializeAws_restJson1AssociateResourceSharePermissionCommandError = asy
859
819
  throw await deserializeAws_restJson1UnknownResourceExceptionResponse(parsedOutput, context);
860
820
  default:
861
821
  const parsedBody = parsedOutput.body;
822
+ const $metadata = deserializeMetadata(output);
823
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
862
824
  response = new RAMServiceException_1.RAMServiceException({
863
- name: parsedBody.code || parsedBody.Code || errorCode,
825
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
864
826
  $fault: "client",
865
- $metadata: deserializeMetadata(output),
827
+ $metadata,
866
828
  });
867
829
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
868
830
  }
@@ -892,8 +854,7 @@ const deserializeAws_restJson1CreateResourceShareCommandError = async (output, c
892
854
  body: await parseBody(output.body, context),
893
855
  };
894
856
  let response;
895
- let errorCode = "UnknownError";
896
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
857
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
897
858
  switch (errorCode) {
898
859
  case "IdempotentParameterMismatchException":
899
860
  case "com.amazonaws.ram#IdempotentParameterMismatchException":
@@ -930,10 +891,12 @@ const deserializeAws_restJson1CreateResourceShareCommandError = async (output, c
930
891
  throw await deserializeAws_restJson1UnknownResourceExceptionResponse(parsedOutput, context);
931
892
  default:
932
893
  const parsedBody = parsedOutput.body;
894
+ const $metadata = deserializeMetadata(output);
895
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
933
896
  response = new RAMServiceException_1.RAMServiceException({
934
- name: parsedBody.code || parsedBody.Code || errorCode,
897
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
935
898
  $fault: "client",
936
- $metadata: deserializeMetadata(output),
899
+ $metadata,
937
900
  });
938
901
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
939
902
  }
@@ -963,8 +926,7 @@ const deserializeAws_restJson1DeleteResourceShareCommandError = async (output, c
963
926
  body: await parseBody(output.body, context),
964
927
  };
965
928
  let response;
966
- let errorCode = "UnknownError";
967
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
929
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
968
930
  switch (errorCode) {
969
931
  case "IdempotentParameterMismatchException":
970
932
  case "com.amazonaws.ram#IdempotentParameterMismatchException":
@@ -995,10 +957,12 @@ const deserializeAws_restJson1DeleteResourceShareCommandError = async (output, c
995
957
  throw await deserializeAws_restJson1UnknownResourceExceptionResponse(parsedOutput, context);
996
958
  default:
997
959
  const parsedBody = parsedOutput.body;
960
+ const $metadata = deserializeMetadata(output);
961
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
998
962
  response = new RAMServiceException_1.RAMServiceException({
999
- name: parsedBody.code || parsedBody.Code || errorCode,
963
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1000
964
  $fault: "client",
1001
- $metadata: deserializeMetadata(output),
965
+ $metadata,
1002
966
  });
1003
967
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1004
968
  }
@@ -1028,8 +992,7 @@ const deserializeAws_restJson1DisassociateResourceShareCommandError = async (out
1028
992
  body: await parseBody(output.body, context),
1029
993
  };
1030
994
  let response;
1031
- let errorCode = "UnknownError";
1032
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
995
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1033
996
  switch (errorCode) {
1034
997
  case "IdempotentParameterMismatchException":
1035
998
  case "com.amazonaws.ram#IdempotentParameterMismatchException":
@@ -1063,10 +1026,12 @@ const deserializeAws_restJson1DisassociateResourceShareCommandError = async (out
1063
1026
  throw await deserializeAws_restJson1UnknownResourceExceptionResponse(parsedOutput, context);
1064
1027
  default:
1065
1028
  const parsedBody = parsedOutput.body;
1029
+ const $metadata = deserializeMetadata(output);
1030
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1066
1031
  response = new RAMServiceException_1.RAMServiceException({
1067
- name: parsedBody.code || parsedBody.Code || errorCode,
1032
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1068
1033
  $fault: "client",
1069
- $metadata: deserializeMetadata(output),
1034
+ $metadata,
1070
1035
  });
1071
1036
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1072
1037
  }
@@ -1096,8 +1061,7 @@ const deserializeAws_restJson1DisassociateResourceSharePermissionCommandError =
1096
1061
  body: await parseBody(output.body, context),
1097
1062
  };
1098
1063
  let response;
1099
- let errorCode = "UnknownError";
1100
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1064
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1101
1065
  switch (errorCode) {
1102
1066
  case "InvalidClientTokenException":
1103
1067
  case "com.amazonaws.ram#InvalidClientTokenException":
@@ -1125,10 +1089,12 @@ const deserializeAws_restJson1DisassociateResourceSharePermissionCommandError =
1125
1089
  throw await deserializeAws_restJson1UnknownResourceExceptionResponse(parsedOutput, context);
1126
1090
  default:
1127
1091
  const parsedBody = parsedOutput.body;
1092
+ const $metadata = deserializeMetadata(output);
1093
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1128
1094
  response = new RAMServiceException_1.RAMServiceException({
1129
- name: parsedBody.code || parsedBody.Code || errorCode,
1095
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1130
1096
  $fault: "client",
1131
- $metadata: deserializeMetadata(output),
1097
+ $metadata,
1132
1098
  });
1133
1099
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1134
1100
  }
@@ -1154,8 +1120,7 @@ const deserializeAws_restJson1EnableSharingWithAwsOrganizationCommandError = asy
1154
1120
  body: await parseBody(output.body, context),
1155
1121
  };
1156
1122
  let response;
1157
- let errorCode = "UnknownError";
1158
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1123
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1159
1124
  switch (errorCode) {
1160
1125
  case "OperationNotPermittedException":
1161
1126
  case "com.amazonaws.ram#OperationNotPermittedException":
@@ -1168,10 +1133,12 @@ const deserializeAws_restJson1EnableSharingWithAwsOrganizationCommandError = asy
1168
1133
  throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
1169
1134
  default:
1170
1135
  const parsedBody = parsedOutput.body;
1136
+ const $metadata = deserializeMetadata(output);
1137
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1171
1138
  response = new RAMServiceException_1.RAMServiceException({
1172
- name: parsedBody.code || parsedBody.Code || errorCode,
1139
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1173
1140
  $fault: "client",
1174
- $metadata: deserializeMetadata(output),
1141
+ $metadata,
1175
1142
  });
1176
1143
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1177
1144
  }
@@ -1197,8 +1164,7 @@ const deserializeAws_restJson1GetPermissionCommandError = async (output, context
1197
1164
  body: await parseBody(output.body, context),
1198
1165
  };
1199
1166
  let response;
1200
- let errorCode = "UnknownError";
1201
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1167
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1202
1168
  switch (errorCode) {
1203
1169
  case "InvalidParameterException":
1204
1170
  case "com.amazonaws.ram#InvalidParameterException":
@@ -1220,10 +1186,12 @@ const deserializeAws_restJson1GetPermissionCommandError = async (output, context
1220
1186
  throw await deserializeAws_restJson1UnknownResourceExceptionResponse(parsedOutput, context);
1221
1187
  default:
1222
1188
  const parsedBody = parsedOutput.body;
1189
+ const $metadata = deserializeMetadata(output);
1190
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1223
1191
  response = new RAMServiceException_1.RAMServiceException({
1224
- name: parsedBody.code || parsedBody.Code || errorCode,
1192
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1225
1193
  $fault: "client",
1226
- $metadata: deserializeMetadata(output),
1194
+ $metadata,
1227
1195
  });
1228
1196
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1229
1197
  }
@@ -1253,8 +1221,7 @@ const deserializeAws_restJson1GetResourcePoliciesCommandError = async (output, c
1253
1221
  body: await parseBody(output.body, context),
1254
1222
  };
1255
1223
  let response;
1256
- let errorCode = "UnknownError";
1257
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1224
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1258
1225
  switch (errorCode) {
1259
1226
  case "InvalidNextTokenException":
1260
1227
  case "com.amazonaws.ram#InvalidNextTokenException":
@@ -1276,10 +1243,12 @@ const deserializeAws_restJson1GetResourcePoliciesCommandError = async (output, c
1276
1243
  throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
1277
1244
  default:
1278
1245
  const parsedBody = parsedOutput.body;
1246
+ const $metadata = deserializeMetadata(output);
1247
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1279
1248
  response = new RAMServiceException_1.RAMServiceException({
1280
- name: parsedBody.code || parsedBody.Code || errorCode,
1249
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1281
1250
  $fault: "client",
1282
- $metadata: deserializeMetadata(output),
1251
+ $metadata,
1283
1252
  });
1284
1253
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1285
1254
  }
@@ -1309,8 +1278,7 @@ const deserializeAws_restJson1GetResourceShareAssociationsCommandError = async (
1309
1278
  body: await parseBody(output.body, context),
1310
1279
  };
1311
1280
  let response;
1312
- let errorCode = "UnknownError";
1313
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1281
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1314
1282
  switch (errorCode) {
1315
1283
  case "InvalidNextTokenException":
1316
1284
  case "com.amazonaws.ram#InvalidNextTokenException":
@@ -1335,10 +1303,12 @@ const deserializeAws_restJson1GetResourceShareAssociationsCommandError = async (
1335
1303
  throw await deserializeAws_restJson1UnknownResourceExceptionResponse(parsedOutput, context);
1336
1304
  default:
1337
1305
  const parsedBody = parsedOutput.body;
1306
+ const $metadata = deserializeMetadata(output);
1307
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1338
1308
  response = new RAMServiceException_1.RAMServiceException({
1339
- name: parsedBody.code || parsedBody.Code || errorCode,
1309
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1340
1310
  $fault: "client",
1341
- $metadata: deserializeMetadata(output),
1311
+ $metadata,
1342
1312
  });
1343
1313
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1344
1314
  }
@@ -1368,8 +1338,7 @@ const deserializeAws_restJson1GetResourceShareInvitationsCommandError = async (o
1368
1338
  body: await parseBody(output.body, context),
1369
1339
  };
1370
1340
  let response;
1371
- let errorCode = "UnknownError";
1372
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1341
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1373
1342
  switch (errorCode) {
1374
1343
  case "InvalidMaxResultsException":
1375
1344
  case "com.amazonaws.ram#InvalidMaxResultsException":
@@ -1397,10 +1366,12 @@ const deserializeAws_restJson1GetResourceShareInvitationsCommandError = async (o
1397
1366
  throw await deserializeAws_restJson1UnknownResourceExceptionResponse(parsedOutput, context);
1398
1367
  default:
1399
1368
  const parsedBody = parsedOutput.body;
1369
+ const $metadata = deserializeMetadata(output);
1370
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1400
1371
  response = new RAMServiceException_1.RAMServiceException({
1401
- name: parsedBody.code || parsedBody.Code || errorCode,
1372
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1402
1373
  $fault: "client",
1403
- $metadata: deserializeMetadata(output),
1374
+ $metadata,
1404
1375
  });
1405
1376
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1406
1377
  }
@@ -1430,8 +1401,7 @@ const deserializeAws_restJson1GetResourceSharesCommandError = async (output, con
1430
1401
  body: await parseBody(output.body, context),
1431
1402
  };
1432
1403
  let response;
1433
- let errorCode = "UnknownError";
1434
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1404
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1435
1405
  switch (errorCode) {
1436
1406
  case "InvalidNextTokenException":
1437
1407
  case "com.amazonaws.ram#InvalidNextTokenException":
@@ -1453,10 +1423,12 @@ const deserializeAws_restJson1GetResourceSharesCommandError = async (output, con
1453
1423
  throw await deserializeAws_restJson1UnknownResourceExceptionResponse(parsedOutput, context);
1454
1424
  default:
1455
1425
  const parsedBody = parsedOutput.body;
1426
+ const $metadata = deserializeMetadata(output);
1427
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1456
1428
  response = new RAMServiceException_1.RAMServiceException({
1457
- name: parsedBody.code || parsedBody.Code || errorCode,
1429
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1458
1430
  $fault: "client",
1459
- $metadata: deserializeMetadata(output),
1431
+ $metadata,
1460
1432
  });
1461
1433
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1462
1434
  }
@@ -1486,8 +1458,7 @@ const deserializeAws_restJson1ListPendingInvitationResourcesCommandError = async
1486
1458
  body: await parseBody(output.body, context),
1487
1459
  };
1488
1460
  let response;
1489
- let errorCode = "UnknownError";
1490
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1461
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1491
1462
  switch (errorCode) {
1492
1463
  case "InvalidNextTokenException":
1493
1464
  case "com.amazonaws.ram#InvalidNextTokenException":
@@ -1518,10 +1489,12 @@ const deserializeAws_restJson1ListPendingInvitationResourcesCommandError = async
1518
1489
  throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
1519
1490
  default:
1520
1491
  const parsedBody = parsedOutput.body;
1492
+ const $metadata = deserializeMetadata(output);
1493
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1521
1494
  response = new RAMServiceException_1.RAMServiceException({
1522
- name: parsedBody.code || parsedBody.Code || errorCode,
1495
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1523
1496
  $fault: "client",
1524
- $metadata: deserializeMetadata(output),
1497
+ $metadata,
1525
1498
  });
1526
1499
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1527
1500
  }
@@ -1551,8 +1524,7 @@ const deserializeAws_restJson1ListPermissionsCommandError = async (output, conte
1551
1524
  body: await parseBody(output.body, context),
1552
1525
  };
1553
1526
  let response;
1554
- let errorCode = "UnknownError";
1555
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1527
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1556
1528
  switch (errorCode) {
1557
1529
  case "InvalidNextTokenException":
1558
1530
  case "com.amazonaws.ram#InvalidNextTokenException":
@@ -1571,10 +1543,12 @@ const deserializeAws_restJson1ListPermissionsCommandError = async (output, conte
1571
1543
  throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
1572
1544
  default:
1573
1545
  const parsedBody = parsedOutput.body;
1546
+ const $metadata = deserializeMetadata(output);
1547
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1574
1548
  response = new RAMServiceException_1.RAMServiceException({
1575
- name: parsedBody.code || parsedBody.Code || errorCode,
1549
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1576
1550
  $fault: "client",
1577
- $metadata: deserializeMetadata(output),
1551
+ $metadata,
1578
1552
  });
1579
1553
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1580
1554
  }
@@ -1604,8 +1578,7 @@ const deserializeAws_restJson1ListPermissionVersionsCommandError = async (output
1604
1578
  body: await parseBody(output.body, context),
1605
1579
  };
1606
1580
  let response;
1607
- let errorCode = "UnknownError";
1608
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1581
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1609
1582
  switch (errorCode) {
1610
1583
  case "InvalidNextTokenException":
1611
1584
  case "com.amazonaws.ram#InvalidNextTokenException":
@@ -1630,10 +1603,12 @@ const deserializeAws_restJson1ListPermissionVersionsCommandError = async (output
1630
1603
  throw await deserializeAws_restJson1UnknownResourceExceptionResponse(parsedOutput, context);
1631
1604
  default:
1632
1605
  const parsedBody = parsedOutput.body;
1606
+ const $metadata = deserializeMetadata(output);
1607
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1633
1608
  response = new RAMServiceException_1.RAMServiceException({
1634
- name: parsedBody.code || parsedBody.Code || errorCode,
1609
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1635
1610
  $fault: "client",
1636
- $metadata: deserializeMetadata(output),
1611
+ $metadata,
1637
1612
  });
1638
1613
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1639
1614
  }
@@ -1663,8 +1638,7 @@ const deserializeAws_restJson1ListPrincipalsCommandError = async (output, contex
1663
1638
  body: await parseBody(output.body, context),
1664
1639
  };
1665
1640
  let response;
1666
- let errorCode = "UnknownError";
1667
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1641
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1668
1642
  switch (errorCode) {
1669
1643
  case "InvalidNextTokenException":
1670
1644
  case "com.amazonaws.ram#InvalidNextTokenException":
@@ -1686,10 +1660,12 @@ const deserializeAws_restJson1ListPrincipalsCommandError = async (output, contex
1686
1660
  throw await deserializeAws_restJson1UnknownResourceExceptionResponse(parsedOutput, context);
1687
1661
  default:
1688
1662
  const parsedBody = parsedOutput.body;
1663
+ const $metadata = deserializeMetadata(output);
1664
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1689
1665
  response = new RAMServiceException_1.RAMServiceException({
1690
- name: parsedBody.code || parsedBody.Code || errorCode,
1666
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1691
1667
  $fault: "client",
1692
- $metadata: deserializeMetadata(output),
1668
+ $metadata,
1693
1669
  });
1694
1670
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1695
1671
  }
@@ -1719,8 +1695,7 @@ const deserializeAws_restJson1ListResourcesCommandError = async (output, context
1719
1695
  body: await parseBody(output.body, context),
1720
1696
  };
1721
1697
  let response;
1722
- let errorCode = "UnknownError";
1723
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1698
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1724
1699
  switch (errorCode) {
1725
1700
  case "InvalidNextTokenException":
1726
1701
  case "com.amazonaws.ram#InvalidNextTokenException":
@@ -1745,10 +1720,12 @@ const deserializeAws_restJson1ListResourcesCommandError = async (output, context
1745
1720
  throw await deserializeAws_restJson1UnknownResourceExceptionResponse(parsedOutput, context);
1746
1721
  default:
1747
1722
  const parsedBody = parsedOutput.body;
1723
+ const $metadata = deserializeMetadata(output);
1724
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1748
1725
  response = new RAMServiceException_1.RAMServiceException({
1749
- name: parsedBody.code || parsedBody.Code || errorCode,
1726
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1750
1727
  $fault: "client",
1751
- $metadata: deserializeMetadata(output),
1728
+ $metadata,
1752
1729
  });
1753
1730
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1754
1731
  }
@@ -1778,8 +1755,7 @@ const deserializeAws_restJson1ListResourceSharePermissionsCommandError = async (
1778
1755
  body: await parseBody(output.body, context),
1779
1756
  };
1780
1757
  let response;
1781
- let errorCode = "UnknownError";
1782
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1758
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1783
1759
  switch (errorCode) {
1784
1760
  case "InvalidNextTokenException":
1785
1761
  case "com.amazonaws.ram#InvalidNextTokenException":
@@ -1804,10 +1780,12 @@ const deserializeAws_restJson1ListResourceSharePermissionsCommandError = async (
1804
1780
  throw await deserializeAws_restJson1UnknownResourceExceptionResponse(parsedOutput, context);
1805
1781
  default:
1806
1782
  const parsedBody = parsedOutput.body;
1783
+ const $metadata = deserializeMetadata(output);
1784
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1807
1785
  response = new RAMServiceException_1.RAMServiceException({
1808
- name: parsedBody.code || parsedBody.Code || errorCode,
1786
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1809
1787
  $fault: "client",
1810
- $metadata: deserializeMetadata(output),
1788
+ $metadata,
1811
1789
  });
1812
1790
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1813
1791
  }
@@ -1837,8 +1815,7 @@ const deserializeAws_restJson1ListResourceTypesCommandError = async (output, con
1837
1815
  body: await parseBody(output.body, context),
1838
1816
  };
1839
1817
  let response;
1840
- let errorCode = "UnknownError";
1841
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1818
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1842
1819
  switch (errorCode) {
1843
1820
  case "InvalidNextTokenException":
1844
1821
  case "com.amazonaws.ram#InvalidNextTokenException":
@@ -1854,10 +1831,12 @@ const deserializeAws_restJson1ListResourceTypesCommandError = async (output, con
1854
1831
  throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
1855
1832
  default:
1856
1833
  const parsedBody = parsedOutput.body;
1834
+ const $metadata = deserializeMetadata(output);
1835
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1857
1836
  response = new RAMServiceException_1.RAMServiceException({
1858
- name: parsedBody.code || parsedBody.Code || errorCode,
1837
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1859
1838
  $fault: "client",
1860
- $metadata: deserializeMetadata(output),
1839
+ $metadata,
1861
1840
  });
1862
1841
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1863
1842
  }
@@ -1883,8 +1862,7 @@ const deserializeAws_restJson1PromoteResourceShareCreatedFromPolicyCommandError
1883
1862
  body: await parseBody(output.body, context),
1884
1863
  };
1885
1864
  let response;
1886
- let errorCode = "UnknownError";
1887
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1865
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1888
1866
  switch (errorCode) {
1889
1867
  case "InvalidParameterException":
1890
1868
  case "com.amazonaws.ram#InvalidParameterException":
@@ -1912,10 +1890,12 @@ const deserializeAws_restJson1PromoteResourceShareCreatedFromPolicyCommandError
1912
1890
  throw await deserializeAws_restJson1UnknownResourceExceptionResponse(parsedOutput, context);
1913
1891
  default:
1914
1892
  const parsedBody = parsedOutput.body;
1893
+ const $metadata = deserializeMetadata(output);
1894
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1915
1895
  response = new RAMServiceException_1.RAMServiceException({
1916
- name: parsedBody.code || parsedBody.Code || errorCode,
1896
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1917
1897
  $fault: "client",
1918
- $metadata: deserializeMetadata(output),
1898
+ $metadata,
1919
1899
  });
1920
1900
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1921
1901
  }
@@ -1945,8 +1925,7 @@ const deserializeAws_restJson1RejectResourceShareInvitationCommandError = async
1945
1925
  body: await parseBody(output.body, context),
1946
1926
  };
1947
1927
  let response;
1948
- let errorCode = "UnknownError";
1949
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1928
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1950
1929
  switch (errorCode) {
1951
1930
  case "IdempotentParameterMismatchException":
1952
1931
  case "com.amazonaws.ram#IdempotentParameterMismatchException":
@@ -1980,10 +1959,12 @@ const deserializeAws_restJson1RejectResourceShareInvitationCommandError = async
1980
1959
  throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
1981
1960
  default:
1982
1961
  const parsedBody = parsedOutput.body;
1962
+ const $metadata = deserializeMetadata(output);
1963
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1983
1964
  response = new RAMServiceException_1.RAMServiceException({
1984
- name: parsedBody.code || parsedBody.Code || errorCode,
1965
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1985
1966
  $fault: "client",
1986
- $metadata: deserializeMetadata(output),
1967
+ $metadata,
1987
1968
  });
1988
1969
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1989
1970
  }
@@ -2005,8 +1986,7 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
2005
1986
  body: await parseBody(output.body, context),
2006
1987
  };
2007
1988
  let response;
2008
- let errorCode = "UnknownError";
2009
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1989
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2010
1990
  switch (errorCode) {
2011
1991
  case "InvalidParameterException":
2012
1992
  case "com.amazonaws.ram#InvalidParameterException":
@@ -2034,10 +2014,12 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
2034
2014
  throw await deserializeAws_restJson1UnknownResourceExceptionResponse(parsedOutput, context);
2035
2015
  default:
2036
2016
  const parsedBody = parsedOutput.body;
2017
+ const $metadata = deserializeMetadata(output);
2018
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2037
2019
  response = new RAMServiceException_1.RAMServiceException({
2038
- name: parsedBody.code || parsedBody.Code || errorCode,
2020
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2039
2021
  $fault: "client",
2040
- $metadata: deserializeMetadata(output),
2022
+ $metadata,
2041
2023
  });
2042
2024
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2043
2025
  }
@@ -2059,8 +2041,7 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
2059
2041
  body: await parseBody(output.body, context),
2060
2042
  };
2061
2043
  let response;
2062
- let errorCode = "UnknownError";
2063
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2044
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2064
2045
  switch (errorCode) {
2065
2046
  case "InvalidParameterException":
2066
2047
  case "com.amazonaws.ram#InvalidParameterException":
@@ -2073,10 +2054,12 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
2073
2054
  throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
2074
2055
  default:
2075
2056
  const parsedBody = parsedOutput.body;
2057
+ const $metadata = deserializeMetadata(output);
2058
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2076
2059
  response = new RAMServiceException_1.RAMServiceException({
2077
- name: parsedBody.code || parsedBody.Code || errorCode,
2060
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2078
2061
  $fault: "client",
2079
- $metadata: deserializeMetadata(output),
2062
+ $metadata,
2080
2063
  });
2081
2064
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2082
2065
  }
@@ -2106,8 +2089,7 @@ const deserializeAws_restJson1UpdateResourceShareCommandError = async (output, c
2106
2089
  body: await parseBody(output.body, context),
2107
2090
  };
2108
2091
  let response;
2109
- let errorCode = "UnknownError";
2110
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2092
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2111
2093
  switch (errorCode) {
2112
2094
  case "IdempotentParameterMismatchException":
2113
2095
  case "com.amazonaws.ram#IdempotentParameterMismatchException":
@@ -2138,10 +2120,12 @@ const deserializeAws_restJson1UpdateResourceShareCommandError = async (output, c
2138
2120
  throw await deserializeAws_restJson1UnknownResourceExceptionResponse(parsedOutput, context);
2139
2121
  default:
2140
2122
  const parsedBody = parsedOutput.body;
2123
+ const $metadata = deserializeMetadata(output);
2124
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2141
2125
  response = new RAMServiceException_1.RAMServiceException({
2142
- name: parsedBody.code || parsedBody.Code || errorCode,
2126
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2143
2127
  $fault: "client",
2144
- $metadata: deserializeMetadata(output),
2128
+ $metadata,
2145
2129
  });
2146
2130
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2147
2131
  }
@@ -2462,15 +2446,14 @@ const serializeAws_restJson1ResourceShareInvitationArnList = (input, context) =>
2462
2446
  };
2463
2447
  const serializeAws_restJson1Tag = (input, context) => {
2464
2448
  return {
2465
- ...(input.key !== undefined && input.key !== null && { key: input.key }),
2466
- ...(input.value !== undefined && input.value !== null && { value: input.value }),
2449
+ ...(input.key != null && { key: input.key }),
2450
+ ...(input.value != null && { value: input.value }),
2467
2451
  };
2468
2452
  };
2469
2453
  const serializeAws_restJson1TagFilter = (input, context) => {
2470
2454
  return {
2471
- ...(input.tagKey !== undefined && input.tagKey !== null && { tagKey: input.tagKey }),
2472
- ...(input.tagValues !== undefined &&
2473
- input.tagValues !== null && { tagValues: serializeAws_restJson1TagValueList(input.tagValues, context) }),
2455
+ ...(input.tagKey != null && { tagKey: input.tagKey }),
2456
+ ...(input.tagValues != null && { tagValues: serializeAws_restJson1TagValueList(input.tagValues, context) }),
2474
2457
  };
2475
2458
  };
2476
2459
  const serializeAws_restJson1TagFilters = (input, context) => {
@@ -2526,12 +2509,12 @@ const deserializeAws_restJson1PolicyList = (output, context) => {
2526
2509
  };
2527
2510
  const deserializeAws_restJson1Principal = (output, context) => {
2528
2511
  return {
2529
- creationTime: output.creationTime !== undefined && output.creationTime !== null
2512
+ creationTime: output.creationTime != null
2530
2513
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.creationTime)))
2531
2514
  : undefined,
2532
2515
  external: (0, smithy_client_1.expectBoolean)(output.external),
2533
2516
  id: (0, smithy_client_1.expectString)(output.id),
2534
- lastUpdatedTime: output.lastUpdatedTime !== undefined && output.lastUpdatedTime !== null
2517
+ lastUpdatedTime: output.lastUpdatedTime != null
2535
2518
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastUpdatedTime)))
2536
2519
  : undefined,
2537
2520
  resourceShareArn: (0, smithy_client_1.expectString)(output.resourceShareArn),
@@ -2551,10 +2534,10 @@ const deserializeAws_restJson1PrincipalList = (output, context) => {
2551
2534
  const deserializeAws_restJson1Resource = (output, context) => {
2552
2535
  return {
2553
2536
  arn: (0, smithy_client_1.expectString)(output.arn),
2554
- creationTime: output.creationTime !== undefined && output.creationTime !== null
2537
+ creationTime: output.creationTime != null
2555
2538
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.creationTime)))
2556
2539
  : undefined,
2557
- lastUpdatedTime: output.lastUpdatedTime !== undefined && output.lastUpdatedTime !== null
2540
+ lastUpdatedTime: output.lastUpdatedTime != null
2558
2541
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastUpdatedTime)))
2559
2542
  : undefined,
2560
2543
  resourceGroupArn: (0, smithy_client_1.expectString)(output.resourceGroupArn),
@@ -2579,11 +2562,11 @@ const deserializeAws_restJson1ResourceList = (output, context) => {
2579
2562
  const deserializeAws_restJson1ResourceShare = (output, context) => {
2580
2563
  return {
2581
2564
  allowExternalPrincipals: (0, smithy_client_1.expectBoolean)(output.allowExternalPrincipals),
2582
- creationTime: output.creationTime !== undefined && output.creationTime !== null
2565
+ creationTime: output.creationTime != null
2583
2566
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.creationTime)))
2584
2567
  : undefined,
2585
2568
  featureSet: (0, smithy_client_1.expectString)(output.featureSet),
2586
- lastUpdatedTime: output.lastUpdatedTime !== undefined && output.lastUpdatedTime !== null
2569
+ lastUpdatedTime: output.lastUpdatedTime != null
2587
2570
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastUpdatedTime)))
2588
2571
  : undefined,
2589
2572
  name: (0, smithy_client_1.expectString)(output.name),
@@ -2591,20 +2574,18 @@ const deserializeAws_restJson1ResourceShare = (output, context) => {
2591
2574
  resourceShareArn: (0, smithy_client_1.expectString)(output.resourceShareArn),
2592
2575
  status: (0, smithy_client_1.expectString)(output.status),
2593
2576
  statusMessage: (0, smithy_client_1.expectString)(output.statusMessage),
2594
- tags: output.tags !== undefined && output.tags !== null
2595
- ? deserializeAws_restJson1TagList(output.tags, context)
2596
- : undefined,
2577
+ tags: output.tags != null ? deserializeAws_restJson1TagList(output.tags, context) : undefined,
2597
2578
  };
2598
2579
  };
2599
2580
  const deserializeAws_restJson1ResourceShareAssociation = (output, context) => {
2600
2581
  return {
2601
2582
  associatedEntity: (0, smithy_client_1.expectString)(output.associatedEntity),
2602
2583
  associationType: (0, smithy_client_1.expectString)(output.associationType),
2603
- creationTime: output.creationTime !== undefined && output.creationTime !== null
2584
+ creationTime: output.creationTime != null
2604
2585
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.creationTime)))
2605
2586
  : undefined,
2606
2587
  external: (0, smithy_client_1.expectBoolean)(output.external),
2607
- lastUpdatedTime: output.lastUpdatedTime !== undefined && output.lastUpdatedTime !== null
2588
+ lastUpdatedTime: output.lastUpdatedTime != null
2608
2589
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastUpdatedTime)))
2609
2590
  : undefined,
2610
2591
  resourceShareArn: (0, smithy_client_1.expectString)(output.resourceShareArn),
@@ -2626,13 +2607,13 @@ const deserializeAws_restJson1ResourceShareAssociationList = (output, context) =
2626
2607
  };
2627
2608
  const deserializeAws_restJson1ResourceShareInvitation = (output, context) => {
2628
2609
  return {
2629
- invitationTimestamp: output.invitationTimestamp !== undefined && output.invitationTimestamp !== null
2610
+ invitationTimestamp: output.invitationTimestamp != null
2630
2611
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.invitationTimestamp)))
2631
2612
  : undefined,
2632
2613
  receiverAccountId: (0, smithy_client_1.expectString)(output.receiverAccountId),
2633
2614
  receiverArn: (0, smithy_client_1.expectString)(output.receiverArn),
2634
2615
  resourceShareArn: (0, smithy_client_1.expectString)(output.resourceShareArn),
2635
- resourceShareAssociations: output.resourceShareAssociations !== undefined && output.resourceShareAssociations !== null
2616
+ resourceShareAssociations: output.resourceShareAssociations != null
2636
2617
  ? deserializeAws_restJson1ResourceShareAssociationList(output.resourceShareAssociations, context)
2637
2618
  : undefined,
2638
2619
  resourceShareInvitationArn: (0, smithy_client_1.expectString)(output.resourceShareInvitationArn),
@@ -2666,12 +2647,12 @@ const deserializeAws_restJson1ResourceShareList = (output, context) => {
2666
2647
  const deserializeAws_restJson1ResourceSharePermissionDetail = (output, context) => {
2667
2648
  return {
2668
2649
  arn: (0, smithy_client_1.expectString)(output.arn),
2669
- creationTime: output.creationTime !== undefined && output.creationTime !== null
2650
+ creationTime: output.creationTime != null
2670
2651
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.creationTime)))
2671
2652
  : undefined,
2672
2653
  defaultVersion: (0, smithy_client_1.expectBoolean)(output.defaultVersion),
2673
2654
  isResourceTypeDefault: (0, smithy_client_1.expectBoolean)(output.isResourceTypeDefault),
2674
- lastUpdatedTime: output.lastUpdatedTime !== undefined && output.lastUpdatedTime !== null
2655
+ lastUpdatedTime: output.lastUpdatedTime != null
2675
2656
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastUpdatedTime)))
2676
2657
  : undefined,
2677
2658
  name: (0, smithy_client_1.expectString)(output.name),
@@ -2694,12 +2675,12 @@ const deserializeAws_restJson1ResourceSharePermissionList = (output, context) =>
2694
2675
  const deserializeAws_restJson1ResourceSharePermissionSummary = (output, context) => {
2695
2676
  return {
2696
2677
  arn: (0, smithy_client_1.expectString)(output.arn),
2697
- creationTime: output.creationTime !== undefined && output.creationTime !== null
2678
+ creationTime: output.creationTime != null
2698
2679
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.creationTime)))
2699
2680
  : undefined,
2700
2681
  defaultVersion: (0, smithy_client_1.expectBoolean)(output.defaultVersion),
2701
2682
  isResourceTypeDefault: (0, smithy_client_1.expectBoolean)(output.isResourceTypeDefault),
2702
- lastUpdatedTime: output.lastUpdatedTime !== undefined && output.lastUpdatedTime !== null
2683
+ lastUpdatedTime: output.lastUpdatedTime != null
2703
2684
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastUpdatedTime)))
2704
2685
  : undefined,
2705
2686
  name: (0, smithy_client_1.expectString)(output.name),
@@ -2792,5 +2773,4 @@ const loadRestJsonErrorCode = (output, data) => {
2792
2773
  if (data["__type"] !== undefined) {
2793
2774
  return sanitizeErrorCode(data["__type"]);
2794
2775
  }
2795
- return "";
2796
2776
  };