@aws-sdk/client-detective 3.118.1 → 3.128.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -0
- package/dist-cjs/protocols/Aws_restJson1.js +137 -130
- package/dist-es/protocols/Aws_restJson1.js +124 -117
- package/package.json +26 -26
|
@@ -13,7 +13,7 @@ const serializeAws_restJson1AcceptInvitationCommand = async (input, context) =>
|
|
|
13
13
|
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/invitation";
|
|
14
14
|
let body;
|
|
15
15
|
body = JSON.stringify({
|
|
16
|
-
...(input.GraphArn
|
|
16
|
+
...(input.GraphArn != null && { GraphArn: input.GraphArn }),
|
|
17
17
|
});
|
|
18
18
|
return new protocol_http_1.HttpRequest({
|
|
19
19
|
protocol,
|
|
@@ -34,7 +34,7 @@ const serializeAws_restJson1CreateGraphCommand = async (input, context) => {
|
|
|
34
34
|
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/graph";
|
|
35
35
|
let body;
|
|
36
36
|
body = JSON.stringify({
|
|
37
|
-
...(input.Tags
|
|
37
|
+
...(input.Tags != null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),
|
|
38
38
|
});
|
|
39
39
|
return new protocol_http_1.HttpRequest({
|
|
40
40
|
protocol,
|
|
@@ -55,12 +55,10 @@ const serializeAws_restJson1CreateMembersCommand = async (input, context) => {
|
|
|
55
55
|
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/graph/members";
|
|
56
56
|
let body;
|
|
57
57
|
body = JSON.stringify({
|
|
58
|
-
...(input.Accounts
|
|
59
|
-
|
|
60
|
-
...(input.
|
|
61
|
-
|
|
62
|
-
...(input.GraphArn !== undefined && input.GraphArn !== null && { GraphArn: input.GraphArn }),
|
|
63
|
-
...(input.Message !== undefined && input.Message !== null && { Message: input.Message }),
|
|
58
|
+
...(input.Accounts != null && { Accounts: serializeAws_restJson1AccountList(input.Accounts, context) }),
|
|
59
|
+
...(input.DisableEmailNotification != null && { DisableEmailNotification: input.DisableEmailNotification }),
|
|
60
|
+
...(input.GraphArn != null && { GraphArn: input.GraphArn }),
|
|
61
|
+
...(input.Message != null && { Message: input.Message }),
|
|
64
62
|
});
|
|
65
63
|
return new protocol_http_1.HttpRequest({
|
|
66
64
|
protocol,
|
|
@@ -81,7 +79,7 @@ const serializeAws_restJson1DeleteGraphCommand = async (input, context) => {
|
|
|
81
79
|
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/graph/removal";
|
|
82
80
|
let body;
|
|
83
81
|
body = JSON.stringify({
|
|
84
|
-
...(input.GraphArn
|
|
82
|
+
...(input.GraphArn != null && { GraphArn: input.GraphArn }),
|
|
85
83
|
});
|
|
86
84
|
return new protocol_http_1.HttpRequest({
|
|
87
85
|
protocol,
|
|
@@ -102,9 +100,8 @@ const serializeAws_restJson1DeleteMembersCommand = async (input, context) => {
|
|
|
102
100
|
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/graph/members/removal";
|
|
103
101
|
let body;
|
|
104
102
|
body = JSON.stringify({
|
|
105
|
-
...(input.AccountIds
|
|
106
|
-
|
|
107
|
-
...(input.GraphArn !== undefined && input.GraphArn !== null && { GraphArn: input.GraphArn }),
|
|
103
|
+
...(input.AccountIds != null && { AccountIds: serializeAws_restJson1AccountIdList(input.AccountIds, context) }),
|
|
104
|
+
...(input.GraphArn != null && { GraphArn: input.GraphArn }),
|
|
108
105
|
});
|
|
109
106
|
return new protocol_http_1.HttpRequest({
|
|
110
107
|
protocol,
|
|
@@ -125,7 +122,7 @@ const serializeAws_restJson1DescribeOrganizationConfigurationCommand = async (in
|
|
|
125
122
|
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/orgs/describeOrganizationConfiguration";
|
|
126
123
|
let body;
|
|
127
124
|
body = JSON.stringify({
|
|
128
|
-
...(input.GraphArn
|
|
125
|
+
...(input.GraphArn != null && { GraphArn: input.GraphArn }),
|
|
129
126
|
});
|
|
130
127
|
return new protocol_http_1.HttpRequest({
|
|
131
128
|
protocol,
|
|
@@ -165,7 +162,7 @@ const serializeAws_restJson1DisassociateMembershipCommand = async (input, contex
|
|
|
165
162
|
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/membership/removal";
|
|
166
163
|
let body;
|
|
167
164
|
body = JSON.stringify({
|
|
168
|
-
...(input.GraphArn
|
|
165
|
+
...(input.GraphArn != null && { GraphArn: input.GraphArn }),
|
|
169
166
|
});
|
|
170
167
|
return new protocol_http_1.HttpRequest({
|
|
171
168
|
protocol,
|
|
@@ -186,7 +183,7 @@ const serializeAws_restJson1EnableOrganizationAdminAccountCommand = async (input
|
|
|
186
183
|
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/orgs/enableAdminAccount";
|
|
187
184
|
let body;
|
|
188
185
|
body = JSON.stringify({
|
|
189
|
-
...(input.AccountId
|
|
186
|
+
...(input.AccountId != null && { AccountId: input.AccountId }),
|
|
190
187
|
});
|
|
191
188
|
return new protocol_http_1.HttpRequest({
|
|
192
189
|
protocol,
|
|
@@ -207,9 +204,8 @@ const serializeAws_restJson1GetMembersCommand = async (input, context) => {
|
|
|
207
204
|
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/graph/members/get";
|
|
208
205
|
let body;
|
|
209
206
|
body = JSON.stringify({
|
|
210
|
-
...(input.AccountIds
|
|
211
|
-
|
|
212
|
-
...(input.GraphArn !== undefined && input.GraphArn !== null && { GraphArn: input.GraphArn }),
|
|
207
|
+
...(input.AccountIds != null && { AccountIds: serializeAws_restJson1AccountIdList(input.AccountIds, context) }),
|
|
208
|
+
...(input.GraphArn != null && { GraphArn: input.GraphArn }),
|
|
213
209
|
});
|
|
214
210
|
return new protocol_http_1.HttpRequest({
|
|
215
211
|
protocol,
|
|
@@ -230,8 +226,8 @@ const serializeAws_restJson1ListGraphsCommand = async (input, context) => {
|
|
|
230
226
|
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/graphs/list";
|
|
231
227
|
let body;
|
|
232
228
|
body = JSON.stringify({
|
|
233
|
-
...(input.MaxResults
|
|
234
|
-
...(input.NextToken
|
|
229
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
230
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
235
231
|
});
|
|
236
232
|
return new protocol_http_1.HttpRequest({
|
|
237
233
|
protocol,
|
|
@@ -252,8 +248,8 @@ const serializeAws_restJson1ListInvitationsCommand = async (input, context) => {
|
|
|
252
248
|
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/invitations/list";
|
|
253
249
|
let body;
|
|
254
250
|
body = JSON.stringify({
|
|
255
|
-
...(input.MaxResults
|
|
256
|
-
...(input.NextToken
|
|
251
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
252
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
257
253
|
});
|
|
258
254
|
return new protocol_http_1.HttpRequest({
|
|
259
255
|
protocol,
|
|
@@ -274,9 +270,9 @@ const serializeAws_restJson1ListMembersCommand = async (input, context) => {
|
|
|
274
270
|
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/graph/members/list";
|
|
275
271
|
let body;
|
|
276
272
|
body = JSON.stringify({
|
|
277
|
-
...(input.GraphArn
|
|
278
|
-
...(input.MaxResults
|
|
279
|
-
...(input.NextToken
|
|
273
|
+
...(input.GraphArn != null && { GraphArn: input.GraphArn }),
|
|
274
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
275
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
280
276
|
});
|
|
281
277
|
return new protocol_http_1.HttpRequest({
|
|
282
278
|
protocol,
|
|
@@ -297,8 +293,8 @@ const serializeAws_restJson1ListOrganizationAdminAccountsCommand = async (input,
|
|
|
297
293
|
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/orgs/adminAccountslist";
|
|
298
294
|
let body;
|
|
299
295
|
body = JSON.stringify({
|
|
300
|
-
...(input.MaxResults
|
|
301
|
-
...(input.NextToken
|
|
296
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
297
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
302
298
|
});
|
|
303
299
|
return new protocol_http_1.HttpRequest({
|
|
304
300
|
protocol,
|
|
@@ -345,7 +341,7 @@ const serializeAws_restJson1RejectInvitationCommand = async (input, context) =>
|
|
|
345
341
|
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/invitation/removal";
|
|
346
342
|
let body;
|
|
347
343
|
body = JSON.stringify({
|
|
348
|
-
...(input.GraphArn
|
|
344
|
+
...(input.GraphArn != null && { GraphArn: input.GraphArn }),
|
|
349
345
|
});
|
|
350
346
|
return new protocol_http_1.HttpRequest({
|
|
351
347
|
protocol,
|
|
@@ -366,8 +362,8 @@ const serializeAws_restJson1StartMonitoringMemberCommand = async (input, context
|
|
|
366
362
|
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/graph/member/monitoringstate";
|
|
367
363
|
let body;
|
|
368
364
|
body = JSON.stringify({
|
|
369
|
-
...(input.AccountId
|
|
370
|
-
...(input.GraphArn
|
|
365
|
+
...(input.AccountId != null && { AccountId: input.AccountId }),
|
|
366
|
+
...(input.GraphArn != null && { GraphArn: input.GraphArn }),
|
|
371
367
|
});
|
|
372
368
|
return new protocol_http_1.HttpRequest({
|
|
373
369
|
protocol,
|
|
@@ -398,7 +394,7 @@ const serializeAws_restJson1TagResourceCommand = async (input, context) => {
|
|
|
398
394
|
}
|
|
399
395
|
let body;
|
|
400
396
|
body = JSON.stringify({
|
|
401
|
-
...(input.Tags
|
|
397
|
+
...(input.Tags != null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),
|
|
402
398
|
});
|
|
403
399
|
return new protocol_http_1.HttpRequest({
|
|
404
400
|
protocol,
|
|
@@ -449,8 +445,8 @@ const serializeAws_restJson1UpdateOrganizationConfigurationCommand = async (inpu
|
|
|
449
445
|
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/orgs/updateOrganizationConfiguration";
|
|
450
446
|
let body;
|
|
451
447
|
body = JSON.stringify({
|
|
452
|
-
...(input.AutoEnable
|
|
453
|
-
...(input.GraphArn
|
|
448
|
+
...(input.AutoEnable != null && { AutoEnable: input.AutoEnable }),
|
|
449
|
+
...(input.GraphArn != null && { GraphArn: input.GraphArn }),
|
|
454
450
|
});
|
|
455
451
|
return new protocol_http_1.HttpRequest({
|
|
456
452
|
protocol,
|
|
@@ -480,8 +476,7 @@ const deserializeAws_restJson1AcceptInvitationCommandError = async (output, cont
|
|
|
480
476
|
body: await parseBody(output.body, context),
|
|
481
477
|
};
|
|
482
478
|
let response;
|
|
483
|
-
|
|
484
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
479
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
485
480
|
switch (errorCode) {
|
|
486
481
|
case "ConflictException":
|
|
487
482
|
case "com.amazonaws.detective#ConflictException":
|
|
@@ -497,10 +492,12 @@ const deserializeAws_restJson1AcceptInvitationCommandError = async (output, cont
|
|
|
497
492
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
498
493
|
default:
|
|
499
494
|
const parsedBody = parsedOutput.body;
|
|
495
|
+
const $metadata = deserializeMetadata(output);
|
|
496
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
500
497
|
response = new DetectiveServiceException_1.DetectiveServiceException({
|
|
501
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
498
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
502
499
|
$fault: "client",
|
|
503
|
-
$metadata
|
|
500
|
+
$metadata,
|
|
504
501
|
});
|
|
505
502
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
506
503
|
}
|
|
@@ -526,8 +523,7 @@ const deserializeAws_restJson1CreateGraphCommandError = async (output, context)
|
|
|
526
523
|
body: await parseBody(output.body, context),
|
|
527
524
|
};
|
|
528
525
|
let response;
|
|
529
|
-
|
|
530
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
526
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
531
527
|
switch (errorCode) {
|
|
532
528
|
case "ConflictException":
|
|
533
529
|
case "com.amazonaws.detective#ConflictException":
|
|
@@ -540,10 +536,12 @@ const deserializeAws_restJson1CreateGraphCommandError = async (output, context)
|
|
|
540
536
|
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
541
537
|
default:
|
|
542
538
|
const parsedBody = parsedOutput.body;
|
|
539
|
+
const $metadata = deserializeMetadata(output);
|
|
540
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
543
541
|
response = new DetectiveServiceException_1.DetectiveServiceException({
|
|
544
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
542
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
545
543
|
$fault: "client",
|
|
546
|
-
$metadata
|
|
544
|
+
$metadata,
|
|
547
545
|
});
|
|
548
546
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
549
547
|
}
|
|
@@ -573,8 +571,7 @@ const deserializeAws_restJson1CreateMembersCommandError = async (output, context
|
|
|
573
571
|
body: await parseBody(output.body, context),
|
|
574
572
|
};
|
|
575
573
|
let response;
|
|
576
|
-
|
|
577
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
574
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
578
575
|
switch (errorCode) {
|
|
579
576
|
case "InternalServerException":
|
|
580
577
|
case "com.amazonaws.detective#InternalServerException":
|
|
@@ -590,10 +587,12 @@ const deserializeAws_restJson1CreateMembersCommandError = async (output, context
|
|
|
590
587
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
591
588
|
default:
|
|
592
589
|
const parsedBody = parsedOutput.body;
|
|
590
|
+
const $metadata = deserializeMetadata(output);
|
|
591
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
593
592
|
response = new DetectiveServiceException_1.DetectiveServiceException({
|
|
594
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
593
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
595
594
|
$fault: "client",
|
|
596
|
-
$metadata
|
|
595
|
+
$metadata,
|
|
597
596
|
});
|
|
598
597
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
599
598
|
}
|
|
@@ -615,8 +614,7 @@ const deserializeAws_restJson1DeleteGraphCommandError = async (output, context)
|
|
|
615
614
|
body: await parseBody(output.body, context),
|
|
616
615
|
};
|
|
617
616
|
let response;
|
|
618
|
-
|
|
619
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
617
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
620
618
|
switch (errorCode) {
|
|
621
619
|
case "InternalServerException":
|
|
622
620
|
case "com.amazonaws.detective#InternalServerException":
|
|
@@ -629,10 +627,12 @@ const deserializeAws_restJson1DeleteGraphCommandError = async (output, context)
|
|
|
629
627
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
630
628
|
default:
|
|
631
629
|
const parsedBody = parsedOutput.body;
|
|
630
|
+
const $metadata = deserializeMetadata(output);
|
|
631
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
632
632
|
response = new DetectiveServiceException_1.DetectiveServiceException({
|
|
633
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
633
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
634
634
|
$fault: "client",
|
|
635
|
-
$metadata
|
|
635
|
+
$metadata,
|
|
636
636
|
});
|
|
637
637
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
638
638
|
}
|
|
@@ -662,8 +662,7 @@ const deserializeAws_restJson1DeleteMembersCommandError = async (output, context
|
|
|
662
662
|
body: await parseBody(output.body, context),
|
|
663
663
|
};
|
|
664
664
|
let response;
|
|
665
|
-
|
|
666
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
665
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
667
666
|
switch (errorCode) {
|
|
668
667
|
case "ConflictException":
|
|
669
668
|
case "com.amazonaws.detective#ConflictException":
|
|
@@ -679,10 +678,12 @@ const deserializeAws_restJson1DeleteMembersCommandError = async (output, context
|
|
|
679
678
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
680
679
|
default:
|
|
681
680
|
const parsedBody = parsedOutput.body;
|
|
681
|
+
const $metadata = deserializeMetadata(output);
|
|
682
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
682
683
|
response = new DetectiveServiceException_1.DetectiveServiceException({
|
|
683
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
684
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
684
685
|
$fault: "client",
|
|
685
|
-
$metadata
|
|
686
|
+
$metadata,
|
|
686
687
|
});
|
|
687
688
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
688
689
|
}
|
|
@@ -708,8 +709,7 @@ const deserializeAws_restJson1DescribeOrganizationConfigurationCommandError = as
|
|
|
708
709
|
body: await parseBody(output.body, context),
|
|
709
710
|
};
|
|
710
711
|
let response;
|
|
711
|
-
|
|
712
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
712
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
713
713
|
switch (errorCode) {
|
|
714
714
|
case "InternalServerException":
|
|
715
715
|
case "com.amazonaws.detective#InternalServerException":
|
|
@@ -722,10 +722,12 @@ const deserializeAws_restJson1DescribeOrganizationConfigurationCommandError = as
|
|
|
722
722
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
723
723
|
default:
|
|
724
724
|
const parsedBody = parsedOutput.body;
|
|
725
|
+
const $metadata = deserializeMetadata(output);
|
|
726
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
725
727
|
response = new DetectiveServiceException_1.DetectiveServiceException({
|
|
726
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
728
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
727
729
|
$fault: "client",
|
|
728
|
-
$metadata
|
|
730
|
+
$metadata,
|
|
729
731
|
});
|
|
730
732
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
731
733
|
}
|
|
@@ -747,8 +749,7 @@ const deserializeAws_restJson1DisableOrganizationAdminAccountCommandError = asyn
|
|
|
747
749
|
body: await parseBody(output.body, context),
|
|
748
750
|
};
|
|
749
751
|
let response;
|
|
750
|
-
|
|
751
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
752
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
752
753
|
switch (errorCode) {
|
|
753
754
|
case "InternalServerException":
|
|
754
755
|
case "com.amazonaws.detective#InternalServerException":
|
|
@@ -761,10 +762,12 @@ const deserializeAws_restJson1DisableOrganizationAdminAccountCommandError = asyn
|
|
|
761
762
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
762
763
|
default:
|
|
763
764
|
const parsedBody = parsedOutput.body;
|
|
765
|
+
const $metadata = deserializeMetadata(output);
|
|
766
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
764
767
|
response = new DetectiveServiceException_1.DetectiveServiceException({
|
|
765
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
768
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
766
769
|
$fault: "client",
|
|
767
|
-
$metadata
|
|
770
|
+
$metadata,
|
|
768
771
|
});
|
|
769
772
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
770
773
|
}
|
|
@@ -786,8 +789,7 @@ const deserializeAws_restJson1DisassociateMembershipCommandError = async (output
|
|
|
786
789
|
body: await parseBody(output.body, context),
|
|
787
790
|
};
|
|
788
791
|
let response;
|
|
789
|
-
|
|
790
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
792
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
791
793
|
switch (errorCode) {
|
|
792
794
|
case "ConflictException":
|
|
793
795
|
case "com.amazonaws.detective#ConflictException":
|
|
@@ -803,10 +805,12 @@ const deserializeAws_restJson1DisassociateMembershipCommandError = async (output
|
|
|
803
805
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
804
806
|
default:
|
|
805
807
|
const parsedBody = parsedOutput.body;
|
|
808
|
+
const $metadata = deserializeMetadata(output);
|
|
809
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
806
810
|
response = new DetectiveServiceException_1.DetectiveServiceException({
|
|
807
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
811
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
808
812
|
$fault: "client",
|
|
809
|
-
$metadata
|
|
813
|
+
$metadata,
|
|
810
814
|
});
|
|
811
815
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
812
816
|
}
|
|
@@ -828,8 +832,7 @@ const deserializeAws_restJson1EnableOrganizationAdminAccountCommandError = async
|
|
|
828
832
|
body: await parseBody(output.body, context),
|
|
829
833
|
};
|
|
830
834
|
let response;
|
|
831
|
-
|
|
832
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
835
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
833
836
|
switch (errorCode) {
|
|
834
837
|
case "InternalServerException":
|
|
835
838
|
case "com.amazonaws.detective#InternalServerException":
|
|
@@ -842,10 +845,12 @@ const deserializeAws_restJson1EnableOrganizationAdminAccountCommandError = async
|
|
|
842
845
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
843
846
|
default:
|
|
844
847
|
const parsedBody = parsedOutput.body;
|
|
848
|
+
const $metadata = deserializeMetadata(output);
|
|
849
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
845
850
|
response = new DetectiveServiceException_1.DetectiveServiceException({
|
|
846
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
851
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
847
852
|
$fault: "client",
|
|
848
|
-
$metadata
|
|
853
|
+
$metadata,
|
|
849
854
|
});
|
|
850
855
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
851
856
|
}
|
|
@@ -875,8 +880,7 @@ const deserializeAws_restJson1GetMembersCommandError = async (output, context) =
|
|
|
875
880
|
body: await parseBody(output.body, context),
|
|
876
881
|
};
|
|
877
882
|
let response;
|
|
878
|
-
|
|
879
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
883
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
880
884
|
switch (errorCode) {
|
|
881
885
|
case "InternalServerException":
|
|
882
886
|
case "com.amazonaws.detective#InternalServerException":
|
|
@@ -889,10 +893,12 @@ const deserializeAws_restJson1GetMembersCommandError = async (output, context) =
|
|
|
889
893
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
890
894
|
default:
|
|
891
895
|
const parsedBody = parsedOutput.body;
|
|
896
|
+
const $metadata = deserializeMetadata(output);
|
|
897
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
892
898
|
response = new DetectiveServiceException_1.DetectiveServiceException({
|
|
893
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
899
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
894
900
|
$fault: "client",
|
|
895
|
-
$metadata
|
|
901
|
+
$metadata,
|
|
896
902
|
});
|
|
897
903
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
898
904
|
}
|
|
@@ -922,8 +928,7 @@ const deserializeAws_restJson1ListGraphsCommandError = async (output, context) =
|
|
|
922
928
|
body: await parseBody(output.body, context),
|
|
923
929
|
};
|
|
924
930
|
let response;
|
|
925
|
-
|
|
926
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
931
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
927
932
|
switch (errorCode) {
|
|
928
933
|
case "InternalServerException":
|
|
929
934
|
case "com.amazonaws.detective#InternalServerException":
|
|
@@ -933,10 +938,12 @@ const deserializeAws_restJson1ListGraphsCommandError = async (output, context) =
|
|
|
933
938
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
934
939
|
default:
|
|
935
940
|
const parsedBody = parsedOutput.body;
|
|
941
|
+
const $metadata = deserializeMetadata(output);
|
|
942
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
936
943
|
response = new DetectiveServiceException_1.DetectiveServiceException({
|
|
937
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
944
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
938
945
|
$fault: "client",
|
|
939
|
-
$metadata
|
|
946
|
+
$metadata,
|
|
940
947
|
});
|
|
941
948
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
942
949
|
}
|
|
@@ -966,8 +973,7 @@ const deserializeAws_restJson1ListInvitationsCommandError = async (output, conte
|
|
|
966
973
|
body: await parseBody(output.body, context),
|
|
967
974
|
};
|
|
968
975
|
let response;
|
|
969
|
-
|
|
970
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
976
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
971
977
|
switch (errorCode) {
|
|
972
978
|
case "InternalServerException":
|
|
973
979
|
case "com.amazonaws.detective#InternalServerException":
|
|
@@ -977,10 +983,12 @@ const deserializeAws_restJson1ListInvitationsCommandError = async (output, conte
|
|
|
977
983
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
978
984
|
default:
|
|
979
985
|
const parsedBody = parsedOutput.body;
|
|
986
|
+
const $metadata = deserializeMetadata(output);
|
|
987
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
980
988
|
response = new DetectiveServiceException_1.DetectiveServiceException({
|
|
981
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
989
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
982
990
|
$fault: "client",
|
|
983
|
-
$metadata
|
|
991
|
+
$metadata,
|
|
984
992
|
});
|
|
985
993
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
986
994
|
}
|
|
@@ -1010,8 +1018,7 @@ const deserializeAws_restJson1ListMembersCommandError = async (output, context)
|
|
|
1010
1018
|
body: await parseBody(output.body, context),
|
|
1011
1019
|
};
|
|
1012
1020
|
let response;
|
|
1013
|
-
|
|
1014
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1021
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1015
1022
|
switch (errorCode) {
|
|
1016
1023
|
case "InternalServerException":
|
|
1017
1024
|
case "com.amazonaws.detective#InternalServerException":
|
|
@@ -1024,10 +1031,12 @@ const deserializeAws_restJson1ListMembersCommandError = async (output, context)
|
|
|
1024
1031
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1025
1032
|
default:
|
|
1026
1033
|
const parsedBody = parsedOutput.body;
|
|
1034
|
+
const $metadata = deserializeMetadata(output);
|
|
1035
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1027
1036
|
response = new DetectiveServiceException_1.DetectiveServiceException({
|
|
1028
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1037
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1029
1038
|
$fault: "client",
|
|
1030
|
-
$metadata
|
|
1039
|
+
$metadata,
|
|
1031
1040
|
});
|
|
1032
1041
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1033
1042
|
}
|
|
@@ -1057,8 +1066,7 @@ const deserializeAws_restJson1ListOrganizationAdminAccountsCommandError = async
|
|
|
1057
1066
|
body: await parseBody(output.body, context),
|
|
1058
1067
|
};
|
|
1059
1068
|
let response;
|
|
1060
|
-
|
|
1061
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1069
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1062
1070
|
switch (errorCode) {
|
|
1063
1071
|
case "InternalServerException":
|
|
1064
1072
|
case "com.amazonaws.detective#InternalServerException":
|
|
@@ -1071,10 +1079,12 @@ const deserializeAws_restJson1ListOrganizationAdminAccountsCommandError = async
|
|
|
1071
1079
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1072
1080
|
default:
|
|
1073
1081
|
const parsedBody = parsedOutput.body;
|
|
1082
|
+
const $metadata = deserializeMetadata(output);
|
|
1083
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1074
1084
|
response = new DetectiveServiceException_1.DetectiveServiceException({
|
|
1075
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1085
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1076
1086
|
$fault: "client",
|
|
1077
|
-
$metadata
|
|
1087
|
+
$metadata,
|
|
1078
1088
|
});
|
|
1079
1089
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1080
1090
|
}
|
|
@@ -1100,8 +1110,7 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
|
|
|
1100
1110
|
body: await parseBody(output.body, context),
|
|
1101
1111
|
};
|
|
1102
1112
|
let response;
|
|
1103
|
-
|
|
1104
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1113
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1105
1114
|
switch (errorCode) {
|
|
1106
1115
|
case "InternalServerException":
|
|
1107
1116
|
case "com.amazonaws.detective#InternalServerException":
|
|
@@ -1114,10 +1123,12 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
|
|
|
1114
1123
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1115
1124
|
default:
|
|
1116
1125
|
const parsedBody = parsedOutput.body;
|
|
1126
|
+
const $metadata = deserializeMetadata(output);
|
|
1127
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1117
1128
|
response = new DetectiveServiceException_1.DetectiveServiceException({
|
|
1118
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1129
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1119
1130
|
$fault: "client",
|
|
1120
|
-
$metadata
|
|
1131
|
+
$metadata,
|
|
1121
1132
|
});
|
|
1122
1133
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1123
1134
|
}
|
|
@@ -1139,8 +1150,7 @@ const deserializeAws_restJson1RejectInvitationCommandError = async (output, cont
|
|
|
1139
1150
|
body: await parseBody(output.body, context),
|
|
1140
1151
|
};
|
|
1141
1152
|
let response;
|
|
1142
|
-
|
|
1143
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1153
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1144
1154
|
switch (errorCode) {
|
|
1145
1155
|
case "ConflictException":
|
|
1146
1156
|
case "com.amazonaws.detective#ConflictException":
|
|
@@ -1156,10 +1166,12 @@ const deserializeAws_restJson1RejectInvitationCommandError = async (output, cont
|
|
|
1156
1166
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1157
1167
|
default:
|
|
1158
1168
|
const parsedBody = parsedOutput.body;
|
|
1169
|
+
const $metadata = deserializeMetadata(output);
|
|
1170
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1159
1171
|
response = new DetectiveServiceException_1.DetectiveServiceException({
|
|
1160
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1172
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1161
1173
|
$fault: "client",
|
|
1162
|
-
$metadata
|
|
1174
|
+
$metadata,
|
|
1163
1175
|
});
|
|
1164
1176
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1165
1177
|
}
|
|
@@ -1181,8 +1193,7 @@ const deserializeAws_restJson1StartMonitoringMemberCommandError = async (output,
|
|
|
1181
1193
|
body: await parseBody(output.body, context),
|
|
1182
1194
|
};
|
|
1183
1195
|
let response;
|
|
1184
|
-
|
|
1185
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1196
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1186
1197
|
switch (errorCode) {
|
|
1187
1198
|
case "ConflictException":
|
|
1188
1199
|
case "com.amazonaws.detective#ConflictException":
|
|
@@ -1201,10 +1212,12 @@ const deserializeAws_restJson1StartMonitoringMemberCommandError = async (output,
|
|
|
1201
1212
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1202
1213
|
default:
|
|
1203
1214
|
const parsedBody = parsedOutput.body;
|
|
1215
|
+
const $metadata = deserializeMetadata(output);
|
|
1216
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1204
1217
|
response = new DetectiveServiceException_1.DetectiveServiceException({
|
|
1205
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1218
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1206
1219
|
$fault: "client",
|
|
1207
|
-
$metadata
|
|
1220
|
+
$metadata,
|
|
1208
1221
|
});
|
|
1209
1222
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1210
1223
|
}
|
|
@@ -1226,8 +1239,7 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
|
|
|
1226
1239
|
body: await parseBody(output.body, context),
|
|
1227
1240
|
};
|
|
1228
1241
|
let response;
|
|
1229
|
-
|
|
1230
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1242
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1231
1243
|
switch (errorCode) {
|
|
1232
1244
|
case "InternalServerException":
|
|
1233
1245
|
case "com.amazonaws.detective#InternalServerException":
|
|
@@ -1240,10 +1252,12 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
|
|
|
1240
1252
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1241
1253
|
default:
|
|
1242
1254
|
const parsedBody = parsedOutput.body;
|
|
1255
|
+
const $metadata = deserializeMetadata(output);
|
|
1256
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1243
1257
|
response = new DetectiveServiceException_1.DetectiveServiceException({
|
|
1244
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1258
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1245
1259
|
$fault: "client",
|
|
1246
|
-
$metadata
|
|
1260
|
+
$metadata,
|
|
1247
1261
|
});
|
|
1248
1262
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1249
1263
|
}
|
|
@@ -1265,8 +1279,7 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
|
|
|
1265
1279
|
body: await parseBody(output.body, context),
|
|
1266
1280
|
};
|
|
1267
1281
|
let response;
|
|
1268
|
-
|
|
1269
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1282
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1270
1283
|
switch (errorCode) {
|
|
1271
1284
|
case "InternalServerException":
|
|
1272
1285
|
case "com.amazonaws.detective#InternalServerException":
|
|
@@ -1279,10 +1292,12 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
|
|
|
1279
1292
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1280
1293
|
default:
|
|
1281
1294
|
const parsedBody = parsedOutput.body;
|
|
1295
|
+
const $metadata = deserializeMetadata(output);
|
|
1296
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1282
1297
|
response = new DetectiveServiceException_1.DetectiveServiceException({
|
|
1283
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1298
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1284
1299
|
$fault: "client",
|
|
1285
|
-
$metadata
|
|
1300
|
+
$metadata,
|
|
1286
1301
|
});
|
|
1287
1302
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1288
1303
|
}
|
|
@@ -1304,8 +1319,7 @@ const deserializeAws_restJson1UpdateOrganizationConfigurationCommandError = asyn
|
|
|
1304
1319
|
body: await parseBody(output.body, context),
|
|
1305
1320
|
};
|
|
1306
1321
|
let response;
|
|
1307
|
-
|
|
1308
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1322
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1309
1323
|
switch (errorCode) {
|
|
1310
1324
|
case "InternalServerException":
|
|
1311
1325
|
case "com.amazonaws.detective#InternalServerException":
|
|
@@ -1318,10 +1332,12 @@ const deserializeAws_restJson1UpdateOrganizationConfigurationCommandError = asyn
|
|
|
1318
1332
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1319
1333
|
default:
|
|
1320
1334
|
const parsedBody = parsedOutput.body;
|
|
1335
|
+
const $metadata = deserializeMetadata(output);
|
|
1336
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1321
1337
|
response = new DetectiveServiceException_1.DetectiveServiceException({
|
|
1322
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1338
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1323
1339
|
$fault: "client",
|
|
1324
|
-
$metadata
|
|
1340
|
+
$metadata,
|
|
1325
1341
|
});
|
|
1326
1342
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1327
1343
|
}
|
|
@@ -1400,8 +1416,8 @@ const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput,
|
|
|
1400
1416
|
};
|
|
1401
1417
|
const serializeAws_restJson1Account = (input, context) => {
|
|
1402
1418
|
return {
|
|
1403
|
-
...(input.AccountId
|
|
1404
|
-
...(input.EmailAddress
|
|
1419
|
+
...(input.AccountId != null && { AccountId: input.AccountId }),
|
|
1420
|
+
...(input.EmailAddress != null && { EmailAddress: input.EmailAddress }),
|
|
1405
1421
|
};
|
|
1406
1422
|
};
|
|
1407
1423
|
const serializeAws_restJson1AccountIdList = (input, context) => {
|
|
@@ -1449,9 +1465,7 @@ const deserializeAws_restJson1AccountIdList = (output, context) => {
|
|
|
1449
1465
|
const deserializeAws_restJson1Administrator = (output, context) => {
|
|
1450
1466
|
return {
|
|
1451
1467
|
AccountId: (0, smithy_client_1.expectString)(output.AccountId),
|
|
1452
|
-
DelegationTime: output.DelegationTime
|
|
1453
|
-
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.DelegationTime))
|
|
1454
|
-
: undefined,
|
|
1468
|
+
DelegationTime: output.DelegationTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.DelegationTime)) : undefined,
|
|
1455
1469
|
GraphArn: (0, smithy_client_1.expectString)(output.GraphArn),
|
|
1456
1470
|
};
|
|
1457
1471
|
};
|
|
@@ -1469,9 +1483,7 @@ const deserializeAws_restJson1AdministratorList = (output, context) => {
|
|
|
1469
1483
|
const deserializeAws_restJson1Graph = (output, context) => {
|
|
1470
1484
|
return {
|
|
1471
1485
|
Arn: (0, smithy_client_1.expectString)(output.Arn),
|
|
1472
|
-
CreatedTime: output.CreatedTime
|
|
1473
|
-
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.CreatedTime))
|
|
1474
|
-
: undefined,
|
|
1486
|
+
CreatedTime: output.CreatedTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.CreatedTime)) : undefined,
|
|
1475
1487
|
};
|
|
1476
1488
|
};
|
|
1477
1489
|
const deserializeAws_restJson1GraphList = (output, context) => {
|
|
@@ -1493,20 +1505,16 @@ const deserializeAws_restJson1MemberDetail = (output, context) => {
|
|
|
1493
1505
|
EmailAddress: (0, smithy_client_1.expectString)(output.EmailAddress),
|
|
1494
1506
|
GraphArn: (0, smithy_client_1.expectString)(output.GraphArn),
|
|
1495
1507
|
InvitationType: (0, smithy_client_1.expectString)(output.InvitationType),
|
|
1496
|
-
InvitedTime: output.InvitedTime
|
|
1497
|
-
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.InvitedTime))
|
|
1498
|
-
: undefined,
|
|
1508
|
+
InvitedTime: output.InvitedTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.InvitedTime)) : undefined,
|
|
1499
1509
|
MasterId: (0, smithy_client_1.expectString)(output.MasterId),
|
|
1500
1510
|
PercentOfGraphUtilization: (0, smithy_client_1.limitedParseDouble)(output.PercentOfGraphUtilization),
|
|
1501
|
-
PercentOfGraphUtilizationUpdatedTime: output.PercentOfGraphUtilizationUpdatedTime
|
|
1511
|
+
PercentOfGraphUtilizationUpdatedTime: output.PercentOfGraphUtilizationUpdatedTime != null
|
|
1502
1512
|
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.PercentOfGraphUtilizationUpdatedTime))
|
|
1503
1513
|
: undefined,
|
|
1504
1514
|
Status: (0, smithy_client_1.expectString)(output.Status),
|
|
1505
|
-
UpdatedTime: output.UpdatedTime
|
|
1506
|
-
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.UpdatedTime))
|
|
1507
|
-
: undefined,
|
|
1515
|
+
UpdatedTime: output.UpdatedTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.UpdatedTime)) : undefined,
|
|
1508
1516
|
VolumeUsageInBytes: (0, smithy_client_1.expectLong)(output.VolumeUsageInBytes),
|
|
1509
|
-
VolumeUsageUpdatedTime: output.VolumeUsageUpdatedTime
|
|
1517
|
+
VolumeUsageUpdatedTime: output.VolumeUsageUpdatedTime != null
|
|
1510
1518
|
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.VolumeUsageUpdatedTime))
|
|
1511
1519
|
: undefined,
|
|
1512
1520
|
};
|
|
@@ -1599,5 +1607,4 @@ const loadRestJsonErrorCode = (output, data) => {
|
|
|
1599
1607
|
if (data["__type"] !== undefined) {
|
|
1600
1608
|
return sanitizeErrorCode(data["__type"]);
|
|
1601
1609
|
}
|
|
1602
|
-
return "";
|
|
1603
1610
|
};
|