@aws-sdk/client-iotdeviceadvisor 3.118.1 → 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.
- package/CHANGELOG.md +30 -0
- package/dist-cjs/endpoints.js +38 -1
- package/dist-cjs/protocols/Aws_restJson1.js +99 -117
- package/dist-es/endpoints.js +38 -1
- package/dist-es/protocols/Aws_restJson1.js +92 -110
- package/package.json +26 -26
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,36 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.127.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.126.0...v3.127.0) (2022-07-11)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @aws-sdk/client-iotdeviceadvisor
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [3.121.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.120.0...v3.121.0) (2022-06-30)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* **clients:** fallback to status code for unmodeled errors ([#3752](https://github.com/aws/aws-sdk-js-v3/issues/3752)) ([49bcc4f](https://github.com/aws/aws-sdk-js-v3/commit/49bcc4f153e890e798a8e82fd5fc397b2dcc449f))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
# [3.120.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.119.0...v3.120.0) (2022-06-29)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Features
|
|
29
|
+
|
|
30
|
+
* **clients:** update client endpoints as of 2022-06-29 ([b078874](https://github.com/aws/aws-sdk-js-v3/commit/b07887465adfa10a71ff222faf41c70054f51f6e))
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
6
36
|
## [3.118.1](https://github.com/aws/aws-sdk-js-v3/compare/v3.118.0...v3.118.1) (2022-06-27)
|
|
7
37
|
|
|
8
38
|
**Note:** Version bump only for package @aws-sdk/client-iotdeviceadvisor
|
package/dist-cjs/endpoints.js
CHANGED
|
@@ -2,7 +2,44 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.defaultRegionInfoProvider = void 0;
|
|
4
4
|
const config_resolver_1 = require("@aws-sdk/config-resolver");
|
|
5
|
-
const regionHash = {
|
|
5
|
+
const regionHash = {
|
|
6
|
+
"ap-northeast-1": {
|
|
7
|
+
variants: [
|
|
8
|
+
{
|
|
9
|
+
hostname: "api.iotdeviceadvisor.ap-northeast-1.amazonaws.com",
|
|
10
|
+
tags: [],
|
|
11
|
+
},
|
|
12
|
+
],
|
|
13
|
+
signingRegion: "ap-northeast-1",
|
|
14
|
+
},
|
|
15
|
+
"eu-west-1": {
|
|
16
|
+
variants: [
|
|
17
|
+
{
|
|
18
|
+
hostname: "api.iotdeviceadvisor.eu-west-1.amazonaws.com",
|
|
19
|
+
tags: [],
|
|
20
|
+
},
|
|
21
|
+
],
|
|
22
|
+
signingRegion: "eu-west-1",
|
|
23
|
+
},
|
|
24
|
+
"us-east-1": {
|
|
25
|
+
variants: [
|
|
26
|
+
{
|
|
27
|
+
hostname: "api.iotdeviceadvisor.us-east-1.amazonaws.com",
|
|
28
|
+
tags: [],
|
|
29
|
+
},
|
|
30
|
+
],
|
|
31
|
+
signingRegion: "us-east-1",
|
|
32
|
+
},
|
|
33
|
+
"us-west-2": {
|
|
34
|
+
variants: [
|
|
35
|
+
{
|
|
36
|
+
hostname: "api.iotdeviceadvisor.us-west-2.amazonaws.com",
|
|
37
|
+
tags: [],
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
signingRegion: "us-west-2",
|
|
41
|
+
},
|
|
42
|
+
};
|
|
6
43
|
const partitionHash = {
|
|
7
44
|
aws: {
|
|
8
45
|
regions: [
|
|
@@ -13,11 +13,10 @@ const serializeAws_restJson1CreateSuiteDefinitionCommand = async (input, context
|
|
|
13
13
|
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/suiteDefinitions";
|
|
14
14
|
let body;
|
|
15
15
|
body = JSON.stringify({
|
|
16
|
-
...(input.suiteDefinitionConfiguration
|
|
17
|
-
input.suiteDefinitionConfiguration !== null && {
|
|
16
|
+
...(input.suiteDefinitionConfiguration != null && {
|
|
18
17
|
suiteDefinitionConfiguration: serializeAws_restJson1SuiteDefinitionConfiguration(input.suiteDefinitionConfiguration, context),
|
|
19
18
|
}),
|
|
20
|
-
...(input.tags
|
|
19
|
+
...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
|
|
21
20
|
});
|
|
22
21
|
return new protocol_http_1.HttpRequest({
|
|
23
22
|
protocol,
|
|
@@ -270,13 +269,11 @@ const serializeAws_restJson1StartSuiteRunCommand = async (input, context) => {
|
|
|
270
269
|
}
|
|
271
270
|
let body;
|
|
272
271
|
body = JSON.stringify({
|
|
273
|
-
...(input.suiteDefinitionVersion
|
|
274
|
-
|
|
275
|
-
...(input.suiteRunConfiguration !== undefined &&
|
|
276
|
-
input.suiteRunConfiguration !== null && {
|
|
272
|
+
...(input.suiteDefinitionVersion != null && { suiteDefinitionVersion: input.suiteDefinitionVersion }),
|
|
273
|
+
...(input.suiteRunConfiguration != null && {
|
|
277
274
|
suiteRunConfiguration: serializeAws_restJson1SuiteRunConfiguration(input.suiteRunConfiguration, context),
|
|
278
275
|
}),
|
|
279
|
-
...(input.tags
|
|
276
|
+
...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
|
|
280
277
|
});
|
|
281
278
|
return new protocol_http_1.HttpRequest({
|
|
282
279
|
protocol,
|
|
@@ -344,7 +341,7 @@ const serializeAws_restJson1TagResourceCommand = async (input, context) => {
|
|
|
344
341
|
}
|
|
345
342
|
let body;
|
|
346
343
|
body = JSON.stringify({
|
|
347
|
-
...(input.tags
|
|
344
|
+
...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
|
|
348
345
|
});
|
|
349
346
|
return new protocol_http_1.HttpRequest({
|
|
350
347
|
protocol,
|
|
@@ -405,8 +402,7 @@ const serializeAws_restJson1UpdateSuiteDefinitionCommand = async (input, context
|
|
|
405
402
|
}
|
|
406
403
|
let body;
|
|
407
404
|
body = JSON.stringify({
|
|
408
|
-
...(input.suiteDefinitionConfiguration
|
|
409
|
-
input.suiteDefinitionConfiguration !== null && {
|
|
405
|
+
...(input.suiteDefinitionConfiguration != null && {
|
|
410
406
|
suiteDefinitionConfiguration: serializeAws_restJson1SuiteDefinitionConfiguration(input.suiteDefinitionConfiguration, context),
|
|
411
407
|
}),
|
|
412
408
|
});
|
|
@@ -454,8 +450,7 @@ const deserializeAws_restJson1CreateSuiteDefinitionCommandError = async (output,
|
|
|
454
450
|
body: await parseBody(output.body, context),
|
|
455
451
|
};
|
|
456
452
|
let response;
|
|
457
|
-
|
|
458
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
453
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
459
454
|
switch (errorCode) {
|
|
460
455
|
case "InternalServerException":
|
|
461
456
|
case "com.amazonaws.iotdeviceadvisor#InternalServerException":
|
|
@@ -465,10 +460,12 @@ const deserializeAws_restJson1CreateSuiteDefinitionCommandError = async (output,
|
|
|
465
460
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
466
461
|
default:
|
|
467
462
|
const parsedBody = parsedOutput.body;
|
|
463
|
+
const $metadata = deserializeMetadata(output);
|
|
464
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
468
465
|
response = new IotDeviceAdvisorServiceException_1.IotDeviceAdvisorServiceException({
|
|
469
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
466
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
470
467
|
$fault: "client",
|
|
471
|
-
$metadata
|
|
468
|
+
$metadata,
|
|
472
469
|
});
|
|
473
470
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
474
471
|
}
|
|
@@ -490,8 +487,7 @@ const deserializeAws_restJson1DeleteSuiteDefinitionCommandError = async (output,
|
|
|
490
487
|
body: await parseBody(output.body, context),
|
|
491
488
|
};
|
|
492
489
|
let response;
|
|
493
|
-
|
|
494
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
490
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
495
491
|
switch (errorCode) {
|
|
496
492
|
case "InternalServerException":
|
|
497
493
|
case "com.amazonaws.iotdeviceadvisor#InternalServerException":
|
|
@@ -501,10 +497,12 @@ const deserializeAws_restJson1DeleteSuiteDefinitionCommandError = async (output,
|
|
|
501
497
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
502
498
|
default:
|
|
503
499
|
const parsedBody = parsedOutput.body;
|
|
500
|
+
const $metadata = deserializeMetadata(output);
|
|
501
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
504
502
|
response = new IotDeviceAdvisorServiceException_1.IotDeviceAdvisorServiceException({
|
|
505
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
503
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
506
504
|
$fault: "client",
|
|
507
|
-
$metadata
|
|
505
|
+
$metadata,
|
|
508
506
|
});
|
|
509
507
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
510
508
|
}
|
|
@@ -530,8 +528,7 @@ const deserializeAws_restJson1GetEndpointCommandError = async (output, context)
|
|
|
530
528
|
body: await parseBody(output.body, context),
|
|
531
529
|
};
|
|
532
530
|
let response;
|
|
533
|
-
|
|
534
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
531
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
535
532
|
switch (errorCode) {
|
|
536
533
|
case "InternalServerException":
|
|
537
534
|
case "com.amazonaws.iotdeviceadvisor#InternalServerException":
|
|
@@ -544,10 +541,12 @@ const deserializeAws_restJson1GetEndpointCommandError = async (output, context)
|
|
|
544
541
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
545
542
|
default:
|
|
546
543
|
const parsedBody = parsedOutput.body;
|
|
544
|
+
const $metadata = deserializeMetadata(output);
|
|
545
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
547
546
|
response = new IotDeviceAdvisorServiceException_1.IotDeviceAdvisorServiceException({
|
|
548
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
547
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
549
548
|
$fault: "client",
|
|
550
|
-
$metadata
|
|
549
|
+
$metadata,
|
|
551
550
|
});
|
|
552
551
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
553
552
|
}
|
|
@@ -601,8 +600,7 @@ const deserializeAws_restJson1GetSuiteDefinitionCommandError = async (output, co
|
|
|
601
600
|
body: await parseBody(output.body, context),
|
|
602
601
|
};
|
|
603
602
|
let response;
|
|
604
|
-
|
|
605
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
603
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
606
604
|
switch (errorCode) {
|
|
607
605
|
case "InternalServerException":
|
|
608
606
|
case "com.amazonaws.iotdeviceadvisor#InternalServerException":
|
|
@@ -615,10 +613,12 @@ const deserializeAws_restJson1GetSuiteDefinitionCommandError = async (output, co
|
|
|
615
613
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
616
614
|
default:
|
|
617
615
|
const parsedBody = parsedOutput.body;
|
|
616
|
+
const $metadata = deserializeMetadata(output);
|
|
617
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
618
618
|
response = new IotDeviceAdvisorServiceException_1.IotDeviceAdvisorServiceException({
|
|
619
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
619
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
620
620
|
$fault: "client",
|
|
621
|
-
$metadata
|
|
621
|
+
$metadata,
|
|
622
622
|
});
|
|
623
623
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
624
624
|
}
|
|
@@ -684,8 +684,7 @@ const deserializeAws_restJson1GetSuiteRunCommandError = async (output, context)
|
|
|
684
684
|
body: await parseBody(output.body, context),
|
|
685
685
|
};
|
|
686
686
|
let response;
|
|
687
|
-
|
|
688
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
687
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
689
688
|
switch (errorCode) {
|
|
690
689
|
case "InternalServerException":
|
|
691
690
|
case "com.amazonaws.iotdeviceadvisor#InternalServerException":
|
|
@@ -698,10 +697,12 @@ const deserializeAws_restJson1GetSuiteRunCommandError = async (output, context)
|
|
|
698
697
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
699
698
|
default:
|
|
700
699
|
const parsedBody = parsedOutput.body;
|
|
700
|
+
const $metadata = deserializeMetadata(output);
|
|
701
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
701
702
|
response = new IotDeviceAdvisorServiceException_1.IotDeviceAdvisorServiceException({
|
|
702
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
703
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
703
704
|
$fault: "client",
|
|
704
|
-
$metadata
|
|
705
|
+
$metadata,
|
|
705
706
|
});
|
|
706
707
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
707
708
|
}
|
|
@@ -727,8 +728,7 @@ const deserializeAws_restJson1GetSuiteRunReportCommandError = async (output, con
|
|
|
727
728
|
body: await parseBody(output.body, context),
|
|
728
729
|
};
|
|
729
730
|
let response;
|
|
730
|
-
|
|
731
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
731
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
732
732
|
switch (errorCode) {
|
|
733
733
|
case "InternalServerException":
|
|
734
734
|
case "com.amazonaws.iotdeviceadvisor#InternalServerException":
|
|
@@ -741,10 +741,12 @@ const deserializeAws_restJson1GetSuiteRunReportCommandError = async (output, con
|
|
|
741
741
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
742
742
|
default:
|
|
743
743
|
const parsedBody = parsedOutput.body;
|
|
744
|
+
const $metadata = deserializeMetadata(output);
|
|
745
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
744
746
|
response = new IotDeviceAdvisorServiceException_1.IotDeviceAdvisorServiceException({
|
|
745
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
747
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
746
748
|
$fault: "client",
|
|
747
|
-
$metadata
|
|
749
|
+
$metadata,
|
|
748
750
|
});
|
|
749
751
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
750
752
|
}
|
|
@@ -774,8 +776,7 @@ const deserializeAws_restJson1ListSuiteDefinitionsCommandError = async (output,
|
|
|
774
776
|
body: await parseBody(output.body, context),
|
|
775
777
|
};
|
|
776
778
|
let response;
|
|
777
|
-
|
|
778
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
779
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
779
780
|
switch (errorCode) {
|
|
780
781
|
case "InternalServerException":
|
|
781
782
|
case "com.amazonaws.iotdeviceadvisor#InternalServerException":
|
|
@@ -785,10 +786,12 @@ const deserializeAws_restJson1ListSuiteDefinitionsCommandError = async (output,
|
|
|
785
786
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
786
787
|
default:
|
|
787
788
|
const parsedBody = parsedOutput.body;
|
|
789
|
+
const $metadata = deserializeMetadata(output);
|
|
790
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
788
791
|
response = new IotDeviceAdvisorServiceException_1.IotDeviceAdvisorServiceException({
|
|
789
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
792
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
790
793
|
$fault: "client",
|
|
791
|
-
$metadata
|
|
794
|
+
$metadata,
|
|
792
795
|
});
|
|
793
796
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
794
797
|
}
|
|
@@ -818,8 +821,7 @@ const deserializeAws_restJson1ListSuiteRunsCommandError = async (output, context
|
|
|
818
821
|
body: await parseBody(output.body, context),
|
|
819
822
|
};
|
|
820
823
|
let response;
|
|
821
|
-
|
|
822
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
824
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
823
825
|
switch (errorCode) {
|
|
824
826
|
case "InternalServerException":
|
|
825
827
|
case "com.amazonaws.iotdeviceadvisor#InternalServerException":
|
|
@@ -829,10 +831,12 @@ const deserializeAws_restJson1ListSuiteRunsCommandError = async (output, context
|
|
|
829
831
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
830
832
|
default:
|
|
831
833
|
const parsedBody = parsedOutput.body;
|
|
834
|
+
const $metadata = deserializeMetadata(output);
|
|
835
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
832
836
|
response = new IotDeviceAdvisorServiceException_1.IotDeviceAdvisorServiceException({
|
|
833
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
837
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
834
838
|
$fault: "client",
|
|
835
|
-
$metadata
|
|
839
|
+
$metadata,
|
|
836
840
|
});
|
|
837
841
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
838
842
|
}
|
|
@@ -858,8 +862,7 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
|
|
|
858
862
|
body: await parseBody(output.body, context),
|
|
859
863
|
};
|
|
860
864
|
let response;
|
|
861
|
-
|
|
862
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
865
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
863
866
|
switch (errorCode) {
|
|
864
867
|
case "InternalServerException":
|
|
865
868
|
case "com.amazonaws.iotdeviceadvisor#InternalServerException":
|
|
@@ -872,10 +875,12 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
|
|
|
872
875
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
873
876
|
default:
|
|
874
877
|
const parsedBody = parsedOutput.body;
|
|
878
|
+
const $metadata = deserializeMetadata(output);
|
|
879
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
875
880
|
response = new IotDeviceAdvisorServiceException_1.IotDeviceAdvisorServiceException({
|
|
876
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
881
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
877
882
|
$fault: "client",
|
|
878
|
-
$metadata
|
|
883
|
+
$metadata,
|
|
879
884
|
});
|
|
880
885
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
881
886
|
}
|
|
@@ -909,8 +914,7 @@ const deserializeAws_restJson1StartSuiteRunCommandError = async (output, context
|
|
|
909
914
|
body: await parseBody(output.body, context),
|
|
910
915
|
};
|
|
911
916
|
let response;
|
|
912
|
-
|
|
913
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
917
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
914
918
|
switch (errorCode) {
|
|
915
919
|
case "ConflictException":
|
|
916
920
|
case "com.amazonaws.iotdeviceadvisor#ConflictException":
|
|
@@ -923,10 +927,12 @@ const deserializeAws_restJson1StartSuiteRunCommandError = async (output, context
|
|
|
923
927
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
924
928
|
default:
|
|
925
929
|
const parsedBody = parsedOutput.body;
|
|
930
|
+
const $metadata = deserializeMetadata(output);
|
|
931
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
926
932
|
response = new IotDeviceAdvisorServiceException_1.IotDeviceAdvisorServiceException({
|
|
927
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
933
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
928
934
|
$fault: "client",
|
|
929
|
-
$metadata
|
|
935
|
+
$metadata,
|
|
930
936
|
});
|
|
931
937
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
932
938
|
}
|
|
@@ -948,8 +954,7 @@ const deserializeAws_restJson1StopSuiteRunCommandError = async (output, context)
|
|
|
948
954
|
body: await parseBody(output.body, context),
|
|
949
955
|
};
|
|
950
956
|
let response;
|
|
951
|
-
|
|
952
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
957
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
953
958
|
switch (errorCode) {
|
|
954
959
|
case "InternalServerException":
|
|
955
960
|
case "com.amazonaws.iotdeviceadvisor#InternalServerException":
|
|
@@ -962,10 +967,12 @@ const deserializeAws_restJson1StopSuiteRunCommandError = async (output, context)
|
|
|
962
967
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
963
968
|
default:
|
|
964
969
|
const parsedBody = parsedOutput.body;
|
|
970
|
+
const $metadata = deserializeMetadata(output);
|
|
971
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
965
972
|
response = new IotDeviceAdvisorServiceException_1.IotDeviceAdvisorServiceException({
|
|
966
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
973
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
967
974
|
$fault: "client",
|
|
968
|
-
$metadata
|
|
975
|
+
$metadata,
|
|
969
976
|
});
|
|
970
977
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
971
978
|
}
|
|
@@ -987,8 +994,7 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
|
|
|
987
994
|
body: await parseBody(output.body, context),
|
|
988
995
|
};
|
|
989
996
|
let response;
|
|
990
|
-
|
|
991
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
997
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
992
998
|
switch (errorCode) {
|
|
993
999
|
case "InternalServerException":
|
|
994
1000
|
case "com.amazonaws.iotdeviceadvisor#InternalServerException":
|
|
@@ -1001,10 +1007,12 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
|
|
|
1001
1007
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1002
1008
|
default:
|
|
1003
1009
|
const parsedBody = parsedOutput.body;
|
|
1010
|
+
const $metadata = deserializeMetadata(output);
|
|
1011
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1004
1012
|
response = new IotDeviceAdvisorServiceException_1.IotDeviceAdvisorServiceException({
|
|
1005
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1013
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1006
1014
|
$fault: "client",
|
|
1007
|
-
$metadata
|
|
1015
|
+
$metadata,
|
|
1008
1016
|
});
|
|
1009
1017
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1010
1018
|
}
|
|
@@ -1026,8 +1034,7 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
|
|
|
1026
1034
|
body: await parseBody(output.body, context),
|
|
1027
1035
|
};
|
|
1028
1036
|
let response;
|
|
1029
|
-
|
|
1030
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1037
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1031
1038
|
switch (errorCode) {
|
|
1032
1039
|
case "InternalServerException":
|
|
1033
1040
|
case "com.amazonaws.iotdeviceadvisor#InternalServerException":
|
|
@@ -1040,10 +1047,12 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
|
|
|
1040
1047
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1041
1048
|
default:
|
|
1042
1049
|
const parsedBody = parsedOutput.body;
|
|
1050
|
+
const $metadata = deserializeMetadata(output);
|
|
1051
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1043
1052
|
response = new IotDeviceAdvisorServiceException_1.IotDeviceAdvisorServiceException({
|
|
1044
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1053
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1045
1054
|
$fault: "client",
|
|
1046
|
-
$metadata
|
|
1055
|
+
$metadata,
|
|
1047
1056
|
});
|
|
1048
1057
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1049
1058
|
}
|
|
@@ -1089,8 +1098,7 @@ const deserializeAws_restJson1UpdateSuiteDefinitionCommandError = async (output,
|
|
|
1089
1098
|
body: await parseBody(output.body, context),
|
|
1090
1099
|
};
|
|
1091
1100
|
let response;
|
|
1092
|
-
|
|
1093
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1101
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1094
1102
|
switch (errorCode) {
|
|
1095
1103
|
case "InternalServerException":
|
|
1096
1104
|
case "com.amazonaws.iotdeviceadvisor#InternalServerException":
|
|
@@ -1100,10 +1108,12 @@ const deserializeAws_restJson1UpdateSuiteDefinitionCommandError = async (output,
|
|
|
1100
1108
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1101
1109
|
default:
|
|
1102
1110
|
const parsedBody = parsedOutput.body;
|
|
1111
|
+
const $metadata = deserializeMetadata(output);
|
|
1112
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1103
1113
|
response = new IotDeviceAdvisorServiceException_1.IotDeviceAdvisorServiceException({
|
|
1104
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1114
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1105
1115
|
$fault: "client",
|
|
1106
|
-
$metadata
|
|
1116
|
+
$metadata,
|
|
1107
1117
|
});
|
|
1108
1118
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1109
1119
|
}
|
|
@@ -1158,9 +1168,8 @@ const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput,
|
|
|
1158
1168
|
};
|
|
1159
1169
|
const serializeAws_restJson1DeviceUnderTest = (input, context) => {
|
|
1160
1170
|
return {
|
|
1161
|
-
...(input.certificateArn
|
|
1162
|
-
|
|
1163
|
-
...(input.thingArn !== undefined && input.thingArn !== null && { thingArn: input.thingArn }),
|
|
1171
|
+
...(input.certificateArn != null && { certificateArn: input.certificateArn }),
|
|
1172
|
+
...(input.thingArn != null && { thingArn: input.thingArn }),
|
|
1164
1173
|
};
|
|
1165
1174
|
};
|
|
1166
1175
|
const serializeAws_restJson1DeviceUnderTestList = (input, context) => {
|
|
@@ -1185,26 +1194,20 @@ const serializeAws_restJson1SelectedTestList = (input, context) => {
|
|
|
1185
1194
|
};
|
|
1186
1195
|
const serializeAws_restJson1SuiteDefinitionConfiguration = (input, context) => {
|
|
1187
1196
|
return {
|
|
1188
|
-
...(input.devicePermissionRoleArn
|
|
1189
|
-
|
|
1190
|
-
...(input.
|
|
1191
|
-
|
|
1192
|
-
...(input.
|
|
1193
|
-
input.intendedForQualification !== null && { intendedForQualification: input.intendedForQualification }),
|
|
1194
|
-
...(input.rootGroup !== undefined && input.rootGroup !== null && { rootGroup: input.rootGroup }),
|
|
1195
|
-
...(input.suiteDefinitionName !== undefined &&
|
|
1196
|
-
input.suiteDefinitionName !== null && { suiteDefinitionName: input.suiteDefinitionName }),
|
|
1197
|
+
...(input.devicePermissionRoleArn != null && { devicePermissionRoleArn: input.devicePermissionRoleArn }),
|
|
1198
|
+
...(input.devices != null && { devices: serializeAws_restJson1DeviceUnderTestList(input.devices, context) }),
|
|
1199
|
+
...(input.intendedForQualification != null && { intendedForQualification: input.intendedForQualification }),
|
|
1200
|
+
...(input.rootGroup != null && { rootGroup: input.rootGroup }),
|
|
1201
|
+
...(input.suiteDefinitionName != null && { suiteDefinitionName: input.suiteDefinitionName }),
|
|
1197
1202
|
};
|
|
1198
1203
|
};
|
|
1199
1204
|
const serializeAws_restJson1SuiteRunConfiguration = (input, context) => {
|
|
1200
1205
|
return {
|
|
1201
|
-
...(input.parallelRun
|
|
1202
|
-
...(input.primaryDevice
|
|
1203
|
-
input.primaryDevice !== null && {
|
|
1206
|
+
...(input.parallelRun != null && { parallelRun: input.parallelRun }),
|
|
1207
|
+
...(input.primaryDevice != null && {
|
|
1204
1208
|
primaryDevice: serializeAws_restJson1DeviceUnderTest(input.primaryDevice, context),
|
|
1205
1209
|
}),
|
|
1206
|
-
...(input.selectedTestList
|
|
1207
|
-
input.selectedTestList !== null && {
|
|
1210
|
+
...(input.selectedTestList != null && {
|
|
1208
1211
|
selectedTestList: serializeAws_restJson1SelectedTestList(input.selectedTestList, context),
|
|
1209
1212
|
}),
|
|
1210
1213
|
};
|
|
@@ -1241,9 +1244,7 @@ const deserializeAws_restJson1GroupResult = (output, context) => {
|
|
|
1241
1244
|
return {
|
|
1242
1245
|
groupId: (0, smithy_client_1.expectString)(output.groupId),
|
|
1243
1246
|
groupName: (0, smithy_client_1.expectString)(output.groupName),
|
|
1244
|
-
tests: output.tests
|
|
1245
|
-
? deserializeAws_restJson1TestCaseRuns(output.tests, context)
|
|
1246
|
-
: undefined,
|
|
1247
|
+
tests: output.tests != null ? deserializeAws_restJson1TestCaseRuns(output.tests, context) : undefined,
|
|
1247
1248
|
};
|
|
1248
1249
|
};
|
|
1249
1250
|
const deserializeAws_restJson1GroupResultList = (output, context) => {
|
|
@@ -1271,9 +1272,7 @@ const deserializeAws_restJson1SelectedTestList = (output, context) => {
|
|
|
1271
1272
|
const deserializeAws_restJson1SuiteDefinitionConfiguration = (output, context) => {
|
|
1272
1273
|
return {
|
|
1273
1274
|
devicePermissionRoleArn: (0, smithy_client_1.expectString)(output.devicePermissionRoleArn),
|
|
1274
|
-
devices: output.devices
|
|
1275
|
-
? deserializeAws_restJson1DeviceUnderTestList(output.devices, context)
|
|
1276
|
-
: undefined,
|
|
1275
|
+
devices: output.devices != null ? deserializeAws_restJson1DeviceUnderTestList(output.devices, context) : undefined,
|
|
1277
1276
|
intendedForQualification: (0, smithy_client_1.expectBoolean)(output.intendedForQualification),
|
|
1278
1277
|
rootGroup: (0, smithy_client_1.expectString)(output.rootGroup),
|
|
1279
1278
|
suiteDefinitionName: (0, smithy_client_1.expectString)(output.suiteDefinitionName),
|
|
@@ -1281,10 +1280,8 @@ const deserializeAws_restJson1SuiteDefinitionConfiguration = (output, context) =
|
|
|
1281
1280
|
};
|
|
1282
1281
|
const deserializeAws_restJson1SuiteDefinitionInformation = (output, context) => {
|
|
1283
1282
|
return {
|
|
1284
|
-
createdAt: output.createdAt
|
|
1285
|
-
|
|
1286
|
-
: undefined,
|
|
1287
|
-
defaultDevices: output.defaultDevices !== undefined && output.defaultDevices !== null
|
|
1283
|
+
createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createdAt))) : undefined,
|
|
1284
|
+
defaultDevices: output.defaultDevices != null
|
|
1288
1285
|
? deserializeAws_restJson1DeviceUnderTestList(output.defaultDevices, context)
|
|
1289
1286
|
: undefined,
|
|
1290
1287
|
intendedForQualification: (0, smithy_client_1.expectBoolean)(output.intendedForQualification),
|
|
@@ -1306,27 +1303,19 @@ const deserializeAws_restJson1SuiteDefinitionInformationList = (output, context)
|
|
|
1306
1303
|
const deserializeAws_restJson1SuiteRunConfiguration = (output, context) => {
|
|
1307
1304
|
return {
|
|
1308
1305
|
parallelRun: (0, smithy_client_1.expectBoolean)(output.parallelRun),
|
|
1309
|
-
primaryDevice: output.primaryDevice
|
|
1310
|
-
|
|
1311
|
-
: undefined,
|
|
1312
|
-
selectedTestList: output.selectedTestList !== undefined && output.selectedTestList !== null
|
|
1306
|
+
primaryDevice: output.primaryDevice != null ? deserializeAws_restJson1DeviceUnderTest(output.primaryDevice, context) : undefined,
|
|
1307
|
+
selectedTestList: output.selectedTestList != null
|
|
1313
1308
|
? deserializeAws_restJson1SelectedTestList(output.selectedTestList, context)
|
|
1314
1309
|
: undefined,
|
|
1315
1310
|
};
|
|
1316
1311
|
};
|
|
1317
1312
|
const deserializeAws_restJson1SuiteRunInformation = (output, context) => {
|
|
1318
1313
|
return {
|
|
1319
|
-
createdAt: output.createdAt
|
|
1320
|
-
|
|
1321
|
-
: undefined,
|
|
1322
|
-
endAt: output.endAt !== undefined && output.endAt !== null
|
|
1323
|
-
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.endAt)))
|
|
1324
|
-
: undefined,
|
|
1314
|
+
createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createdAt))) : undefined,
|
|
1315
|
+
endAt: output.endAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.endAt))) : undefined,
|
|
1325
1316
|
failed: (0, smithy_client_1.expectInt32)(output.failed),
|
|
1326
1317
|
passed: (0, smithy_client_1.expectInt32)(output.passed),
|
|
1327
|
-
startedAt: output.startedAt
|
|
1328
|
-
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.startedAt)))
|
|
1329
|
-
: undefined,
|
|
1318
|
+
startedAt: output.startedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.startedAt))) : undefined,
|
|
1330
1319
|
status: (0, smithy_client_1.expectString)(output.status),
|
|
1331
1320
|
suiteDefinitionId: (0, smithy_client_1.expectString)(output.suiteDefinitionId),
|
|
1332
1321
|
suiteDefinitionName: (0, smithy_client_1.expectString)(output.suiteDefinitionName),
|
|
@@ -1358,14 +1347,10 @@ const deserializeAws_restJson1TagMap = (output, context) => {
|
|
|
1358
1347
|
};
|
|
1359
1348
|
const deserializeAws_restJson1TestCaseRun = (output, context) => {
|
|
1360
1349
|
return {
|
|
1361
|
-
endTime: output.endTime
|
|
1362
|
-
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.endTime)))
|
|
1363
|
-
: undefined,
|
|
1350
|
+
endTime: output.endTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.endTime))) : undefined,
|
|
1364
1351
|
failure: (0, smithy_client_1.expectString)(output.failure),
|
|
1365
1352
|
logUrl: (0, smithy_client_1.expectString)(output.logUrl),
|
|
1366
|
-
startTime: output.startTime
|
|
1367
|
-
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.startTime)))
|
|
1368
|
-
: undefined,
|
|
1353
|
+
startTime: output.startTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.startTime))) : undefined,
|
|
1369
1354
|
status: (0, smithy_client_1.expectString)(output.status),
|
|
1370
1355
|
testCaseDefinitionId: (0, smithy_client_1.expectString)(output.testCaseDefinitionId),
|
|
1371
1356
|
testCaseDefinitionName: (0, smithy_client_1.expectString)(output.testCaseDefinitionName),
|
|
@@ -1386,9 +1371,7 @@ const deserializeAws_restJson1TestCaseRuns = (output, context) => {
|
|
|
1386
1371
|
};
|
|
1387
1372
|
const deserializeAws_restJson1TestResult = (output, context) => {
|
|
1388
1373
|
return {
|
|
1389
|
-
groups: output.groups
|
|
1390
|
-
? deserializeAws_restJson1GroupResultList(output.groups, context)
|
|
1391
|
-
: undefined,
|
|
1374
|
+
groups: output.groups != null ? deserializeAws_restJson1GroupResultList(output.groups, context) : undefined,
|
|
1392
1375
|
};
|
|
1393
1376
|
};
|
|
1394
1377
|
const deserializeMetadata = (output) => {
|
|
@@ -1440,5 +1423,4 @@ const loadRestJsonErrorCode = (output, data) => {
|
|
|
1440
1423
|
if (data["__type"] !== undefined) {
|
|
1441
1424
|
return sanitizeErrorCode(data["__type"]);
|
|
1442
1425
|
}
|
|
1443
|
-
return "";
|
|
1444
1426
|
};
|