@aws-sdk/client-shield 3.35.0 → 3.38.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 +47 -0
- package/dist-cjs/Shield.js +0 -7
- package/dist-cjs/ShieldClient.js +0 -12
- package/dist-cjs/commands/AssociateDRTLogBucketCommand.js +0 -26
- package/dist-cjs/commands/AssociateDRTRoleCommand.js +0 -31
- package/dist-cjs/commands/AssociateHealthCheckCommand.js +0 -26
- package/dist-cjs/commands/AssociateProactiveEngagementDetailsCommand.js +0 -30
- package/dist-cjs/commands/CreateProtectionCommand.js +0 -26
- package/dist-cjs/commands/CreateProtectionGroupCommand.js +0 -25
- package/dist-cjs/commands/CreateSubscriptionCommand.js +0 -27
- package/dist-cjs/commands/DeleteProtectionCommand.js +0 -25
- package/dist-cjs/commands/DeleteProtectionGroupCommand.js +0 -25
- package/dist-cjs/commands/DeleteSubscriptionCommand.js +0 -27
- package/dist-cjs/commands/DescribeAttackCommand.js +0 -25
- package/dist-cjs/commands/DescribeAttackStatisticsCommand.js +0 -27
- package/dist-cjs/commands/DescribeDRTAccessCommand.js +0 -25
- package/dist-cjs/commands/DescribeEmergencyContactSettingsCommand.js +0 -25
- package/dist-cjs/commands/DescribeProtectionCommand.js +0 -25
- package/dist-cjs/commands/DescribeProtectionGroupCommand.js +0 -25
- package/dist-cjs/commands/DescribeSubscriptionCommand.js +0 -25
- package/dist-cjs/commands/DisableProactiveEngagementCommand.js +0 -25
- package/dist-cjs/commands/DisassociateDRTLogBucketCommand.js +0 -26
- package/dist-cjs/commands/DisassociateDRTRoleCommand.js +0 -26
- package/dist-cjs/commands/DisassociateHealthCheckCommand.js +0 -26
- package/dist-cjs/commands/EnableProactiveEngagementCommand.js +0 -25
- package/dist-cjs/commands/GetSubscriptionStateCommand.js +0 -25
- package/dist-cjs/commands/ListAttacksCommand.js +0 -26
- package/dist-cjs/commands/ListProtectionGroupsCommand.js +0 -25
- package/dist-cjs/commands/ListProtectionsCommand.js +0 -25
- package/dist-cjs/commands/ListResourcesInProtectionGroupCommand.js +0 -25
- package/dist-cjs/commands/ListTagsForResourceCommand.js +0 -25
- package/dist-cjs/commands/TagResourceCommand.js +0 -25
- package/dist-cjs/commands/UntagResourceCommand.js +0 -25
- package/dist-cjs/commands/UpdateEmergencyContactSettingsCommand.js +0 -25
- package/dist-cjs/commands/UpdateProtectionGroupCommand.js +0 -25
- package/dist-cjs/commands/UpdateSubscriptionCommand.js +0 -25
- package/dist-cjs/commands/index.js +36 -0
- package/dist-cjs/endpoints.js +1 -2
- package/dist-cjs/index.js +4 -41
- package/dist-cjs/models/index.js +0 -1
- package/dist-cjs/models/models_0.js +0 -313
- package/dist-cjs/pagination/Interfaces.js +0 -1
- package/dist-cjs/pagination/ListAttacksPaginator.js +0 -11
- package/dist-cjs/pagination/ListProtectionGroupsPaginator.js +0 -11
- package/dist-cjs/pagination/ListProtectionsPaginator.js +0 -11
- package/dist-cjs/pagination/ListResourcesInProtectionGroupPaginator.js +0 -11
- package/dist-cjs/pagination/index.js +8 -0
- package/dist-cjs/protocols/Aws_json1_1.js +0 -6
- package/dist-cjs/runtimeConfig.browser.js +1 -6
- package/dist-cjs/runtimeConfig.js +2 -7
- package/dist-cjs/runtimeConfig.native.js +0 -4
- package/dist-cjs/runtimeConfig.shared.js +0 -4
- package/dist-es/Shield.js +0 -1
- package/dist-es/ShieldClient.js +0 -1
- package/dist-es/commands/AssociateDRTLogBucketCommand.js +0 -1
- package/dist-es/commands/AssociateDRTRoleCommand.js +0 -1
- package/dist-es/commands/AssociateHealthCheckCommand.js +0 -1
- package/dist-es/commands/AssociateProactiveEngagementDetailsCommand.js +0 -1
- package/dist-es/commands/CreateProtectionCommand.js +0 -1
- package/dist-es/commands/CreateProtectionGroupCommand.js +0 -1
- package/dist-es/commands/CreateSubscriptionCommand.js +0 -1
- package/dist-es/commands/DeleteProtectionCommand.js +0 -1
- package/dist-es/commands/DeleteProtectionGroupCommand.js +0 -1
- package/dist-es/commands/DeleteSubscriptionCommand.js +0 -1
- package/dist-es/commands/DescribeAttackCommand.js +0 -1
- package/dist-es/commands/DescribeAttackStatisticsCommand.js +0 -1
- package/dist-es/commands/DescribeDRTAccessCommand.js +0 -1
- package/dist-es/commands/DescribeEmergencyContactSettingsCommand.js +0 -1
- package/dist-es/commands/DescribeProtectionCommand.js +0 -1
- package/dist-es/commands/DescribeProtectionGroupCommand.js +0 -1
- package/dist-es/commands/DescribeSubscriptionCommand.js +0 -1
- package/dist-es/commands/DisableProactiveEngagementCommand.js +0 -1
- package/dist-es/commands/DisassociateDRTLogBucketCommand.js +0 -1
- package/dist-es/commands/DisassociateDRTRoleCommand.js +0 -1
- package/dist-es/commands/DisassociateHealthCheckCommand.js +0 -1
- package/dist-es/commands/EnableProactiveEngagementCommand.js +0 -1
- package/dist-es/commands/GetSubscriptionStateCommand.js +0 -1
- package/dist-es/commands/ListAttacksCommand.js +0 -1
- package/dist-es/commands/ListProtectionGroupsCommand.js +0 -1
- package/dist-es/commands/ListProtectionsCommand.js +0 -1
- package/dist-es/commands/ListResourcesInProtectionGroupCommand.js +0 -1
- package/dist-es/commands/ListTagsForResourceCommand.js +0 -1
- package/dist-es/commands/TagResourceCommand.js +0 -1
- package/dist-es/commands/UntagResourceCommand.js +0 -1
- package/dist-es/commands/UpdateEmergencyContactSettingsCommand.js +0 -1
- package/dist-es/commands/UpdateProtectionGroupCommand.js +0 -1
- package/dist-es/commands/UpdateSubscriptionCommand.js +0 -1
- package/dist-es/commands/index.js +33 -0
- package/dist-es/endpoints.js +1 -2
- package/dist-es/index.js +4 -41
- package/dist-es/models/index.js +0 -1
- package/dist-es/models/models_0.js +0 -1
- package/dist-es/pagination/Interfaces.js +0 -1
- package/dist-es/pagination/ListAttacksPaginator.js +0 -1
- package/dist-es/pagination/ListProtectionGroupsPaginator.js +0 -1
- package/dist-es/pagination/ListProtectionsPaginator.js +0 -1
- package/dist-es/pagination/ListResourcesInProtectionGroupPaginator.js +0 -1
- package/dist-es/pagination/index.js +5 -0
- package/dist-es/protocols/Aws_json1_1.js +0 -1
- package/dist-es/runtimeConfig.browser.js +1 -2
- package/dist-es/runtimeConfig.js +2 -3
- package/dist-es/runtimeConfig.native.js +0 -1
- package/dist-es/runtimeConfig.shared.js +0 -1
- package/dist-types/commands/index.d.ts +33 -0
- package/dist-types/index.d.ts +4 -40
- package/dist-types/pagination/index.d.ts +5 -0
- package/dist-types/ts3.4/Shield.d.ts +34 -129
- package/dist-types/ts3.4/ShieldClient.d.ts +24 -92
- package/dist-types/ts3.4/commands/AssociateDRTLogBucketCommand.d.ts +2 -21
- package/dist-types/ts3.4/commands/AssociateDRTRoleCommand.d.ts +2 -26
- package/dist-types/ts3.4/commands/AssociateHealthCheckCommand.d.ts +2 -21
- package/dist-types/ts3.4/commands/AssociateProactiveEngagementDetailsCommand.d.ts +2 -25
- package/dist-types/ts3.4/commands/CreateProtectionCommand.d.ts +2 -21
- package/dist-types/ts3.4/commands/CreateProtectionGroupCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/CreateSubscriptionCommand.d.ts +2 -22
- package/dist-types/ts3.4/commands/DeleteProtectionCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/DeleteProtectionGroupCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/DeleteSubscriptionCommand.d.ts +2 -22
- package/dist-types/ts3.4/commands/DescribeAttackCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/DescribeAttackStatisticsCommand.d.ts +2 -22
- package/dist-types/ts3.4/commands/DescribeDRTAccessCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/DescribeEmergencyContactSettingsCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/DescribeProtectionCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/DescribeProtectionGroupCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/DescribeSubscriptionCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/DisableProactiveEngagementCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/DisassociateDRTLogBucketCommand.d.ts +2 -21
- package/dist-types/ts3.4/commands/DisassociateDRTRoleCommand.d.ts +2 -21
- package/dist-types/ts3.4/commands/DisassociateHealthCheckCommand.d.ts +2 -21
- package/dist-types/ts3.4/commands/EnableProactiveEngagementCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/GetSubscriptionStateCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/ListAttacksCommand.d.ts +2 -21
- package/dist-types/ts3.4/commands/ListProtectionGroupsCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/ListProtectionsCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/ListResourcesInProtectionGroupCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/UpdateEmergencyContactSettingsCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/UpdateProtectionGroupCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/UpdateSubscriptionCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/index.d.ts +33 -0
- package/dist-types/ts3.4/index.d.ts +4 -40
- package/dist-types/ts3.4/models/models_0.d.ts +292 -1041
- package/dist-types/ts3.4/pagination/index.d.ts +5 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -3
- package/dist-types/ts3.4/runtimeConfig.d.ts +1 -3
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -3
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +1 -3
- package/package.json +33 -30
- package/dist-cjs/Shield.js.map +0 -1
- package/dist-cjs/ShieldClient.js.map +0 -1
- package/dist-cjs/commands/AssociateDRTLogBucketCommand.js.map +0 -1
- package/dist-cjs/commands/AssociateDRTRoleCommand.js.map +0 -1
- package/dist-cjs/commands/AssociateHealthCheckCommand.js.map +0 -1
- package/dist-cjs/commands/AssociateProactiveEngagementDetailsCommand.js.map +0 -1
- package/dist-cjs/commands/CreateProtectionCommand.js.map +0 -1
- package/dist-cjs/commands/CreateProtectionGroupCommand.js.map +0 -1
- package/dist-cjs/commands/CreateSubscriptionCommand.js.map +0 -1
- package/dist-cjs/commands/DeleteProtectionCommand.js.map +0 -1
- package/dist-cjs/commands/DeleteProtectionGroupCommand.js.map +0 -1
- package/dist-cjs/commands/DeleteSubscriptionCommand.js.map +0 -1
- package/dist-cjs/commands/DescribeAttackCommand.js.map +0 -1
- package/dist-cjs/commands/DescribeAttackStatisticsCommand.js.map +0 -1
- package/dist-cjs/commands/DescribeDRTAccessCommand.js.map +0 -1
- package/dist-cjs/commands/DescribeEmergencyContactSettingsCommand.js.map +0 -1
- package/dist-cjs/commands/DescribeProtectionCommand.js.map +0 -1
- package/dist-cjs/commands/DescribeProtectionGroupCommand.js.map +0 -1
- package/dist-cjs/commands/DescribeSubscriptionCommand.js.map +0 -1
- package/dist-cjs/commands/DisableProactiveEngagementCommand.js.map +0 -1
- package/dist-cjs/commands/DisassociateDRTLogBucketCommand.js.map +0 -1
- package/dist-cjs/commands/DisassociateDRTRoleCommand.js.map +0 -1
- package/dist-cjs/commands/DisassociateHealthCheckCommand.js.map +0 -1
- package/dist-cjs/commands/EnableProactiveEngagementCommand.js.map +0 -1
- package/dist-cjs/commands/GetSubscriptionStateCommand.js.map +0 -1
- package/dist-cjs/commands/ListAttacksCommand.js.map +0 -1
- package/dist-cjs/commands/ListProtectionGroupsCommand.js.map +0 -1
- package/dist-cjs/commands/ListProtectionsCommand.js.map +0 -1
- package/dist-cjs/commands/ListResourcesInProtectionGroupCommand.js.map +0 -1
- package/dist-cjs/commands/ListTagsForResourceCommand.js.map +0 -1
- package/dist-cjs/commands/TagResourceCommand.js.map +0 -1
- package/dist-cjs/commands/UntagResourceCommand.js.map +0 -1
- package/dist-cjs/commands/UpdateEmergencyContactSettingsCommand.js.map +0 -1
- package/dist-cjs/commands/UpdateProtectionGroupCommand.js.map +0 -1
- package/dist-cjs/commands/UpdateSubscriptionCommand.js.map +0 -1
- package/dist-cjs/endpoints.js.map +0 -1
- package/dist-cjs/index.js.map +0 -1
- package/dist-cjs/models/index.js.map +0 -1
- package/dist-cjs/models/models_0.js.map +0 -1
- package/dist-cjs/pagination/Interfaces.js.map +0 -1
- package/dist-cjs/pagination/ListAttacksPaginator.js.map +0 -1
- package/dist-cjs/pagination/ListProtectionGroupsPaginator.js.map +0 -1
- package/dist-cjs/pagination/ListProtectionsPaginator.js.map +0 -1
- package/dist-cjs/pagination/ListResourcesInProtectionGroupPaginator.js.map +0 -1
- package/dist-cjs/protocols/Aws_json1_1.js.map +0 -1
- package/dist-cjs/runtimeConfig.browser.js.map +0 -1
- package/dist-cjs/runtimeConfig.js.map +0 -1
- package/dist-cjs/runtimeConfig.native.js.map +0 -1
- package/dist-cjs/runtimeConfig.shared.js.map +0 -1
- package/dist-es/Shield.js.map +0 -1
- package/dist-es/ShieldClient.js.map +0 -1
- package/dist-es/commands/AssociateDRTLogBucketCommand.js.map +0 -1
- package/dist-es/commands/AssociateDRTRoleCommand.js.map +0 -1
- package/dist-es/commands/AssociateHealthCheckCommand.js.map +0 -1
- package/dist-es/commands/AssociateProactiveEngagementDetailsCommand.js.map +0 -1
- package/dist-es/commands/CreateProtectionCommand.js.map +0 -1
- package/dist-es/commands/CreateProtectionGroupCommand.js.map +0 -1
- package/dist-es/commands/CreateSubscriptionCommand.js.map +0 -1
- package/dist-es/commands/DeleteProtectionCommand.js.map +0 -1
- package/dist-es/commands/DeleteProtectionGroupCommand.js.map +0 -1
- package/dist-es/commands/DeleteSubscriptionCommand.js.map +0 -1
- package/dist-es/commands/DescribeAttackCommand.js.map +0 -1
- package/dist-es/commands/DescribeAttackStatisticsCommand.js.map +0 -1
- package/dist-es/commands/DescribeDRTAccessCommand.js.map +0 -1
- package/dist-es/commands/DescribeEmergencyContactSettingsCommand.js.map +0 -1
- package/dist-es/commands/DescribeProtectionCommand.js.map +0 -1
- package/dist-es/commands/DescribeProtectionGroupCommand.js.map +0 -1
- package/dist-es/commands/DescribeSubscriptionCommand.js.map +0 -1
- package/dist-es/commands/DisableProactiveEngagementCommand.js.map +0 -1
- package/dist-es/commands/DisassociateDRTLogBucketCommand.js.map +0 -1
- package/dist-es/commands/DisassociateDRTRoleCommand.js.map +0 -1
- package/dist-es/commands/DisassociateHealthCheckCommand.js.map +0 -1
- package/dist-es/commands/EnableProactiveEngagementCommand.js.map +0 -1
- package/dist-es/commands/GetSubscriptionStateCommand.js.map +0 -1
- package/dist-es/commands/ListAttacksCommand.js.map +0 -1
- package/dist-es/commands/ListProtectionGroupsCommand.js.map +0 -1
- package/dist-es/commands/ListProtectionsCommand.js.map +0 -1
- package/dist-es/commands/ListResourcesInProtectionGroupCommand.js.map +0 -1
- package/dist-es/commands/ListTagsForResourceCommand.js.map +0 -1
- package/dist-es/commands/TagResourceCommand.js.map +0 -1
- package/dist-es/commands/UntagResourceCommand.js.map +0 -1
- package/dist-es/commands/UpdateEmergencyContactSettingsCommand.js.map +0 -1
- package/dist-es/commands/UpdateProtectionGroupCommand.js.map +0 -1
- package/dist-es/commands/UpdateSubscriptionCommand.js.map +0 -1
- package/dist-es/endpoints.js.map +0 -1
- package/dist-es/index.js.map +0 -1
- package/dist-es/models/index.js.map +0 -1
- package/dist-es/models/models_0.js.map +0 -1
- package/dist-es/pagination/Interfaces.js.map +0 -1
- package/dist-es/pagination/ListAttacksPaginator.js.map +0 -1
- package/dist-es/pagination/ListProtectionGroupsPaginator.js.map +0 -1
- package/dist-es/pagination/ListProtectionsPaginator.js.map +0 -1
- package/dist-es/pagination/ListResourcesInProtectionGroupPaginator.js.map +0 -1
- package/dist-es/protocols/Aws_json1_1.js.map +0 -1
- package/dist-es/runtimeConfig.browser.js.map +0 -1
- package/dist-es/runtimeConfig.js.map +0 -1
- package/dist-es/runtimeConfig.native.js.map +0 -1
- package/dist-es/runtimeConfig.shared.js.map +0 -1
- package/jest.config.js +0 -4
- package/src/Shield.ts +0 -1236
- package/src/ShieldClient.ts +0 -398
- package/src/commands/AssociateDRTLogBucketCommand.ts +0 -96
- package/src/commands/AssociateDRTRoleCommand.ts +0 -101
- package/src/commands/AssociateHealthCheckCommand.ts +0 -96
- package/src/commands/AssociateProactiveEngagementDetailsCommand.ts +0 -111
- package/src/commands/CreateProtectionCommand.ts +0 -96
- package/src/commands/CreateProtectionGroupCommand.ts +0 -95
- package/src/commands/CreateSubscriptionCommand.ts +0 -97
- package/src/commands/DeleteProtectionCommand.ts +0 -95
- package/src/commands/DeleteProtectionGroupCommand.ts +0 -95
- package/src/commands/DeleteSubscriptionCommand.ts +0 -97
- package/src/commands/DescribeAttackCommand.ts +0 -95
- package/src/commands/DescribeAttackStatisticsCommand.ts +0 -97
- package/src/commands/DescribeDRTAccessCommand.ts +0 -95
- package/src/commands/DescribeEmergencyContactSettingsCommand.ts +0 -103
- package/src/commands/DescribeProtectionCommand.ts +0 -95
- package/src/commands/DescribeProtectionGroupCommand.ts +0 -95
- package/src/commands/DescribeSubscriptionCommand.ts +0 -95
- package/src/commands/DisableProactiveEngagementCommand.ts +0 -98
- package/src/commands/DisassociateDRTLogBucketCommand.ts +0 -96
- package/src/commands/DisassociateDRTRoleCommand.ts +0 -96
- package/src/commands/DisassociateHealthCheckCommand.ts +0 -96
- package/src/commands/EnableProactiveEngagementCommand.ts +0 -98
- package/src/commands/GetSubscriptionStateCommand.ts +0 -95
- package/src/commands/ListAttacksCommand.ts +0 -96
- package/src/commands/ListProtectionGroupsCommand.ts +0 -95
- package/src/commands/ListProtectionsCommand.ts +0 -95
- package/src/commands/ListResourcesInProtectionGroupCommand.ts +0 -103
- package/src/commands/ListTagsForResourceCommand.ts +0 -95
- package/src/commands/TagResourceCommand.ts +0 -95
- package/src/commands/UntagResourceCommand.ts +0 -95
- package/src/commands/UpdateEmergencyContactSettingsCommand.ts +0 -103
- package/src/commands/UpdateProtectionGroupCommand.ts +0 -95
- package/src/commands/UpdateSubscriptionCommand.ts +0 -95
- package/src/endpoints.ts +0 -68
- package/src/index.ts +0 -41
- package/src/models/index.ts +0 -1
- package/src/models/models_0.ts +0 -2292
- package/src/pagination/Interfaces.ts +0 -8
- package/src/pagination/ListAttacksPaginator.ts +0 -55
- package/src/pagination/ListProtectionGroupsPaginator.ts +0 -59
- package/src/pagination/ListProtectionsPaginator.ts +0 -59
- package/src/pagination/ListResourcesInProtectionGroupPaginator.ts +0 -59
- package/src/protocols/Aws_json1_1.ts +0 -4754
- package/src/runtimeConfig.browser.ts +0 -41
- package/src/runtimeConfig.native.ts +0 -17
- package/src/runtimeConfig.shared.ts +0 -17
- package/src/runtimeConfig.ts +0 -46
- package/tsconfig.es.json +0 -10
- package/tsconfig.json +0 -33
- package/tsconfig.types.json +0 -9
|
@@ -1,4754 +0,0 @@
|
|
|
1
|
-
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
|
|
2
|
-
import {
|
|
3
|
-
expectInt32 as __expectInt32,
|
|
4
|
-
expectLong as __expectLong,
|
|
5
|
-
expectNonNull as __expectNonNull,
|
|
6
|
-
expectNumber as __expectNumber,
|
|
7
|
-
expectString as __expectString,
|
|
8
|
-
limitedParseDouble as __limitedParseDouble,
|
|
9
|
-
parseEpochTimestamp as __parseEpochTimestamp,
|
|
10
|
-
} from "@aws-sdk/smithy-client";
|
|
11
|
-
import {
|
|
12
|
-
Endpoint as __Endpoint,
|
|
13
|
-
HeaderBag as __HeaderBag,
|
|
14
|
-
MetadataBearer as __MetadataBearer,
|
|
15
|
-
ResponseMetadata as __ResponseMetadata,
|
|
16
|
-
SerdeContext as __SerdeContext,
|
|
17
|
-
SmithyException as __SmithyException,
|
|
18
|
-
} from "@aws-sdk/types";
|
|
19
|
-
|
|
20
|
-
import {
|
|
21
|
-
AssociateDRTLogBucketCommandInput,
|
|
22
|
-
AssociateDRTLogBucketCommandOutput,
|
|
23
|
-
} from "../commands/AssociateDRTLogBucketCommand";
|
|
24
|
-
import { AssociateDRTRoleCommandInput, AssociateDRTRoleCommandOutput } from "../commands/AssociateDRTRoleCommand";
|
|
25
|
-
import {
|
|
26
|
-
AssociateHealthCheckCommandInput,
|
|
27
|
-
AssociateHealthCheckCommandOutput,
|
|
28
|
-
} from "../commands/AssociateHealthCheckCommand";
|
|
29
|
-
import {
|
|
30
|
-
AssociateProactiveEngagementDetailsCommandInput,
|
|
31
|
-
AssociateProactiveEngagementDetailsCommandOutput,
|
|
32
|
-
} from "../commands/AssociateProactiveEngagementDetailsCommand";
|
|
33
|
-
import { CreateProtectionCommandInput, CreateProtectionCommandOutput } from "../commands/CreateProtectionCommand";
|
|
34
|
-
import {
|
|
35
|
-
CreateProtectionGroupCommandInput,
|
|
36
|
-
CreateProtectionGroupCommandOutput,
|
|
37
|
-
} from "../commands/CreateProtectionGroupCommand";
|
|
38
|
-
import { CreateSubscriptionCommandInput, CreateSubscriptionCommandOutput } from "../commands/CreateSubscriptionCommand";
|
|
39
|
-
import { DeleteProtectionCommandInput, DeleteProtectionCommandOutput } from "../commands/DeleteProtectionCommand";
|
|
40
|
-
import {
|
|
41
|
-
DeleteProtectionGroupCommandInput,
|
|
42
|
-
DeleteProtectionGroupCommandOutput,
|
|
43
|
-
} from "../commands/DeleteProtectionGroupCommand";
|
|
44
|
-
import { DeleteSubscriptionCommandInput, DeleteSubscriptionCommandOutput } from "../commands/DeleteSubscriptionCommand";
|
|
45
|
-
import { DescribeAttackCommandInput, DescribeAttackCommandOutput } from "../commands/DescribeAttackCommand";
|
|
46
|
-
import {
|
|
47
|
-
DescribeAttackStatisticsCommandInput,
|
|
48
|
-
DescribeAttackStatisticsCommandOutput,
|
|
49
|
-
} from "../commands/DescribeAttackStatisticsCommand";
|
|
50
|
-
import { DescribeDRTAccessCommandInput, DescribeDRTAccessCommandOutput } from "../commands/DescribeDRTAccessCommand";
|
|
51
|
-
import {
|
|
52
|
-
DescribeEmergencyContactSettingsCommandInput,
|
|
53
|
-
DescribeEmergencyContactSettingsCommandOutput,
|
|
54
|
-
} from "../commands/DescribeEmergencyContactSettingsCommand";
|
|
55
|
-
import { DescribeProtectionCommandInput, DescribeProtectionCommandOutput } from "../commands/DescribeProtectionCommand";
|
|
56
|
-
import {
|
|
57
|
-
DescribeProtectionGroupCommandInput,
|
|
58
|
-
DescribeProtectionGroupCommandOutput,
|
|
59
|
-
} from "../commands/DescribeProtectionGroupCommand";
|
|
60
|
-
import {
|
|
61
|
-
DescribeSubscriptionCommandInput,
|
|
62
|
-
DescribeSubscriptionCommandOutput,
|
|
63
|
-
} from "../commands/DescribeSubscriptionCommand";
|
|
64
|
-
import {
|
|
65
|
-
DisableProactiveEngagementCommandInput,
|
|
66
|
-
DisableProactiveEngagementCommandOutput,
|
|
67
|
-
} from "../commands/DisableProactiveEngagementCommand";
|
|
68
|
-
import {
|
|
69
|
-
DisassociateDRTLogBucketCommandInput,
|
|
70
|
-
DisassociateDRTLogBucketCommandOutput,
|
|
71
|
-
} from "../commands/DisassociateDRTLogBucketCommand";
|
|
72
|
-
import {
|
|
73
|
-
DisassociateDRTRoleCommandInput,
|
|
74
|
-
DisassociateDRTRoleCommandOutput,
|
|
75
|
-
} from "../commands/DisassociateDRTRoleCommand";
|
|
76
|
-
import {
|
|
77
|
-
DisassociateHealthCheckCommandInput,
|
|
78
|
-
DisassociateHealthCheckCommandOutput,
|
|
79
|
-
} from "../commands/DisassociateHealthCheckCommand";
|
|
80
|
-
import {
|
|
81
|
-
EnableProactiveEngagementCommandInput,
|
|
82
|
-
EnableProactiveEngagementCommandOutput,
|
|
83
|
-
} from "../commands/EnableProactiveEngagementCommand";
|
|
84
|
-
import {
|
|
85
|
-
GetSubscriptionStateCommandInput,
|
|
86
|
-
GetSubscriptionStateCommandOutput,
|
|
87
|
-
} from "../commands/GetSubscriptionStateCommand";
|
|
88
|
-
import { ListAttacksCommandInput, ListAttacksCommandOutput } from "../commands/ListAttacksCommand";
|
|
89
|
-
import {
|
|
90
|
-
ListProtectionGroupsCommandInput,
|
|
91
|
-
ListProtectionGroupsCommandOutput,
|
|
92
|
-
} from "../commands/ListProtectionGroupsCommand";
|
|
93
|
-
import { ListProtectionsCommandInput, ListProtectionsCommandOutput } from "../commands/ListProtectionsCommand";
|
|
94
|
-
import {
|
|
95
|
-
ListResourcesInProtectionGroupCommandInput,
|
|
96
|
-
ListResourcesInProtectionGroupCommandOutput,
|
|
97
|
-
} from "../commands/ListResourcesInProtectionGroupCommand";
|
|
98
|
-
import {
|
|
99
|
-
ListTagsForResourceCommandInput,
|
|
100
|
-
ListTagsForResourceCommandOutput,
|
|
101
|
-
} from "../commands/ListTagsForResourceCommand";
|
|
102
|
-
import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/TagResourceCommand";
|
|
103
|
-
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand";
|
|
104
|
-
import {
|
|
105
|
-
UpdateEmergencyContactSettingsCommandInput,
|
|
106
|
-
UpdateEmergencyContactSettingsCommandOutput,
|
|
107
|
-
} from "../commands/UpdateEmergencyContactSettingsCommand";
|
|
108
|
-
import {
|
|
109
|
-
UpdateProtectionGroupCommandInput,
|
|
110
|
-
UpdateProtectionGroupCommandOutput,
|
|
111
|
-
} from "../commands/UpdateProtectionGroupCommand";
|
|
112
|
-
import { UpdateSubscriptionCommandInput, UpdateSubscriptionCommandOutput } from "../commands/UpdateSubscriptionCommand";
|
|
113
|
-
import {
|
|
114
|
-
AccessDeniedException,
|
|
115
|
-
AccessDeniedForDependencyException,
|
|
116
|
-
AssociateDRTLogBucketRequest,
|
|
117
|
-
AssociateDRTLogBucketResponse,
|
|
118
|
-
AssociateDRTRoleRequest,
|
|
119
|
-
AssociateDRTRoleResponse,
|
|
120
|
-
AssociateHealthCheckRequest,
|
|
121
|
-
AssociateHealthCheckResponse,
|
|
122
|
-
AssociateProactiveEngagementDetailsRequest,
|
|
123
|
-
AssociateProactiveEngagementDetailsResponse,
|
|
124
|
-
AttackDetail,
|
|
125
|
-
AttackProperty,
|
|
126
|
-
AttackStatisticsDataItem,
|
|
127
|
-
AttackSummary,
|
|
128
|
-
AttackVectorDescription,
|
|
129
|
-
AttackVolume,
|
|
130
|
-
AttackVolumeStatistics,
|
|
131
|
-
Contributor,
|
|
132
|
-
CreateProtectionGroupRequest,
|
|
133
|
-
CreateProtectionGroupResponse,
|
|
134
|
-
CreateProtectionRequest,
|
|
135
|
-
CreateProtectionResponse,
|
|
136
|
-
CreateSubscriptionRequest,
|
|
137
|
-
CreateSubscriptionResponse,
|
|
138
|
-
DeleteProtectionGroupRequest,
|
|
139
|
-
DeleteProtectionGroupResponse,
|
|
140
|
-
DeleteProtectionRequest,
|
|
141
|
-
DeleteProtectionResponse,
|
|
142
|
-
DeleteSubscriptionRequest,
|
|
143
|
-
DeleteSubscriptionResponse,
|
|
144
|
-
DescribeAttackRequest,
|
|
145
|
-
DescribeAttackResponse,
|
|
146
|
-
DescribeAttackStatisticsRequest,
|
|
147
|
-
DescribeAttackStatisticsResponse,
|
|
148
|
-
DescribeDRTAccessRequest,
|
|
149
|
-
DescribeDRTAccessResponse,
|
|
150
|
-
DescribeEmergencyContactSettingsRequest,
|
|
151
|
-
DescribeEmergencyContactSettingsResponse,
|
|
152
|
-
DescribeProtectionGroupRequest,
|
|
153
|
-
DescribeProtectionGroupResponse,
|
|
154
|
-
DescribeProtectionRequest,
|
|
155
|
-
DescribeProtectionResponse,
|
|
156
|
-
DescribeSubscriptionRequest,
|
|
157
|
-
DescribeSubscriptionResponse,
|
|
158
|
-
DisableProactiveEngagementRequest,
|
|
159
|
-
DisableProactiveEngagementResponse,
|
|
160
|
-
DisassociateDRTLogBucketRequest,
|
|
161
|
-
DisassociateDRTLogBucketResponse,
|
|
162
|
-
DisassociateDRTRoleRequest,
|
|
163
|
-
DisassociateDRTRoleResponse,
|
|
164
|
-
DisassociateHealthCheckRequest,
|
|
165
|
-
DisassociateHealthCheckResponse,
|
|
166
|
-
EmergencyContact,
|
|
167
|
-
EnableProactiveEngagementRequest,
|
|
168
|
-
EnableProactiveEngagementResponse,
|
|
169
|
-
GetSubscriptionStateRequest,
|
|
170
|
-
GetSubscriptionStateResponse,
|
|
171
|
-
InternalErrorException,
|
|
172
|
-
InvalidOperationException,
|
|
173
|
-
InvalidPaginationTokenException,
|
|
174
|
-
InvalidParameterException,
|
|
175
|
-
InvalidResourceException,
|
|
176
|
-
Limit,
|
|
177
|
-
LimitsExceededException,
|
|
178
|
-
ListAttacksRequest,
|
|
179
|
-
ListAttacksResponse,
|
|
180
|
-
ListProtectionGroupsRequest,
|
|
181
|
-
ListProtectionGroupsResponse,
|
|
182
|
-
ListProtectionsRequest,
|
|
183
|
-
ListProtectionsResponse,
|
|
184
|
-
ListResourcesInProtectionGroupRequest,
|
|
185
|
-
ListResourcesInProtectionGroupResponse,
|
|
186
|
-
ListTagsForResourceRequest,
|
|
187
|
-
ListTagsForResourceResponse,
|
|
188
|
-
LockedSubscriptionException,
|
|
189
|
-
Mitigation,
|
|
190
|
-
NoAssociatedRoleException,
|
|
191
|
-
OptimisticLockException,
|
|
192
|
-
Protection,
|
|
193
|
-
ProtectionGroup,
|
|
194
|
-
ProtectionGroupArbitraryPatternLimits,
|
|
195
|
-
ProtectionGroupLimits,
|
|
196
|
-
ProtectionGroupPatternTypeLimits,
|
|
197
|
-
ProtectionLimits,
|
|
198
|
-
ResourceAlreadyExistsException,
|
|
199
|
-
ResourceNotFoundException,
|
|
200
|
-
SubResourceSummary,
|
|
201
|
-
Subscription,
|
|
202
|
-
SubscriptionLimits,
|
|
203
|
-
SummarizedAttackVector,
|
|
204
|
-
SummarizedCounter,
|
|
205
|
-
Tag,
|
|
206
|
-
TagResourceRequest,
|
|
207
|
-
TagResourceResponse,
|
|
208
|
-
TimeRange,
|
|
209
|
-
UntagResourceRequest,
|
|
210
|
-
UntagResourceResponse,
|
|
211
|
-
UpdateEmergencyContactSettingsRequest,
|
|
212
|
-
UpdateEmergencyContactSettingsResponse,
|
|
213
|
-
UpdateProtectionGroupRequest,
|
|
214
|
-
UpdateProtectionGroupResponse,
|
|
215
|
-
UpdateSubscriptionRequest,
|
|
216
|
-
UpdateSubscriptionResponse,
|
|
217
|
-
ValidationExceptionField,
|
|
218
|
-
} from "../models/models_0";
|
|
219
|
-
|
|
220
|
-
export const serializeAws_json1_1AssociateDRTLogBucketCommand = async (
|
|
221
|
-
input: AssociateDRTLogBucketCommandInput,
|
|
222
|
-
context: __SerdeContext
|
|
223
|
-
): Promise<__HttpRequest> => {
|
|
224
|
-
const headers: __HeaderBag = {
|
|
225
|
-
"content-type": "application/x-amz-json-1.1",
|
|
226
|
-
"x-amz-target": "AWSShield_20160616.AssociateDRTLogBucket",
|
|
227
|
-
};
|
|
228
|
-
let body: any;
|
|
229
|
-
body = JSON.stringify(serializeAws_json1_1AssociateDRTLogBucketRequest(input, context));
|
|
230
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
231
|
-
};
|
|
232
|
-
|
|
233
|
-
export const serializeAws_json1_1AssociateDRTRoleCommand = async (
|
|
234
|
-
input: AssociateDRTRoleCommandInput,
|
|
235
|
-
context: __SerdeContext
|
|
236
|
-
): Promise<__HttpRequest> => {
|
|
237
|
-
const headers: __HeaderBag = {
|
|
238
|
-
"content-type": "application/x-amz-json-1.1",
|
|
239
|
-
"x-amz-target": "AWSShield_20160616.AssociateDRTRole",
|
|
240
|
-
};
|
|
241
|
-
let body: any;
|
|
242
|
-
body = JSON.stringify(serializeAws_json1_1AssociateDRTRoleRequest(input, context));
|
|
243
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
244
|
-
};
|
|
245
|
-
|
|
246
|
-
export const serializeAws_json1_1AssociateHealthCheckCommand = async (
|
|
247
|
-
input: AssociateHealthCheckCommandInput,
|
|
248
|
-
context: __SerdeContext
|
|
249
|
-
): Promise<__HttpRequest> => {
|
|
250
|
-
const headers: __HeaderBag = {
|
|
251
|
-
"content-type": "application/x-amz-json-1.1",
|
|
252
|
-
"x-amz-target": "AWSShield_20160616.AssociateHealthCheck",
|
|
253
|
-
};
|
|
254
|
-
let body: any;
|
|
255
|
-
body = JSON.stringify(serializeAws_json1_1AssociateHealthCheckRequest(input, context));
|
|
256
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
257
|
-
};
|
|
258
|
-
|
|
259
|
-
export const serializeAws_json1_1AssociateProactiveEngagementDetailsCommand = async (
|
|
260
|
-
input: AssociateProactiveEngagementDetailsCommandInput,
|
|
261
|
-
context: __SerdeContext
|
|
262
|
-
): Promise<__HttpRequest> => {
|
|
263
|
-
const headers: __HeaderBag = {
|
|
264
|
-
"content-type": "application/x-amz-json-1.1",
|
|
265
|
-
"x-amz-target": "AWSShield_20160616.AssociateProactiveEngagementDetails",
|
|
266
|
-
};
|
|
267
|
-
let body: any;
|
|
268
|
-
body = JSON.stringify(serializeAws_json1_1AssociateProactiveEngagementDetailsRequest(input, context));
|
|
269
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
270
|
-
};
|
|
271
|
-
|
|
272
|
-
export const serializeAws_json1_1CreateProtectionCommand = async (
|
|
273
|
-
input: CreateProtectionCommandInput,
|
|
274
|
-
context: __SerdeContext
|
|
275
|
-
): Promise<__HttpRequest> => {
|
|
276
|
-
const headers: __HeaderBag = {
|
|
277
|
-
"content-type": "application/x-amz-json-1.1",
|
|
278
|
-
"x-amz-target": "AWSShield_20160616.CreateProtection",
|
|
279
|
-
};
|
|
280
|
-
let body: any;
|
|
281
|
-
body = JSON.stringify(serializeAws_json1_1CreateProtectionRequest(input, context));
|
|
282
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
283
|
-
};
|
|
284
|
-
|
|
285
|
-
export const serializeAws_json1_1CreateProtectionGroupCommand = async (
|
|
286
|
-
input: CreateProtectionGroupCommandInput,
|
|
287
|
-
context: __SerdeContext
|
|
288
|
-
): Promise<__HttpRequest> => {
|
|
289
|
-
const headers: __HeaderBag = {
|
|
290
|
-
"content-type": "application/x-amz-json-1.1",
|
|
291
|
-
"x-amz-target": "AWSShield_20160616.CreateProtectionGroup",
|
|
292
|
-
};
|
|
293
|
-
let body: any;
|
|
294
|
-
body = JSON.stringify(serializeAws_json1_1CreateProtectionGroupRequest(input, context));
|
|
295
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
296
|
-
};
|
|
297
|
-
|
|
298
|
-
export const serializeAws_json1_1CreateSubscriptionCommand = async (
|
|
299
|
-
input: CreateSubscriptionCommandInput,
|
|
300
|
-
context: __SerdeContext
|
|
301
|
-
): Promise<__HttpRequest> => {
|
|
302
|
-
const headers: __HeaderBag = {
|
|
303
|
-
"content-type": "application/x-amz-json-1.1",
|
|
304
|
-
"x-amz-target": "AWSShield_20160616.CreateSubscription",
|
|
305
|
-
};
|
|
306
|
-
let body: any;
|
|
307
|
-
body = JSON.stringify(serializeAws_json1_1CreateSubscriptionRequest(input, context));
|
|
308
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
309
|
-
};
|
|
310
|
-
|
|
311
|
-
export const serializeAws_json1_1DeleteProtectionCommand = async (
|
|
312
|
-
input: DeleteProtectionCommandInput,
|
|
313
|
-
context: __SerdeContext
|
|
314
|
-
): Promise<__HttpRequest> => {
|
|
315
|
-
const headers: __HeaderBag = {
|
|
316
|
-
"content-type": "application/x-amz-json-1.1",
|
|
317
|
-
"x-amz-target": "AWSShield_20160616.DeleteProtection",
|
|
318
|
-
};
|
|
319
|
-
let body: any;
|
|
320
|
-
body = JSON.stringify(serializeAws_json1_1DeleteProtectionRequest(input, context));
|
|
321
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
322
|
-
};
|
|
323
|
-
|
|
324
|
-
export const serializeAws_json1_1DeleteProtectionGroupCommand = async (
|
|
325
|
-
input: DeleteProtectionGroupCommandInput,
|
|
326
|
-
context: __SerdeContext
|
|
327
|
-
): Promise<__HttpRequest> => {
|
|
328
|
-
const headers: __HeaderBag = {
|
|
329
|
-
"content-type": "application/x-amz-json-1.1",
|
|
330
|
-
"x-amz-target": "AWSShield_20160616.DeleteProtectionGroup",
|
|
331
|
-
};
|
|
332
|
-
let body: any;
|
|
333
|
-
body = JSON.stringify(serializeAws_json1_1DeleteProtectionGroupRequest(input, context));
|
|
334
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
335
|
-
};
|
|
336
|
-
|
|
337
|
-
export const serializeAws_json1_1DeleteSubscriptionCommand = async (
|
|
338
|
-
input: DeleteSubscriptionCommandInput,
|
|
339
|
-
context: __SerdeContext
|
|
340
|
-
): Promise<__HttpRequest> => {
|
|
341
|
-
const headers: __HeaderBag = {
|
|
342
|
-
"content-type": "application/x-amz-json-1.1",
|
|
343
|
-
"x-amz-target": "AWSShield_20160616.DeleteSubscription",
|
|
344
|
-
};
|
|
345
|
-
let body: any;
|
|
346
|
-
body = JSON.stringify(serializeAws_json1_1DeleteSubscriptionRequest(input, context));
|
|
347
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
348
|
-
};
|
|
349
|
-
|
|
350
|
-
export const serializeAws_json1_1DescribeAttackCommand = async (
|
|
351
|
-
input: DescribeAttackCommandInput,
|
|
352
|
-
context: __SerdeContext
|
|
353
|
-
): Promise<__HttpRequest> => {
|
|
354
|
-
const headers: __HeaderBag = {
|
|
355
|
-
"content-type": "application/x-amz-json-1.1",
|
|
356
|
-
"x-amz-target": "AWSShield_20160616.DescribeAttack",
|
|
357
|
-
};
|
|
358
|
-
let body: any;
|
|
359
|
-
body = JSON.stringify(serializeAws_json1_1DescribeAttackRequest(input, context));
|
|
360
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
361
|
-
};
|
|
362
|
-
|
|
363
|
-
export const serializeAws_json1_1DescribeAttackStatisticsCommand = async (
|
|
364
|
-
input: DescribeAttackStatisticsCommandInput,
|
|
365
|
-
context: __SerdeContext
|
|
366
|
-
): Promise<__HttpRequest> => {
|
|
367
|
-
const headers: __HeaderBag = {
|
|
368
|
-
"content-type": "application/x-amz-json-1.1",
|
|
369
|
-
"x-amz-target": "AWSShield_20160616.DescribeAttackStatistics",
|
|
370
|
-
};
|
|
371
|
-
let body: any;
|
|
372
|
-
body = JSON.stringify(serializeAws_json1_1DescribeAttackStatisticsRequest(input, context));
|
|
373
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
374
|
-
};
|
|
375
|
-
|
|
376
|
-
export const serializeAws_json1_1DescribeDRTAccessCommand = async (
|
|
377
|
-
input: DescribeDRTAccessCommandInput,
|
|
378
|
-
context: __SerdeContext
|
|
379
|
-
): Promise<__HttpRequest> => {
|
|
380
|
-
const headers: __HeaderBag = {
|
|
381
|
-
"content-type": "application/x-amz-json-1.1",
|
|
382
|
-
"x-amz-target": "AWSShield_20160616.DescribeDRTAccess",
|
|
383
|
-
};
|
|
384
|
-
let body: any;
|
|
385
|
-
body = JSON.stringify(serializeAws_json1_1DescribeDRTAccessRequest(input, context));
|
|
386
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
387
|
-
};
|
|
388
|
-
|
|
389
|
-
export const serializeAws_json1_1DescribeEmergencyContactSettingsCommand = async (
|
|
390
|
-
input: DescribeEmergencyContactSettingsCommandInput,
|
|
391
|
-
context: __SerdeContext
|
|
392
|
-
): Promise<__HttpRequest> => {
|
|
393
|
-
const headers: __HeaderBag = {
|
|
394
|
-
"content-type": "application/x-amz-json-1.1",
|
|
395
|
-
"x-amz-target": "AWSShield_20160616.DescribeEmergencyContactSettings",
|
|
396
|
-
};
|
|
397
|
-
let body: any;
|
|
398
|
-
body = JSON.stringify(serializeAws_json1_1DescribeEmergencyContactSettingsRequest(input, context));
|
|
399
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
400
|
-
};
|
|
401
|
-
|
|
402
|
-
export const serializeAws_json1_1DescribeProtectionCommand = async (
|
|
403
|
-
input: DescribeProtectionCommandInput,
|
|
404
|
-
context: __SerdeContext
|
|
405
|
-
): Promise<__HttpRequest> => {
|
|
406
|
-
const headers: __HeaderBag = {
|
|
407
|
-
"content-type": "application/x-amz-json-1.1",
|
|
408
|
-
"x-amz-target": "AWSShield_20160616.DescribeProtection",
|
|
409
|
-
};
|
|
410
|
-
let body: any;
|
|
411
|
-
body = JSON.stringify(serializeAws_json1_1DescribeProtectionRequest(input, context));
|
|
412
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
413
|
-
};
|
|
414
|
-
|
|
415
|
-
export const serializeAws_json1_1DescribeProtectionGroupCommand = async (
|
|
416
|
-
input: DescribeProtectionGroupCommandInput,
|
|
417
|
-
context: __SerdeContext
|
|
418
|
-
): Promise<__HttpRequest> => {
|
|
419
|
-
const headers: __HeaderBag = {
|
|
420
|
-
"content-type": "application/x-amz-json-1.1",
|
|
421
|
-
"x-amz-target": "AWSShield_20160616.DescribeProtectionGroup",
|
|
422
|
-
};
|
|
423
|
-
let body: any;
|
|
424
|
-
body = JSON.stringify(serializeAws_json1_1DescribeProtectionGroupRequest(input, context));
|
|
425
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
426
|
-
};
|
|
427
|
-
|
|
428
|
-
export const serializeAws_json1_1DescribeSubscriptionCommand = async (
|
|
429
|
-
input: DescribeSubscriptionCommandInput,
|
|
430
|
-
context: __SerdeContext
|
|
431
|
-
): Promise<__HttpRequest> => {
|
|
432
|
-
const headers: __HeaderBag = {
|
|
433
|
-
"content-type": "application/x-amz-json-1.1",
|
|
434
|
-
"x-amz-target": "AWSShield_20160616.DescribeSubscription",
|
|
435
|
-
};
|
|
436
|
-
let body: any;
|
|
437
|
-
body = JSON.stringify(serializeAws_json1_1DescribeSubscriptionRequest(input, context));
|
|
438
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
439
|
-
};
|
|
440
|
-
|
|
441
|
-
export const serializeAws_json1_1DisableProactiveEngagementCommand = async (
|
|
442
|
-
input: DisableProactiveEngagementCommandInput,
|
|
443
|
-
context: __SerdeContext
|
|
444
|
-
): Promise<__HttpRequest> => {
|
|
445
|
-
const headers: __HeaderBag = {
|
|
446
|
-
"content-type": "application/x-amz-json-1.1",
|
|
447
|
-
"x-amz-target": "AWSShield_20160616.DisableProactiveEngagement",
|
|
448
|
-
};
|
|
449
|
-
let body: any;
|
|
450
|
-
body = JSON.stringify(serializeAws_json1_1DisableProactiveEngagementRequest(input, context));
|
|
451
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
452
|
-
};
|
|
453
|
-
|
|
454
|
-
export const serializeAws_json1_1DisassociateDRTLogBucketCommand = async (
|
|
455
|
-
input: DisassociateDRTLogBucketCommandInput,
|
|
456
|
-
context: __SerdeContext
|
|
457
|
-
): Promise<__HttpRequest> => {
|
|
458
|
-
const headers: __HeaderBag = {
|
|
459
|
-
"content-type": "application/x-amz-json-1.1",
|
|
460
|
-
"x-amz-target": "AWSShield_20160616.DisassociateDRTLogBucket",
|
|
461
|
-
};
|
|
462
|
-
let body: any;
|
|
463
|
-
body = JSON.stringify(serializeAws_json1_1DisassociateDRTLogBucketRequest(input, context));
|
|
464
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
465
|
-
};
|
|
466
|
-
|
|
467
|
-
export const serializeAws_json1_1DisassociateDRTRoleCommand = async (
|
|
468
|
-
input: DisassociateDRTRoleCommandInput,
|
|
469
|
-
context: __SerdeContext
|
|
470
|
-
): Promise<__HttpRequest> => {
|
|
471
|
-
const headers: __HeaderBag = {
|
|
472
|
-
"content-type": "application/x-amz-json-1.1",
|
|
473
|
-
"x-amz-target": "AWSShield_20160616.DisassociateDRTRole",
|
|
474
|
-
};
|
|
475
|
-
let body: any;
|
|
476
|
-
body = JSON.stringify(serializeAws_json1_1DisassociateDRTRoleRequest(input, context));
|
|
477
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
478
|
-
};
|
|
479
|
-
|
|
480
|
-
export const serializeAws_json1_1DisassociateHealthCheckCommand = async (
|
|
481
|
-
input: DisassociateHealthCheckCommandInput,
|
|
482
|
-
context: __SerdeContext
|
|
483
|
-
): Promise<__HttpRequest> => {
|
|
484
|
-
const headers: __HeaderBag = {
|
|
485
|
-
"content-type": "application/x-amz-json-1.1",
|
|
486
|
-
"x-amz-target": "AWSShield_20160616.DisassociateHealthCheck",
|
|
487
|
-
};
|
|
488
|
-
let body: any;
|
|
489
|
-
body = JSON.stringify(serializeAws_json1_1DisassociateHealthCheckRequest(input, context));
|
|
490
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
491
|
-
};
|
|
492
|
-
|
|
493
|
-
export const serializeAws_json1_1EnableProactiveEngagementCommand = async (
|
|
494
|
-
input: EnableProactiveEngagementCommandInput,
|
|
495
|
-
context: __SerdeContext
|
|
496
|
-
): Promise<__HttpRequest> => {
|
|
497
|
-
const headers: __HeaderBag = {
|
|
498
|
-
"content-type": "application/x-amz-json-1.1",
|
|
499
|
-
"x-amz-target": "AWSShield_20160616.EnableProactiveEngagement",
|
|
500
|
-
};
|
|
501
|
-
let body: any;
|
|
502
|
-
body = JSON.stringify(serializeAws_json1_1EnableProactiveEngagementRequest(input, context));
|
|
503
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
504
|
-
};
|
|
505
|
-
|
|
506
|
-
export const serializeAws_json1_1GetSubscriptionStateCommand = async (
|
|
507
|
-
input: GetSubscriptionStateCommandInput,
|
|
508
|
-
context: __SerdeContext
|
|
509
|
-
): Promise<__HttpRequest> => {
|
|
510
|
-
const headers: __HeaderBag = {
|
|
511
|
-
"content-type": "application/x-amz-json-1.1",
|
|
512
|
-
"x-amz-target": "AWSShield_20160616.GetSubscriptionState",
|
|
513
|
-
};
|
|
514
|
-
let body: any;
|
|
515
|
-
body = JSON.stringify(serializeAws_json1_1GetSubscriptionStateRequest(input, context));
|
|
516
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
517
|
-
};
|
|
518
|
-
|
|
519
|
-
export const serializeAws_json1_1ListAttacksCommand = async (
|
|
520
|
-
input: ListAttacksCommandInput,
|
|
521
|
-
context: __SerdeContext
|
|
522
|
-
): Promise<__HttpRequest> => {
|
|
523
|
-
const headers: __HeaderBag = {
|
|
524
|
-
"content-type": "application/x-amz-json-1.1",
|
|
525
|
-
"x-amz-target": "AWSShield_20160616.ListAttacks",
|
|
526
|
-
};
|
|
527
|
-
let body: any;
|
|
528
|
-
body = JSON.stringify(serializeAws_json1_1ListAttacksRequest(input, context));
|
|
529
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
530
|
-
};
|
|
531
|
-
|
|
532
|
-
export const serializeAws_json1_1ListProtectionGroupsCommand = async (
|
|
533
|
-
input: ListProtectionGroupsCommandInput,
|
|
534
|
-
context: __SerdeContext
|
|
535
|
-
): Promise<__HttpRequest> => {
|
|
536
|
-
const headers: __HeaderBag = {
|
|
537
|
-
"content-type": "application/x-amz-json-1.1",
|
|
538
|
-
"x-amz-target": "AWSShield_20160616.ListProtectionGroups",
|
|
539
|
-
};
|
|
540
|
-
let body: any;
|
|
541
|
-
body = JSON.stringify(serializeAws_json1_1ListProtectionGroupsRequest(input, context));
|
|
542
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
543
|
-
};
|
|
544
|
-
|
|
545
|
-
export const serializeAws_json1_1ListProtectionsCommand = async (
|
|
546
|
-
input: ListProtectionsCommandInput,
|
|
547
|
-
context: __SerdeContext
|
|
548
|
-
): Promise<__HttpRequest> => {
|
|
549
|
-
const headers: __HeaderBag = {
|
|
550
|
-
"content-type": "application/x-amz-json-1.1",
|
|
551
|
-
"x-amz-target": "AWSShield_20160616.ListProtections",
|
|
552
|
-
};
|
|
553
|
-
let body: any;
|
|
554
|
-
body = JSON.stringify(serializeAws_json1_1ListProtectionsRequest(input, context));
|
|
555
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
556
|
-
};
|
|
557
|
-
|
|
558
|
-
export const serializeAws_json1_1ListResourcesInProtectionGroupCommand = async (
|
|
559
|
-
input: ListResourcesInProtectionGroupCommandInput,
|
|
560
|
-
context: __SerdeContext
|
|
561
|
-
): Promise<__HttpRequest> => {
|
|
562
|
-
const headers: __HeaderBag = {
|
|
563
|
-
"content-type": "application/x-amz-json-1.1",
|
|
564
|
-
"x-amz-target": "AWSShield_20160616.ListResourcesInProtectionGroup",
|
|
565
|
-
};
|
|
566
|
-
let body: any;
|
|
567
|
-
body = JSON.stringify(serializeAws_json1_1ListResourcesInProtectionGroupRequest(input, context));
|
|
568
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
569
|
-
};
|
|
570
|
-
|
|
571
|
-
export const serializeAws_json1_1ListTagsForResourceCommand = async (
|
|
572
|
-
input: ListTagsForResourceCommandInput,
|
|
573
|
-
context: __SerdeContext
|
|
574
|
-
): Promise<__HttpRequest> => {
|
|
575
|
-
const headers: __HeaderBag = {
|
|
576
|
-
"content-type": "application/x-amz-json-1.1",
|
|
577
|
-
"x-amz-target": "AWSShield_20160616.ListTagsForResource",
|
|
578
|
-
};
|
|
579
|
-
let body: any;
|
|
580
|
-
body = JSON.stringify(serializeAws_json1_1ListTagsForResourceRequest(input, context));
|
|
581
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
582
|
-
};
|
|
583
|
-
|
|
584
|
-
export const serializeAws_json1_1TagResourceCommand = async (
|
|
585
|
-
input: TagResourceCommandInput,
|
|
586
|
-
context: __SerdeContext
|
|
587
|
-
): Promise<__HttpRequest> => {
|
|
588
|
-
const headers: __HeaderBag = {
|
|
589
|
-
"content-type": "application/x-amz-json-1.1",
|
|
590
|
-
"x-amz-target": "AWSShield_20160616.TagResource",
|
|
591
|
-
};
|
|
592
|
-
let body: any;
|
|
593
|
-
body = JSON.stringify(serializeAws_json1_1TagResourceRequest(input, context));
|
|
594
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
595
|
-
};
|
|
596
|
-
|
|
597
|
-
export const serializeAws_json1_1UntagResourceCommand = async (
|
|
598
|
-
input: UntagResourceCommandInput,
|
|
599
|
-
context: __SerdeContext
|
|
600
|
-
): Promise<__HttpRequest> => {
|
|
601
|
-
const headers: __HeaderBag = {
|
|
602
|
-
"content-type": "application/x-amz-json-1.1",
|
|
603
|
-
"x-amz-target": "AWSShield_20160616.UntagResource",
|
|
604
|
-
};
|
|
605
|
-
let body: any;
|
|
606
|
-
body = JSON.stringify(serializeAws_json1_1UntagResourceRequest(input, context));
|
|
607
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
608
|
-
};
|
|
609
|
-
|
|
610
|
-
export const serializeAws_json1_1UpdateEmergencyContactSettingsCommand = async (
|
|
611
|
-
input: UpdateEmergencyContactSettingsCommandInput,
|
|
612
|
-
context: __SerdeContext
|
|
613
|
-
): Promise<__HttpRequest> => {
|
|
614
|
-
const headers: __HeaderBag = {
|
|
615
|
-
"content-type": "application/x-amz-json-1.1",
|
|
616
|
-
"x-amz-target": "AWSShield_20160616.UpdateEmergencyContactSettings",
|
|
617
|
-
};
|
|
618
|
-
let body: any;
|
|
619
|
-
body = JSON.stringify(serializeAws_json1_1UpdateEmergencyContactSettingsRequest(input, context));
|
|
620
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
621
|
-
};
|
|
622
|
-
|
|
623
|
-
export const serializeAws_json1_1UpdateProtectionGroupCommand = async (
|
|
624
|
-
input: UpdateProtectionGroupCommandInput,
|
|
625
|
-
context: __SerdeContext
|
|
626
|
-
): Promise<__HttpRequest> => {
|
|
627
|
-
const headers: __HeaderBag = {
|
|
628
|
-
"content-type": "application/x-amz-json-1.1",
|
|
629
|
-
"x-amz-target": "AWSShield_20160616.UpdateProtectionGroup",
|
|
630
|
-
};
|
|
631
|
-
let body: any;
|
|
632
|
-
body = JSON.stringify(serializeAws_json1_1UpdateProtectionGroupRequest(input, context));
|
|
633
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
634
|
-
};
|
|
635
|
-
|
|
636
|
-
export const serializeAws_json1_1UpdateSubscriptionCommand = async (
|
|
637
|
-
input: UpdateSubscriptionCommandInput,
|
|
638
|
-
context: __SerdeContext
|
|
639
|
-
): Promise<__HttpRequest> => {
|
|
640
|
-
const headers: __HeaderBag = {
|
|
641
|
-
"content-type": "application/x-amz-json-1.1",
|
|
642
|
-
"x-amz-target": "AWSShield_20160616.UpdateSubscription",
|
|
643
|
-
};
|
|
644
|
-
let body: any;
|
|
645
|
-
body = JSON.stringify(serializeAws_json1_1UpdateSubscriptionRequest(input, context));
|
|
646
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
647
|
-
};
|
|
648
|
-
|
|
649
|
-
export const deserializeAws_json1_1AssociateDRTLogBucketCommand = async (
|
|
650
|
-
output: __HttpResponse,
|
|
651
|
-
context: __SerdeContext
|
|
652
|
-
): Promise<AssociateDRTLogBucketCommandOutput> => {
|
|
653
|
-
if (output.statusCode >= 300) {
|
|
654
|
-
return deserializeAws_json1_1AssociateDRTLogBucketCommandError(output, context);
|
|
655
|
-
}
|
|
656
|
-
const data: any = await parseBody(output.body, context);
|
|
657
|
-
let contents: any = {};
|
|
658
|
-
contents = deserializeAws_json1_1AssociateDRTLogBucketResponse(data, context);
|
|
659
|
-
const response: AssociateDRTLogBucketCommandOutput = {
|
|
660
|
-
$metadata: deserializeMetadata(output),
|
|
661
|
-
...contents,
|
|
662
|
-
};
|
|
663
|
-
return Promise.resolve(response);
|
|
664
|
-
};
|
|
665
|
-
|
|
666
|
-
const deserializeAws_json1_1AssociateDRTLogBucketCommandError = async (
|
|
667
|
-
output: __HttpResponse,
|
|
668
|
-
context: __SerdeContext
|
|
669
|
-
): Promise<AssociateDRTLogBucketCommandOutput> => {
|
|
670
|
-
const parsedOutput: any = {
|
|
671
|
-
...output,
|
|
672
|
-
body: await parseBody(output.body, context),
|
|
673
|
-
};
|
|
674
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
675
|
-
let errorCode = "UnknownError";
|
|
676
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
677
|
-
switch (errorCode) {
|
|
678
|
-
case "AccessDeniedForDependencyException":
|
|
679
|
-
case "com.amazonaws.shield#AccessDeniedForDependencyException":
|
|
680
|
-
response = {
|
|
681
|
-
...(await deserializeAws_json1_1AccessDeniedForDependencyExceptionResponse(parsedOutput, context)),
|
|
682
|
-
name: errorCode,
|
|
683
|
-
$metadata: deserializeMetadata(output),
|
|
684
|
-
};
|
|
685
|
-
break;
|
|
686
|
-
case "InternalErrorException":
|
|
687
|
-
case "com.amazonaws.shield#InternalErrorException":
|
|
688
|
-
response = {
|
|
689
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
690
|
-
name: errorCode,
|
|
691
|
-
$metadata: deserializeMetadata(output),
|
|
692
|
-
};
|
|
693
|
-
break;
|
|
694
|
-
case "InvalidOperationException":
|
|
695
|
-
case "com.amazonaws.shield#InvalidOperationException":
|
|
696
|
-
response = {
|
|
697
|
-
...(await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context)),
|
|
698
|
-
name: errorCode,
|
|
699
|
-
$metadata: deserializeMetadata(output),
|
|
700
|
-
};
|
|
701
|
-
break;
|
|
702
|
-
case "InvalidParameterException":
|
|
703
|
-
case "com.amazonaws.shield#InvalidParameterException":
|
|
704
|
-
response = {
|
|
705
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
706
|
-
name: errorCode,
|
|
707
|
-
$metadata: deserializeMetadata(output),
|
|
708
|
-
};
|
|
709
|
-
break;
|
|
710
|
-
case "LimitsExceededException":
|
|
711
|
-
case "com.amazonaws.shield#LimitsExceededException":
|
|
712
|
-
response = {
|
|
713
|
-
...(await deserializeAws_json1_1LimitsExceededExceptionResponse(parsedOutput, context)),
|
|
714
|
-
name: errorCode,
|
|
715
|
-
$metadata: deserializeMetadata(output),
|
|
716
|
-
};
|
|
717
|
-
break;
|
|
718
|
-
case "NoAssociatedRoleException":
|
|
719
|
-
case "com.amazonaws.shield#NoAssociatedRoleException":
|
|
720
|
-
response = {
|
|
721
|
-
...(await deserializeAws_json1_1NoAssociatedRoleExceptionResponse(parsedOutput, context)),
|
|
722
|
-
name: errorCode,
|
|
723
|
-
$metadata: deserializeMetadata(output),
|
|
724
|
-
};
|
|
725
|
-
break;
|
|
726
|
-
case "OptimisticLockException":
|
|
727
|
-
case "com.amazonaws.shield#OptimisticLockException":
|
|
728
|
-
response = {
|
|
729
|
-
...(await deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context)),
|
|
730
|
-
name: errorCode,
|
|
731
|
-
$metadata: deserializeMetadata(output),
|
|
732
|
-
};
|
|
733
|
-
break;
|
|
734
|
-
case "ResourceNotFoundException":
|
|
735
|
-
case "com.amazonaws.shield#ResourceNotFoundException":
|
|
736
|
-
response = {
|
|
737
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
738
|
-
name: errorCode,
|
|
739
|
-
$metadata: deserializeMetadata(output),
|
|
740
|
-
};
|
|
741
|
-
break;
|
|
742
|
-
default:
|
|
743
|
-
const parsedBody = parsedOutput.body;
|
|
744
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
745
|
-
response = {
|
|
746
|
-
...parsedBody,
|
|
747
|
-
name: `${errorCode}`,
|
|
748
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
749
|
-
$fault: "client",
|
|
750
|
-
$metadata: deserializeMetadata(output),
|
|
751
|
-
} as any;
|
|
752
|
-
}
|
|
753
|
-
const message = response.message || response.Message || errorCode;
|
|
754
|
-
response.message = message;
|
|
755
|
-
delete response.Message;
|
|
756
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
757
|
-
};
|
|
758
|
-
|
|
759
|
-
export const deserializeAws_json1_1AssociateDRTRoleCommand = async (
|
|
760
|
-
output: __HttpResponse,
|
|
761
|
-
context: __SerdeContext
|
|
762
|
-
): Promise<AssociateDRTRoleCommandOutput> => {
|
|
763
|
-
if (output.statusCode >= 300) {
|
|
764
|
-
return deserializeAws_json1_1AssociateDRTRoleCommandError(output, context);
|
|
765
|
-
}
|
|
766
|
-
const data: any = await parseBody(output.body, context);
|
|
767
|
-
let contents: any = {};
|
|
768
|
-
contents = deserializeAws_json1_1AssociateDRTRoleResponse(data, context);
|
|
769
|
-
const response: AssociateDRTRoleCommandOutput = {
|
|
770
|
-
$metadata: deserializeMetadata(output),
|
|
771
|
-
...contents,
|
|
772
|
-
};
|
|
773
|
-
return Promise.resolve(response);
|
|
774
|
-
};
|
|
775
|
-
|
|
776
|
-
const deserializeAws_json1_1AssociateDRTRoleCommandError = async (
|
|
777
|
-
output: __HttpResponse,
|
|
778
|
-
context: __SerdeContext
|
|
779
|
-
): Promise<AssociateDRTRoleCommandOutput> => {
|
|
780
|
-
const parsedOutput: any = {
|
|
781
|
-
...output,
|
|
782
|
-
body: await parseBody(output.body, context),
|
|
783
|
-
};
|
|
784
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
785
|
-
let errorCode = "UnknownError";
|
|
786
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
787
|
-
switch (errorCode) {
|
|
788
|
-
case "AccessDeniedForDependencyException":
|
|
789
|
-
case "com.amazonaws.shield#AccessDeniedForDependencyException":
|
|
790
|
-
response = {
|
|
791
|
-
...(await deserializeAws_json1_1AccessDeniedForDependencyExceptionResponse(parsedOutput, context)),
|
|
792
|
-
name: errorCode,
|
|
793
|
-
$metadata: deserializeMetadata(output),
|
|
794
|
-
};
|
|
795
|
-
break;
|
|
796
|
-
case "InternalErrorException":
|
|
797
|
-
case "com.amazonaws.shield#InternalErrorException":
|
|
798
|
-
response = {
|
|
799
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
800
|
-
name: errorCode,
|
|
801
|
-
$metadata: deserializeMetadata(output),
|
|
802
|
-
};
|
|
803
|
-
break;
|
|
804
|
-
case "InvalidOperationException":
|
|
805
|
-
case "com.amazonaws.shield#InvalidOperationException":
|
|
806
|
-
response = {
|
|
807
|
-
...(await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context)),
|
|
808
|
-
name: errorCode,
|
|
809
|
-
$metadata: deserializeMetadata(output),
|
|
810
|
-
};
|
|
811
|
-
break;
|
|
812
|
-
case "InvalidParameterException":
|
|
813
|
-
case "com.amazonaws.shield#InvalidParameterException":
|
|
814
|
-
response = {
|
|
815
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
816
|
-
name: errorCode,
|
|
817
|
-
$metadata: deserializeMetadata(output),
|
|
818
|
-
};
|
|
819
|
-
break;
|
|
820
|
-
case "OptimisticLockException":
|
|
821
|
-
case "com.amazonaws.shield#OptimisticLockException":
|
|
822
|
-
response = {
|
|
823
|
-
...(await deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context)),
|
|
824
|
-
name: errorCode,
|
|
825
|
-
$metadata: deserializeMetadata(output),
|
|
826
|
-
};
|
|
827
|
-
break;
|
|
828
|
-
case "ResourceNotFoundException":
|
|
829
|
-
case "com.amazonaws.shield#ResourceNotFoundException":
|
|
830
|
-
response = {
|
|
831
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
832
|
-
name: errorCode,
|
|
833
|
-
$metadata: deserializeMetadata(output),
|
|
834
|
-
};
|
|
835
|
-
break;
|
|
836
|
-
default:
|
|
837
|
-
const parsedBody = parsedOutput.body;
|
|
838
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
839
|
-
response = {
|
|
840
|
-
...parsedBody,
|
|
841
|
-
name: `${errorCode}`,
|
|
842
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
843
|
-
$fault: "client",
|
|
844
|
-
$metadata: deserializeMetadata(output),
|
|
845
|
-
} as any;
|
|
846
|
-
}
|
|
847
|
-
const message = response.message || response.Message || errorCode;
|
|
848
|
-
response.message = message;
|
|
849
|
-
delete response.Message;
|
|
850
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
851
|
-
};
|
|
852
|
-
|
|
853
|
-
export const deserializeAws_json1_1AssociateHealthCheckCommand = async (
|
|
854
|
-
output: __HttpResponse,
|
|
855
|
-
context: __SerdeContext
|
|
856
|
-
): Promise<AssociateHealthCheckCommandOutput> => {
|
|
857
|
-
if (output.statusCode >= 300) {
|
|
858
|
-
return deserializeAws_json1_1AssociateHealthCheckCommandError(output, context);
|
|
859
|
-
}
|
|
860
|
-
const data: any = await parseBody(output.body, context);
|
|
861
|
-
let contents: any = {};
|
|
862
|
-
contents = deserializeAws_json1_1AssociateHealthCheckResponse(data, context);
|
|
863
|
-
const response: AssociateHealthCheckCommandOutput = {
|
|
864
|
-
$metadata: deserializeMetadata(output),
|
|
865
|
-
...contents,
|
|
866
|
-
};
|
|
867
|
-
return Promise.resolve(response);
|
|
868
|
-
};
|
|
869
|
-
|
|
870
|
-
const deserializeAws_json1_1AssociateHealthCheckCommandError = async (
|
|
871
|
-
output: __HttpResponse,
|
|
872
|
-
context: __SerdeContext
|
|
873
|
-
): Promise<AssociateHealthCheckCommandOutput> => {
|
|
874
|
-
const parsedOutput: any = {
|
|
875
|
-
...output,
|
|
876
|
-
body: await parseBody(output.body, context),
|
|
877
|
-
};
|
|
878
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
879
|
-
let errorCode = "UnknownError";
|
|
880
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
881
|
-
switch (errorCode) {
|
|
882
|
-
case "InternalErrorException":
|
|
883
|
-
case "com.amazonaws.shield#InternalErrorException":
|
|
884
|
-
response = {
|
|
885
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
886
|
-
name: errorCode,
|
|
887
|
-
$metadata: deserializeMetadata(output),
|
|
888
|
-
};
|
|
889
|
-
break;
|
|
890
|
-
case "InvalidParameterException":
|
|
891
|
-
case "com.amazonaws.shield#InvalidParameterException":
|
|
892
|
-
response = {
|
|
893
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
894
|
-
name: errorCode,
|
|
895
|
-
$metadata: deserializeMetadata(output),
|
|
896
|
-
};
|
|
897
|
-
break;
|
|
898
|
-
case "LimitsExceededException":
|
|
899
|
-
case "com.amazonaws.shield#LimitsExceededException":
|
|
900
|
-
response = {
|
|
901
|
-
...(await deserializeAws_json1_1LimitsExceededExceptionResponse(parsedOutput, context)),
|
|
902
|
-
name: errorCode,
|
|
903
|
-
$metadata: deserializeMetadata(output),
|
|
904
|
-
};
|
|
905
|
-
break;
|
|
906
|
-
case "OptimisticLockException":
|
|
907
|
-
case "com.amazonaws.shield#OptimisticLockException":
|
|
908
|
-
response = {
|
|
909
|
-
...(await deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context)),
|
|
910
|
-
name: errorCode,
|
|
911
|
-
$metadata: deserializeMetadata(output),
|
|
912
|
-
};
|
|
913
|
-
break;
|
|
914
|
-
case "ResourceNotFoundException":
|
|
915
|
-
case "com.amazonaws.shield#ResourceNotFoundException":
|
|
916
|
-
response = {
|
|
917
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
918
|
-
name: errorCode,
|
|
919
|
-
$metadata: deserializeMetadata(output),
|
|
920
|
-
};
|
|
921
|
-
break;
|
|
922
|
-
default:
|
|
923
|
-
const parsedBody = parsedOutput.body;
|
|
924
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
925
|
-
response = {
|
|
926
|
-
...parsedBody,
|
|
927
|
-
name: `${errorCode}`,
|
|
928
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
929
|
-
$fault: "client",
|
|
930
|
-
$metadata: deserializeMetadata(output),
|
|
931
|
-
} as any;
|
|
932
|
-
}
|
|
933
|
-
const message = response.message || response.Message || errorCode;
|
|
934
|
-
response.message = message;
|
|
935
|
-
delete response.Message;
|
|
936
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
937
|
-
};
|
|
938
|
-
|
|
939
|
-
export const deserializeAws_json1_1AssociateProactiveEngagementDetailsCommand = async (
|
|
940
|
-
output: __HttpResponse,
|
|
941
|
-
context: __SerdeContext
|
|
942
|
-
): Promise<AssociateProactiveEngagementDetailsCommandOutput> => {
|
|
943
|
-
if (output.statusCode >= 300) {
|
|
944
|
-
return deserializeAws_json1_1AssociateProactiveEngagementDetailsCommandError(output, context);
|
|
945
|
-
}
|
|
946
|
-
const data: any = await parseBody(output.body, context);
|
|
947
|
-
let contents: any = {};
|
|
948
|
-
contents = deserializeAws_json1_1AssociateProactiveEngagementDetailsResponse(data, context);
|
|
949
|
-
const response: AssociateProactiveEngagementDetailsCommandOutput = {
|
|
950
|
-
$metadata: deserializeMetadata(output),
|
|
951
|
-
...contents,
|
|
952
|
-
};
|
|
953
|
-
return Promise.resolve(response);
|
|
954
|
-
};
|
|
955
|
-
|
|
956
|
-
const deserializeAws_json1_1AssociateProactiveEngagementDetailsCommandError = async (
|
|
957
|
-
output: __HttpResponse,
|
|
958
|
-
context: __SerdeContext
|
|
959
|
-
): Promise<AssociateProactiveEngagementDetailsCommandOutput> => {
|
|
960
|
-
const parsedOutput: any = {
|
|
961
|
-
...output,
|
|
962
|
-
body: await parseBody(output.body, context),
|
|
963
|
-
};
|
|
964
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
965
|
-
let errorCode = "UnknownError";
|
|
966
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
967
|
-
switch (errorCode) {
|
|
968
|
-
case "InternalErrorException":
|
|
969
|
-
case "com.amazonaws.shield#InternalErrorException":
|
|
970
|
-
response = {
|
|
971
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
972
|
-
name: errorCode,
|
|
973
|
-
$metadata: deserializeMetadata(output),
|
|
974
|
-
};
|
|
975
|
-
break;
|
|
976
|
-
case "InvalidOperationException":
|
|
977
|
-
case "com.amazonaws.shield#InvalidOperationException":
|
|
978
|
-
response = {
|
|
979
|
-
...(await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context)),
|
|
980
|
-
name: errorCode,
|
|
981
|
-
$metadata: deserializeMetadata(output),
|
|
982
|
-
};
|
|
983
|
-
break;
|
|
984
|
-
case "InvalidParameterException":
|
|
985
|
-
case "com.amazonaws.shield#InvalidParameterException":
|
|
986
|
-
response = {
|
|
987
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
988
|
-
name: errorCode,
|
|
989
|
-
$metadata: deserializeMetadata(output),
|
|
990
|
-
};
|
|
991
|
-
break;
|
|
992
|
-
case "OptimisticLockException":
|
|
993
|
-
case "com.amazonaws.shield#OptimisticLockException":
|
|
994
|
-
response = {
|
|
995
|
-
...(await deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context)),
|
|
996
|
-
name: errorCode,
|
|
997
|
-
$metadata: deserializeMetadata(output),
|
|
998
|
-
};
|
|
999
|
-
break;
|
|
1000
|
-
case "ResourceNotFoundException":
|
|
1001
|
-
case "com.amazonaws.shield#ResourceNotFoundException":
|
|
1002
|
-
response = {
|
|
1003
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1004
|
-
name: errorCode,
|
|
1005
|
-
$metadata: deserializeMetadata(output),
|
|
1006
|
-
};
|
|
1007
|
-
break;
|
|
1008
|
-
default:
|
|
1009
|
-
const parsedBody = parsedOutput.body;
|
|
1010
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1011
|
-
response = {
|
|
1012
|
-
...parsedBody,
|
|
1013
|
-
name: `${errorCode}`,
|
|
1014
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1015
|
-
$fault: "client",
|
|
1016
|
-
$metadata: deserializeMetadata(output),
|
|
1017
|
-
} as any;
|
|
1018
|
-
}
|
|
1019
|
-
const message = response.message || response.Message || errorCode;
|
|
1020
|
-
response.message = message;
|
|
1021
|
-
delete response.Message;
|
|
1022
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1023
|
-
};
|
|
1024
|
-
|
|
1025
|
-
export const deserializeAws_json1_1CreateProtectionCommand = async (
|
|
1026
|
-
output: __HttpResponse,
|
|
1027
|
-
context: __SerdeContext
|
|
1028
|
-
): Promise<CreateProtectionCommandOutput> => {
|
|
1029
|
-
if (output.statusCode >= 300) {
|
|
1030
|
-
return deserializeAws_json1_1CreateProtectionCommandError(output, context);
|
|
1031
|
-
}
|
|
1032
|
-
const data: any = await parseBody(output.body, context);
|
|
1033
|
-
let contents: any = {};
|
|
1034
|
-
contents = deserializeAws_json1_1CreateProtectionResponse(data, context);
|
|
1035
|
-
const response: CreateProtectionCommandOutput = {
|
|
1036
|
-
$metadata: deserializeMetadata(output),
|
|
1037
|
-
...contents,
|
|
1038
|
-
};
|
|
1039
|
-
return Promise.resolve(response);
|
|
1040
|
-
};
|
|
1041
|
-
|
|
1042
|
-
const deserializeAws_json1_1CreateProtectionCommandError = async (
|
|
1043
|
-
output: __HttpResponse,
|
|
1044
|
-
context: __SerdeContext
|
|
1045
|
-
): Promise<CreateProtectionCommandOutput> => {
|
|
1046
|
-
const parsedOutput: any = {
|
|
1047
|
-
...output,
|
|
1048
|
-
body: await parseBody(output.body, context),
|
|
1049
|
-
};
|
|
1050
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1051
|
-
let errorCode = "UnknownError";
|
|
1052
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1053
|
-
switch (errorCode) {
|
|
1054
|
-
case "InternalErrorException":
|
|
1055
|
-
case "com.amazonaws.shield#InternalErrorException":
|
|
1056
|
-
response = {
|
|
1057
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
1058
|
-
name: errorCode,
|
|
1059
|
-
$metadata: deserializeMetadata(output),
|
|
1060
|
-
};
|
|
1061
|
-
break;
|
|
1062
|
-
case "InvalidOperationException":
|
|
1063
|
-
case "com.amazonaws.shield#InvalidOperationException":
|
|
1064
|
-
response = {
|
|
1065
|
-
...(await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context)),
|
|
1066
|
-
name: errorCode,
|
|
1067
|
-
$metadata: deserializeMetadata(output),
|
|
1068
|
-
};
|
|
1069
|
-
break;
|
|
1070
|
-
case "InvalidParameterException":
|
|
1071
|
-
case "com.amazonaws.shield#InvalidParameterException":
|
|
1072
|
-
response = {
|
|
1073
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
1074
|
-
name: errorCode,
|
|
1075
|
-
$metadata: deserializeMetadata(output),
|
|
1076
|
-
};
|
|
1077
|
-
break;
|
|
1078
|
-
case "InvalidResourceException":
|
|
1079
|
-
case "com.amazonaws.shield#InvalidResourceException":
|
|
1080
|
-
response = {
|
|
1081
|
-
...(await deserializeAws_json1_1InvalidResourceExceptionResponse(parsedOutput, context)),
|
|
1082
|
-
name: errorCode,
|
|
1083
|
-
$metadata: deserializeMetadata(output),
|
|
1084
|
-
};
|
|
1085
|
-
break;
|
|
1086
|
-
case "LimitsExceededException":
|
|
1087
|
-
case "com.amazonaws.shield#LimitsExceededException":
|
|
1088
|
-
response = {
|
|
1089
|
-
...(await deserializeAws_json1_1LimitsExceededExceptionResponse(parsedOutput, context)),
|
|
1090
|
-
name: errorCode,
|
|
1091
|
-
$metadata: deserializeMetadata(output),
|
|
1092
|
-
};
|
|
1093
|
-
break;
|
|
1094
|
-
case "OptimisticLockException":
|
|
1095
|
-
case "com.amazonaws.shield#OptimisticLockException":
|
|
1096
|
-
response = {
|
|
1097
|
-
...(await deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context)),
|
|
1098
|
-
name: errorCode,
|
|
1099
|
-
$metadata: deserializeMetadata(output),
|
|
1100
|
-
};
|
|
1101
|
-
break;
|
|
1102
|
-
case "ResourceAlreadyExistsException":
|
|
1103
|
-
case "com.amazonaws.shield#ResourceAlreadyExistsException":
|
|
1104
|
-
response = {
|
|
1105
|
-
...(await deserializeAws_json1_1ResourceAlreadyExistsExceptionResponse(parsedOutput, context)),
|
|
1106
|
-
name: errorCode,
|
|
1107
|
-
$metadata: deserializeMetadata(output),
|
|
1108
|
-
};
|
|
1109
|
-
break;
|
|
1110
|
-
case "ResourceNotFoundException":
|
|
1111
|
-
case "com.amazonaws.shield#ResourceNotFoundException":
|
|
1112
|
-
response = {
|
|
1113
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1114
|
-
name: errorCode,
|
|
1115
|
-
$metadata: deserializeMetadata(output),
|
|
1116
|
-
};
|
|
1117
|
-
break;
|
|
1118
|
-
default:
|
|
1119
|
-
const parsedBody = parsedOutput.body;
|
|
1120
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1121
|
-
response = {
|
|
1122
|
-
...parsedBody,
|
|
1123
|
-
name: `${errorCode}`,
|
|
1124
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1125
|
-
$fault: "client",
|
|
1126
|
-
$metadata: deserializeMetadata(output),
|
|
1127
|
-
} as any;
|
|
1128
|
-
}
|
|
1129
|
-
const message = response.message || response.Message || errorCode;
|
|
1130
|
-
response.message = message;
|
|
1131
|
-
delete response.Message;
|
|
1132
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1133
|
-
};
|
|
1134
|
-
|
|
1135
|
-
export const deserializeAws_json1_1CreateProtectionGroupCommand = async (
|
|
1136
|
-
output: __HttpResponse,
|
|
1137
|
-
context: __SerdeContext
|
|
1138
|
-
): Promise<CreateProtectionGroupCommandOutput> => {
|
|
1139
|
-
if (output.statusCode >= 300) {
|
|
1140
|
-
return deserializeAws_json1_1CreateProtectionGroupCommandError(output, context);
|
|
1141
|
-
}
|
|
1142
|
-
const data: any = await parseBody(output.body, context);
|
|
1143
|
-
let contents: any = {};
|
|
1144
|
-
contents = deserializeAws_json1_1CreateProtectionGroupResponse(data, context);
|
|
1145
|
-
const response: CreateProtectionGroupCommandOutput = {
|
|
1146
|
-
$metadata: deserializeMetadata(output),
|
|
1147
|
-
...contents,
|
|
1148
|
-
};
|
|
1149
|
-
return Promise.resolve(response);
|
|
1150
|
-
};
|
|
1151
|
-
|
|
1152
|
-
const deserializeAws_json1_1CreateProtectionGroupCommandError = async (
|
|
1153
|
-
output: __HttpResponse,
|
|
1154
|
-
context: __SerdeContext
|
|
1155
|
-
): Promise<CreateProtectionGroupCommandOutput> => {
|
|
1156
|
-
const parsedOutput: any = {
|
|
1157
|
-
...output,
|
|
1158
|
-
body: await parseBody(output.body, context),
|
|
1159
|
-
};
|
|
1160
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1161
|
-
let errorCode = "UnknownError";
|
|
1162
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1163
|
-
switch (errorCode) {
|
|
1164
|
-
case "InternalErrorException":
|
|
1165
|
-
case "com.amazonaws.shield#InternalErrorException":
|
|
1166
|
-
response = {
|
|
1167
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
1168
|
-
name: errorCode,
|
|
1169
|
-
$metadata: deserializeMetadata(output),
|
|
1170
|
-
};
|
|
1171
|
-
break;
|
|
1172
|
-
case "InvalidParameterException":
|
|
1173
|
-
case "com.amazonaws.shield#InvalidParameterException":
|
|
1174
|
-
response = {
|
|
1175
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
1176
|
-
name: errorCode,
|
|
1177
|
-
$metadata: deserializeMetadata(output),
|
|
1178
|
-
};
|
|
1179
|
-
break;
|
|
1180
|
-
case "LimitsExceededException":
|
|
1181
|
-
case "com.amazonaws.shield#LimitsExceededException":
|
|
1182
|
-
response = {
|
|
1183
|
-
...(await deserializeAws_json1_1LimitsExceededExceptionResponse(parsedOutput, context)),
|
|
1184
|
-
name: errorCode,
|
|
1185
|
-
$metadata: deserializeMetadata(output),
|
|
1186
|
-
};
|
|
1187
|
-
break;
|
|
1188
|
-
case "OptimisticLockException":
|
|
1189
|
-
case "com.amazonaws.shield#OptimisticLockException":
|
|
1190
|
-
response = {
|
|
1191
|
-
...(await deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context)),
|
|
1192
|
-
name: errorCode,
|
|
1193
|
-
$metadata: deserializeMetadata(output),
|
|
1194
|
-
};
|
|
1195
|
-
break;
|
|
1196
|
-
case "ResourceAlreadyExistsException":
|
|
1197
|
-
case "com.amazonaws.shield#ResourceAlreadyExistsException":
|
|
1198
|
-
response = {
|
|
1199
|
-
...(await deserializeAws_json1_1ResourceAlreadyExistsExceptionResponse(parsedOutput, context)),
|
|
1200
|
-
name: errorCode,
|
|
1201
|
-
$metadata: deserializeMetadata(output),
|
|
1202
|
-
};
|
|
1203
|
-
break;
|
|
1204
|
-
case "ResourceNotFoundException":
|
|
1205
|
-
case "com.amazonaws.shield#ResourceNotFoundException":
|
|
1206
|
-
response = {
|
|
1207
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1208
|
-
name: errorCode,
|
|
1209
|
-
$metadata: deserializeMetadata(output),
|
|
1210
|
-
};
|
|
1211
|
-
break;
|
|
1212
|
-
default:
|
|
1213
|
-
const parsedBody = parsedOutput.body;
|
|
1214
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1215
|
-
response = {
|
|
1216
|
-
...parsedBody,
|
|
1217
|
-
name: `${errorCode}`,
|
|
1218
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1219
|
-
$fault: "client",
|
|
1220
|
-
$metadata: deserializeMetadata(output),
|
|
1221
|
-
} as any;
|
|
1222
|
-
}
|
|
1223
|
-
const message = response.message || response.Message || errorCode;
|
|
1224
|
-
response.message = message;
|
|
1225
|
-
delete response.Message;
|
|
1226
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1227
|
-
};
|
|
1228
|
-
|
|
1229
|
-
export const deserializeAws_json1_1CreateSubscriptionCommand = async (
|
|
1230
|
-
output: __HttpResponse,
|
|
1231
|
-
context: __SerdeContext
|
|
1232
|
-
): Promise<CreateSubscriptionCommandOutput> => {
|
|
1233
|
-
if (output.statusCode >= 300) {
|
|
1234
|
-
return deserializeAws_json1_1CreateSubscriptionCommandError(output, context);
|
|
1235
|
-
}
|
|
1236
|
-
const data: any = await parseBody(output.body, context);
|
|
1237
|
-
let contents: any = {};
|
|
1238
|
-
contents = deserializeAws_json1_1CreateSubscriptionResponse(data, context);
|
|
1239
|
-
const response: CreateSubscriptionCommandOutput = {
|
|
1240
|
-
$metadata: deserializeMetadata(output),
|
|
1241
|
-
...contents,
|
|
1242
|
-
};
|
|
1243
|
-
return Promise.resolve(response);
|
|
1244
|
-
};
|
|
1245
|
-
|
|
1246
|
-
const deserializeAws_json1_1CreateSubscriptionCommandError = async (
|
|
1247
|
-
output: __HttpResponse,
|
|
1248
|
-
context: __SerdeContext
|
|
1249
|
-
): Promise<CreateSubscriptionCommandOutput> => {
|
|
1250
|
-
const parsedOutput: any = {
|
|
1251
|
-
...output,
|
|
1252
|
-
body: await parseBody(output.body, context),
|
|
1253
|
-
};
|
|
1254
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1255
|
-
let errorCode = "UnknownError";
|
|
1256
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1257
|
-
switch (errorCode) {
|
|
1258
|
-
case "InternalErrorException":
|
|
1259
|
-
case "com.amazonaws.shield#InternalErrorException":
|
|
1260
|
-
response = {
|
|
1261
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
1262
|
-
name: errorCode,
|
|
1263
|
-
$metadata: deserializeMetadata(output),
|
|
1264
|
-
};
|
|
1265
|
-
break;
|
|
1266
|
-
case "ResourceAlreadyExistsException":
|
|
1267
|
-
case "com.amazonaws.shield#ResourceAlreadyExistsException":
|
|
1268
|
-
response = {
|
|
1269
|
-
...(await deserializeAws_json1_1ResourceAlreadyExistsExceptionResponse(parsedOutput, context)),
|
|
1270
|
-
name: errorCode,
|
|
1271
|
-
$metadata: deserializeMetadata(output),
|
|
1272
|
-
};
|
|
1273
|
-
break;
|
|
1274
|
-
default:
|
|
1275
|
-
const parsedBody = parsedOutput.body;
|
|
1276
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1277
|
-
response = {
|
|
1278
|
-
...parsedBody,
|
|
1279
|
-
name: `${errorCode}`,
|
|
1280
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1281
|
-
$fault: "client",
|
|
1282
|
-
$metadata: deserializeMetadata(output),
|
|
1283
|
-
} as any;
|
|
1284
|
-
}
|
|
1285
|
-
const message = response.message || response.Message || errorCode;
|
|
1286
|
-
response.message = message;
|
|
1287
|
-
delete response.Message;
|
|
1288
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1289
|
-
};
|
|
1290
|
-
|
|
1291
|
-
export const deserializeAws_json1_1DeleteProtectionCommand = async (
|
|
1292
|
-
output: __HttpResponse,
|
|
1293
|
-
context: __SerdeContext
|
|
1294
|
-
): Promise<DeleteProtectionCommandOutput> => {
|
|
1295
|
-
if (output.statusCode >= 300) {
|
|
1296
|
-
return deserializeAws_json1_1DeleteProtectionCommandError(output, context);
|
|
1297
|
-
}
|
|
1298
|
-
const data: any = await parseBody(output.body, context);
|
|
1299
|
-
let contents: any = {};
|
|
1300
|
-
contents = deserializeAws_json1_1DeleteProtectionResponse(data, context);
|
|
1301
|
-
const response: DeleteProtectionCommandOutput = {
|
|
1302
|
-
$metadata: deserializeMetadata(output),
|
|
1303
|
-
...contents,
|
|
1304
|
-
};
|
|
1305
|
-
return Promise.resolve(response);
|
|
1306
|
-
};
|
|
1307
|
-
|
|
1308
|
-
const deserializeAws_json1_1DeleteProtectionCommandError = async (
|
|
1309
|
-
output: __HttpResponse,
|
|
1310
|
-
context: __SerdeContext
|
|
1311
|
-
): Promise<DeleteProtectionCommandOutput> => {
|
|
1312
|
-
const parsedOutput: any = {
|
|
1313
|
-
...output,
|
|
1314
|
-
body: await parseBody(output.body, context),
|
|
1315
|
-
};
|
|
1316
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1317
|
-
let errorCode = "UnknownError";
|
|
1318
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1319
|
-
switch (errorCode) {
|
|
1320
|
-
case "InternalErrorException":
|
|
1321
|
-
case "com.amazonaws.shield#InternalErrorException":
|
|
1322
|
-
response = {
|
|
1323
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
1324
|
-
name: errorCode,
|
|
1325
|
-
$metadata: deserializeMetadata(output),
|
|
1326
|
-
};
|
|
1327
|
-
break;
|
|
1328
|
-
case "OptimisticLockException":
|
|
1329
|
-
case "com.amazonaws.shield#OptimisticLockException":
|
|
1330
|
-
response = {
|
|
1331
|
-
...(await deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context)),
|
|
1332
|
-
name: errorCode,
|
|
1333
|
-
$metadata: deserializeMetadata(output),
|
|
1334
|
-
};
|
|
1335
|
-
break;
|
|
1336
|
-
case "ResourceNotFoundException":
|
|
1337
|
-
case "com.amazonaws.shield#ResourceNotFoundException":
|
|
1338
|
-
response = {
|
|
1339
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1340
|
-
name: errorCode,
|
|
1341
|
-
$metadata: deserializeMetadata(output),
|
|
1342
|
-
};
|
|
1343
|
-
break;
|
|
1344
|
-
default:
|
|
1345
|
-
const parsedBody = parsedOutput.body;
|
|
1346
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1347
|
-
response = {
|
|
1348
|
-
...parsedBody,
|
|
1349
|
-
name: `${errorCode}`,
|
|
1350
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1351
|
-
$fault: "client",
|
|
1352
|
-
$metadata: deserializeMetadata(output),
|
|
1353
|
-
} as any;
|
|
1354
|
-
}
|
|
1355
|
-
const message = response.message || response.Message || errorCode;
|
|
1356
|
-
response.message = message;
|
|
1357
|
-
delete response.Message;
|
|
1358
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1359
|
-
};
|
|
1360
|
-
|
|
1361
|
-
export const deserializeAws_json1_1DeleteProtectionGroupCommand = async (
|
|
1362
|
-
output: __HttpResponse,
|
|
1363
|
-
context: __SerdeContext
|
|
1364
|
-
): Promise<DeleteProtectionGroupCommandOutput> => {
|
|
1365
|
-
if (output.statusCode >= 300) {
|
|
1366
|
-
return deserializeAws_json1_1DeleteProtectionGroupCommandError(output, context);
|
|
1367
|
-
}
|
|
1368
|
-
const data: any = await parseBody(output.body, context);
|
|
1369
|
-
let contents: any = {};
|
|
1370
|
-
contents = deserializeAws_json1_1DeleteProtectionGroupResponse(data, context);
|
|
1371
|
-
const response: DeleteProtectionGroupCommandOutput = {
|
|
1372
|
-
$metadata: deserializeMetadata(output),
|
|
1373
|
-
...contents,
|
|
1374
|
-
};
|
|
1375
|
-
return Promise.resolve(response);
|
|
1376
|
-
};
|
|
1377
|
-
|
|
1378
|
-
const deserializeAws_json1_1DeleteProtectionGroupCommandError = async (
|
|
1379
|
-
output: __HttpResponse,
|
|
1380
|
-
context: __SerdeContext
|
|
1381
|
-
): Promise<DeleteProtectionGroupCommandOutput> => {
|
|
1382
|
-
const parsedOutput: any = {
|
|
1383
|
-
...output,
|
|
1384
|
-
body: await parseBody(output.body, context),
|
|
1385
|
-
};
|
|
1386
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1387
|
-
let errorCode = "UnknownError";
|
|
1388
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1389
|
-
switch (errorCode) {
|
|
1390
|
-
case "InternalErrorException":
|
|
1391
|
-
case "com.amazonaws.shield#InternalErrorException":
|
|
1392
|
-
response = {
|
|
1393
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
1394
|
-
name: errorCode,
|
|
1395
|
-
$metadata: deserializeMetadata(output),
|
|
1396
|
-
};
|
|
1397
|
-
break;
|
|
1398
|
-
case "OptimisticLockException":
|
|
1399
|
-
case "com.amazonaws.shield#OptimisticLockException":
|
|
1400
|
-
response = {
|
|
1401
|
-
...(await deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context)),
|
|
1402
|
-
name: errorCode,
|
|
1403
|
-
$metadata: deserializeMetadata(output),
|
|
1404
|
-
};
|
|
1405
|
-
break;
|
|
1406
|
-
case "ResourceNotFoundException":
|
|
1407
|
-
case "com.amazonaws.shield#ResourceNotFoundException":
|
|
1408
|
-
response = {
|
|
1409
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1410
|
-
name: errorCode,
|
|
1411
|
-
$metadata: deserializeMetadata(output),
|
|
1412
|
-
};
|
|
1413
|
-
break;
|
|
1414
|
-
default:
|
|
1415
|
-
const parsedBody = parsedOutput.body;
|
|
1416
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1417
|
-
response = {
|
|
1418
|
-
...parsedBody,
|
|
1419
|
-
name: `${errorCode}`,
|
|
1420
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1421
|
-
$fault: "client",
|
|
1422
|
-
$metadata: deserializeMetadata(output),
|
|
1423
|
-
} as any;
|
|
1424
|
-
}
|
|
1425
|
-
const message = response.message || response.Message || errorCode;
|
|
1426
|
-
response.message = message;
|
|
1427
|
-
delete response.Message;
|
|
1428
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1429
|
-
};
|
|
1430
|
-
|
|
1431
|
-
export const deserializeAws_json1_1DeleteSubscriptionCommand = async (
|
|
1432
|
-
output: __HttpResponse,
|
|
1433
|
-
context: __SerdeContext
|
|
1434
|
-
): Promise<DeleteSubscriptionCommandOutput> => {
|
|
1435
|
-
if (output.statusCode >= 300) {
|
|
1436
|
-
return deserializeAws_json1_1DeleteSubscriptionCommandError(output, context);
|
|
1437
|
-
}
|
|
1438
|
-
const data: any = await parseBody(output.body, context);
|
|
1439
|
-
let contents: any = {};
|
|
1440
|
-
contents = deserializeAws_json1_1DeleteSubscriptionResponse(data, context);
|
|
1441
|
-
const response: DeleteSubscriptionCommandOutput = {
|
|
1442
|
-
$metadata: deserializeMetadata(output),
|
|
1443
|
-
...contents,
|
|
1444
|
-
};
|
|
1445
|
-
return Promise.resolve(response);
|
|
1446
|
-
};
|
|
1447
|
-
|
|
1448
|
-
const deserializeAws_json1_1DeleteSubscriptionCommandError = async (
|
|
1449
|
-
output: __HttpResponse,
|
|
1450
|
-
context: __SerdeContext
|
|
1451
|
-
): Promise<DeleteSubscriptionCommandOutput> => {
|
|
1452
|
-
const parsedOutput: any = {
|
|
1453
|
-
...output,
|
|
1454
|
-
body: await parseBody(output.body, context),
|
|
1455
|
-
};
|
|
1456
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1457
|
-
let errorCode = "UnknownError";
|
|
1458
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1459
|
-
switch (errorCode) {
|
|
1460
|
-
case "InternalErrorException":
|
|
1461
|
-
case "com.amazonaws.shield#InternalErrorException":
|
|
1462
|
-
response = {
|
|
1463
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
1464
|
-
name: errorCode,
|
|
1465
|
-
$metadata: deserializeMetadata(output),
|
|
1466
|
-
};
|
|
1467
|
-
break;
|
|
1468
|
-
case "LockedSubscriptionException":
|
|
1469
|
-
case "com.amazonaws.shield#LockedSubscriptionException":
|
|
1470
|
-
response = {
|
|
1471
|
-
...(await deserializeAws_json1_1LockedSubscriptionExceptionResponse(parsedOutput, context)),
|
|
1472
|
-
name: errorCode,
|
|
1473
|
-
$metadata: deserializeMetadata(output),
|
|
1474
|
-
};
|
|
1475
|
-
break;
|
|
1476
|
-
case "ResourceNotFoundException":
|
|
1477
|
-
case "com.amazonaws.shield#ResourceNotFoundException":
|
|
1478
|
-
response = {
|
|
1479
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1480
|
-
name: errorCode,
|
|
1481
|
-
$metadata: deserializeMetadata(output),
|
|
1482
|
-
};
|
|
1483
|
-
break;
|
|
1484
|
-
default:
|
|
1485
|
-
const parsedBody = parsedOutput.body;
|
|
1486
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1487
|
-
response = {
|
|
1488
|
-
...parsedBody,
|
|
1489
|
-
name: `${errorCode}`,
|
|
1490
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1491
|
-
$fault: "client",
|
|
1492
|
-
$metadata: deserializeMetadata(output),
|
|
1493
|
-
} as any;
|
|
1494
|
-
}
|
|
1495
|
-
const message = response.message || response.Message || errorCode;
|
|
1496
|
-
response.message = message;
|
|
1497
|
-
delete response.Message;
|
|
1498
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1499
|
-
};
|
|
1500
|
-
|
|
1501
|
-
export const deserializeAws_json1_1DescribeAttackCommand = async (
|
|
1502
|
-
output: __HttpResponse,
|
|
1503
|
-
context: __SerdeContext
|
|
1504
|
-
): Promise<DescribeAttackCommandOutput> => {
|
|
1505
|
-
if (output.statusCode >= 300) {
|
|
1506
|
-
return deserializeAws_json1_1DescribeAttackCommandError(output, context);
|
|
1507
|
-
}
|
|
1508
|
-
const data: any = await parseBody(output.body, context);
|
|
1509
|
-
let contents: any = {};
|
|
1510
|
-
contents = deserializeAws_json1_1DescribeAttackResponse(data, context);
|
|
1511
|
-
const response: DescribeAttackCommandOutput = {
|
|
1512
|
-
$metadata: deserializeMetadata(output),
|
|
1513
|
-
...contents,
|
|
1514
|
-
};
|
|
1515
|
-
return Promise.resolve(response);
|
|
1516
|
-
};
|
|
1517
|
-
|
|
1518
|
-
const deserializeAws_json1_1DescribeAttackCommandError = async (
|
|
1519
|
-
output: __HttpResponse,
|
|
1520
|
-
context: __SerdeContext
|
|
1521
|
-
): Promise<DescribeAttackCommandOutput> => {
|
|
1522
|
-
const parsedOutput: any = {
|
|
1523
|
-
...output,
|
|
1524
|
-
body: await parseBody(output.body, context),
|
|
1525
|
-
};
|
|
1526
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1527
|
-
let errorCode = "UnknownError";
|
|
1528
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1529
|
-
switch (errorCode) {
|
|
1530
|
-
case "AccessDeniedException":
|
|
1531
|
-
case "com.amazonaws.shield#AccessDeniedException":
|
|
1532
|
-
response = {
|
|
1533
|
-
...(await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1534
|
-
name: errorCode,
|
|
1535
|
-
$metadata: deserializeMetadata(output),
|
|
1536
|
-
};
|
|
1537
|
-
break;
|
|
1538
|
-
case "InternalErrorException":
|
|
1539
|
-
case "com.amazonaws.shield#InternalErrorException":
|
|
1540
|
-
response = {
|
|
1541
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
1542
|
-
name: errorCode,
|
|
1543
|
-
$metadata: deserializeMetadata(output),
|
|
1544
|
-
};
|
|
1545
|
-
break;
|
|
1546
|
-
default:
|
|
1547
|
-
const parsedBody = parsedOutput.body;
|
|
1548
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1549
|
-
response = {
|
|
1550
|
-
...parsedBody,
|
|
1551
|
-
name: `${errorCode}`,
|
|
1552
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1553
|
-
$fault: "client",
|
|
1554
|
-
$metadata: deserializeMetadata(output),
|
|
1555
|
-
} as any;
|
|
1556
|
-
}
|
|
1557
|
-
const message = response.message || response.Message || errorCode;
|
|
1558
|
-
response.message = message;
|
|
1559
|
-
delete response.Message;
|
|
1560
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1561
|
-
};
|
|
1562
|
-
|
|
1563
|
-
export const deserializeAws_json1_1DescribeAttackStatisticsCommand = async (
|
|
1564
|
-
output: __HttpResponse,
|
|
1565
|
-
context: __SerdeContext
|
|
1566
|
-
): Promise<DescribeAttackStatisticsCommandOutput> => {
|
|
1567
|
-
if (output.statusCode >= 300) {
|
|
1568
|
-
return deserializeAws_json1_1DescribeAttackStatisticsCommandError(output, context);
|
|
1569
|
-
}
|
|
1570
|
-
const data: any = await parseBody(output.body, context);
|
|
1571
|
-
let contents: any = {};
|
|
1572
|
-
contents = deserializeAws_json1_1DescribeAttackStatisticsResponse(data, context);
|
|
1573
|
-
const response: DescribeAttackStatisticsCommandOutput = {
|
|
1574
|
-
$metadata: deserializeMetadata(output),
|
|
1575
|
-
...contents,
|
|
1576
|
-
};
|
|
1577
|
-
return Promise.resolve(response);
|
|
1578
|
-
};
|
|
1579
|
-
|
|
1580
|
-
const deserializeAws_json1_1DescribeAttackStatisticsCommandError = async (
|
|
1581
|
-
output: __HttpResponse,
|
|
1582
|
-
context: __SerdeContext
|
|
1583
|
-
): Promise<DescribeAttackStatisticsCommandOutput> => {
|
|
1584
|
-
const parsedOutput: any = {
|
|
1585
|
-
...output,
|
|
1586
|
-
body: await parseBody(output.body, context),
|
|
1587
|
-
};
|
|
1588
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1589
|
-
let errorCode = "UnknownError";
|
|
1590
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1591
|
-
switch (errorCode) {
|
|
1592
|
-
case "InternalErrorException":
|
|
1593
|
-
case "com.amazonaws.shield#InternalErrorException":
|
|
1594
|
-
response = {
|
|
1595
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
1596
|
-
name: errorCode,
|
|
1597
|
-
$metadata: deserializeMetadata(output),
|
|
1598
|
-
};
|
|
1599
|
-
break;
|
|
1600
|
-
default:
|
|
1601
|
-
const parsedBody = parsedOutput.body;
|
|
1602
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1603
|
-
response = {
|
|
1604
|
-
...parsedBody,
|
|
1605
|
-
name: `${errorCode}`,
|
|
1606
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1607
|
-
$fault: "client",
|
|
1608
|
-
$metadata: deserializeMetadata(output),
|
|
1609
|
-
} as any;
|
|
1610
|
-
}
|
|
1611
|
-
const message = response.message || response.Message || errorCode;
|
|
1612
|
-
response.message = message;
|
|
1613
|
-
delete response.Message;
|
|
1614
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1615
|
-
};
|
|
1616
|
-
|
|
1617
|
-
export const deserializeAws_json1_1DescribeDRTAccessCommand = async (
|
|
1618
|
-
output: __HttpResponse,
|
|
1619
|
-
context: __SerdeContext
|
|
1620
|
-
): Promise<DescribeDRTAccessCommandOutput> => {
|
|
1621
|
-
if (output.statusCode >= 300) {
|
|
1622
|
-
return deserializeAws_json1_1DescribeDRTAccessCommandError(output, context);
|
|
1623
|
-
}
|
|
1624
|
-
const data: any = await parseBody(output.body, context);
|
|
1625
|
-
let contents: any = {};
|
|
1626
|
-
contents = deserializeAws_json1_1DescribeDRTAccessResponse(data, context);
|
|
1627
|
-
const response: DescribeDRTAccessCommandOutput = {
|
|
1628
|
-
$metadata: deserializeMetadata(output),
|
|
1629
|
-
...contents,
|
|
1630
|
-
};
|
|
1631
|
-
return Promise.resolve(response);
|
|
1632
|
-
};
|
|
1633
|
-
|
|
1634
|
-
const deserializeAws_json1_1DescribeDRTAccessCommandError = async (
|
|
1635
|
-
output: __HttpResponse,
|
|
1636
|
-
context: __SerdeContext
|
|
1637
|
-
): Promise<DescribeDRTAccessCommandOutput> => {
|
|
1638
|
-
const parsedOutput: any = {
|
|
1639
|
-
...output,
|
|
1640
|
-
body: await parseBody(output.body, context),
|
|
1641
|
-
};
|
|
1642
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1643
|
-
let errorCode = "UnknownError";
|
|
1644
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1645
|
-
switch (errorCode) {
|
|
1646
|
-
case "InternalErrorException":
|
|
1647
|
-
case "com.amazonaws.shield#InternalErrorException":
|
|
1648
|
-
response = {
|
|
1649
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
1650
|
-
name: errorCode,
|
|
1651
|
-
$metadata: deserializeMetadata(output),
|
|
1652
|
-
};
|
|
1653
|
-
break;
|
|
1654
|
-
case "ResourceNotFoundException":
|
|
1655
|
-
case "com.amazonaws.shield#ResourceNotFoundException":
|
|
1656
|
-
response = {
|
|
1657
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1658
|
-
name: errorCode,
|
|
1659
|
-
$metadata: deserializeMetadata(output),
|
|
1660
|
-
};
|
|
1661
|
-
break;
|
|
1662
|
-
default:
|
|
1663
|
-
const parsedBody = parsedOutput.body;
|
|
1664
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1665
|
-
response = {
|
|
1666
|
-
...parsedBody,
|
|
1667
|
-
name: `${errorCode}`,
|
|
1668
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1669
|
-
$fault: "client",
|
|
1670
|
-
$metadata: deserializeMetadata(output),
|
|
1671
|
-
} as any;
|
|
1672
|
-
}
|
|
1673
|
-
const message = response.message || response.Message || errorCode;
|
|
1674
|
-
response.message = message;
|
|
1675
|
-
delete response.Message;
|
|
1676
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1677
|
-
};
|
|
1678
|
-
|
|
1679
|
-
export const deserializeAws_json1_1DescribeEmergencyContactSettingsCommand = async (
|
|
1680
|
-
output: __HttpResponse,
|
|
1681
|
-
context: __SerdeContext
|
|
1682
|
-
): Promise<DescribeEmergencyContactSettingsCommandOutput> => {
|
|
1683
|
-
if (output.statusCode >= 300) {
|
|
1684
|
-
return deserializeAws_json1_1DescribeEmergencyContactSettingsCommandError(output, context);
|
|
1685
|
-
}
|
|
1686
|
-
const data: any = await parseBody(output.body, context);
|
|
1687
|
-
let contents: any = {};
|
|
1688
|
-
contents = deserializeAws_json1_1DescribeEmergencyContactSettingsResponse(data, context);
|
|
1689
|
-
const response: DescribeEmergencyContactSettingsCommandOutput = {
|
|
1690
|
-
$metadata: deserializeMetadata(output),
|
|
1691
|
-
...contents,
|
|
1692
|
-
};
|
|
1693
|
-
return Promise.resolve(response);
|
|
1694
|
-
};
|
|
1695
|
-
|
|
1696
|
-
const deserializeAws_json1_1DescribeEmergencyContactSettingsCommandError = async (
|
|
1697
|
-
output: __HttpResponse,
|
|
1698
|
-
context: __SerdeContext
|
|
1699
|
-
): Promise<DescribeEmergencyContactSettingsCommandOutput> => {
|
|
1700
|
-
const parsedOutput: any = {
|
|
1701
|
-
...output,
|
|
1702
|
-
body: await parseBody(output.body, context),
|
|
1703
|
-
};
|
|
1704
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1705
|
-
let errorCode = "UnknownError";
|
|
1706
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1707
|
-
switch (errorCode) {
|
|
1708
|
-
case "InternalErrorException":
|
|
1709
|
-
case "com.amazonaws.shield#InternalErrorException":
|
|
1710
|
-
response = {
|
|
1711
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
1712
|
-
name: errorCode,
|
|
1713
|
-
$metadata: deserializeMetadata(output),
|
|
1714
|
-
};
|
|
1715
|
-
break;
|
|
1716
|
-
case "ResourceNotFoundException":
|
|
1717
|
-
case "com.amazonaws.shield#ResourceNotFoundException":
|
|
1718
|
-
response = {
|
|
1719
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1720
|
-
name: errorCode,
|
|
1721
|
-
$metadata: deserializeMetadata(output),
|
|
1722
|
-
};
|
|
1723
|
-
break;
|
|
1724
|
-
default:
|
|
1725
|
-
const parsedBody = parsedOutput.body;
|
|
1726
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1727
|
-
response = {
|
|
1728
|
-
...parsedBody,
|
|
1729
|
-
name: `${errorCode}`,
|
|
1730
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1731
|
-
$fault: "client",
|
|
1732
|
-
$metadata: deserializeMetadata(output),
|
|
1733
|
-
} as any;
|
|
1734
|
-
}
|
|
1735
|
-
const message = response.message || response.Message || errorCode;
|
|
1736
|
-
response.message = message;
|
|
1737
|
-
delete response.Message;
|
|
1738
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1739
|
-
};
|
|
1740
|
-
|
|
1741
|
-
export const deserializeAws_json1_1DescribeProtectionCommand = async (
|
|
1742
|
-
output: __HttpResponse,
|
|
1743
|
-
context: __SerdeContext
|
|
1744
|
-
): Promise<DescribeProtectionCommandOutput> => {
|
|
1745
|
-
if (output.statusCode >= 300) {
|
|
1746
|
-
return deserializeAws_json1_1DescribeProtectionCommandError(output, context);
|
|
1747
|
-
}
|
|
1748
|
-
const data: any = await parseBody(output.body, context);
|
|
1749
|
-
let contents: any = {};
|
|
1750
|
-
contents = deserializeAws_json1_1DescribeProtectionResponse(data, context);
|
|
1751
|
-
const response: DescribeProtectionCommandOutput = {
|
|
1752
|
-
$metadata: deserializeMetadata(output),
|
|
1753
|
-
...contents,
|
|
1754
|
-
};
|
|
1755
|
-
return Promise.resolve(response);
|
|
1756
|
-
};
|
|
1757
|
-
|
|
1758
|
-
const deserializeAws_json1_1DescribeProtectionCommandError = async (
|
|
1759
|
-
output: __HttpResponse,
|
|
1760
|
-
context: __SerdeContext
|
|
1761
|
-
): Promise<DescribeProtectionCommandOutput> => {
|
|
1762
|
-
const parsedOutput: any = {
|
|
1763
|
-
...output,
|
|
1764
|
-
body: await parseBody(output.body, context),
|
|
1765
|
-
};
|
|
1766
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1767
|
-
let errorCode = "UnknownError";
|
|
1768
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1769
|
-
switch (errorCode) {
|
|
1770
|
-
case "InternalErrorException":
|
|
1771
|
-
case "com.amazonaws.shield#InternalErrorException":
|
|
1772
|
-
response = {
|
|
1773
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
1774
|
-
name: errorCode,
|
|
1775
|
-
$metadata: deserializeMetadata(output),
|
|
1776
|
-
};
|
|
1777
|
-
break;
|
|
1778
|
-
case "InvalidParameterException":
|
|
1779
|
-
case "com.amazonaws.shield#InvalidParameterException":
|
|
1780
|
-
response = {
|
|
1781
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
1782
|
-
name: errorCode,
|
|
1783
|
-
$metadata: deserializeMetadata(output),
|
|
1784
|
-
};
|
|
1785
|
-
break;
|
|
1786
|
-
case "ResourceNotFoundException":
|
|
1787
|
-
case "com.amazonaws.shield#ResourceNotFoundException":
|
|
1788
|
-
response = {
|
|
1789
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1790
|
-
name: errorCode,
|
|
1791
|
-
$metadata: deserializeMetadata(output),
|
|
1792
|
-
};
|
|
1793
|
-
break;
|
|
1794
|
-
default:
|
|
1795
|
-
const parsedBody = parsedOutput.body;
|
|
1796
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1797
|
-
response = {
|
|
1798
|
-
...parsedBody,
|
|
1799
|
-
name: `${errorCode}`,
|
|
1800
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1801
|
-
$fault: "client",
|
|
1802
|
-
$metadata: deserializeMetadata(output),
|
|
1803
|
-
} as any;
|
|
1804
|
-
}
|
|
1805
|
-
const message = response.message || response.Message || errorCode;
|
|
1806
|
-
response.message = message;
|
|
1807
|
-
delete response.Message;
|
|
1808
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1809
|
-
};
|
|
1810
|
-
|
|
1811
|
-
export const deserializeAws_json1_1DescribeProtectionGroupCommand = async (
|
|
1812
|
-
output: __HttpResponse,
|
|
1813
|
-
context: __SerdeContext
|
|
1814
|
-
): Promise<DescribeProtectionGroupCommandOutput> => {
|
|
1815
|
-
if (output.statusCode >= 300) {
|
|
1816
|
-
return deserializeAws_json1_1DescribeProtectionGroupCommandError(output, context);
|
|
1817
|
-
}
|
|
1818
|
-
const data: any = await parseBody(output.body, context);
|
|
1819
|
-
let contents: any = {};
|
|
1820
|
-
contents = deserializeAws_json1_1DescribeProtectionGroupResponse(data, context);
|
|
1821
|
-
const response: DescribeProtectionGroupCommandOutput = {
|
|
1822
|
-
$metadata: deserializeMetadata(output),
|
|
1823
|
-
...contents,
|
|
1824
|
-
};
|
|
1825
|
-
return Promise.resolve(response);
|
|
1826
|
-
};
|
|
1827
|
-
|
|
1828
|
-
const deserializeAws_json1_1DescribeProtectionGroupCommandError = async (
|
|
1829
|
-
output: __HttpResponse,
|
|
1830
|
-
context: __SerdeContext
|
|
1831
|
-
): Promise<DescribeProtectionGroupCommandOutput> => {
|
|
1832
|
-
const parsedOutput: any = {
|
|
1833
|
-
...output,
|
|
1834
|
-
body: await parseBody(output.body, context),
|
|
1835
|
-
};
|
|
1836
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1837
|
-
let errorCode = "UnknownError";
|
|
1838
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1839
|
-
switch (errorCode) {
|
|
1840
|
-
case "InternalErrorException":
|
|
1841
|
-
case "com.amazonaws.shield#InternalErrorException":
|
|
1842
|
-
response = {
|
|
1843
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
1844
|
-
name: errorCode,
|
|
1845
|
-
$metadata: deserializeMetadata(output),
|
|
1846
|
-
};
|
|
1847
|
-
break;
|
|
1848
|
-
case "ResourceNotFoundException":
|
|
1849
|
-
case "com.amazonaws.shield#ResourceNotFoundException":
|
|
1850
|
-
response = {
|
|
1851
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1852
|
-
name: errorCode,
|
|
1853
|
-
$metadata: deserializeMetadata(output),
|
|
1854
|
-
};
|
|
1855
|
-
break;
|
|
1856
|
-
default:
|
|
1857
|
-
const parsedBody = parsedOutput.body;
|
|
1858
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1859
|
-
response = {
|
|
1860
|
-
...parsedBody,
|
|
1861
|
-
name: `${errorCode}`,
|
|
1862
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1863
|
-
$fault: "client",
|
|
1864
|
-
$metadata: deserializeMetadata(output),
|
|
1865
|
-
} as any;
|
|
1866
|
-
}
|
|
1867
|
-
const message = response.message || response.Message || errorCode;
|
|
1868
|
-
response.message = message;
|
|
1869
|
-
delete response.Message;
|
|
1870
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1871
|
-
};
|
|
1872
|
-
|
|
1873
|
-
export const deserializeAws_json1_1DescribeSubscriptionCommand = async (
|
|
1874
|
-
output: __HttpResponse,
|
|
1875
|
-
context: __SerdeContext
|
|
1876
|
-
): Promise<DescribeSubscriptionCommandOutput> => {
|
|
1877
|
-
if (output.statusCode >= 300) {
|
|
1878
|
-
return deserializeAws_json1_1DescribeSubscriptionCommandError(output, context);
|
|
1879
|
-
}
|
|
1880
|
-
const data: any = await parseBody(output.body, context);
|
|
1881
|
-
let contents: any = {};
|
|
1882
|
-
contents = deserializeAws_json1_1DescribeSubscriptionResponse(data, context);
|
|
1883
|
-
const response: DescribeSubscriptionCommandOutput = {
|
|
1884
|
-
$metadata: deserializeMetadata(output),
|
|
1885
|
-
...contents,
|
|
1886
|
-
};
|
|
1887
|
-
return Promise.resolve(response);
|
|
1888
|
-
};
|
|
1889
|
-
|
|
1890
|
-
const deserializeAws_json1_1DescribeSubscriptionCommandError = async (
|
|
1891
|
-
output: __HttpResponse,
|
|
1892
|
-
context: __SerdeContext
|
|
1893
|
-
): Promise<DescribeSubscriptionCommandOutput> => {
|
|
1894
|
-
const parsedOutput: any = {
|
|
1895
|
-
...output,
|
|
1896
|
-
body: await parseBody(output.body, context),
|
|
1897
|
-
};
|
|
1898
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1899
|
-
let errorCode = "UnknownError";
|
|
1900
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1901
|
-
switch (errorCode) {
|
|
1902
|
-
case "InternalErrorException":
|
|
1903
|
-
case "com.amazonaws.shield#InternalErrorException":
|
|
1904
|
-
response = {
|
|
1905
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
1906
|
-
name: errorCode,
|
|
1907
|
-
$metadata: deserializeMetadata(output),
|
|
1908
|
-
};
|
|
1909
|
-
break;
|
|
1910
|
-
case "ResourceNotFoundException":
|
|
1911
|
-
case "com.amazonaws.shield#ResourceNotFoundException":
|
|
1912
|
-
response = {
|
|
1913
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1914
|
-
name: errorCode,
|
|
1915
|
-
$metadata: deserializeMetadata(output),
|
|
1916
|
-
};
|
|
1917
|
-
break;
|
|
1918
|
-
default:
|
|
1919
|
-
const parsedBody = parsedOutput.body;
|
|
1920
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1921
|
-
response = {
|
|
1922
|
-
...parsedBody,
|
|
1923
|
-
name: `${errorCode}`,
|
|
1924
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1925
|
-
$fault: "client",
|
|
1926
|
-
$metadata: deserializeMetadata(output),
|
|
1927
|
-
} as any;
|
|
1928
|
-
}
|
|
1929
|
-
const message = response.message || response.Message || errorCode;
|
|
1930
|
-
response.message = message;
|
|
1931
|
-
delete response.Message;
|
|
1932
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1933
|
-
};
|
|
1934
|
-
|
|
1935
|
-
export const deserializeAws_json1_1DisableProactiveEngagementCommand = async (
|
|
1936
|
-
output: __HttpResponse,
|
|
1937
|
-
context: __SerdeContext
|
|
1938
|
-
): Promise<DisableProactiveEngagementCommandOutput> => {
|
|
1939
|
-
if (output.statusCode >= 300) {
|
|
1940
|
-
return deserializeAws_json1_1DisableProactiveEngagementCommandError(output, context);
|
|
1941
|
-
}
|
|
1942
|
-
const data: any = await parseBody(output.body, context);
|
|
1943
|
-
let contents: any = {};
|
|
1944
|
-
contents = deserializeAws_json1_1DisableProactiveEngagementResponse(data, context);
|
|
1945
|
-
const response: DisableProactiveEngagementCommandOutput = {
|
|
1946
|
-
$metadata: deserializeMetadata(output),
|
|
1947
|
-
...contents,
|
|
1948
|
-
};
|
|
1949
|
-
return Promise.resolve(response);
|
|
1950
|
-
};
|
|
1951
|
-
|
|
1952
|
-
const deserializeAws_json1_1DisableProactiveEngagementCommandError = async (
|
|
1953
|
-
output: __HttpResponse,
|
|
1954
|
-
context: __SerdeContext
|
|
1955
|
-
): Promise<DisableProactiveEngagementCommandOutput> => {
|
|
1956
|
-
const parsedOutput: any = {
|
|
1957
|
-
...output,
|
|
1958
|
-
body: await parseBody(output.body, context),
|
|
1959
|
-
};
|
|
1960
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1961
|
-
let errorCode = "UnknownError";
|
|
1962
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1963
|
-
switch (errorCode) {
|
|
1964
|
-
case "InternalErrorException":
|
|
1965
|
-
case "com.amazonaws.shield#InternalErrorException":
|
|
1966
|
-
response = {
|
|
1967
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
1968
|
-
name: errorCode,
|
|
1969
|
-
$metadata: deserializeMetadata(output),
|
|
1970
|
-
};
|
|
1971
|
-
break;
|
|
1972
|
-
case "InvalidOperationException":
|
|
1973
|
-
case "com.amazonaws.shield#InvalidOperationException":
|
|
1974
|
-
response = {
|
|
1975
|
-
...(await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context)),
|
|
1976
|
-
name: errorCode,
|
|
1977
|
-
$metadata: deserializeMetadata(output),
|
|
1978
|
-
};
|
|
1979
|
-
break;
|
|
1980
|
-
case "InvalidParameterException":
|
|
1981
|
-
case "com.amazonaws.shield#InvalidParameterException":
|
|
1982
|
-
response = {
|
|
1983
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
1984
|
-
name: errorCode,
|
|
1985
|
-
$metadata: deserializeMetadata(output),
|
|
1986
|
-
};
|
|
1987
|
-
break;
|
|
1988
|
-
case "OptimisticLockException":
|
|
1989
|
-
case "com.amazonaws.shield#OptimisticLockException":
|
|
1990
|
-
response = {
|
|
1991
|
-
...(await deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context)),
|
|
1992
|
-
name: errorCode,
|
|
1993
|
-
$metadata: deserializeMetadata(output),
|
|
1994
|
-
};
|
|
1995
|
-
break;
|
|
1996
|
-
case "ResourceNotFoundException":
|
|
1997
|
-
case "com.amazonaws.shield#ResourceNotFoundException":
|
|
1998
|
-
response = {
|
|
1999
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2000
|
-
name: errorCode,
|
|
2001
|
-
$metadata: deserializeMetadata(output),
|
|
2002
|
-
};
|
|
2003
|
-
break;
|
|
2004
|
-
default:
|
|
2005
|
-
const parsedBody = parsedOutput.body;
|
|
2006
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2007
|
-
response = {
|
|
2008
|
-
...parsedBody,
|
|
2009
|
-
name: `${errorCode}`,
|
|
2010
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2011
|
-
$fault: "client",
|
|
2012
|
-
$metadata: deserializeMetadata(output),
|
|
2013
|
-
} as any;
|
|
2014
|
-
}
|
|
2015
|
-
const message = response.message || response.Message || errorCode;
|
|
2016
|
-
response.message = message;
|
|
2017
|
-
delete response.Message;
|
|
2018
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2019
|
-
};
|
|
2020
|
-
|
|
2021
|
-
export const deserializeAws_json1_1DisassociateDRTLogBucketCommand = async (
|
|
2022
|
-
output: __HttpResponse,
|
|
2023
|
-
context: __SerdeContext
|
|
2024
|
-
): Promise<DisassociateDRTLogBucketCommandOutput> => {
|
|
2025
|
-
if (output.statusCode >= 300) {
|
|
2026
|
-
return deserializeAws_json1_1DisassociateDRTLogBucketCommandError(output, context);
|
|
2027
|
-
}
|
|
2028
|
-
const data: any = await parseBody(output.body, context);
|
|
2029
|
-
let contents: any = {};
|
|
2030
|
-
contents = deserializeAws_json1_1DisassociateDRTLogBucketResponse(data, context);
|
|
2031
|
-
const response: DisassociateDRTLogBucketCommandOutput = {
|
|
2032
|
-
$metadata: deserializeMetadata(output),
|
|
2033
|
-
...contents,
|
|
2034
|
-
};
|
|
2035
|
-
return Promise.resolve(response);
|
|
2036
|
-
};
|
|
2037
|
-
|
|
2038
|
-
const deserializeAws_json1_1DisassociateDRTLogBucketCommandError = async (
|
|
2039
|
-
output: __HttpResponse,
|
|
2040
|
-
context: __SerdeContext
|
|
2041
|
-
): Promise<DisassociateDRTLogBucketCommandOutput> => {
|
|
2042
|
-
const parsedOutput: any = {
|
|
2043
|
-
...output,
|
|
2044
|
-
body: await parseBody(output.body, context),
|
|
2045
|
-
};
|
|
2046
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2047
|
-
let errorCode = "UnknownError";
|
|
2048
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2049
|
-
switch (errorCode) {
|
|
2050
|
-
case "AccessDeniedForDependencyException":
|
|
2051
|
-
case "com.amazonaws.shield#AccessDeniedForDependencyException":
|
|
2052
|
-
response = {
|
|
2053
|
-
...(await deserializeAws_json1_1AccessDeniedForDependencyExceptionResponse(parsedOutput, context)),
|
|
2054
|
-
name: errorCode,
|
|
2055
|
-
$metadata: deserializeMetadata(output),
|
|
2056
|
-
};
|
|
2057
|
-
break;
|
|
2058
|
-
case "InternalErrorException":
|
|
2059
|
-
case "com.amazonaws.shield#InternalErrorException":
|
|
2060
|
-
response = {
|
|
2061
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
2062
|
-
name: errorCode,
|
|
2063
|
-
$metadata: deserializeMetadata(output),
|
|
2064
|
-
};
|
|
2065
|
-
break;
|
|
2066
|
-
case "InvalidOperationException":
|
|
2067
|
-
case "com.amazonaws.shield#InvalidOperationException":
|
|
2068
|
-
response = {
|
|
2069
|
-
...(await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context)),
|
|
2070
|
-
name: errorCode,
|
|
2071
|
-
$metadata: deserializeMetadata(output),
|
|
2072
|
-
};
|
|
2073
|
-
break;
|
|
2074
|
-
case "NoAssociatedRoleException":
|
|
2075
|
-
case "com.amazonaws.shield#NoAssociatedRoleException":
|
|
2076
|
-
response = {
|
|
2077
|
-
...(await deserializeAws_json1_1NoAssociatedRoleExceptionResponse(parsedOutput, context)),
|
|
2078
|
-
name: errorCode,
|
|
2079
|
-
$metadata: deserializeMetadata(output),
|
|
2080
|
-
};
|
|
2081
|
-
break;
|
|
2082
|
-
case "OptimisticLockException":
|
|
2083
|
-
case "com.amazonaws.shield#OptimisticLockException":
|
|
2084
|
-
response = {
|
|
2085
|
-
...(await deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context)),
|
|
2086
|
-
name: errorCode,
|
|
2087
|
-
$metadata: deserializeMetadata(output),
|
|
2088
|
-
};
|
|
2089
|
-
break;
|
|
2090
|
-
case "ResourceNotFoundException":
|
|
2091
|
-
case "com.amazonaws.shield#ResourceNotFoundException":
|
|
2092
|
-
response = {
|
|
2093
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2094
|
-
name: errorCode,
|
|
2095
|
-
$metadata: deserializeMetadata(output),
|
|
2096
|
-
};
|
|
2097
|
-
break;
|
|
2098
|
-
default:
|
|
2099
|
-
const parsedBody = parsedOutput.body;
|
|
2100
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2101
|
-
response = {
|
|
2102
|
-
...parsedBody,
|
|
2103
|
-
name: `${errorCode}`,
|
|
2104
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2105
|
-
$fault: "client",
|
|
2106
|
-
$metadata: deserializeMetadata(output),
|
|
2107
|
-
} as any;
|
|
2108
|
-
}
|
|
2109
|
-
const message = response.message || response.Message || errorCode;
|
|
2110
|
-
response.message = message;
|
|
2111
|
-
delete response.Message;
|
|
2112
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2113
|
-
};
|
|
2114
|
-
|
|
2115
|
-
export const deserializeAws_json1_1DisassociateDRTRoleCommand = async (
|
|
2116
|
-
output: __HttpResponse,
|
|
2117
|
-
context: __SerdeContext
|
|
2118
|
-
): Promise<DisassociateDRTRoleCommandOutput> => {
|
|
2119
|
-
if (output.statusCode >= 300) {
|
|
2120
|
-
return deserializeAws_json1_1DisassociateDRTRoleCommandError(output, context);
|
|
2121
|
-
}
|
|
2122
|
-
const data: any = await parseBody(output.body, context);
|
|
2123
|
-
let contents: any = {};
|
|
2124
|
-
contents = deserializeAws_json1_1DisassociateDRTRoleResponse(data, context);
|
|
2125
|
-
const response: DisassociateDRTRoleCommandOutput = {
|
|
2126
|
-
$metadata: deserializeMetadata(output),
|
|
2127
|
-
...contents,
|
|
2128
|
-
};
|
|
2129
|
-
return Promise.resolve(response);
|
|
2130
|
-
};
|
|
2131
|
-
|
|
2132
|
-
const deserializeAws_json1_1DisassociateDRTRoleCommandError = async (
|
|
2133
|
-
output: __HttpResponse,
|
|
2134
|
-
context: __SerdeContext
|
|
2135
|
-
): Promise<DisassociateDRTRoleCommandOutput> => {
|
|
2136
|
-
const parsedOutput: any = {
|
|
2137
|
-
...output,
|
|
2138
|
-
body: await parseBody(output.body, context),
|
|
2139
|
-
};
|
|
2140
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2141
|
-
let errorCode = "UnknownError";
|
|
2142
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2143
|
-
switch (errorCode) {
|
|
2144
|
-
case "InternalErrorException":
|
|
2145
|
-
case "com.amazonaws.shield#InternalErrorException":
|
|
2146
|
-
response = {
|
|
2147
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
2148
|
-
name: errorCode,
|
|
2149
|
-
$metadata: deserializeMetadata(output),
|
|
2150
|
-
};
|
|
2151
|
-
break;
|
|
2152
|
-
case "InvalidOperationException":
|
|
2153
|
-
case "com.amazonaws.shield#InvalidOperationException":
|
|
2154
|
-
response = {
|
|
2155
|
-
...(await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context)),
|
|
2156
|
-
name: errorCode,
|
|
2157
|
-
$metadata: deserializeMetadata(output),
|
|
2158
|
-
};
|
|
2159
|
-
break;
|
|
2160
|
-
case "OptimisticLockException":
|
|
2161
|
-
case "com.amazonaws.shield#OptimisticLockException":
|
|
2162
|
-
response = {
|
|
2163
|
-
...(await deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context)),
|
|
2164
|
-
name: errorCode,
|
|
2165
|
-
$metadata: deserializeMetadata(output),
|
|
2166
|
-
};
|
|
2167
|
-
break;
|
|
2168
|
-
case "ResourceNotFoundException":
|
|
2169
|
-
case "com.amazonaws.shield#ResourceNotFoundException":
|
|
2170
|
-
response = {
|
|
2171
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2172
|
-
name: errorCode,
|
|
2173
|
-
$metadata: deserializeMetadata(output),
|
|
2174
|
-
};
|
|
2175
|
-
break;
|
|
2176
|
-
default:
|
|
2177
|
-
const parsedBody = parsedOutput.body;
|
|
2178
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2179
|
-
response = {
|
|
2180
|
-
...parsedBody,
|
|
2181
|
-
name: `${errorCode}`,
|
|
2182
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2183
|
-
$fault: "client",
|
|
2184
|
-
$metadata: deserializeMetadata(output),
|
|
2185
|
-
} as any;
|
|
2186
|
-
}
|
|
2187
|
-
const message = response.message || response.Message || errorCode;
|
|
2188
|
-
response.message = message;
|
|
2189
|
-
delete response.Message;
|
|
2190
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2191
|
-
};
|
|
2192
|
-
|
|
2193
|
-
export const deserializeAws_json1_1DisassociateHealthCheckCommand = async (
|
|
2194
|
-
output: __HttpResponse,
|
|
2195
|
-
context: __SerdeContext
|
|
2196
|
-
): Promise<DisassociateHealthCheckCommandOutput> => {
|
|
2197
|
-
if (output.statusCode >= 300) {
|
|
2198
|
-
return deserializeAws_json1_1DisassociateHealthCheckCommandError(output, context);
|
|
2199
|
-
}
|
|
2200
|
-
const data: any = await parseBody(output.body, context);
|
|
2201
|
-
let contents: any = {};
|
|
2202
|
-
contents = deserializeAws_json1_1DisassociateHealthCheckResponse(data, context);
|
|
2203
|
-
const response: DisassociateHealthCheckCommandOutput = {
|
|
2204
|
-
$metadata: deserializeMetadata(output),
|
|
2205
|
-
...contents,
|
|
2206
|
-
};
|
|
2207
|
-
return Promise.resolve(response);
|
|
2208
|
-
};
|
|
2209
|
-
|
|
2210
|
-
const deserializeAws_json1_1DisassociateHealthCheckCommandError = async (
|
|
2211
|
-
output: __HttpResponse,
|
|
2212
|
-
context: __SerdeContext
|
|
2213
|
-
): Promise<DisassociateHealthCheckCommandOutput> => {
|
|
2214
|
-
const parsedOutput: any = {
|
|
2215
|
-
...output,
|
|
2216
|
-
body: await parseBody(output.body, context),
|
|
2217
|
-
};
|
|
2218
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2219
|
-
let errorCode = "UnknownError";
|
|
2220
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2221
|
-
switch (errorCode) {
|
|
2222
|
-
case "InternalErrorException":
|
|
2223
|
-
case "com.amazonaws.shield#InternalErrorException":
|
|
2224
|
-
response = {
|
|
2225
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
2226
|
-
name: errorCode,
|
|
2227
|
-
$metadata: deserializeMetadata(output),
|
|
2228
|
-
};
|
|
2229
|
-
break;
|
|
2230
|
-
case "InvalidParameterException":
|
|
2231
|
-
case "com.amazonaws.shield#InvalidParameterException":
|
|
2232
|
-
response = {
|
|
2233
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
2234
|
-
name: errorCode,
|
|
2235
|
-
$metadata: deserializeMetadata(output),
|
|
2236
|
-
};
|
|
2237
|
-
break;
|
|
2238
|
-
case "OptimisticLockException":
|
|
2239
|
-
case "com.amazonaws.shield#OptimisticLockException":
|
|
2240
|
-
response = {
|
|
2241
|
-
...(await deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context)),
|
|
2242
|
-
name: errorCode,
|
|
2243
|
-
$metadata: deserializeMetadata(output),
|
|
2244
|
-
};
|
|
2245
|
-
break;
|
|
2246
|
-
case "ResourceNotFoundException":
|
|
2247
|
-
case "com.amazonaws.shield#ResourceNotFoundException":
|
|
2248
|
-
response = {
|
|
2249
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2250
|
-
name: errorCode,
|
|
2251
|
-
$metadata: deserializeMetadata(output),
|
|
2252
|
-
};
|
|
2253
|
-
break;
|
|
2254
|
-
default:
|
|
2255
|
-
const parsedBody = parsedOutput.body;
|
|
2256
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2257
|
-
response = {
|
|
2258
|
-
...parsedBody,
|
|
2259
|
-
name: `${errorCode}`,
|
|
2260
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2261
|
-
$fault: "client",
|
|
2262
|
-
$metadata: deserializeMetadata(output),
|
|
2263
|
-
} as any;
|
|
2264
|
-
}
|
|
2265
|
-
const message = response.message || response.Message || errorCode;
|
|
2266
|
-
response.message = message;
|
|
2267
|
-
delete response.Message;
|
|
2268
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2269
|
-
};
|
|
2270
|
-
|
|
2271
|
-
export const deserializeAws_json1_1EnableProactiveEngagementCommand = async (
|
|
2272
|
-
output: __HttpResponse,
|
|
2273
|
-
context: __SerdeContext
|
|
2274
|
-
): Promise<EnableProactiveEngagementCommandOutput> => {
|
|
2275
|
-
if (output.statusCode >= 300) {
|
|
2276
|
-
return deserializeAws_json1_1EnableProactiveEngagementCommandError(output, context);
|
|
2277
|
-
}
|
|
2278
|
-
const data: any = await parseBody(output.body, context);
|
|
2279
|
-
let contents: any = {};
|
|
2280
|
-
contents = deserializeAws_json1_1EnableProactiveEngagementResponse(data, context);
|
|
2281
|
-
const response: EnableProactiveEngagementCommandOutput = {
|
|
2282
|
-
$metadata: deserializeMetadata(output),
|
|
2283
|
-
...contents,
|
|
2284
|
-
};
|
|
2285
|
-
return Promise.resolve(response);
|
|
2286
|
-
};
|
|
2287
|
-
|
|
2288
|
-
const deserializeAws_json1_1EnableProactiveEngagementCommandError = async (
|
|
2289
|
-
output: __HttpResponse,
|
|
2290
|
-
context: __SerdeContext
|
|
2291
|
-
): Promise<EnableProactiveEngagementCommandOutput> => {
|
|
2292
|
-
const parsedOutput: any = {
|
|
2293
|
-
...output,
|
|
2294
|
-
body: await parseBody(output.body, context),
|
|
2295
|
-
};
|
|
2296
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2297
|
-
let errorCode = "UnknownError";
|
|
2298
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2299
|
-
switch (errorCode) {
|
|
2300
|
-
case "InternalErrorException":
|
|
2301
|
-
case "com.amazonaws.shield#InternalErrorException":
|
|
2302
|
-
response = {
|
|
2303
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
2304
|
-
name: errorCode,
|
|
2305
|
-
$metadata: deserializeMetadata(output),
|
|
2306
|
-
};
|
|
2307
|
-
break;
|
|
2308
|
-
case "InvalidOperationException":
|
|
2309
|
-
case "com.amazonaws.shield#InvalidOperationException":
|
|
2310
|
-
response = {
|
|
2311
|
-
...(await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context)),
|
|
2312
|
-
name: errorCode,
|
|
2313
|
-
$metadata: deserializeMetadata(output),
|
|
2314
|
-
};
|
|
2315
|
-
break;
|
|
2316
|
-
case "InvalidParameterException":
|
|
2317
|
-
case "com.amazonaws.shield#InvalidParameterException":
|
|
2318
|
-
response = {
|
|
2319
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
2320
|
-
name: errorCode,
|
|
2321
|
-
$metadata: deserializeMetadata(output),
|
|
2322
|
-
};
|
|
2323
|
-
break;
|
|
2324
|
-
case "OptimisticLockException":
|
|
2325
|
-
case "com.amazonaws.shield#OptimisticLockException":
|
|
2326
|
-
response = {
|
|
2327
|
-
...(await deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context)),
|
|
2328
|
-
name: errorCode,
|
|
2329
|
-
$metadata: deserializeMetadata(output),
|
|
2330
|
-
};
|
|
2331
|
-
break;
|
|
2332
|
-
case "ResourceNotFoundException":
|
|
2333
|
-
case "com.amazonaws.shield#ResourceNotFoundException":
|
|
2334
|
-
response = {
|
|
2335
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2336
|
-
name: errorCode,
|
|
2337
|
-
$metadata: deserializeMetadata(output),
|
|
2338
|
-
};
|
|
2339
|
-
break;
|
|
2340
|
-
default:
|
|
2341
|
-
const parsedBody = parsedOutput.body;
|
|
2342
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2343
|
-
response = {
|
|
2344
|
-
...parsedBody,
|
|
2345
|
-
name: `${errorCode}`,
|
|
2346
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2347
|
-
$fault: "client",
|
|
2348
|
-
$metadata: deserializeMetadata(output),
|
|
2349
|
-
} as any;
|
|
2350
|
-
}
|
|
2351
|
-
const message = response.message || response.Message || errorCode;
|
|
2352
|
-
response.message = message;
|
|
2353
|
-
delete response.Message;
|
|
2354
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2355
|
-
};
|
|
2356
|
-
|
|
2357
|
-
export const deserializeAws_json1_1GetSubscriptionStateCommand = async (
|
|
2358
|
-
output: __HttpResponse,
|
|
2359
|
-
context: __SerdeContext
|
|
2360
|
-
): Promise<GetSubscriptionStateCommandOutput> => {
|
|
2361
|
-
if (output.statusCode >= 300) {
|
|
2362
|
-
return deserializeAws_json1_1GetSubscriptionStateCommandError(output, context);
|
|
2363
|
-
}
|
|
2364
|
-
const data: any = await parseBody(output.body, context);
|
|
2365
|
-
let contents: any = {};
|
|
2366
|
-
contents = deserializeAws_json1_1GetSubscriptionStateResponse(data, context);
|
|
2367
|
-
const response: GetSubscriptionStateCommandOutput = {
|
|
2368
|
-
$metadata: deserializeMetadata(output),
|
|
2369
|
-
...contents,
|
|
2370
|
-
};
|
|
2371
|
-
return Promise.resolve(response);
|
|
2372
|
-
};
|
|
2373
|
-
|
|
2374
|
-
const deserializeAws_json1_1GetSubscriptionStateCommandError = async (
|
|
2375
|
-
output: __HttpResponse,
|
|
2376
|
-
context: __SerdeContext
|
|
2377
|
-
): Promise<GetSubscriptionStateCommandOutput> => {
|
|
2378
|
-
const parsedOutput: any = {
|
|
2379
|
-
...output,
|
|
2380
|
-
body: await parseBody(output.body, context),
|
|
2381
|
-
};
|
|
2382
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2383
|
-
let errorCode = "UnknownError";
|
|
2384
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2385
|
-
switch (errorCode) {
|
|
2386
|
-
case "InternalErrorException":
|
|
2387
|
-
case "com.amazonaws.shield#InternalErrorException":
|
|
2388
|
-
response = {
|
|
2389
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
2390
|
-
name: errorCode,
|
|
2391
|
-
$metadata: deserializeMetadata(output),
|
|
2392
|
-
};
|
|
2393
|
-
break;
|
|
2394
|
-
default:
|
|
2395
|
-
const parsedBody = parsedOutput.body;
|
|
2396
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2397
|
-
response = {
|
|
2398
|
-
...parsedBody,
|
|
2399
|
-
name: `${errorCode}`,
|
|
2400
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2401
|
-
$fault: "client",
|
|
2402
|
-
$metadata: deserializeMetadata(output),
|
|
2403
|
-
} as any;
|
|
2404
|
-
}
|
|
2405
|
-
const message = response.message || response.Message || errorCode;
|
|
2406
|
-
response.message = message;
|
|
2407
|
-
delete response.Message;
|
|
2408
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2409
|
-
};
|
|
2410
|
-
|
|
2411
|
-
export const deserializeAws_json1_1ListAttacksCommand = async (
|
|
2412
|
-
output: __HttpResponse,
|
|
2413
|
-
context: __SerdeContext
|
|
2414
|
-
): Promise<ListAttacksCommandOutput> => {
|
|
2415
|
-
if (output.statusCode >= 300) {
|
|
2416
|
-
return deserializeAws_json1_1ListAttacksCommandError(output, context);
|
|
2417
|
-
}
|
|
2418
|
-
const data: any = await parseBody(output.body, context);
|
|
2419
|
-
let contents: any = {};
|
|
2420
|
-
contents = deserializeAws_json1_1ListAttacksResponse(data, context);
|
|
2421
|
-
const response: ListAttacksCommandOutput = {
|
|
2422
|
-
$metadata: deserializeMetadata(output),
|
|
2423
|
-
...contents,
|
|
2424
|
-
};
|
|
2425
|
-
return Promise.resolve(response);
|
|
2426
|
-
};
|
|
2427
|
-
|
|
2428
|
-
const deserializeAws_json1_1ListAttacksCommandError = async (
|
|
2429
|
-
output: __HttpResponse,
|
|
2430
|
-
context: __SerdeContext
|
|
2431
|
-
): Promise<ListAttacksCommandOutput> => {
|
|
2432
|
-
const parsedOutput: any = {
|
|
2433
|
-
...output,
|
|
2434
|
-
body: await parseBody(output.body, context),
|
|
2435
|
-
};
|
|
2436
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2437
|
-
let errorCode = "UnknownError";
|
|
2438
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2439
|
-
switch (errorCode) {
|
|
2440
|
-
case "InternalErrorException":
|
|
2441
|
-
case "com.amazonaws.shield#InternalErrorException":
|
|
2442
|
-
response = {
|
|
2443
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
2444
|
-
name: errorCode,
|
|
2445
|
-
$metadata: deserializeMetadata(output),
|
|
2446
|
-
};
|
|
2447
|
-
break;
|
|
2448
|
-
case "InvalidOperationException":
|
|
2449
|
-
case "com.amazonaws.shield#InvalidOperationException":
|
|
2450
|
-
response = {
|
|
2451
|
-
...(await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context)),
|
|
2452
|
-
name: errorCode,
|
|
2453
|
-
$metadata: deserializeMetadata(output),
|
|
2454
|
-
};
|
|
2455
|
-
break;
|
|
2456
|
-
case "InvalidParameterException":
|
|
2457
|
-
case "com.amazonaws.shield#InvalidParameterException":
|
|
2458
|
-
response = {
|
|
2459
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
2460
|
-
name: errorCode,
|
|
2461
|
-
$metadata: deserializeMetadata(output),
|
|
2462
|
-
};
|
|
2463
|
-
break;
|
|
2464
|
-
default:
|
|
2465
|
-
const parsedBody = parsedOutput.body;
|
|
2466
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2467
|
-
response = {
|
|
2468
|
-
...parsedBody,
|
|
2469
|
-
name: `${errorCode}`,
|
|
2470
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2471
|
-
$fault: "client",
|
|
2472
|
-
$metadata: deserializeMetadata(output),
|
|
2473
|
-
} as any;
|
|
2474
|
-
}
|
|
2475
|
-
const message = response.message || response.Message || errorCode;
|
|
2476
|
-
response.message = message;
|
|
2477
|
-
delete response.Message;
|
|
2478
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2479
|
-
};
|
|
2480
|
-
|
|
2481
|
-
export const deserializeAws_json1_1ListProtectionGroupsCommand = async (
|
|
2482
|
-
output: __HttpResponse,
|
|
2483
|
-
context: __SerdeContext
|
|
2484
|
-
): Promise<ListProtectionGroupsCommandOutput> => {
|
|
2485
|
-
if (output.statusCode >= 300) {
|
|
2486
|
-
return deserializeAws_json1_1ListProtectionGroupsCommandError(output, context);
|
|
2487
|
-
}
|
|
2488
|
-
const data: any = await parseBody(output.body, context);
|
|
2489
|
-
let contents: any = {};
|
|
2490
|
-
contents = deserializeAws_json1_1ListProtectionGroupsResponse(data, context);
|
|
2491
|
-
const response: ListProtectionGroupsCommandOutput = {
|
|
2492
|
-
$metadata: deserializeMetadata(output),
|
|
2493
|
-
...contents,
|
|
2494
|
-
};
|
|
2495
|
-
return Promise.resolve(response);
|
|
2496
|
-
};
|
|
2497
|
-
|
|
2498
|
-
const deserializeAws_json1_1ListProtectionGroupsCommandError = async (
|
|
2499
|
-
output: __HttpResponse,
|
|
2500
|
-
context: __SerdeContext
|
|
2501
|
-
): Promise<ListProtectionGroupsCommandOutput> => {
|
|
2502
|
-
const parsedOutput: any = {
|
|
2503
|
-
...output,
|
|
2504
|
-
body: await parseBody(output.body, context),
|
|
2505
|
-
};
|
|
2506
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2507
|
-
let errorCode = "UnknownError";
|
|
2508
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2509
|
-
switch (errorCode) {
|
|
2510
|
-
case "InternalErrorException":
|
|
2511
|
-
case "com.amazonaws.shield#InternalErrorException":
|
|
2512
|
-
response = {
|
|
2513
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
2514
|
-
name: errorCode,
|
|
2515
|
-
$metadata: deserializeMetadata(output),
|
|
2516
|
-
};
|
|
2517
|
-
break;
|
|
2518
|
-
case "InvalidPaginationTokenException":
|
|
2519
|
-
case "com.amazonaws.shield#InvalidPaginationTokenException":
|
|
2520
|
-
response = {
|
|
2521
|
-
...(await deserializeAws_json1_1InvalidPaginationTokenExceptionResponse(parsedOutput, context)),
|
|
2522
|
-
name: errorCode,
|
|
2523
|
-
$metadata: deserializeMetadata(output),
|
|
2524
|
-
};
|
|
2525
|
-
break;
|
|
2526
|
-
case "ResourceNotFoundException":
|
|
2527
|
-
case "com.amazonaws.shield#ResourceNotFoundException":
|
|
2528
|
-
response = {
|
|
2529
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2530
|
-
name: errorCode,
|
|
2531
|
-
$metadata: deserializeMetadata(output),
|
|
2532
|
-
};
|
|
2533
|
-
break;
|
|
2534
|
-
default:
|
|
2535
|
-
const parsedBody = parsedOutput.body;
|
|
2536
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2537
|
-
response = {
|
|
2538
|
-
...parsedBody,
|
|
2539
|
-
name: `${errorCode}`,
|
|
2540
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2541
|
-
$fault: "client",
|
|
2542
|
-
$metadata: deserializeMetadata(output),
|
|
2543
|
-
} as any;
|
|
2544
|
-
}
|
|
2545
|
-
const message = response.message || response.Message || errorCode;
|
|
2546
|
-
response.message = message;
|
|
2547
|
-
delete response.Message;
|
|
2548
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2549
|
-
};
|
|
2550
|
-
|
|
2551
|
-
export const deserializeAws_json1_1ListProtectionsCommand = async (
|
|
2552
|
-
output: __HttpResponse,
|
|
2553
|
-
context: __SerdeContext
|
|
2554
|
-
): Promise<ListProtectionsCommandOutput> => {
|
|
2555
|
-
if (output.statusCode >= 300) {
|
|
2556
|
-
return deserializeAws_json1_1ListProtectionsCommandError(output, context);
|
|
2557
|
-
}
|
|
2558
|
-
const data: any = await parseBody(output.body, context);
|
|
2559
|
-
let contents: any = {};
|
|
2560
|
-
contents = deserializeAws_json1_1ListProtectionsResponse(data, context);
|
|
2561
|
-
const response: ListProtectionsCommandOutput = {
|
|
2562
|
-
$metadata: deserializeMetadata(output),
|
|
2563
|
-
...contents,
|
|
2564
|
-
};
|
|
2565
|
-
return Promise.resolve(response);
|
|
2566
|
-
};
|
|
2567
|
-
|
|
2568
|
-
const deserializeAws_json1_1ListProtectionsCommandError = async (
|
|
2569
|
-
output: __HttpResponse,
|
|
2570
|
-
context: __SerdeContext
|
|
2571
|
-
): Promise<ListProtectionsCommandOutput> => {
|
|
2572
|
-
const parsedOutput: any = {
|
|
2573
|
-
...output,
|
|
2574
|
-
body: await parseBody(output.body, context),
|
|
2575
|
-
};
|
|
2576
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2577
|
-
let errorCode = "UnknownError";
|
|
2578
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2579
|
-
switch (errorCode) {
|
|
2580
|
-
case "InternalErrorException":
|
|
2581
|
-
case "com.amazonaws.shield#InternalErrorException":
|
|
2582
|
-
response = {
|
|
2583
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
2584
|
-
name: errorCode,
|
|
2585
|
-
$metadata: deserializeMetadata(output),
|
|
2586
|
-
};
|
|
2587
|
-
break;
|
|
2588
|
-
case "InvalidPaginationTokenException":
|
|
2589
|
-
case "com.amazonaws.shield#InvalidPaginationTokenException":
|
|
2590
|
-
response = {
|
|
2591
|
-
...(await deserializeAws_json1_1InvalidPaginationTokenExceptionResponse(parsedOutput, context)),
|
|
2592
|
-
name: errorCode,
|
|
2593
|
-
$metadata: deserializeMetadata(output),
|
|
2594
|
-
};
|
|
2595
|
-
break;
|
|
2596
|
-
case "ResourceNotFoundException":
|
|
2597
|
-
case "com.amazonaws.shield#ResourceNotFoundException":
|
|
2598
|
-
response = {
|
|
2599
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2600
|
-
name: errorCode,
|
|
2601
|
-
$metadata: deserializeMetadata(output),
|
|
2602
|
-
};
|
|
2603
|
-
break;
|
|
2604
|
-
default:
|
|
2605
|
-
const parsedBody = parsedOutput.body;
|
|
2606
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2607
|
-
response = {
|
|
2608
|
-
...parsedBody,
|
|
2609
|
-
name: `${errorCode}`,
|
|
2610
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2611
|
-
$fault: "client",
|
|
2612
|
-
$metadata: deserializeMetadata(output),
|
|
2613
|
-
} as any;
|
|
2614
|
-
}
|
|
2615
|
-
const message = response.message || response.Message || errorCode;
|
|
2616
|
-
response.message = message;
|
|
2617
|
-
delete response.Message;
|
|
2618
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2619
|
-
};
|
|
2620
|
-
|
|
2621
|
-
export const deserializeAws_json1_1ListResourcesInProtectionGroupCommand = async (
|
|
2622
|
-
output: __HttpResponse,
|
|
2623
|
-
context: __SerdeContext
|
|
2624
|
-
): Promise<ListResourcesInProtectionGroupCommandOutput> => {
|
|
2625
|
-
if (output.statusCode >= 300) {
|
|
2626
|
-
return deserializeAws_json1_1ListResourcesInProtectionGroupCommandError(output, context);
|
|
2627
|
-
}
|
|
2628
|
-
const data: any = await parseBody(output.body, context);
|
|
2629
|
-
let contents: any = {};
|
|
2630
|
-
contents = deserializeAws_json1_1ListResourcesInProtectionGroupResponse(data, context);
|
|
2631
|
-
const response: ListResourcesInProtectionGroupCommandOutput = {
|
|
2632
|
-
$metadata: deserializeMetadata(output),
|
|
2633
|
-
...contents,
|
|
2634
|
-
};
|
|
2635
|
-
return Promise.resolve(response);
|
|
2636
|
-
};
|
|
2637
|
-
|
|
2638
|
-
const deserializeAws_json1_1ListResourcesInProtectionGroupCommandError = async (
|
|
2639
|
-
output: __HttpResponse,
|
|
2640
|
-
context: __SerdeContext
|
|
2641
|
-
): Promise<ListResourcesInProtectionGroupCommandOutput> => {
|
|
2642
|
-
const parsedOutput: any = {
|
|
2643
|
-
...output,
|
|
2644
|
-
body: await parseBody(output.body, context),
|
|
2645
|
-
};
|
|
2646
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2647
|
-
let errorCode = "UnknownError";
|
|
2648
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2649
|
-
switch (errorCode) {
|
|
2650
|
-
case "InternalErrorException":
|
|
2651
|
-
case "com.amazonaws.shield#InternalErrorException":
|
|
2652
|
-
response = {
|
|
2653
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
2654
|
-
name: errorCode,
|
|
2655
|
-
$metadata: deserializeMetadata(output),
|
|
2656
|
-
};
|
|
2657
|
-
break;
|
|
2658
|
-
case "InvalidPaginationTokenException":
|
|
2659
|
-
case "com.amazonaws.shield#InvalidPaginationTokenException":
|
|
2660
|
-
response = {
|
|
2661
|
-
...(await deserializeAws_json1_1InvalidPaginationTokenExceptionResponse(parsedOutput, context)),
|
|
2662
|
-
name: errorCode,
|
|
2663
|
-
$metadata: deserializeMetadata(output),
|
|
2664
|
-
};
|
|
2665
|
-
break;
|
|
2666
|
-
case "ResourceNotFoundException":
|
|
2667
|
-
case "com.amazonaws.shield#ResourceNotFoundException":
|
|
2668
|
-
response = {
|
|
2669
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2670
|
-
name: errorCode,
|
|
2671
|
-
$metadata: deserializeMetadata(output),
|
|
2672
|
-
};
|
|
2673
|
-
break;
|
|
2674
|
-
default:
|
|
2675
|
-
const parsedBody = parsedOutput.body;
|
|
2676
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2677
|
-
response = {
|
|
2678
|
-
...parsedBody,
|
|
2679
|
-
name: `${errorCode}`,
|
|
2680
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2681
|
-
$fault: "client",
|
|
2682
|
-
$metadata: deserializeMetadata(output),
|
|
2683
|
-
} as any;
|
|
2684
|
-
}
|
|
2685
|
-
const message = response.message || response.Message || errorCode;
|
|
2686
|
-
response.message = message;
|
|
2687
|
-
delete response.Message;
|
|
2688
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2689
|
-
};
|
|
2690
|
-
|
|
2691
|
-
export const deserializeAws_json1_1ListTagsForResourceCommand = async (
|
|
2692
|
-
output: __HttpResponse,
|
|
2693
|
-
context: __SerdeContext
|
|
2694
|
-
): Promise<ListTagsForResourceCommandOutput> => {
|
|
2695
|
-
if (output.statusCode >= 300) {
|
|
2696
|
-
return deserializeAws_json1_1ListTagsForResourceCommandError(output, context);
|
|
2697
|
-
}
|
|
2698
|
-
const data: any = await parseBody(output.body, context);
|
|
2699
|
-
let contents: any = {};
|
|
2700
|
-
contents = deserializeAws_json1_1ListTagsForResourceResponse(data, context);
|
|
2701
|
-
const response: ListTagsForResourceCommandOutput = {
|
|
2702
|
-
$metadata: deserializeMetadata(output),
|
|
2703
|
-
...contents,
|
|
2704
|
-
};
|
|
2705
|
-
return Promise.resolve(response);
|
|
2706
|
-
};
|
|
2707
|
-
|
|
2708
|
-
const deserializeAws_json1_1ListTagsForResourceCommandError = async (
|
|
2709
|
-
output: __HttpResponse,
|
|
2710
|
-
context: __SerdeContext
|
|
2711
|
-
): Promise<ListTagsForResourceCommandOutput> => {
|
|
2712
|
-
const parsedOutput: any = {
|
|
2713
|
-
...output,
|
|
2714
|
-
body: await parseBody(output.body, context),
|
|
2715
|
-
};
|
|
2716
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2717
|
-
let errorCode = "UnknownError";
|
|
2718
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2719
|
-
switch (errorCode) {
|
|
2720
|
-
case "InternalErrorException":
|
|
2721
|
-
case "com.amazonaws.shield#InternalErrorException":
|
|
2722
|
-
response = {
|
|
2723
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
2724
|
-
name: errorCode,
|
|
2725
|
-
$metadata: deserializeMetadata(output),
|
|
2726
|
-
};
|
|
2727
|
-
break;
|
|
2728
|
-
case "InvalidResourceException":
|
|
2729
|
-
case "com.amazonaws.shield#InvalidResourceException":
|
|
2730
|
-
response = {
|
|
2731
|
-
...(await deserializeAws_json1_1InvalidResourceExceptionResponse(parsedOutput, context)),
|
|
2732
|
-
name: errorCode,
|
|
2733
|
-
$metadata: deserializeMetadata(output),
|
|
2734
|
-
};
|
|
2735
|
-
break;
|
|
2736
|
-
case "ResourceNotFoundException":
|
|
2737
|
-
case "com.amazonaws.shield#ResourceNotFoundException":
|
|
2738
|
-
response = {
|
|
2739
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2740
|
-
name: errorCode,
|
|
2741
|
-
$metadata: deserializeMetadata(output),
|
|
2742
|
-
};
|
|
2743
|
-
break;
|
|
2744
|
-
default:
|
|
2745
|
-
const parsedBody = parsedOutput.body;
|
|
2746
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2747
|
-
response = {
|
|
2748
|
-
...parsedBody,
|
|
2749
|
-
name: `${errorCode}`,
|
|
2750
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2751
|
-
$fault: "client",
|
|
2752
|
-
$metadata: deserializeMetadata(output),
|
|
2753
|
-
} as any;
|
|
2754
|
-
}
|
|
2755
|
-
const message = response.message || response.Message || errorCode;
|
|
2756
|
-
response.message = message;
|
|
2757
|
-
delete response.Message;
|
|
2758
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2759
|
-
};
|
|
2760
|
-
|
|
2761
|
-
export const deserializeAws_json1_1TagResourceCommand = async (
|
|
2762
|
-
output: __HttpResponse,
|
|
2763
|
-
context: __SerdeContext
|
|
2764
|
-
): Promise<TagResourceCommandOutput> => {
|
|
2765
|
-
if (output.statusCode >= 300) {
|
|
2766
|
-
return deserializeAws_json1_1TagResourceCommandError(output, context);
|
|
2767
|
-
}
|
|
2768
|
-
const data: any = await parseBody(output.body, context);
|
|
2769
|
-
let contents: any = {};
|
|
2770
|
-
contents = deserializeAws_json1_1TagResourceResponse(data, context);
|
|
2771
|
-
const response: TagResourceCommandOutput = {
|
|
2772
|
-
$metadata: deserializeMetadata(output),
|
|
2773
|
-
...contents,
|
|
2774
|
-
};
|
|
2775
|
-
return Promise.resolve(response);
|
|
2776
|
-
};
|
|
2777
|
-
|
|
2778
|
-
const deserializeAws_json1_1TagResourceCommandError = async (
|
|
2779
|
-
output: __HttpResponse,
|
|
2780
|
-
context: __SerdeContext
|
|
2781
|
-
): Promise<TagResourceCommandOutput> => {
|
|
2782
|
-
const parsedOutput: any = {
|
|
2783
|
-
...output,
|
|
2784
|
-
body: await parseBody(output.body, context),
|
|
2785
|
-
};
|
|
2786
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2787
|
-
let errorCode = "UnknownError";
|
|
2788
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2789
|
-
switch (errorCode) {
|
|
2790
|
-
case "InternalErrorException":
|
|
2791
|
-
case "com.amazonaws.shield#InternalErrorException":
|
|
2792
|
-
response = {
|
|
2793
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
2794
|
-
name: errorCode,
|
|
2795
|
-
$metadata: deserializeMetadata(output),
|
|
2796
|
-
};
|
|
2797
|
-
break;
|
|
2798
|
-
case "InvalidParameterException":
|
|
2799
|
-
case "com.amazonaws.shield#InvalidParameterException":
|
|
2800
|
-
response = {
|
|
2801
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
2802
|
-
name: errorCode,
|
|
2803
|
-
$metadata: deserializeMetadata(output),
|
|
2804
|
-
};
|
|
2805
|
-
break;
|
|
2806
|
-
case "InvalidResourceException":
|
|
2807
|
-
case "com.amazonaws.shield#InvalidResourceException":
|
|
2808
|
-
response = {
|
|
2809
|
-
...(await deserializeAws_json1_1InvalidResourceExceptionResponse(parsedOutput, context)),
|
|
2810
|
-
name: errorCode,
|
|
2811
|
-
$metadata: deserializeMetadata(output),
|
|
2812
|
-
};
|
|
2813
|
-
break;
|
|
2814
|
-
case "ResourceNotFoundException":
|
|
2815
|
-
case "com.amazonaws.shield#ResourceNotFoundException":
|
|
2816
|
-
response = {
|
|
2817
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2818
|
-
name: errorCode,
|
|
2819
|
-
$metadata: deserializeMetadata(output),
|
|
2820
|
-
};
|
|
2821
|
-
break;
|
|
2822
|
-
default:
|
|
2823
|
-
const parsedBody = parsedOutput.body;
|
|
2824
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2825
|
-
response = {
|
|
2826
|
-
...parsedBody,
|
|
2827
|
-
name: `${errorCode}`,
|
|
2828
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2829
|
-
$fault: "client",
|
|
2830
|
-
$metadata: deserializeMetadata(output),
|
|
2831
|
-
} as any;
|
|
2832
|
-
}
|
|
2833
|
-
const message = response.message || response.Message || errorCode;
|
|
2834
|
-
response.message = message;
|
|
2835
|
-
delete response.Message;
|
|
2836
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2837
|
-
};
|
|
2838
|
-
|
|
2839
|
-
export const deserializeAws_json1_1UntagResourceCommand = async (
|
|
2840
|
-
output: __HttpResponse,
|
|
2841
|
-
context: __SerdeContext
|
|
2842
|
-
): Promise<UntagResourceCommandOutput> => {
|
|
2843
|
-
if (output.statusCode >= 300) {
|
|
2844
|
-
return deserializeAws_json1_1UntagResourceCommandError(output, context);
|
|
2845
|
-
}
|
|
2846
|
-
const data: any = await parseBody(output.body, context);
|
|
2847
|
-
let contents: any = {};
|
|
2848
|
-
contents = deserializeAws_json1_1UntagResourceResponse(data, context);
|
|
2849
|
-
const response: UntagResourceCommandOutput = {
|
|
2850
|
-
$metadata: deserializeMetadata(output),
|
|
2851
|
-
...contents,
|
|
2852
|
-
};
|
|
2853
|
-
return Promise.resolve(response);
|
|
2854
|
-
};
|
|
2855
|
-
|
|
2856
|
-
const deserializeAws_json1_1UntagResourceCommandError = async (
|
|
2857
|
-
output: __HttpResponse,
|
|
2858
|
-
context: __SerdeContext
|
|
2859
|
-
): Promise<UntagResourceCommandOutput> => {
|
|
2860
|
-
const parsedOutput: any = {
|
|
2861
|
-
...output,
|
|
2862
|
-
body: await parseBody(output.body, context),
|
|
2863
|
-
};
|
|
2864
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2865
|
-
let errorCode = "UnknownError";
|
|
2866
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2867
|
-
switch (errorCode) {
|
|
2868
|
-
case "InternalErrorException":
|
|
2869
|
-
case "com.amazonaws.shield#InternalErrorException":
|
|
2870
|
-
response = {
|
|
2871
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
2872
|
-
name: errorCode,
|
|
2873
|
-
$metadata: deserializeMetadata(output),
|
|
2874
|
-
};
|
|
2875
|
-
break;
|
|
2876
|
-
case "InvalidParameterException":
|
|
2877
|
-
case "com.amazonaws.shield#InvalidParameterException":
|
|
2878
|
-
response = {
|
|
2879
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
2880
|
-
name: errorCode,
|
|
2881
|
-
$metadata: deserializeMetadata(output),
|
|
2882
|
-
};
|
|
2883
|
-
break;
|
|
2884
|
-
case "InvalidResourceException":
|
|
2885
|
-
case "com.amazonaws.shield#InvalidResourceException":
|
|
2886
|
-
response = {
|
|
2887
|
-
...(await deserializeAws_json1_1InvalidResourceExceptionResponse(parsedOutput, context)),
|
|
2888
|
-
name: errorCode,
|
|
2889
|
-
$metadata: deserializeMetadata(output),
|
|
2890
|
-
};
|
|
2891
|
-
break;
|
|
2892
|
-
case "ResourceNotFoundException":
|
|
2893
|
-
case "com.amazonaws.shield#ResourceNotFoundException":
|
|
2894
|
-
response = {
|
|
2895
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2896
|
-
name: errorCode,
|
|
2897
|
-
$metadata: deserializeMetadata(output),
|
|
2898
|
-
};
|
|
2899
|
-
break;
|
|
2900
|
-
default:
|
|
2901
|
-
const parsedBody = parsedOutput.body;
|
|
2902
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2903
|
-
response = {
|
|
2904
|
-
...parsedBody,
|
|
2905
|
-
name: `${errorCode}`,
|
|
2906
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2907
|
-
$fault: "client",
|
|
2908
|
-
$metadata: deserializeMetadata(output),
|
|
2909
|
-
} as any;
|
|
2910
|
-
}
|
|
2911
|
-
const message = response.message || response.Message || errorCode;
|
|
2912
|
-
response.message = message;
|
|
2913
|
-
delete response.Message;
|
|
2914
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2915
|
-
};
|
|
2916
|
-
|
|
2917
|
-
export const deserializeAws_json1_1UpdateEmergencyContactSettingsCommand = async (
|
|
2918
|
-
output: __HttpResponse,
|
|
2919
|
-
context: __SerdeContext
|
|
2920
|
-
): Promise<UpdateEmergencyContactSettingsCommandOutput> => {
|
|
2921
|
-
if (output.statusCode >= 300) {
|
|
2922
|
-
return deserializeAws_json1_1UpdateEmergencyContactSettingsCommandError(output, context);
|
|
2923
|
-
}
|
|
2924
|
-
const data: any = await parseBody(output.body, context);
|
|
2925
|
-
let contents: any = {};
|
|
2926
|
-
contents = deserializeAws_json1_1UpdateEmergencyContactSettingsResponse(data, context);
|
|
2927
|
-
const response: UpdateEmergencyContactSettingsCommandOutput = {
|
|
2928
|
-
$metadata: deserializeMetadata(output),
|
|
2929
|
-
...contents,
|
|
2930
|
-
};
|
|
2931
|
-
return Promise.resolve(response);
|
|
2932
|
-
};
|
|
2933
|
-
|
|
2934
|
-
const deserializeAws_json1_1UpdateEmergencyContactSettingsCommandError = async (
|
|
2935
|
-
output: __HttpResponse,
|
|
2936
|
-
context: __SerdeContext
|
|
2937
|
-
): Promise<UpdateEmergencyContactSettingsCommandOutput> => {
|
|
2938
|
-
const parsedOutput: any = {
|
|
2939
|
-
...output,
|
|
2940
|
-
body: await parseBody(output.body, context),
|
|
2941
|
-
};
|
|
2942
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2943
|
-
let errorCode = "UnknownError";
|
|
2944
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2945
|
-
switch (errorCode) {
|
|
2946
|
-
case "InternalErrorException":
|
|
2947
|
-
case "com.amazonaws.shield#InternalErrorException":
|
|
2948
|
-
response = {
|
|
2949
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
2950
|
-
name: errorCode,
|
|
2951
|
-
$metadata: deserializeMetadata(output),
|
|
2952
|
-
};
|
|
2953
|
-
break;
|
|
2954
|
-
case "InvalidParameterException":
|
|
2955
|
-
case "com.amazonaws.shield#InvalidParameterException":
|
|
2956
|
-
response = {
|
|
2957
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
2958
|
-
name: errorCode,
|
|
2959
|
-
$metadata: deserializeMetadata(output),
|
|
2960
|
-
};
|
|
2961
|
-
break;
|
|
2962
|
-
case "OptimisticLockException":
|
|
2963
|
-
case "com.amazonaws.shield#OptimisticLockException":
|
|
2964
|
-
response = {
|
|
2965
|
-
...(await deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context)),
|
|
2966
|
-
name: errorCode,
|
|
2967
|
-
$metadata: deserializeMetadata(output),
|
|
2968
|
-
};
|
|
2969
|
-
break;
|
|
2970
|
-
case "ResourceNotFoundException":
|
|
2971
|
-
case "com.amazonaws.shield#ResourceNotFoundException":
|
|
2972
|
-
response = {
|
|
2973
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2974
|
-
name: errorCode,
|
|
2975
|
-
$metadata: deserializeMetadata(output),
|
|
2976
|
-
};
|
|
2977
|
-
break;
|
|
2978
|
-
default:
|
|
2979
|
-
const parsedBody = parsedOutput.body;
|
|
2980
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2981
|
-
response = {
|
|
2982
|
-
...parsedBody,
|
|
2983
|
-
name: `${errorCode}`,
|
|
2984
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2985
|
-
$fault: "client",
|
|
2986
|
-
$metadata: deserializeMetadata(output),
|
|
2987
|
-
} as any;
|
|
2988
|
-
}
|
|
2989
|
-
const message = response.message || response.Message || errorCode;
|
|
2990
|
-
response.message = message;
|
|
2991
|
-
delete response.Message;
|
|
2992
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2993
|
-
};
|
|
2994
|
-
|
|
2995
|
-
export const deserializeAws_json1_1UpdateProtectionGroupCommand = async (
|
|
2996
|
-
output: __HttpResponse,
|
|
2997
|
-
context: __SerdeContext
|
|
2998
|
-
): Promise<UpdateProtectionGroupCommandOutput> => {
|
|
2999
|
-
if (output.statusCode >= 300) {
|
|
3000
|
-
return deserializeAws_json1_1UpdateProtectionGroupCommandError(output, context);
|
|
3001
|
-
}
|
|
3002
|
-
const data: any = await parseBody(output.body, context);
|
|
3003
|
-
let contents: any = {};
|
|
3004
|
-
contents = deserializeAws_json1_1UpdateProtectionGroupResponse(data, context);
|
|
3005
|
-
const response: UpdateProtectionGroupCommandOutput = {
|
|
3006
|
-
$metadata: deserializeMetadata(output),
|
|
3007
|
-
...contents,
|
|
3008
|
-
};
|
|
3009
|
-
return Promise.resolve(response);
|
|
3010
|
-
};
|
|
3011
|
-
|
|
3012
|
-
const deserializeAws_json1_1UpdateProtectionGroupCommandError = async (
|
|
3013
|
-
output: __HttpResponse,
|
|
3014
|
-
context: __SerdeContext
|
|
3015
|
-
): Promise<UpdateProtectionGroupCommandOutput> => {
|
|
3016
|
-
const parsedOutput: any = {
|
|
3017
|
-
...output,
|
|
3018
|
-
body: await parseBody(output.body, context),
|
|
3019
|
-
};
|
|
3020
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
3021
|
-
let errorCode = "UnknownError";
|
|
3022
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3023
|
-
switch (errorCode) {
|
|
3024
|
-
case "InternalErrorException":
|
|
3025
|
-
case "com.amazonaws.shield#InternalErrorException":
|
|
3026
|
-
response = {
|
|
3027
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
3028
|
-
name: errorCode,
|
|
3029
|
-
$metadata: deserializeMetadata(output),
|
|
3030
|
-
};
|
|
3031
|
-
break;
|
|
3032
|
-
case "InvalidParameterException":
|
|
3033
|
-
case "com.amazonaws.shield#InvalidParameterException":
|
|
3034
|
-
response = {
|
|
3035
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
3036
|
-
name: errorCode,
|
|
3037
|
-
$metadata: deserializeMetadata(output),
|
|
3038
|
-
};
|
|
3039
|
-
break;
|
|
3040
|
-
case "OptimisticLockException":
|
|
3041
|
-
case "com.amazonaws.shield#OptimisticLockException":
|
|
3042
|
-
response = {
|
|
3043
|
-
...(await deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context)),
|
|
3044
|
-
name: errorCode,
|
|
3045
|
-
$metadata: deserializeMetadata(output),
|
|
3046
|
-
};
|
|
3047
|
-
break;
|
|
3048
|
-
case "ResourceNotFoundException":
|
|
3049
|
-
case "com.amazonaws.shield#ResourceNotFoundException":
|
|
3050
|
-
response = {
|
|
3051
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
3052
|
-
name: errorCode,
|
|
3053
|
-
$metadata: deserializeMetadata(output),
|
|
3054
|
-
};
|
|
3055
|
-
break;
|
|
3056
|
-
default:
|
|
3057
|
-
const parsedBody = parsedOutput.body;
|
|
3058
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
3059
|
-
response = {
|
|
3060
|
-
...parsedBody,
|
|
3061
|
-
name: `${errorCode}`,
|
|
3062
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
3063
|
-
$fault: "client",
|
|
3064
|
-
$metadata: deserializeMetadata(output),
|
|
3065
|
-
} as any;
|
|
3066
|
-
}
|
|
3067
|
-
const message = response.message || response.Message || errorCode;
|
|
3068
|
-
response.message = message;
|
|
3069
|
-
delete response.Message;
|
|
3070
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3071
|
-
};
|
|
3072
|
-
|
|
3073
|
-
export const deserializeAws_json1_1UpdateSubscriptionCommand = async (
|
|
3074
|
-
output: __HttpResponse,
|
|
3075
|
-
context: __SerdeContext
|
|
3076
|
-
): Promise<UpdateSubscriptionCommandOutput> => {
|
|
3077
|
-
if (output.statusCode >= 300) {
|
|
3078
|
-
return deserializeAws_json1_1UpdateSubscriptionCommandError(output, context);
|
|
3079
|
-
}
|
|
3080
|
-
const data: any = await parseBody(output.body, context);
|
|
3081
|
-
let contents: any = {};
|
|
3082
|
-
contents = deserializeAws_json1_1UpdateSubscriptionResponse(data, context);
|
|
3083
|
-
const response: UpdateSubscriptionCommandOutput = {
|
|
3084
|
-
$metadata: deserializeMetadata(output),
|
|
3085
|
-
...contents,
|
|
3086
|
-
};
|
|
3087
|
-
return Promise.resolve(response);
|
|
3088
|
-
};
|
|
3089
|
-
|
|
3090
|
-
const deserializeAws_json1_1UpdateSubscriptionCommandError = async (
|
|
3091
|
-
output: __HttpResponse,
|
|
3092
|
-
context: __SerdeContext
|
|
3093
|
-
): Promise<UpdateSubscriptionCommandOutput> => {
|
|
3094
|
-
const parsedOutput: any = {
|
|
3095
|
-
...output,
|
|
3096
|
-
body: await parseBody(output.body, context),
|
|
3097
|
-
};
|
|
3098
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
3099
|
-
let errorCode = "UnknownError";
|
|
3100
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3101
|
-
switch (errorCode) {
|
|
3102
|
-
case "InternalErrorException":
|
|
3103
|
-
case "com.amazonaws.shield#InternalErrorException":
|
|
3104
|
-
response = {
|
|
3105
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
3106
|
-
name: errorCode,
|
|
3107
|
-
$metadata: deserializeMetadata(output),
|
|
3108
|
-
};
|
|
3109
|
-
break;
|
|
3110
|
-
case "InvalidParameterException":
|
|
3111
|
-
case "com.amazonaws.shield#InvalidParameterException":
|
|
3112
|
-
response = {
|
|
3113
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
3114
|
-
name: errorCode,
|
|
3115
|
-
$metadata: deserializeMetadata(output),
|
|
3116
|
-
};
|
|
3117
|
-
break;
|
|
3118
|
-
case "LockedSubscriptionException":
|
|
3119
|
-
case "com.amazonaws.shield#LockedSubscriptionException":
|
|
3120
|
-
response = {
|
|
3121
|
-
...(await deserializeAws_json1_1LockedSubscriptionExceptionResponse(parsedOutput, context)),
|
|
3122
|
-
name: errorCode,
|
|
3123
|
-
$metadata: deserializeMetadata(output),
|
|
3124
|
-
};
|
|
3125
|
-
break;
|
|
3126
|
-
case "OptimisticLockException":
|
|
3127
|
-
case "com.amazonaws.shield#OptimisticLockException":
|
|
3128
|
-
response = {
|
|
3129
|
-
...(await deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context)),
|
|
3130
|
-
name: errorCode,
|
|
3131
|
-
$metadata: deserializeMetadata(output),
|
|
3132
|
-
};
|
|
3133
|
-
break;
|
|
3134
|
-
case "ResourceNotFoundException":
|
|
3135
|
-
case "com.amazonaws.shield#ResourceNotFoundException":
|
|
3136
|
-
response = {
|
|
3137
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
3138
|
-
name: errorCode,
|
|
3139
|
-
$metadata: deserializeMetadata(output),
|
|
3140
|
-
};
|
|
3141
|
-
break;
|
|
3142
|
-
default:
|
|
3143
|
-
const parsedBody = parsedOutput.body;
|
|
3144
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
3145
|
-
response = {
|
|
3146
|
-
...parsedBody,
|
|
3147
|
-
name: `${errorCode}`,
|
|
3148
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
3149
|
-
$fault: "client",
|
|
3150
|
-
$metadata: deserializeMetadata(output),
|
|
3151
|
-
} as any;
|
|
3152
|
-
}
|
|
3153
|
-
const message = response.message || response.Message || errorCode;
|
|
3154
|
-
response.message = message;
|
|
3155
|
-
delete response.Message;
|
|
3156
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3157
|
-
};
|
|
3158
|
-
|
|
3159
|
-
const deserializeAws_json1_1AccessDeniedExceptionResponse = async (
|
|
3160
|
-
parsedOutput: any,
|
|
3161
|
-
context: __SerdeContext
|
|
3162
|
-
): Promise<AccessDeniedException> => {
|
|
3163
|
-
const body = parsedOutput.body;
|
|
3164
|
-
const deserialized: any = deserializeAws_json1_1AccessDeniedException(body, context);
|
|
3165
|
-
const contents: AccessDeniedException = {
|
|
3166
|
-
name: "AccessDeniedException",
|
|
3167
|
-
$fault: "client",
|
|
3168
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3169
|
-
...deserialized,
|
|
3170
|
-
};
|
|
3171
|
-
return contents;
|
|
3172
|
-
};
|
|
3173
|
-
|
|
3174
|
-
const deserializeAws_json1_1AccessDeniedForDependencyExceptionResponse = async (
|
|
3175
|
-
parsedOutput: any,
|
|
3176
|
-
context: __SerdeContext
|
|
3177
|
-
): Promise<AccessDeniedForDependencyException> => {
|
|
3178
|
-
const body = parsedOutput.body;
|
|
3179
|
-
const deserialized: any = deserializeAws_json1_1AccessDeniedForDependencyException(body, context);
|
|
3180
|
-
const contents: AccessDeniedForDependencyException = {
|
|
3181
|
-
name: "AccessDeniedForDependencyException",
|
|
3182
|
-
$fault: "client",
|
|
3183
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3184
|
-
...deserialized,
|
|
3185
|
-
};
|
|
3186
|
-
return contents;
|
|
3187
|
-
};
|
|
3188
|
-
|
|
3189
|
-
const deserializeAws_json1_1InternalErrorExceptionResponse = async (
|
|
3190
|
-
parsedOutput: any,
|
|
3191
|
-
context: __SerdeContext
|
|
3192
|
-
): Promise<InternalErrorException> => {
|
|
3193
|
-
const body = parsedOutput.body;
|
|
3194
|
-
const deserialized: any = deserializeAws_json1_1InternalErrorException(body, context);
|
|
3195
|
-
const contents: InternalErrorException = {
|
|
3196
|
-
name: "InternalErrorException",
|
|
3197
|
-
$fault: "server",
|
|
3198
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3199
|
-
...deserialized,
|
|
3200
|
-
};
|
|
3201
|
-
return contents;
|
|
3202
|
-
};
|
|
3203
|
-
|
|
3204
|
-
const deserializeAws_json1_1InvalidOperationExceptionResponse = async (
|
|
3205
|
-
parsedOutput: any,
|
|
3206
|
-
context: __SerdeContext
|
|
3207
|
-
): Promise<InvalidOperationException> => {
|
|
3208
|
-
const body = parsedOutput.body;
|
|
3209
|
-
const deserialized: any = deserializeAws_json1_1InvalidOperationException(body, context);
|
|
3210
|
-
const contents: InvalidOperationException = {
|
|
3211
|
-
name: "InvalidOperationException",
|
|
3212
|
-
$fault: "client",
|
|
3213
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3214
|
-
...deserialized,
|
|
3215
|
-
};
|
|
3216
|
-
return contents;
|
|
3217
|
-
};
|
|
3218
|
-
|
|
3219
|
-
const deserializeAws_json1_1InvalidPaginationTokenExceptionResponse = async (
|
|
3220
|
-
parsedOutput: any,
|
|
3221
|
-
context: __SerdeContext
|
|
3222
|
-
): Promise<InvalidPaginationTokenException> => {
|
|
3223
|
-
const body = parsedOutput.body;
|
|
3224
|
-
const deserialized: any = deserializeAws_json1_1InvalidPaginationTokenException(body, context);
|
|
3225
|
-
const contents: InvalidPaginationTokenException = {
|
|
3226
|
-
name: "InvalidPaginationTokenException",
|
|
3227
|
-
$fault: "client",
|
|
3228
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3229
|
-
...deserialized,
|
|
3230
|
-
};
|
|
3231
|
-
return contents;
|
|
3232
|
-
};
|
|
3233
|
-
|
|
3234
|
-
const deserializeAws_json1_1InvalidParameterExceptionResponse = async (
|
|
3235
|
-
parsedOutput: any,
|
|
3236
|
-
context: __SerdeContext
|
|
3237
|
-
): Promise<InvalidParameterException> => {
|
|
3238
|
-
const body = parsedOutput.body;
|
|
3239
|
-
const deserialized: any = deserializeAws_json1_1InvalidParameterException(body, context);
|
|
3240
|
-
const contents: InvalidParameterException = {
|
|
3241
|
-
name: "InvalidParameterException",
|
|
3242
|
-
$fault: "client",
|
|
3243
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3244
|
-
...deserialized,
|
|
3245
|
-
};
|
|
3246
|
-
return contents;
|
|
3247
|
-
};
|
|
3248
|
-
|
|
3249
|
-
const deserializeAws_json1_1InvalidResourceExceptionResponse = async (
|
|
3250
|
-
parsedOutput: any,
|
|
3251
|
-
context: __SerdeContext
|
|
3252
|
-
): Promise<InvalidResourceException> => {
|
|
3253
|
-
const body = parsedOutput.body;
|
|
3254
|
-
const deserialized: any = deserializeAws_json1_1InvalidResourceException(body, context);
|
|
3255
|
-
const contents: InvalidResourceException = {
|
|
3256
|
-
name: "InvalidResourceException",
|
|
3257
|
-
$fault: "client",
|
|
3258
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3259
|
-
...deserialized,
|
|
3260
|
-
};
|
|
3261
|
-
return contents;
|
|
3262
|
-
};
|
|
3263
|
-
|
|
3264
|
-
const deserializeAws_json1_1LimitsExceededExceptionResponse = async (
|
|
3265
|
-
parsedOutput: any,
|
|
3266
|
-
context: __SerdeContext
|
|
3267
|
-
): Promise<LimitsExceededException> => {
|
|
3268
|
-
const body = parsedOutput.body;
|
|
3269
|
-
const deserialized: any = deserializeAws_json1_1LimitsExceededException(body, context);
|
|
3270
|
-
const contents: LimitsExceededException = {
|
|
3271
|
-
name: "LimitsExceededException",
|
|
3272
|
-
$fault: "client",
|
|
3273
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3274
|
-
...deserialized,
|
|
3275
|
-
};
|
|
3276
|
-
return contents;
|
|
3277
|
-
};
|
|
3278
|
-
|
|
3279
|
-
const deserializeAws_json1_1LockedSubscriptionExceptionResponse = async (
|
|
3280
|
-
parsedOutput: any,
|
|
3281
|
-
context: __SerdeContext
|
|
3282
|
-
): Promise<LockedSubscriptionException> => {
|
|
3283
|
-
const body = parsedOutput.body;
|
|
3284
|
-
const deserialized: any = deserializeAws_json1_1LockedSubscriptionException(body, context);
|
|
3285
|
-
const contents: LockedSubscriptionException = {
|
|
3286
|
-
name: "LockedSubscriptionException",
|
|
3287
|
-
$fault: "client",
|
|
3288
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3289
|
-
...deserialized,
|
|
3290
|
-
};
|
|
3291
|
-
return contents;
|
|
3292
|
-
};
|
|
3293
|
-
|
|
3294
|
-
const deserializeAws_json1_1NoAssociatedRoleExceptionResponse = async (
|
|
3295
|
-
parsedOutput: any,
|
|
3296
|
-
context: __SerdeContext
|
|
3297
|
-
): Promise<NoAssociatedRoleException> => {
|
|
3298
|
-
const body = parsedOutput.body;
|
|
3299
|
-
const deserialized: any = deserializeAws_json1_1NoAssociatedRoleException(body, context);
|
|
3300
|
-
const contents: NoAssociatedRoleException = {
|
|
3301
|
-
name: "NoAssociatedRoleException",
|
|
3302
|
-
$fault: "client",
|
|
3303
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3304
|
-
...deserialized,
|
|
3305
|
-
};
|
|
3306
|
-
return contents;
|
|
3307
|
-
};
|
|
3308
|
-
|
|
3309
|
-
const deserializeAws_json1_1OptimisticLockExceptionResponse = async (
|
|
3310
|
-
parsedOutput: any,
|
|
3311
|
-
context: __SerdeContext
|
|
3312
|
-
): Promise<OptimisticLockException> => {
|
|
3313
|
-
const body = parsedOutput.body;
|
|
3314
|
-
const deserialized: any = deserializeAws_json1_1OptimisticLockException(body, context);
|
|
3315
|
-
const contents: OptimisticLockException = {
|
|
3316
|
-
name: "OptimisticLockException",
|
|
3317
|
-
$fault: "client",
|
|
3318
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3319
|
-
...deserialized,
|
|
3320
|
-
};
|
|
3321
|
-
return contents;
|
|
3322
|
-
};
|
|
3323
|
-
|
|
3324
|
-
const deserializeAws_json1_1ResourceAlreadyExistsExceptionResponse = async (
|
|
3325
|
-
parsedOutput: any,
|
|
3326
|
-
context: __SerdeContext
|
|
3327
|
-
): Promise<ResourceAlreadyExistsException> => {
|
|
3328
|
-
const body = parsedOutput.body;
|
|
3329
|
-
const deserialized: any = deserializeAws_json1_1ResourceAlreadyExistsException(body, context);
|
|
3330
|
-
const contents: ResourceAlreadyExistsException = {
|
|
3331
|
-
name: "ResourceAlreadyExistsException",
|
|
3332
|
-
$fault: "client",
|
|
3333
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3334
|
-
...deserialized,
|
|
3335
|
-
};
|
|
3336
|
-
return contents;
|
|
3337
|
-
};
|
|
3338
|
-
|
|
3339
|
-
const deserializeAws_json1_1ResourceNotFoundExceptionResponse = async (
|
|
3340
|
-
parsedOutput: any,
|
|
3341
|
-
context: __SerdeContext
|
|
3342
|
-
): Promise<ResourceNotFoundException> => {
|
|
3343
|
-
const body = parsedOutput.body;
|
|
3344
|
-
const deserialized: any = deserializeAws_json1_1ResourceNotFoundException(body, context);
|
|
3345
|
-
const contents: ResourceNotFoundException = {
|
|
3346
|
-
name: "ResourceNotFoundException",
|
|
3347
|
-
$fault: "client",
|
|
3348
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3349
|
-
...deserialized,
|
|
3350
|
-
};
|
|
3351
|
-
return contents;
|
|
3352
|
-
};
|
|
3353
|
-
|
|
3354
|
-
const serializeAws_json1_1AssociateDRTLogBucketRequest = (
|
|
3355
|
-
input: AssociateDRTLogBucketRequest,
|
|
3356
|
-
context: __SerdeContext
|
|
3357
|
-
): any => {
|
|
3358
|
-
return {
|
|
3359
|
-
...(input.LogBucket !== undefined && input.LogBucket !== null && { LogBucket: input.LogBucket }),
|
|
3360
|
-
};
|
|
3361
|
-
};
|
|
3362
|
-
|
|
3363
|
-
const serializeAws_json1_1AssociateDRTRoleRequest = (input: AssociateDRTRoleRequest, context: __SerdeContext): any => {
|
|
3364
|
-
return {
|
|
3365
|
-
...(input.RoleArn !== undefined && input.RoleArn !== null && { RoleArn: input.RoleArn }),
|
|
3366
|
-
};
|
|
3367
|
-
};
|
|
3368
|
-
|
|
3369
|
-
const serializeAws_json1_1AssociateHealthCheckRequest = (
|
|
3370
|
-
input: AssociateHealthCheckRequest,
|
|
3371
|
-
context: __SerdeContext
|
|
3372
|
-
): any => {
|
|
3373
|
-
return {
|
|
3374
|
-
...(input.HealthCheckArn !== undefined &&
|
|
3375
|
-
input.HealthCheckArn !== null && { HealthCheckArn: input.HealthCheckArn }),
|
|
3376
|
-
...(input.ProtectionId !== undefined && input.ProtectionId !== null && { ProtectionId: input.ProtectionId }),
|
|
3377
|
-
};
|
|
3378
|
-
};
|
|
3379
|
-
|
|
3380
|
-
const serializeAws_json1_1AssociateProactiveEngagementDetailsRequest = (
|
|
3381
|
-
input: AssociateProactiveEngagementDetailsRequest,
|
|
3382
|
-
context: __SerdeContext
|
|
3383
|
-
): any => {
|
|
3384
|
-
return {
|
|
3385
|
-
...(input.EmergencyContactList !== undefined &&
|
|
3386
|
-
input.EmergencyContactList !== null && {
|
|
3387
|
-
EmergencyContactList: serializeAws_json1_1EmergencyContactList(input.EmergencyContactList, context),
|
|
3388
|
-
}),
|
|
3389
|
-
};
|
|
3390
|
-
};
|
|
3391
|
-
|
|
3392
|
-
const serializeAws_json1_1CreateProtectionGroupRequest = (
|
|
3393
|
-
input: CreateProtectionGroupRequest,
|
|
3394
|
-
context: __SerdeContext
|
|
3395
|
-
): any => {
|
|
3396
|
-
return {
|
|
3397
|
-
...(input.Aggregation !== undefined && input.Aggregation !== null && { Aggregation: input.Aggregation }),
|
|
3398
|
-
...(input.Members !== undefined &&
|
|
3399
|
-
input.Members !== null && { Members: serializeAws_json1_1ProtectionGroupMembers(input.Members, context) }),
|
|
3400
|
-
...(input.Pattern !== undefined && input.Pattern !== null && { Pattern: input.Pattern }),
|
|
3401
|
-
...(input.ProtectionGroupId !== undefined &&
|
|
3402
|
-
input.ProtectionGroupId !== null && { ProtectionGroupId: input.ProtectionGroupId }),
|
|
3403
|
-
...(input.ResourceType !== undefined && input.ResourceType !== null && { ResourceType: input.ResourceType }),
|
|
3404
|
-
...(input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_json1_1TagList(input.Tags, context) }),
|
|
3405
|
-
};
|
|
3406
|
-
};
|
|
3407
|
-
|
|
3408
|
-
const serializeAws_json1_1CreateProtectionRequest = (input: CreateProtectionRequest, context: __SerdeContext): any => {
|
|
3409
|
-
return {
|
|
3410
|
-
...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
|
|
3411
|
-
...(input.ResourceArn !== undefined && input.ResourceArn !== null && { ResourceArn: input.ResourceArn }),
|
|
3412
|
-
...(input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_json1_1TagList(input.Tags, context) }),
|
|
3413
|
-
};
|
|
3414
|
-
};
|
|
3415
|
-
|
|
3416
|
-
const serializeAws_json1_1CreateSubscriptionRequest = (
|
|
3417
|
-
input: CreateSubscriptionRequest,
|
|
3418
|
-
context: __SerdeContext
|
|
3419
|
-
): any => {
|
|
3420
|
-
return {};
|
|
3421
|
-
};
|
|
3422
|
-
|
|
3423
|
-
const serializeAws_json1_1DeleteProtectionGroupRequest = (
|
|
3424
|
-
input: DeleteProtectionGroupRequest,
|
|
3425
|
-
context: __SerdeContext
|
|
3426
|
-
): any => {
|
|
3427
|
-
return {
|
|
3428
|
-
...(input.ProtectionGroupId !== undefined &&
|
|
3429
|
-
input.ProtectionGroupId !== null && { ProtectionGroupId: input.ProtectionGroupId }),
|
|
3430
|
-
};
|
|
3431
|
-
};
|
|
3432
|
-
|
|
3433
|
-
const serializeAws_json1_1DeleteProtectionRequest = (input: DeleteProtectionRequest, context: __SerdeContext): any => {
|
|
3434
|
-
return {
|
|
3435
|
-
...(input.ProtectionId !== undefined && input.ProtectionId !== null && { ProtectionId: input.ProtectionId }),
|
|
3436
|
-
};
|
|
3437
|
-
};
|
|
3438
|
-
|
|
3439
|
-
const serializeAws_json1_1DeleteSubscriptionRequest = (
|
|
3440
|
-
input: DeleteSubscriptionRequest,
|
|
3441
|
-
context: __SerdeContext
|
|
3442
|
-
): any => {
|
|
3443
|
-
return {};
|
|
3444
|
-
};
|
|
3445
|
-
|
|
3446
|
-
const serializeAws_json1_1DescribeAttackRequest = (input: DescribeAttackRequest, context: __SerdeContext): any => {
|
|
3447
|
-
return {
|
|
3448
|
-
...(input.AttackId !== undefined && input.AttackId !== null && { AttackId: input.AttackId }),
|
|
3449
|
-
};
|
|
3450
|
-
};
|
|
3451
|
-
|
|
3452
|
-
const serializeAws_json1_1DescribeAttackStatisticsRequest = (
|
|
3453
|
-
input: DescribeAttackStatisticsRequest,
|
|
3454
|
-
context: __SerdeContext
|
|
3455
|
-
): any => {
|
|
3456
|
-
return {};
|
|
3457
|
-
};
|
|
3458
|
-
|
|
3459
|
-
const serializeAws_json1_1DescribeDRTAccessRequest = (
|
|
3460
|
-
input: DescribeDRTAccessRequest,
|
|
3461
|
-
context: __SerdeContext
|
|
3462
|
-
): any => {
|
|
3463
|
-
return {};
|
|
3464
|
-
};
|
|
3465
|
-
|
|
3466
|
-
const serializeAws_json1_1DescribeEmergencyContactSettingsRequest = (
|
|
3467
|
-
input: DescribeEmergencyContactSettingsRequest,
|
|
3468
|
-
context: __SerdeContext
|
|
3469
|
-
): any => {
|
|
3470
|
-
return {};
|
|
3471
|
-
};
|
|
3472
|
-
|
|
3473
|
-
const serializeAws_json1_1DescribeProtectionGroupRequest = (
|
|
3474
|
-
input: DescribeProtectionGroupRequest,
|
|
3475
|
-
context: __SerdeContext
|
|
3476
|
-
): any => {
|
|
3477
|
-
return {
|
|
3478
|
-
...(input.ProtectionGroupId !== undefined &&
|
|
3479
|
-
input.ProtectionGroupId !== null && { ProtectionGroupId: input.ProtectionGroupId }),
|
|
3480
|
-
};
|
|
3481
|
-
};
|
|
3482
|
-
|
|
3483
|
-
const serializeAws_json1_1DescribeProtectionRequest = (
|
|
3484
|
-
input: DescribeProtectionRequest,
|
|
3485
|
-
context: __SerdeContext
|
|
3486
|
-
): any => {
|
|
3487
|
-
return {
|
|
3488
|
-
...(input.ProtectionId !== undefined && input.ProtectionId !== null && { ProtectionId: input.ProtectionId }),
|
|
3489
|
-
...(input.ResourceArn !== undefined && input.ResourceArn !== null && { ResourceArn: input.ResourceArn }),
|
|
3490
|
-
};
|
|
3491
|
-
};
|
|
3492
|
-
|
|
3493
|
-
const serializeAws_json1_1DescribeSubscriptionRequest = (
|
|
3494
|
-
input: DescribeSubscriptionRequest,
|
|
3495
|
-
context: __SerdeContext
|
|
3496
|
-
): any => {
|
|
3497
|
-
return {};
|
|
3498
|
-
};
|
|
3499
|
-
|
|
3500
|
-
const serializeAws_json1_1DisableProactiveEngagementRequest = (
|
|
3501
|
-
input: DisableProactiveEngagementRequest,
|
|
3502
|
-
context: __SerdeContext
|
|
3503
|
-
): any => {
|
|
3504
|
-
return {};
|
|
3505
|
-
};
|
|
3506
|
-
|
|
3507
|
-
const serializeAws_json1_1DisassociateDRTLogBucketRequest = (
|
|
3508
|
-
input: DisassociateDRTLogBucketRequest,
|
|
3509
|
-
context: __SerdeContext
|
|
3510
|
-
): any => {
|
|
3511
|
-
return {
|
|
3512
|
-
...(input.LogBucket !== undefined && input.LogBucket !== null && { LogBucket: input.LogBucket }),
|
|
3513
|
-
};
|
|
3514
|
-
};
|
|
3515
|
-
|
|
3516
|
-
const serializeAws_json1_1DisassociateDRTRoleRequest = (
|
|
3517
|
-
input: DisassociateDRTRoleRequest,
|
|
3518
|
-
context: __SerdeContext
|
|
3519
|
-
): any => {
|
|
3520
|
-
return {};
|
|
3521
|
-
};
|
|
3522
|
-
|
|
3523
|
-
const serializeAws_json1_1DisassociateHealthCheckRequest = (
|
|
3524
|
-
input: DisassociateHealthCheckRequest,
|
|
3525
|
-
context: __SerdeContext
|
|
3526
|
-
): any => {
|
|
3527
|
-
return {
|
|
3528
|
-
...(input.HealthCheckArn !== undefined &&
|
|
3529
|
-
input.HealthCheckArn !== null && { HealthCheckArn: input.HealthCheckArn }),
|
|
3530
|
-
...(input.ProtectionId !== undefined && input.ProtectionId !== null && { ProtectionId: input.ProtectionId }),
|
|
3531
|
-
};
|
|
3532
|
-
};
|
|
3533
|
-
|
|
3534
|
-
const serializeAws_json1_1EmergencyContact = (input: EmergencyContact, context: __SerdeContext): any => {
|
|
3535
|
-
return {
|
|
3536
|
-
...(input.ContactNotes !== undefined && input.ContactNotes !== null && { ContactNotes: input.ContactNotes }),
|
|
3537
|
-
...(input.EmailAddress !== undefined && input.EmailAddress !== null && { EmailAddress: input.EmailAddress }),
|
|
3538
|
-
...(input.PhoneNumber !== undefined && input.PhoneNumber !== null && { PhoneNumber: input.PhoneNumber }),
|
|
3539
|
-
};
|
|
3540
|
-
};
|
|
3541
|
-
|
|
3542
|
-
const serializeAws_json1_1EmergencyContactList = (input: EmergencyContact[], context: __SerdeContext): any => {
|
|
3543
|
-
return input
|
|
3544
|
-
.filter((e: any) => e != null)
|
|
3545
|
-
.map((entry) => {
|
|
3546
|
-
if (entry === null) {
|
|
3547
|
-
return null as any;
|
|
3548
|
-
}
|
|
3549
|
-
return serializeAws_json1_1EmergencyContact(entry, context);
|
|
3550
|
-
});
|
|
3551
|
-
};
|
|
3552
|
-
|
|
3553
|
-
const serializeAws_json1_1EnableProactiveEngagementRequest = (
|
|
3554
|
-
input: EnableProactiveEngagementRequest,
|
|
3555
|
-
context: __SerdeContext
|
|
3556
|
-
): any => {
|
|
3557
|
-
return {};
|
|
3558
|
-
};
|
|
3559
|
-
|
|
3560
|
-
const serializeAws_json1_1GetSubscriptionStateRequest = (
|
|
3561
|
-
input: GetSubscriptionStateRequest,
|
|
3562
|
-
context: __SerdeContext
|
|
3563
|
-
): any => {
|
|
3564
|
-
return {};
|
|
3565
|
-
};
|
|
3566
|
-
|
|
3567
|
-
const serializeAws_json1_1ListAttacksRequest = (input: ListAttacksRequest, context: __SerdeContext): any => {
|
|
3568
|
-
return {
|
|
3569
|
-
...(input.EndTime !== undefined &&
|
|
3570
|
-
input.EndTime !== null && { EndTime: serializeAws_json1_1TimeRange(input.EndTime, context) }),
|
|
3571
|
-
...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
|
|
3572
|
-
...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
|
|
3573
|
-
...(input.ResourceArns !== undefined &&
|
|
3574
|
-
input.ResourceArns !== null && {
|
|
3575
|
-
ResourceArns: serializeAws_json1_1ResourceArnFilterList(input.ResourceArns, context),
|
|
3576
|
-
}),
|
|
3577
|
-
...(input.StartTime !== undefined &&
|
|
3578
|
-
input.StartTime !== null && { StartTime: serializeAws_json1_1TimeRange(input.StartTime, context) }),
|
|
3579
|
-
};
|
|
3580
|
-
};
|
|
3581
|
-
|
|
3582
|
-
const serializeAws_json1_1ListProtectionGroupsRequest = (
|
|
3583
|
-
input: ListProtectionGroupsRequest,
|
|
3584
|
-
context: __SerdeContext
|
|
3585
|
-
): any => {
|
|
3586
|
-
return {
|
|
3587
|
-
...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
|
|
3588
|
-
...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
|
|
3589
|
-
};
|
|
3590
|
-
};
|
|
3591
|
-
|
|
3592
|
-
const serializeAws_json1_1ListProtectionsRequest = (input: ListProtectionsRequest, context: __SerdeContext): any => {
|
|
3593
|
-
return {
|
|
3594
|
-
...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
|
|
3595
|
-
...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
|
|
3596
|
-
};
|
|
3597
|
-
};
|
|
3598
|
-
|
|
3599
|
-
const serializeAws_json1_1ListResourcesInProtectionGroupRequest = (
|
|
3600
|
-
input: ListResourcesInProtectionGroupRequest,
|
|
3601
|
-
context: __SerdeContext
|
|
3602
|
-
): any => {
|
|
3603
|
-
return {
|
|
3604
|
-
...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
|
|
3605
|
-
...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
|
|
3606
|
-
...(input.ProtectionGroupId !== undefined &&
|
|
3607
|
-
input.ProtectionGroupId !== null && { ProtectionGroupId: input.ProtectionGroupId }),
|
|
3608
|
-
};
|
|
3609
|
-
};
|
|
3610
|
-
|
|
3611
|
-
const serializeAws_json1_1ListTagsForResourceRequest = (
|
|
3612
|
-
input: ListTagsForResourceRequest,
|
|
3613
|
-
context: __SerdeContext
|
|
3614
|
-
): any => {
|
|
3615
|
-
return {
|
|
3616
|
-
...(input.ResourceARN !== undefined && input.ResourceARN !== null && { ResourceARN: input.ResourceARN }),
|
|
3617
|
-
};
|
|
3618
|
-
};
|
|
3619
|
-
|
|
3620
|
-
const serializeAws_json1_1ProtectionGroupMembers = (input: string[], context: __SerdeContext): any => {
|
|
3621
|
-
return input
|
|
3622
|
-
.filter((e: any) => e != null)
|
|
3623
|
-
.map((entry) => {
|
|
3624
|
-
if (entry === null) {
|
|
3625
|
-
return null as any;
|
|
3626
|
-
}
|
|
3627
|
-
return entry;
|
|
3628
|
-
});
|
|
3629
|
-
};
|
|
3630
|
-
|
|
3631
|
-
const serializeAws_json1_1ResourceArnFilterList = (input: string[], context: __SerdeContext): any => {
|
|
3632
|
-
return input
|
|
3633
|
-
.filter((e: any) => e != null)
|
|
3634
|
-
.map((entry) => {
|
|
3635
|
-
if (entry === null) {
|
|
3636
|
-
return null as any;
|
|
3637
|
-
}
|
|
3638
|
-
return entry;
|
|
3639
|
-
});
|
|
3640
|
-
};
|
|
3641
|
-
|
|
3642
|
-
const serializeAws_json1_1Tag = (input: Tag, context: __SerdeContext): any => {
|
|
3643
|
-
return {
|
|
3644
|
-
...(input.Key !== undefined && input.Key !== null && { Key: input.Key }),
|
|
3645
|
-
...(input.Value !== undefined && input.Value !== null && { Value: input.Value }),
|
|
3646
|
-
};
|
|
3647
|
-
};
|
|
3648
|
-
|
|
3649
|
-
const serializeAws_json1_1TagKeyList = (input: string[], context: __SerdeContext): any => {
|
|
3650
|
-
return input
|
|
3651
|
-
.filter((e: any) => e != null)
|
|
3652
|
-
.map((entry) => {
|
|
3653
|
-
if (entry === null) {
|
|
3654
|
-
return null as any;
|
|
3655
|
-
}
|
|
3656
|
-
return entry;
|
|
3657
|
-
});
|
|
3658
|
-
};
|
|
3659
|
-
|
|
3660
|
-
const serializeAws_json1_1TagList = (input: Tag[], context: __SerdeContext): any => {
|
|
3661
|
-
return input
|
|
3662
|
-
.filter((e: any) => e != null)
|
|
3663
|
-
.map((entry) => {
|
|
3664
|
-
if (entry === null) {
|
|
3665
|
-
return null as any;
|
|
3666
|
-
}
|
|
3667
|
-
return serializeAws_json1_1Tag(entry, context);
|
|
3668
|
-
});
|
|
3669
|
-
};
|
|
3670
|
-
|
|
3671
|
-
const serializeAws_json1_1TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => {
|
|
3672
|
-
return {
|
|
3673
|
-
...(input.ResourceARN !== undefined && input.ResourceARN !== null && { ResourceARN: input.ResourceARN }),
|
|
3674
|
-
...(input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_json1_1TagList(input.Tags, context) }),
|
|
3675
|
-
};
|
|
3676
|
-
};
|
|
3677
|
-
|
|
3678
|
-
const serializeAws_json1_1TimeRange = (input: TimeRange, context: __SerdeContext): any => {
|
|
3679
|
-
return {
|
|
3680
|
-
...(input.FromInclusive !== undefined &&
|
|
3681
|
-
input.FromInclusive !== null && { FromInclusive: Math.round(input.FromInclusive.getTime() / 1000) }),
|
|
3682
|
-
...(input.ToExclusive !== undefined &&
|
|
3683
|
-
input.ToExclusive !== null && { ToExclusive: Math.round(input.ToExclusive.getTime() / 1000) }),
|
|
3684
|
-
};
|
|
3685
|
-
};
|
|
3686
|
-
|
|
3687
|
-
const serializeAws_json1_1UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => {
|
|
3688
|
-
return {
|
|
3689
|
-
...(input.ResourceARN !== undefined && input.ResourceARN !== null && { ResourceARN: input.ResourceARN }),
|
|
3690
|
-
...(input.TagKeys !== undefined &&
|
|
3691
|
-
input.TagKeys !== null && { TagKeys: serializeAws_json1_1TagKeyList(input.TagKeys, context) }),
|
|
3692
|
-
};
|
|
3693
|
-
};
|
|
3694
|
-
|
|
3695
|
-
const serializeAws_json1_1UpdateEmergencyContactSettingsRequest = (
|
|
3696
|
-
input: UpdateEmergencyContactSettingsRequest,
|
|
3697
|
-
context: __SerdeContext
|
|
3698
|
-
): any => {
|
|
3699
|
-
return {
|
|
3700
|
-
...(input.EmergencyContactList !== undefined &&
|
|
3701
|
-
input.EmergencyContactList !== null && {
|
|
3702
|
-
EmergencyContactList: serializeAws_json1_1EmergencyContactList(input.EmergencyContactList, context),
|
|
3703
|
-
}),
|
|
3704
|
-
};
|
|
3705
|
-
};
|
|
3706
|
-
|
|
3707
|
-
const serializeAws_json1_1UpdateProtectionGroupRequest = (
|
|
3708
|
-
input: UpdateProtectionGroupRequest,
|
|
3709
|
-
context: __SerdeContext
|
|
3710
|
-
): any => {
|
|
3711
|
-
return {
|
|
3712
|
-
...(input.Aggregation !== undefined && input.Aggregation !== null && { Aggregation: input.Aggregation }),
|
|
3713
|
-
...(input.Members !== undefined &&
|
|
3714
|
-
input.Members !== null && { Members: serializeAws_json1_1ProtectionGroupMembers(input.Members, context) }),
|
|
3715
|
-
...(input.Pattern !== undefined && input.Pattern !== null && { Pattern: input.Pattern }),
|
|
3716
|
-
...(input.ProtectionGroupId !== undefined &&
|
|
3717
|
-
input.ProtectionGroupId !== null && { ProtectionGroupId: input.ProtectionGroupId }),
|
|
3718
|
-
...(input.ResourceType !== undefined && input.ResourceType !== null && { ResourceType: input.ResourceType }),
|
|
3719
|
-
};
|
|
3720
|
-
};
|
|
3721
|
-
|
|
3722
|
-
const serializeAws_json1_1UpdateSubscriptionRequest = (
|
|
3723
|
-
input: UpdateSubscriptionRequest,
|
|
3724
|
-
context: __SerdeContext
|
|
3725
|
-
): any => {
|
|
3726
|
-
return {
|
|
3727
|
-
...(input.AutoRenew !== undefined && input.AutoRenew !== null && { AutoRenew: input.AutoRenew }),
|
|
3728
|
-
};
|
|
3729
|
-
};
|
|
3730
|
-
|
|
3731
|
-
const deserializeAws_json1_1AccessDeniedException = (output: any, context: __SerdeContext): AccessDeniedException => {
|
|
3732
|
-
return {
|
|
3733
|
-
message: __expectString(output.message),
|
|
3734
|
-
} as any;
|
|
3735
|
-
};
|
|
3736
|
-
|
|
3737
|
-
const deserializeAws_json1_1AccessDeniedForDependencyException = (
|
|
3738
|
-
output: any,
|
|
3739
|
-
context: __SerdeContext
|
|
3740
|
-
): AccessDeniedForDependencyException => {
|
|
3741
|
-
return {
|
|
3742
|
-
message: __expectString(output.message),
|
|
3743
|
-
} as any;
|
|
3744
|
-
};
|
|
3745
|
-
|
|
3746
|
-
const deserializeAws_json1_1AssociateDRTLogBucketResponse = (
|
|
3747
|
-
output: any,
|
|
3748
|
-
context: __SerdeContext
|
|
3749
|
-
): AssociateDRTLogBucketResponse => {
|
|
3750
|
-
return {} as any;
|
|
3751
|
-
};
|
|
3752
|
-
|
|
3753
|
-
const deserializeAws_json1_1AssociateDRTRoleResponse = (
|
|
3754
|
-
output: any,
|
|
3755
|
-
context: __SerdeContext
|
|
3756
|
-
): AssociateDRTRoleResponse => {
|
|
3757
|
-
return {} as any;
|
|
3758
|
-
};
|
|
3759
|
-
|
|
3760
|
-
const deserializeAws_json1_1AssociateHealthCheckResponse = (
|
|
3761
|
-
output: any,
|
|
3762
|
-
context: __SerdeContext
|
|
3763
|
-
): AssociateHealthCheckResponse => {
|
|
3764
|
-
return {} as any;
|
|
3765
|
-
};
|
|
3766
|
-
|
|
3767
|
-
const deserializeAws_json1_1AssociateProactiveEngagementDetailsResponse = (
|
|
3768
|
-
output: any,
|
|
3769
|
-
context: __SerdeContext
|
|
3770
|
-
): AssociateProactiveEngagementDetailsResponse => {
|
|
3771
|
-
return {} as any;
|
|
3772
|
-
};
|
|
3773
|
-
|
|
3774
|
-
const deserializeAws_json1_1AttackDetail = (output: any, context: __SerdeContext): AttackDetail => {
|
|
3775
|
-
return {
|
|
3776
|
-
AttackCounters:
|
|
3777
|
-
output.AttackCounters !== undefined && output.AttackCounters !== null
|
|
3778
|
-
? deserializeAws_json1_1SummarizedCounterList(output.AttackCounters, context)
|
|
3779
|
-
: undefined,
|
|
3780
|
-
AttackId: __expectString(output.AttackId),
|
|
3781
|
-
AttackProperties:
|
|
3782
|
-
output.AttackProperties !== undefined && output.AttackProperties !== null
|
|
3783
|
-
? deserializeAws_json1_1AttackProperties(output.AttackProperties, context)
|
|
3784
|
-
: undefined,
|
|
3785
|
-
EndTime:
|
|
3786
|
-
output.EndTime !== undefined && output.EndTime !== null
|
|
3787
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime)))
|
|
3788
|
-
: undefined,
|
|
3789
|
-
Mitigations:
|
|
3790
|
-
output.Mitigations !== undefined && output.Mitigations !== null
|
|
3791
|
-
? deserializeAws_json1_1MitigationList(output.Mitigations, context)
|
|
3792
|
-
: undefined,
|
|
3793
|
-
ResourceArn: __expectString(output.ResourceArn),
|
|
3794
|
-
StartTime:
|
|
3795
|
-
output.StartTime !== undefined && output.StartTime !== null
|
|
3796
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime)))
|
|
3797
|
-
: undefined,
|
|
3798
|
-
SubResources:
|
|
3799
|
-
output.SubResources !== undefined && output.SubResources !== null
|
|
3800
|
-
? deserializeAws_json1_1SubResourceSummaryList(output.SubResources, context)
|
|
3801
|
-
: undefined,
|
|
3802
|
-
} as any;
|
|
3803
|
-
};
|
|
3804
|
-
|
|
3805
|
-
const deserializeAws_json1_1AttackProperties = (output: any, context: __SerdeContext): AttackProperty[] => {
|
|
3806
|
-
return (output || [])
|
|
3807
|
-
.filter((e: any) => e != null)
|
|
3808
|
-
.map((entry: any) => {
|
|
3809
|
-
if (entry === null) {
|
|
3810
|
-
return null as any;
|
|
3811
|
-
}
|
|
3812
|
-
return deserializeAws_json1_1AttackProperty(entry, context);
|
|
3813
|
-
});
|
|
3814
|
-
};
|
|
3815
|
-
|
|
3816
|
-
const deserializeAws_json1_1AttackProperty = (output: any, context: __SerdeContext): AttackProperty => {
|
|
3817
|
-
return {
|
|
3818
|
-
AttackLayer: __expectString(output.AttackLayer),
|
|
3819
|
-
AttackPropertyIdentifier: __expectString(output.AttackPropertyIdentifier),
|
|
3820
|
-
TopContributors:
|
|
3821
|
-
output.TopContributors !== undefined && output.TopContributors !== null
|
|
3822
|
-
? deserializeAws_json1_1TopContributors(output.TopContributors, context)
|
|
3823
|
-
: undefined,
|
|
3824
|
-
Total: __expectLong(output.Total),
|
|
3825
|
-
Unit: __expectString(output.Unit),
|
|
3826
|
-
} as any;
|
|
3827
|
-
};
|
|
3828
|
-
|
|
3829
|
-
const deserializeAws_json1_1AttackStatisticsDataItem = (
|
|
3830
|
-
output: any,
|
|
3831
|
-
context: __SerdeContext
|
|
3832
|
-
): AttackStatisticsDataItem => {
|
|
3833
|
-
return {
|
|
3834
|
-
AttackCount: __expectLong(output.AttackCount),
|
|
3835
|
-
AttackVolume:
|
|
3836
|
-
output.AttackVolume !== undefined && output.AttackVolume !== null
|
|
3837
|
-
? deserializeAws_json1_1AttackVolume(output.AttackVolume, context)
|
|
3838
|
-
: undefined,
|
|
3839
|
-
} as any;
|
|
3840
|
-
};
|
|
3841
|
-
|
|
3842
|
-
const deserializeAws_json1_1AttackStatisticsDataList = (
|
|
3843
|
-
output: any,
|
|
3844
|
-
context: __SerdeContext
|
|
3845
|
-
): AttackStatisticsDataItem[] => {
|
|
3846
|
-
return (output || [])
|
|
3847
|
-
.filter((e: any) => e != null)
|
|
3848
|
-
.map((entry: any) => {
|
|
3849
|
-
if (entry === null) {
|
|
3850
|
-
return null as any;
|
|
3851
|
-
}
|
|
3852
|
-
return deserializeAws_json1_1AttackStatisticsDataItem(entry, context);
|
|
3853
|
-
});
|
|
3854
|
-
};
|
|
3855
|
-
|
|
3856
|
-
const deserializeAws_json1_1AttackSummaries = (output: any, context: __SerdeContext): AttackSummary[] => {
|
|
3857
|
-
return (output || [])
|
|
3858
|
-
.filter((e: any) => e != null)
|
|
3859
|
-
.map((entry: any) => {
|
|
3860
|
-
if (entry === null) {
|
|
3861
|
-
return null as any;
|
|
3862
|
-
}
|
|
3863
|
-
return deserializeAws_json1_1AttackSummary(entry, context);
|
|
3864
|
-
});
|
|
3865
|
-
};
|
|
3866
|
-
|
|
3867
|
-
const deserializeAws_json1_1AttackSummary = (output: any, context: __SerdeContext): AttackSummary => {
|
|
3868
|
-
return {
|
|
3869
|
-
AttackId: __expectString(output.AttackId),
|
|
3870
|
-
AttackVectors:
|
|
3871
|
-
output.AttackVectors !== undefined && output.AttackVectors !== null
|
|
3872
|
-
? deserializeAws_json1_1AttackVectorDescriptionList(output.AttackVectors, context)
|
|
3873
|
-
: undefined,
|
|
3874
|
-
EndTime:
|
|
3875
|
-
output.EndTime !== undefined && output.EndTime !== null
|
|
3876
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime)))
|
|
3877
|
-
: undefined,
|
|
3878
|
-
ResourceArn: __expectString(output.ResourceArn),
|
|
3879
|
-
StartTime:
|
|
3880
|
-
output.StartTime !== undefined && output.StartTime !== null
|
|
3881
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime)))
|
|
3882
|
-
: undefined,
|
|
3883
|
-
} as any;
|
|
3884
|
-
};
|
|
3885
|
-
|
|
3886
|
-
const deserializeAws_json1_1AttackVectorDescription = (
|
|
3887
|
-
output: any,
|
|
3888
|
-
context: __SerdeContext
|
|
3889
|
-
): AttackVectorDescription => {
|
|
3890
|
-
return {
|
|
3891
|
-
VectorType: __expectString(output.VectorType),
|
|
3892
|
-
} as any;
|
|
3893
|
-
};
|
|
3894
|
-
|
|
3895
|
-
const deserializeAws_json1_1AttackVectorDescriptionList = (
|
|
3896
|
-
output: any,
|
|
3897
|
-
context: __SerdeContext
|
|
3898
|
-
): AttackVectorDescription[] => {
|
|
3899
|
-
return (output || [])
|
|
3900
|
-
.filter((e: any) => e != null)
|
|
3901
|
-
.map((entry: any) => {
|
|
3902
|
-
if (entry === null) {
|
|
3903
|
-
return null as any;
|
|
3904
|
-
}
|
|
3905
|
-
return deserializeAws_json1_1AttackVectorDescription(entry, context);
|
|
3906
|
-
});
|
|
3907
|
-
};
|
|
3908
|
-
|
|
3909
|
-
const deserializeAws_json1_1AttackVolume = (output: any, context: __SerdeContext): AttackVolume => {
|
|
3910
|
-
return {
|
|
3911
|
-
BitsPerSecond:
|
|
3912
|
-
output.BitsPerSecond !== undefined && output.BitsPerSecond !== null
|
|
3913
|
-
? deserializeAws_json1_1AttackVolumeStatistics(output.BitsPerSecond, context)
|
|
3914
|
-
: undefined,
|
|
3915
|
-
PacketsPerSecond:
|
|
3916
|
-
output.PacketsPerSecond !== undefined && output.PacketsPerSecond !== null
|
|
3917
|
-
? deserializeAws_json1_1AttackVolumeStatistics(output.PacketsPerSecond, context)
|
|
3918
|
-
: undefined,
|
|
3919
|
-
RequestsPerSecond:
|
|
3920
|
-
output.RequestsPerSecond !== undefined && output.RequestsPerSecond !== null
|
|
3921
|
-
? deserializeAws_json1_1AttackVolumeStatistics(output.RequestsPerSecond, context)
|
|
3922
|
-
: undefined,
|
|
3923
|
-
} as any;
|
|
3924
|
-
};
|
|
3925
|
-
|
|
3926
|
-
const deserializeAws_json1_1AttackVolumeStatistics = (output: any, context: __SerdeContext): AttackVolumeStatistics => {
|
|
3927
|
-
return {
|
|
3928
|
-
Max: __limitedParseDouble(output.Max),
|
|
3929
|
-
} as any;
|
|
3930
|
-
};
|
|
3931
|
-
|
|
3932
|
-
const deserializeAws_json1_1Contributor = (output: any, context: __SerdeContext): Contributor => {
|
|
3933
|
-
return {
|
|
3934
|
-
Name: __expectString(output.Name),
|
|
3935
|
-
Value: __expectLong(output.Value),
|
|
3936
|
-
} as any;
|
|
3937
|
-
};
|
|
3938
|
-
|
|
3939
|
-
const deserializeAws_json1_1CreateProtectionGroupResponse = (
|
|
3940
|
-
output: any,
|
|
3941
|
-
context: __SerdeContext
|
|
3942
|
-
): CreateProtectionGroupResponse => {
|
|
3943
|
-
return {} as any;
|
|
3944
|
-
};
|
|
3945
|
-
|
|
3946
|
-
const deserializeAws_json1_1CreateProtectionResponse = (
|
|
3947
|
-
output: any,
|
|
3948
|
-
context: __SerdeContext
|
|
3949
|
-
): CreateProtectionResponse => {
|
|
3950
|
-
return {
|
|
3951
|
-
ProtectionId: __expectString(output.ProtectionId),
|
|
3952
|
-
} as any;
|
|
3953
|
-
};
|
|
3954
|
-
|
|
3955
|
-
const deserializeAws_json1_1CreateSubscriptionResponse = (
|
|
3956
|
-
output: any,
|
|
3957
|
-
context: __SerdeContext
|
|
3958
|
-
): CreateSubscriptionResponse => {
|
|
3959
|
-
return {} as any;
|
|
3960
|
-
};
|
|
3961
|
-
|
|
3962
|
-
const deserializeAws_json1_1DeleteProtectionGroupResponse = (
|
|
3963
|
-
output: any,
|
|
3964
|
-
context: __SerdeContext
|
|
3965
|
-
): DeleteProtectionGroupResponse => {
|
|
3966
|
-
return {} as any;
|
|
3967
|
-
};
|
|
3968
|
-
|
|
3969
|
-
const deserializeAws_json1_1DeleteProtectionResponse = (
|
|
3970
|
-
output: any,
|
|
3971
|
-
context: __SerdeContext
|
|
3972
|
-
): DeleteProtectionResponse => {
|
|
3973
|
-
return {} as any;
|
|
3974
|
-
};
|
|
3975
|
-
|
|
3976
|
-
const deserializeAws_json1_1DeleteSubscriptionResponse = (
|
|
3977
|
-
output: any,
|
|
3978
|
-
context: __SerdeContext
|
|
3979
|
-
): DeleteSubscriptionResponse => {
|
|
3980
|
-
return {} as any;
|
|
3981
|
-
};
|
|
3982
|
-
|
|
3983
|
-
const deserializeAws_json1_1DescribeAttackResponse = (output: any, context: __SerdeContext): DescribeAttackResponse => {
|
|
3984
|
-
return {
|
|
3985
|
-
Attack:
|
|
3986
|
-
output.Attack !== undefined && output.Attack !== null
|
|
3987
|
-
? deserializeAws_json1_1AttackDetail(output.Attack, context)
|
|
3988
|
-
: undefined,
|
|
3989
|
-
} as any;
|
|
3990
|
-
};
|
|
3991
|
-
|
|
3992
|
-
const deserializeAws_json1_1DescribeAttackStatisticsResponse = (
|
|
3993
|
-
output: any,
|
|
3994
|
-
context: __SerdeContext
|
|
3995
|
-
): DescribeAttackStatisticsResponse => {
|
|
3996
|
-
return {
|
|
3997
|
-
DataItems:
|
|
3998
|
-
output.DataItems !== undefined && output.DataItems !== null
|
|
3999
|
-
? deserializeAws_json1_1AttackStatisticsDataList(output.DataItems, context)
|
|
4000
|
-
: undefined,
|
|
4001
|
-
TimeRange:
|
|
4002
|
-
output.TimeRange !== undefined && output.TimeRange !== null
|
|
4003
|
-
? deserializeAws_json1_1TimeRange(output.TimeRange, context)
|
|
4004
|
-
: undefined,
|
|
4005
|
-
} as any;
|
|
4006
|
-
};
|
|
4007
|
-
|
|
4008
|
-
const deserializeAws_json1_1DescribeDRTAccessResponse = (
|
|
4009
|
-
output: any,
|
|
4010
|
-
context: __SerdeContext
|
|
4011
|
-
): DescribeDRTAccessResponse => {
|
|
4012
|
-
return {
|
|
4013
|
-
LogBucketList:
|
|
4014
|
-
output.LogBucketList !== undefined && output.LogBucketList !== null
|
|
4015
|
-
? deserializeAws_json1_1LogBucketList(output.LogBucketList, context)
|
|
4016
|
-
: undefined,
|
|
4017
|
-
RoleArn: __expectString(output.RoleArn),
|
|
4018
|
-
} as any;
|
|
4019
|
-
};
|
|
4020
|
-
|
|
4021
|
-
const deserializeAws_json1_1DescribeEmergencyContactSettingsResponse = (
|
|
4022
|
-
output: any,
|
|
4023
|
-
context: __SerdeContext
|
|
4024
|
-
): DescribeEmergencyContactSettingsResponse => {
|
|
4025
|
-
return {
|
|
4026
|
-
EmergencyContactList:
|
|
4027
|
-
output.EmergencyContactList !== undefined && output.EmergencyContactList !== null
|
|
4028
|
-
? deserializeAws_json1_1EmergencyContactList(output.EmergencyContactList, context)
|
|
4029
|
-
: undefined,
|
|
4030
|
-
} as any;
|
|
4031
|
-
};
|
|
4032
|
-
|
|
4033
|
-
const deserializeAws_json1_1DescribeProtectionGroupResponse = (
|
|
4034
|
-
output: any,
|
|
4035
|
-
context: __SerdeContext
|
|
4036
|
-
): DescribeProtectionGroupResponse => {
|
|
4037
|
-
return {
|
|
4038
|
-
ProtectionGroup:
|
|
4039
|
-
output.ProtectionGroup !== undefined && output.ProtectionGroup !== null
|
|
4040
|
-
? deserializeAws_json1_1ProtectionGroup(output.ProtectionGroup, context)
|
|
4041
|
-
: undefined,
|
|
4042
|
-
} as any;
|
|
4043
|
-
};
|
|
4044
|
-
|
|
4045
|
-
const deserializeAws_json1_1DescribeProtectionResponse = (
|
|
4046
|
-
output: any,
|
|
4047
|
-
context: __SerdeContext
|
|
4048
|
-
): DescribeProtectionResponse => {
|
|
4049
|
-
return {
|
|
4050
|
-
Protection:
|
|
4051
|
-
output.Protection !== undefined && output.Protection !== null
|
|
4052
|
-
? deserializeAws_json1_1Protection(output.Protection, context)
|
|
4053
|
-
: undefined,
|
|
4054
|
-
} as any;
|
|
4055
|
-
};
|
|
4056
|
-
|
|
4057
|
-
const deserializeAws_json1_1DescribeSubscriptionResponse = (
|
|
4058
|
-
output: any,
|
|
4059
|
-
context: __SerdeContext
|
|
4060
|
-
): DescribeSubscriptionResponse => {
|
|
4061
|
-
return {
|
|
4062
|
-
Subscription:
|
|
4063
|
-
output.Subscription !== undefined && output.Subscription !== null
|
|
4064
|
-
? deserializeAws_json1_1Subscription(output.Subscription, context)
|
|
4065
|
-
: undefined,
|
|
4066
|
-
} as any;
|
|
4067
|
-
};
|
|
4068
|
-
|
|
4069
|
-
const deserializeAws_json1_1DisableProactiveEngagementResponse = (
|
|
4070
|
-
output: any,
|
|
4071
|
-
context: __SerdeContext
|
|
4072
|
-
): DisableProactiveEngagementResponse => {
|
|
4073
|
-
return {} as any;
|
|
4074
|
-
};
|
|
4075
|
-
|
|
4076
|
-
const deserializeAws_json1_1DisassociateDRTLogBucketResponse = (
|
|
4077
|
-
output: any,
|
|
4078
|
-
context: __SerdeContext
|
|
4079
|
-
): DisassociateDRTLogBucketResponse => {
|
|
4080
|
-
return {} as any;
|
|
4081
|
-
};
|
|
4082
|
-
|
|
4083
|
-
const deserializeAws_json1_1DisassociateDRTRoleResponse = (
|
|
4084
|
-
output: any,
|
|
4085
|
-
context: __SerdeContext
|
|
4086
|
-
): DisassociateDRTRoleResponse => {
|
|
4087
|
-
return {} as any;
|
|
4088
|
-
};
|
|
4089
|
-
|
|
4090
|
-
const deserializeAws_json1_1DisassociateHealthCheckResponse = (
|
|
4091
|
-
output: any,
|
|
4092
|
-
context: __SerdeContext
|
|
4093
|
-
): DisassociateHealthCheckResponse => {
|
|
4094
|
-
return {} as any;
|
|
4095
|
-
};
|
|
4096
|
-
|
|
4097
|
-
const deserializeAws_json1_1EmergencyContact = (output: any, context: __SerdeContext): EmergencyContact => {
|
|
4098
|
-
return {
|
|
4099
|
-
ContactNotes: __expectString(output.ContactNotes),
|
|
4100
|
-
EmailAddress: __expectString(output.EmailAddress),
|
|
4101
|
-
PhoneNumber: __expectString(output.PhoneNumber),
|
|
4102
|
-
} as any;
|
|
4103
|
-
};
|
|
4104
|
-
|
|
4105
|
-
const deserializeAws_json1_1EmergencyContactList = (output: any, context: __SerdeContext): EmergencyContact[] => {
|
|
4106
|
-
return (output || [])
|
|
4107
|
-
.filter((e: any) => e != null)
|
|
4108
|
-
.map((entry: any) => {
|
|
4109
|
-
if (entry === null) {
|
|
4110
|
-
return null as any;
|
|
4111
|
-
}
|
|
4112
|
-
return deserializeAws_json1_1EmergencyContact(entry, context);
|
|
4113
|
-
});
|
|
4114
|
-
};
|
|
4115
|
-
|
|
4116
|
-
const deserializeAws_json1_1EnableProactiveEngagementResponse = (
|
|
4117
|
-
output: any,
|
|
4118
|
-
context: __SerdeContext
|
|
4119
|
-
): EnableProactiveEngagementResponse => {
|
|
4120
|
-
return {} as any;
|
|
4121
|
-
};
|
|
4122
|
-
|
|
4123
|
-
const deserializeAws_json1_1GetSubscriptionStateResponse = (
|
|
4124
|
-
output: any,
|
|
4125
|
-
context: __SerdeContext
|
|
4126
|
-
): GetSubscriptionStateResponse => {
|
|
4127
|
-
return {
|
|
4128
|
-
SubscriptionState: __expectString(output.SubscriptionState),
|
|
4129
|
-
} as any;
|
|
4130
|
-
};
|
|
4131
|
-
|
|
4132
|
-
const deserializeAws_json1_1HealthCheckIds = (output: any, context: __SerdeContext): string[] => {
|
|
4133
|
-
return (output || [])
|
|
4134
|
-
.filter((e: any) => e != null)
|
|
4135
|
-
.map((entry: any) => {
|
|
4136
|
-
if (entry === null) {
|
|
4137
|
-
return null as any;
|
|
4138
|
-
}
|
|
4139
|
-
return __expectString(entry) as any;
|
|
4140
|
-
});
|
|
4141
|
-
};
|
|
4142
|
-
|
|
4143
|
-
const deserializeAws_json1_1InternalErrorException = (output: any, context: __SerdeContext): InternalErrorException => {
|
|
4144
|
-
return {
|
|
4145
|
-
message: __expectString(output.message),
|
|
4146
|
-
} as any;
|
|
4147
|
-
};
|
|
4148
|
-
|
|
4149
|
-
const deserializeAws_json1_1InvalidOperationException = (
|
|
4150
|
-
output: any,
|
|
4151
|
-
context: __SerdeContext
|
|
4152
|
-
): InvalidOperationException => {
|
|
4153
|
-
return {
|
|
4154
|
-
message: __expectString(output.message),
|
|
4155
|
-
} as any;
|
|
4156
|
-
};
|
|
4157
|
-
|
|
4158
|
-
const deserializeAws_json1_1InvalidPaginationTokenException = (
|
|
4159
|
-
output: any,
|
|
4160
|
-
context: __SerdeContext
|
|
4161
|
-
): InvalidPaginationTokenException => {
|
|
4162
|
-
return {
|
|
4163
|
-
message: __expectString(output.message),
|
|
4164
|
-
} as any;
|
|
4165
|
-
};
|
|
4166
|
-
|
|
4167
|
-
const deserializeAws_json1_1InvalidParameterException = (
|
|
4168
|
-
output: any,
|
|
4169
|
-
context: __SerdeContext
|
|
4170
|
-
): InvalidParameterException => {
|
|
4171
|
-
return {
|
|
4172
|
-
fields:
|
|
4173
|
-
output.fields !== undefined && output.fields !== null
|
|
4174
|
-
? deserializeAws_json1_1ValidationExceptionFieldList(output.fields, context)
|
|
4175
|
-
: undefined,
|
|
4176
|
-
message: __expectString(output.message),
|
|
4177
|
-
reason: __expectString(output.reason),
|
|
4178
|
-
} as any;
|
|
4179
|
-
};
|
|
4180
|
-
|
|
4181
|
-
const deserializeAws_json1_1InvalidResourceException = (
|
|
4182
|
-
output: any,
|
|
4183
|
-
context: __SerdeContext
|
|
4184
|
-
): InvalidResourceException => {
|
|
4185
|
-
return {
|
|
4186
|
-
message: __expectString(output.message),
|
|
4187
|
-
} as any;
|
|
4188
|
-
};
|
|
4189
|
-
|
|
4190
|
-
const deserializeAws_json1_1Limit = (output: any, context: __SerdeContext): Limit => {
|
|
4191
|
-
return {
|
|
4192
|
-
Max: __expectLong(output.Max),
|
|
4193
|
-
Type: __expectString(output.Type),
|
|
4194
|
-
} as any;
|
|
4195
|
-
};
|
|
4196
|
-
|
|
4197
|
-
const deserializeAws_json1_1Limits = (output: any, context: __SerdeContext): Limit[] => {
|
|
4198
|
-
return (output || [])
|
|
4199
|
-
.filter((e: any) => e != null)
|
|
4200
|
-
.map((entry: any) => {
|
|
4201
|
-
if (entry === null) {
|
|
4202
|
-
return null as any;
|
|
4203
|
-
}
|
|
4204
|
-
return deserializeAws_json1_1Limit(entry, context);
|
|
4205
|
-
});
|
|
4206
|
-
};
|
|
4207
|
-
|
|
4208
|
-
const deserializeAws_json1_1LimitsExceededException = (
|
|
4209
|
-
output: any,
|
|
4210
|
-
context: __SerdeContext
|
|
4211
|
-
): LimitsExceededException => {
|
|
4212
|
-
return {
|
|
4213
|
-
Limit: __expectLong(output.Limit),
|
|
4214
|
-
Type: __expectString(output.Type),
|
|
4215
|
-
message: __expectString(output.message),
|
|
4216
|
-
} as any;
|
|
4217
|
-
};
|
|
4218
|
-
|
|
4219
|
-
const deserializeAws_json1_1ListAttacksResponse = (output: any, context: __SerdeContext): ListAttacksResponse => {
|
|
4220
|
-
return {
|
|
4221
|
-
AttackSummaries:
|
|
4222
|
-
output.AttackSummaries !== undefined && output.AttackSummaries !== null
|
|
4223
|
-
? deserializeAws_json1_1AttackSummaries(output.AttackSummaries, context)
|
|
4224
|
-
: undefined,
|
|
4225
|
-
NextToken: __expectString(output.NextToken),
|
|
4226
|
-
} as any;
|
|
4227
|
-
};
|
|
4228
|
-
|
|
4229
|
-
const deserializeAws_json1_1ListProtectionGroupsResponse = (
|
|
4230
|
-
output: any,
|
|
4231
|
-
context: __SerdeContext
|
|
4232
|
-
): ListProtectionGroupsResponse => {
|
|
4233
|
-
return {
|
|
4234
|
-
NextToken: __expectString(output.NextToken),
|
|
4235
|
-
ProtectionGroups:
|
|
4236
|
-
output.ProtectionGroups !== undefined && output.ProtectionGroups !== null
|
|
4237
|
-
? deserializeAws_json1_1ProtectionGroups(output.ProtectionGroups, context)
|
|
4238
|
-
: undefined,
|
|
4239
|
-
} as any;
|
|
4240
|
-
};
|
|
4241
|
-
|
|
4242
|
-
const deserializeAws_json1_1ListProtectionsResponse = (
|
|
4243
|
-
output: any,
|
|
4244
|
-
context: __SerdeContext
|
|
4245
|
-
): ListProtectionsResponse => {
|
|
4246
|
-
return {
|
|
4247
|
-
NextToken: __expectString(output.NextToken),
|
|
4248
|
-
Protections:
|
|
4249
|
-
output.Protections !== undefined && output.Protections !== null
|
|
4250
|
-
? deserializeAws_json1_1Protections(output.Protections, context)
|
|
4251
|
-
: undefined,
|
|
4252
|
-
} as any;
|
|
4253
|
-
};
|
|
4254
|
-
|
|
4255
|
-
const deserializeAws_json1_1ListResourcesInProtectionGroupResponse = (
|
|
4256
|
-
output: any,
|
|
4257
|
-
context: __SerdeContext
|
|
4258
|
-
): ListResourcesInProtectionGroupResponse => {
|
|
4259
|
-
return {
|
|
4260
|
-
NextToken: __expectString(output.NextToken),
|
|
4261
|
-
ResourceArns:
|
|
4262
|
-
output.ResourceArns !== undefined && output.ResourceArns !== null
|
|
4263
|
-
? deserializeAws_json1_1ResourceArnList(output.ResourceArns, context)
|
|
4264
|
-
: undefined,
|
|
4265
|
-
} as any;
|
|
4266
|
-
};
|
|
4267
|
-
|
|
4268
|
-
const deserializeAws_json1_1ListTagsForResourceResponse = (
|
|
4269
|
-
output: any,
|
|
4270
|
-
context: __SerdeContext
|
|
4271
|
-
): ListTagsForResourceResponse => {
|
|
4272
|
-
return {
|
|
4273
|
-
Tags:
|
|
4274
|
-
output.Tags !== undefined && output.Tags !== null
|
|
4275
|
-
? deserializeAws_json1_1TagList(output.Tags, context)
|
|
4276
|
-
: undefined,
|
|
4277
|
-
} as any;
|
|
4278
|
-
};
|
|
4279
|
-
|
|
4280
|
-
const deserializeAws_json1_1LockedSubscriptionException = (
|
|
4281
|
-
output: any,
|
|
4282
|
-
context: __SerdeContext
|
|
4283
|
-
): LockedSubscriptionException => {
|
|
4284
|
-
return {
|
|
4285
|
-
message: __expectString(output.message),
|
|
4286
|
-
} as any;
|
|
4287
|
-
};
|
|
4288
|
-
|
|
4289
|
-
const deserializeAws_json1_1LogBucketList = (output: any, context: __SerdeContext): string[] => {
|
|
4290
|
-
return (output || [])
|
|
4291
|
-
.filter((e: any) => e != null)
|
|
4292
|
-
.map((entry: any) => {
|
|
4293
|
-
if (entry === null) {
|
|
4294
|
-
return null as any;
|
|
4295
|
-
}
|
|
4296
|
-
return __expectString(entry) as any;
|
|
4297
|
-
});
|
|
4298
|
-
};
|
|
4299
|
-
|
|
4300
|
-
const deserializeAws_json1_1Mitigation = (output: any, context: __SerdeContext): Mitigation => {
|
|
4301
|
-
return {
|
|
4302
|
-
MitigationName: __expectString(output.MitigationName),
|
|
4303
|
-
} as any;
|
|
4304
|
-
};
|
|
4305
|
-
|
|
4306
|
-
const deserializeAws_json1_1MitigationList = (output: any, context: __SerdeContext): Mitigation[] => {
|
|
4307
|
-
return (output || [])
|
|
4308
|
-
.filter((e: any) => e != null)
|
|
4309
|
-
.map((entry: any) => {
|
|
4310
|
-
if (entry === null) {
|
|
4311
|
-
return null as any;
|
|
4312
|
-
}
|
|
4313
|
-
return deserializeAws_json1_1Mitigation(entry, context);
|
|
4314
|
-
});
|
|
4315
|
-
};
|
|
4316
|
-
|
|
4317
|
-
const deserializeAws_json1_1NoAssociatedRoleException = (
|
|
4318
|
-
output: any,
|
|
4319
|
-
context: __SerdeContext
|
|
4320
|
-
): NoAssociatedRoleException => {
|
|
4321
|
-
return {
|
|
4322
|
-
message: __expectString(output.message),
|
|
4323
|
-
} as any;
|
|
4324
|
-
};
|
|
4325
|
-
|
|
4326
|
-
const deserializeAws_json1_1OptimisticLockException = (
|
|
4327
|
-
output: any,
|
|
4328
|
-
context: __SerdeContext
|
|
4329
|
-
): OptimisticLockException => {
|
|
4330
|
-
return {
|
|
4331
|
-
message: __expectString(output.message),
|
|
4332
|
-
} as any;
|
|
4333
|
-
};
|
|
4334
|
-
|
|
4335
|
-
const deserializeAws_json1_1Protection = (output: any, context: __SerdeContext): Protection => {
|
|
4336
|
-
return {
|
|
4337
|
-
HealthCheckIds:
|
|
4338
|
-
output.HealthCheckIds !== undefined && output.HealthCheckIds !== null
|
|
4339
|
-
? deserializeAws_json1_1HealthCheckIds(output.HealthCheckIds, context)
|
|
4340
|
-
: undefined,
|
|
4341
|
-
Id: __expectString(output.Id),
|
|
4342
|
-
Name: __expectString(output.Name),
|
|
4343
|
-
ProtectionArn: __expectString(output.ProtectionArn),
|
|
4344
|
-
ResourceArn: __expectString(output.ResourceArn),
|
|
4345
|
-
} as any;
|
|
4346
|
-
};
|
|
4347
|
-
|
|
4348
|
-
const deserializeAws_json1_1ProtectionGroup = (output: any, context: __SerdeContext): ProtectionGroup => {
|
|
4349
|
-
return {
|
|
4350
|
-
Aggregation: __expectString(output.Aggregation),
|
|
4351
|
-
Members:
|
|
4352
|
-
output.Members !== undefined && output.Members !== null
|
|
4353
|
-
? deserializeAws_json1_1ProtectionGroupMembers(output.Members, context)
|
|
4354
|
-
: undefined,
|
|
4355
|
-
Pattern: __expectString(output.Pattern),
|
|
4356
|
-
ProtectionGroupArn: __expectString(output.ProtectionGroupArn),
|
|
4357
|
-
ProtectionGroupId: __expectString(output.ProtectionGroupId),
|
|
4358
|
-
ResourceType: __expectString(output.ResourceType),
|
|
4359
|
-
} as any;
|
|
4360
|
-
};
|
|
4361
|
-
|
|
4362
|
-
const deserializeAws_json1_1ProtectionGroupArbitraryPatternLimits = (
|
|
4363
|
-
output: any,
|
|
4364
|
-
context: __SerdeContext
|
|
4365
|
-
): ProtectionGroupArbitraryPatternLimits => {
|
|
4366
|
-
return {
|
|
4367
|
-
MaxMembers: __expectLong(output.MaxMembers),
|
|
4368
|
-
} as any;
|
|
4369
|
-
};
|
|
4370
|
-
|
|
4371
|
-
const deserializeAws_json1_1ProtectionGroupLimits = (output: any, context: __SerdeContext): ProtectionGroupLimits => {
|
|
4372
|
-
return {
|
|
4373
|
-
MaxProtectionGroups: __expectLong(output.MaxProtectionGroups),
|
|
4374
|
-
PatternTypeLimits:
|
|
4375
|
-
output.PatternTypeLimits !== undefined && output.PatternTypeLimits !== null
|
|
4376
|
-
? deserializeAws_json1_1ProtectionGroupPatternTypeLimits(output.PatternTypeLimits, context)
|
|
4377
|
-
: undefined,
|
|
4378
|
-
} as any;
|
|
4379
|
-
};
|
|
4380
|
-
|
|
4381
|
-
const deserializeAws_json1_1ProtectionGroupMembers = (output: any, context: __SerdeContext): string[] => {
|
|
4382
|
-
return (output || [])
|
|
4383
|
-
.filter((e: any) => e != null)
|
|
4384
|
-
.map((entry: any) => {
|
|
4385
|
-
if (entry === null) {
|
|
4386
|
-
return null as any;
|
|
4387
|
-
}
|
|
4388
|
-
return __expectString(entry) as any;
|
|
4389
|
-
});
|
|
4390
|
-
};
|
|
4391
|
-
|
|
4392
|
-
const deserializeAws_json1_1ProtectionGroupPatternTypeLimits = (
|
|
4393
|
-
output: any,
|
|
4394
|
-
context: __SerdeContext
|
|
4395
|
-
): ProtectionGroupPatternTypeLimits => {
|
|
4396
|
-
return {
|
|
4397
|
-
ArbitraryPatternLimits:
|
|
4398
|
-
output.ArbitraryPatternLimits !== undefined && output.ArbitraryPatternLimits !== null
|
|
4399
|
-
? deserializeAws_json1_1ProtectionGroupArbitraryPatternLimits(output.ArbitraryPatternLimits, context)
|
|
4400
|
-
: undefined,
|
|
4401
|
-
} as any;
|
|
4402
|
-
};
|
|
4403
|
-
|
|
4404
|
-
const deserializeAws_json1_1ProtectionGroups = (output: any, context: __SerdeContext): ProtectionGroup[] => {
|
|
4405
|
-
return (output || [])
|
|
4406
|
-
.filter((e: any) => e != null)
|
|
4407
|
-
.map((entry: any) => {
|
|
4408
|
-
if (entry === null) {
|
|
4409
|
-
return null as any;
|
|
4410
|
-
}
|
|
4411
|
-
return deserializeAws_json1_1ProtectionGroup(entry, context);
|
|
4412
|
-
});
|
|
4413
|
-
};
|
|
4414
|
-
|
|
4415
|
-
const deserializeAws_json1_1ProtectionLimits = (output: any, context: __SerdeContext): ProtectionLimits => {
|
|
4416
|
-
return {
|
|
4417
|
-
ProtectedResourceTypeLimits:
|
|
4418
|
-
output.ProtectedResourceTypeLimits !== undefined && output.ProtectedResourceTypeLimits !== null
|
|
4419
|
-
? deserializeAws_json1_1Limits(output.ProtectedResourceTypeLimits, context)
|
|
4420
|
-
: undefined,
|
|
4421
|
-
} as any;
|
|
4422
|
-
};
|
|
4423
|
-
|
|
4424
|
-
const deserializeAws_json1_1Protections = (output: any, context: __SerdeContext): Protection[] => {
|
|
4425
|
-
return (output || [])
|
|
4426
|
-
.filter((e: any) => e != null)
|
|
4427
|
-
.map((entry: any) => {
|
|
4428
|
-
if (entry === null) {
|
|
4429
|
-
return null as any;
|
|
4430
|
-
}
|
|
4431
|
-
return deserializeAws_json1_1Protection(entry, context);
|
|
4432
|
-
});
|
|
4433
|
-
};
|
|
4434
|
-
|
|
4435
|
-
const deserializeAws_json1_1ResourceAlreadyExistsException = (
|
|
4436
|
-
output: any,
|
|
4437
|
-
context: __SerdeContext
|
|
4438
|
-
): ResourceAlreadyExistsException => {
|
|
4439
|
-
return {
|
|
4440
|
-
message: __expectString(output.message),
|
|
4441
|
-
resourceType: __expectString(output.resourceType),
|
|
4442
|
-
} as any;
|
|
4443
|
-
};
|
|
4444
|
-
|
|
4445
|
-
const deserializeAws_json1_1ResourceArnList = (output: any, context: __SerdeContext): string[] => {
|
|
4446
|
-
return (output || [])
|
|
4447
|
-
.filter((e: any) => e != null)
|
|
4448
|
-
.map((entry: any) => {
|
|
4449
|
-
if (entry === null) {
|
|
4450
|
-
return null as any;
|
|
4451
|
-
}
|
|
4452
|
-
return __expectString(entry) as any;
|
|
4453
|
-
});
|
|
4454
|
-
};
|
|
4455
|
-
|
|
4456
|
-
const deserializeAws_json1_1ResourceNotFoundException = (
|
|
4457
|
-
output: any,
|
|
4458
|
-
context: __SerdeContext
|
|
4459
|
-
): ResourceNotFoundException => {
|
|
4460
|
-
return {
|
|
4461
|
-
message: __expectString(output.message),
|
|
4462
|
-
resourceType: __expectString(output.resourceType),
|
|
4463
|
-
} as any;
|
|
4464
|
-
};
|
|
4465
|
-
|
|
4466
|
-
const deserializeAws_json1_1SubResourceSummary = (output: any, context: __SerdeContext): SubResourceSummary => {
|
|
4467
|
-
return {
|
|
4468
|
-
AttackVectors:
|
|
4469
|
-
output.AttackVectors !== undefined && output.AttackVectors !== null
|
|
4470
|
-
? deserializeAws_json1_1SummarizedAttackVectorList(output.AttackVectors, context)
|
|
4471
|
-
: undefined,
|
|
4472
|
-
Counters:
|
|
4473
|
-
output.Counters !== undefined && output.Counters !== null
|
|
4474
|
-
? deserializeAws_json1_1SummarizedCounterList(output.Counters, context)
|
|
4475
|
-
: undefined,
|
|
4476
|
-
Id: __expectString(output.Id),
|
|
4477
|
-
Type: __expectString(output.Type),
|
|
4478
|
-
} as any;
|
|
4479
|
-
};
|
|
4480
|
-
|
|
4481
|
-
const deserializeAws_json1_1SubResourceSummaryList = (output: any, context: __SerdeContext): SubResourceSummary[] => {
|
|
4482
|
-
return (output || [])
|
|
4483
|
-
.filter((e: any) => e != null)
|
|
4484
|
-
.map((entry: any) => {
|
|
4485
|
-
if (entry === null) {
|
|
4486
|
-
return null as any;
|
|
4487
|
-
}
|
|
4488
|
-
return deserializeAws_json1_1SubResourceSummary(entry, context);
|
|
4489
|
-
});
|
|
4490
|
-
};
|
|
4491
|
-
|
|
4492
|
-
const deserializeAws_json1_1Subscription = (output: any, context: __SerdeContext): Subscription => {
|
|
4493
|
-
return {
|
|
4494
|
-
AutoRenew: __expectString(output.AutoRenew),
|
|
4495
|
-
EndTime:
|
|
4496
|
-
output.EndTime !== undefined && output.EndTime !== null
|
|
4497
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime)))
|
|
4498
|
-
: undefined,
|
|
4499
|
-
Limits:
|
|
4500
|
-
output.Limits !== undefined && output.Limits !== null
|
|
4501
|
-
? deserializeAws_json1_1Limits(output.Limits, context)
|
|
4502
|
-
: undefined,
|
|
4503
|
-
ProactiveEngagementStatus: __expectString(output.ProactiveEngagementStatus),
|
|
4504
|
-
StartTime:
|
|
4505
|
-
output.StartTime !== undefined && output.StartTime !== null
|
|
4506
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime)))
|
|
4507
|
-
: undefined,
|
|
4508
|
-
SubscriptionArn: __expectString(output.SubscriptionArn),
|
|
4509
|
-
SubscriptionLimits:
|
|
4510
|
-
output.SubscriptionLimits !== undefined && output.SubscriptionLimits !== null
|
|
4511
|
-
? deserializeAws_json1_1SubscriptionLimits(output.SubscriptionLimits, context)
|
|
4512
|
-
: undefined,
|
|
4513
|
-
TimeCommitmentInSeconds: __expectLong(output.TimeCommitmentInSeconds),
|
|
4514
|
-
} as any;
|
|
4515
|
-
};
|
|
4516
|
-
|
|
4517
|
-
const deserializeAws_json1_1SubscriptionLimits = (output: any, context: __SerdeContext): SubscriptionLimits => {
|
|
4518
|
-
return {
|
|
4519
|
-
ProtectionGroupLimits:
|
|
4520
|
-
output.ProtectionGroupLimits !== undefined && output.ProtectionGroupLimits !== null
|
|
4521
|
-
? deserializeAws_json1_1ProtectionGroupLimits(output.ProtectionGroupLimits, context)
|
|
4522
|
-
: undefined,
|
|
4523
|
-
ProtectionLimits:
|
|
4524
|
-
output.ProtectionLimits !== undefined && output.ProtectionLimits !== null
|
|
4525
|
-
? deserializeAws_json1_1ProtectionLimits(output.ProtectionLimits, context)
|
|
4526
|
-
: undefined,
|
|
4527
|
-
} as any;
|
|
4528
|
-
};
|
|
4529
|
-
|
|
4530
|
-
const deserializeAws_json1_1SummarizedAttackVector = (output: any, context: __SerdeContext): SummarizedAttackVector => {
|
|
4531
|
-
return {
|
|
4532
|
-
VectorCounters:
|
|
4533
|
-
output.VectorCounters !== undefined && output.VectorCounters !== null
|
|
4534
|
-
? deserializeAws_json1_1SummarizedCounterList(output.VectorCounters, context)
|
|
4535
|
-
: undefined,
|
|
4536
|
-
VectorType: __expectString(output.VectorType),
|
|
4537
|
-
} as any;
|
|
4538
|
-
};
|
|
4539
|
-
|
|
4540
|
-
const deserializeAws_json1_1SummarizedAttackVectorList = (
|
|
4541
|
-
output: any,
|
|
4542
|
-
context: __SerdeContext
|
|
4543
|
-
): SummarizedAttackVector[] => {
|
|
4544
|
-
return (output || [])
|
|
4545
|
-
.filter((e: any) => e != null)
|
|
4546
|
-
.map((entry: any) => {
|
|
4547
|
-
if (entry === null) {
|
|
4548
|
-
return null as any;
|
|
4549
|
-
}
|
|
4550
|
-
return deserializeAws_json1_1SummarizedAttackVector(entry, context);
|
|
4551
|
-
});
|
|
4552
|
-
};
|
|
4553
|
-
|
|
4554
|
-
const deserializeAws_json1_1SummarizedCounter = (output: any, context: __SerdeContext): SummarizedCounter => {
|
|
4555
|
-
return {
|
|
4556
|
-
Average: __limitedParseDouble(output.Average),
|
|
4557
|
-
Max: __limitedParseDouble(output.Max),
|
|
4558
|
-
N: __expectInt32(output.N),
|
|
4559
|
-
Name: __expectString(output.Name),
|
|
4560
|
-
Sum: __limitedParseDouble(output.Sum),
|
|
4561
|
-
Unit: __expectString(output.Unit),
|
|
4562
|
-
} as any;
|
|
4563
|
-
};
|
|
4564
|
-
|
|
4565
|
-
const deserializeAws_json1_1SummarizedCounterList = (output: any, context: __SerdeContext): SummarizedCounter[] => {
|
|
4566
|
-
return (output || [])
|
|
4567
|
-
.filter((e: any) => e != null)
|
|
4568
|
-
.map((entry: any) => {
|
|
4569
|
-
if (entry === null) {
|
|
4570
|
-
return null as any;
|
|
4571
|
-
}
|
|
4572
|
-
return deserializeAws_json1_1SummarizedCounter(entry, context);
|
|
4573
|
-
});
|
|
4574
|
-
};
|
|
4575
|
-
|
|
4576
|
-
const deserializeAws_json1_1Tag = (output: any, context: __SerdeContext): Tag => {
|
|
4577
|
-
return {
|
|
4578
|
-
Key: __expectString(output.Key),
|
|
4579
|
-
Value: __expectString(output.Value),
|
|
4580
|
-
} as any;
|
|
4581
|
-
};
|
|
4582
|
-
|
|
4583
|
-
const deserializeAws_json1_1TagList = (output: any, context: __SerdeContext): Tag[] => {
|
|
4584
|
-
return (output || [])
|
|
4585
|
-
.filter((e: any) => e != null)
|
|
4586
|
-
.map((entry: any) => {
|
|
4587
|
-
if (entry === null) {
|
|
4588
|
-
return null as any;
|
|
4589
|
-
}
|
|
4590
|
-
return deserializeAws_json1_1Tag(entry, context);
|
|
4591
|
-
});
|
|
4592
|
-
};
|
|
4593
|
-
|
|
4594
|
-
const deserializeAws_json1_1TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => {
|
|
4595
|
-
return {} as any;
|
|
4596
|
-
};
|
|
4597
|
-
|
|
4598
|
-
const deserializeAws_json1_1TimeRange = (output: any, context: __SerdeContext): TimeRange => {
|
|
4599
|
-
return {
|
|
4600
|
-
FromInclusive:
|
|
4601
|
-
output.FromInclusive !== undefined && output.FromInclusive !== null
|
|
4602
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.FromInclusive)))
|
|
4603
|
-
: undefined,
|
|
4604
|
-
ToExclusive:
|
|
4605
|
-
output.ToExclusive !== undefined && output.ToExclusive !== null
|
|
4606
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ToExclusive)))
|
|
4607
|
-
: undefined,
|
|
4608
|
-
} as any;
|
|
4609
|
-
};
|
|
4610
|
-
|
|
4611
|
-
const deserializeAws_json1_1TopContributors = (output: any, context: __SerdeContext): Contributor[] => {
|
|
4612
|
-
return (output || [])
|
|
4613
|
-
.filter((e: any) => e != null)
|
|
4614
|
-
.map((entry: any) => {
|
|
4615
|
-
if (entry === null) {
|
|
4616
|
-
return null as any;
|
|
4617
|
-
}
|
|
4618
|
-
return deserializeAws_json1_1Contributor(entry, context);
|
|
4619
|
-
});
|
|
4620
|
-
};
|
|
4621
|
-
|
|
4622
|
-
const deserializeAws_json1_1UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => {
|
|
4623
|
-
return {} as any;
|
|
4624
|
-
};
|
|
4625
|
-
|
|
4626
|
-
const deserializeAws_json1_1UpdateEmergencyContactSettingsResponse = (
|
|
4627
|
-
output: any,
|
|
4628
|
-
context: __SerdeContext
|
|
4629
|
-
): UpdateEmergencyContactSettingsResponse => {
|
|
4630
|
-
return {} as any;
|
|
4631
|
-
};
|
|
4632
|
-
|
|
4633
|
-
const deserializeAws_json1_1UpdateProtectionGroupResponse = (
|
|
4634
|
-
output: any,
|
|
4635
|
-
context: __SerdeContext
|
|
4636
|
-
): UpdateProtectionGroupResponse => {
|
|
4637
|
-
return {} as any;
|
|
4638
|
-
};
|
|
4639
|
-
|
|
4640
|
-
const deserializeAws_json1_1UpdateSubscriptionResponse = (
|
|
4641
|
-
output: any,
|
|
4642
|
-
context: __SerdeContext
|
|
4643
|
-
): UpdateSubscriptionResponse => {
|
|
4644
|
-
return {} as any;
|
|
4645
|
-
};
|
|
4646
|
-
|
|
4647
|
-
const deserializeAws_json1_1ValidationExceptionField = (
|
|
4648
|
-
output: any,
|
|
4649
|
-
context: __SerdeContext
|
|
4650
|
-
): ValidationExceptionField => {
|
|
4651
|
-
return {
|
|
4652
|
-
message: __expectString(output.message),
|
|
4653
|
-
name: __expectString(output.name),
|
|
4654
|
-
} as any;
|
|
4655
|
-
};
|
|
4656
|
-
|
|
4657
|
-
const deserializeAws_json1_1ValidationExceptionFieldList = (
|
|
4658
|
-
output: any,
|
|
4659
|
-
context: __SerdeContext
|
|
4660
|
-
): ValidationExceptionField[] => {
|
|
4661
|
-
return (output || [])
|
|
4662
|
-
.filter((e: any) => e != null)
|
|
4663
|
-
.map((entry: any) => {
|
|
4664
|
-
if (entry === null) {
|
|
4665
|
-
return null as any;
|
|
4666
|
-
}
|
|
4667
|
-
return deserializeAws_json1_1ValidationExceptionField(entry, context);
|
|
4668
|
-
});
|
|
4669
|
-
};
|
|
4670
|
-
|
|
4671
|
-
const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({
|
|
4672
|
-
httpStatusCode: output.statusCode,
|
|
4673
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
|
|
4674
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
4675
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
4676
|
-
});
|
|
4677
|
-
|
|
4678
|
-
// Collect low-level response body stream to Uint8Array.
|
|
4679
|
-
const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext): Promise<Uint8Array> => {
|
|
4680
|
-
if (streamBody instanceof Uint8Array) {
|
|
4681
|
-
return Promise.resolve(streamBody);
|
|
4682
|
-
}
|
|
4683
|
-
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
4684
|
-
};
|
|
4685
|
-
|
|
4686
|
-
// Encode Uint8Array data into string with utf-8.
|
|
4687
|
-
const collectBodyString = (streamBody: any, context: __SerdeContext): Promise<string> =>
|
|
4688
|
-
collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
4689
|
-
|
|
4690
|
-
const buildHttpRpcRequest = async (
|
|
4691
|
-
context: __SerdeContext,
|
|
4692
|
-
headers: __HeaderBag,
|
|
4693
|
-
path: string,
|
|
4694
|
-
resolvedHostname: string | undefined,
|
|
4695
|
-
body: any
|
|
4696
|
-
): Promise<__HttpRequest> => {
|
|
4697
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
4698
|
-
const contents: any = {
|
|
4699
|
-
protocol,
|
|
4700
|
-
hostname,
|
|
4701
|
-
port,
|
|
4702
|
-
method: "POST",
|
|
4703
|
-
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
4704
|
-
headers,
|
|
4705
|
-
};
|
|
4706
|
-
if (resolvedHostname !== undefined) {
|
|
4707
|
-
contents.hostname = resolvedHostname;
|
|
4708
|
-
}
|
|
4709
|
-
if (body !== undefined) {
|
|
4710
|
-
contents.body = body;
|
|
4711
|
-
}
|
|
4712
|
-
return new __HttpRequest(contents);
|
|
4713
|
-
};
|
|
4714
|
-
|
|
4715
|
-
const parseBody = (streamBody: any, context: __SerdeContext): any =>
|
|
4716
|
-
collectBodyString(streamBody, context).then((encoded) => {
|
|
4717
|
-
if (encoded.length) {
|
|
4718
|
-
return JSON.parse(encoded);
|
|
4719
|
-
}
|
|
4720
|
-
return {};
|
|
4721
|
-
});
|
|
4722
|
-
|
|
4723
|
-
/**
|
|
4724
|
-
* Load an error code for the aws.rest-json-1.1 protocol.
|
|
4725
|
-
*/
|
|
4726
|
-
const loadRestJsonErrorCode = (output: __HttpResponse, data: any): string => {
|
|
4727
|
-
const findKey = (object: any, key: string) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
4728
|
-
|
|
4729
|
-
const sanitizeErrorCode = (rawValue: string): string => {
|
|
4730
|
-
let cleanValue = rawValue;
|
|
4731
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
4732
|
-
cleanValue = cleanValue.split(":")[0];
|
|
4733
|
-
}
|
|
4734
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
4735
|
-
cleanValue = cleanValue.split("#")[1];
|
|
4736
|
-
}
|
|
4737
|
-
return cleanValue;
|
|
4738
|
-
};
|
|
4739
|
-
|
|
4740
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
4741
|
-
if (headerKey !== undefined) {
|
|
4742
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
4743
|
-
}
|
|
4744
|
-
|
|
4745
|
-
if (data.code !== undefined) {
|
|
4746
|
-
return sanitizeErrorCode(data.code);
|
|
4747
|
-
}
|
|
4748
|
-
|
|
4749
|
-
if (data["__type"] !== undefined) {
|
|
4750
|
-
return sanitizeErrorCode(data["__type"]);
|
|
4751
|
-
}
|
|
4752
|
-
|
|
4753
|
-
return "";
|
|
4754
|
-
};
|