@aws-sdk/client-migration-hub 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/MigrationHub.js +0 -9
- package/dist-cjs/MigrationHubClient.js +0 -14
- package/dist-cjs/commands/AssociateCreatedArtifactCommand.js +0 -42
- package/dist-cjs/commands/AssociateDiscoveredResourceCommand.js +0 -26
- package/dist-cjs/commands/CreateProgressUpdateStreamCommand.js +0 -29
- package/dist-cjs/commands/DeleteProgressUpdateStreamCommand.js +0 -55
- package/dist-cjs/commands/DescribeApplicationStateCommand.js +0 -25
- package/dist-cjs/commands/DescribeMigrationTaskCommand.js +0 -25
- package/dist-cjs/commands/DisassociateCreatedArtifactCommand.js +0 -41
- package/dist-cjs/commands/DisassociateDiscoveredResourceCommand.js +0 -26
- package/dist-cjs/commands/ImportMigrationTaskCommand.js +0 -28
- package/dist-cjs/commands/ListApplicationStatesCommand.js +0 -27
- package/dist-cjs/commands/ListCreatedArtifactsCommand.js +0 -39
- package/dist-cjs/commands/ListDiscoveredResourcesCommand.js +0 -25
- package/dist-cjs/commands/ListMigrationTasksCommand.js +0 -38
- package/dist-cjs/commands/ListProgressUpdateStreamsCommand.js +0 -25
- package/dist-cjs/commands/NotifyApplicationStateCommand.js +0 -28
- package/dist-cjs/commands/NotifyMigrationTaskStateCommand.js +0 -42
- package/dist-cjs/commands/PutResourceAttributesCommand.js +0 -50
- package/dist-cjs/commands/index.js +20 -0
- package/dist-cjs/endpoints.js +1 -2
- package/dist-cjs/index.js +4 -26
- package/dist-cjs/models/index.js +0 -1
- package/dist-cjs/models/models_0.js +0 -157
- package/dist-cjs/pagination/Interfaces.js +0 -1
- package/dist-cjs/pagination/ListApplicationStatesPaginator.js +0 -11
- package/dist-cjs/pagination/ListCreatedArtifactsPaginator.js +0 -11
- package/dist-cjs/pagination/ListDiscoveredResourcesPaginator.js +0 -11
- package/dist-cjs/pagination/ListMigrationTasksPaginator.js +0 -11
- package/dist-cjs/pagination/ListProgressUpdateStreamsPaginator.js +0 -11
- package/dist-cjs/pagination/index.js +9 -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/MigrationHub.js +0 -1
- package/dist-es/MigrationHubClient.js +0 -1
- package/dist-es/commands/AssociateCreatedArtifactCommand.js +0 -1
- package/dist-es/commands/AssociateDiscoveredResourceCommand.js +0 -1
- package/dist-es/commands/CreateProgressUpdateStreamCommand.js +0 -1
- package/dist-es/commands/DeleteProgressUpdateStreamCommand.js +0 -1
- package/dist-es/commands/DescribeApplicationStateCommand.js +0 -1
- package/dist-es/commands/DescribeMigrationTaskCommand.js +0 -1
- package/dist-es/commands/DisassociateCreatedArtifactCommand.js +0 -1
- package/dist-es/commands/DisassociateDiscoveredResourceCommand.js +0 -1
- package/dist-es/commands/ImportMigrationTaskCommand.js +0 -1
- package/dist-es/commands/ListApplicationStatesCommand.js +0 -1
- package/dist-es/commands/ListCreatedArtifactsCommand.js +0 -1
- package/dist-es/commands/ListDiscoveredResourcesCommand.js +0 -1
- package/dist-es/commands/ListMigrationTasksCommand.js +0 -1
- package/dist-es/commands/ListProgressUpdateStreamsCommand.js +0 -1
- package/dist-es/commands/NotifyApplicationStateCommand.js +0 -1
- package/dist-es/commands/NotifyMigrationTaskStateCommand.js +0 -1
- package/dist-es/commands/PutResourceAttributesCommand.js +0 -1
- package/dist-es/commands/index.js +17 -0
- package/dist-es/endpoints.js +1 -2
- package/dist-es/index.js +4 -26
- 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/ListApplicationStatesPaginator.js +0 -1
- package/dist-es/pagination/ListCreatedArtifactsPaginator.js +0 -1
- package/dist-es/pagination/ListDiscoveredResourcesPaginator.js +0 -1
- package/dist-es/pagination/ListMigrationTasksPaginator.js +0 -1
- package/dist-es/pagination/ListProgressUpdateStreamsPaginator.js +0 -1
- package/dist-es/pagination/index.js +6 -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 +17 -0
- package/dist-types/index.d.ts +4 -25
- package/dist-types/pagination/index.d.ts +6 -0
- package/dist-types/ts3.4/MigrationHub.d.ts +18 -205
- package/dist-types/ts3.4/MigrationHubClient.d.ts +24 -94
- package/dist-types/ts3.4/commands/AssociateCreatedArtifactCommand.d.ts +2 -37
- package/dist-types/ts3.4/commands/AssociateDiscoveredResourceCommand.d.ts +2 -21
- package/dist-types/ts3.4/commands/CreateProgressUpdateStreamCommand.d.ts +2 -24
- package/dist-types/ts3.4/commands/DeleteProgressUpdateStreamCommand.d.ts +2 -50
- package/dist-types/ts3.4/commands/DescribeApplicationStateCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/DescribeMigrationTaskCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/DisassociateCreatedArtifactCommand.d.ts +2 -36
- package/dist-types/ts3.4/commands/DisassociateDiscoveredResourceCommand.d.ts +2 -21
- package/dist-types/ts3.4/commands/ImportMigrationTaskCommand.d.ts +2 -23
- package/dist-types/ts3.4/commands/ListApplicationStatesCommand.d.ts +2 -22
- package/dist-types/ts3.4/commands/ListCreatedArtifactsCommand.d.ts +2 -34
- package/dist-types/ts3.4/commands/ListDiscoveredResourcesCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/ListMigrationTasksCommand.d.ts +2 -33
- package/dist-types/ts3.4/commands/ListProgressUpdateStreamsCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/NotifyApplicationStateCommand.d.ts +2 -23
- package/dist-types/ts3.4/commands/NotifyMigrationTaskStateCommand.d.ts +2 -37
- package/dist-types/ts3.4/commands/PutResourceAttributesCommand.d.ts +2 -45
- package/dist-types/ts3.4/commands/index.d.ts +17 -0
- package/dist-types/ts3.4/index.d.ts +4 -25
- package/dist-types/ts3.4/models/models_0.d.ts +165 -648
- package/dist-types/ts3.4/pagination/index.d.ts +6 -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/MigrationHub.js.map +0 -1
- package/dist-cjs/MigrationHubClient.js.map +0 -1
- package/dist-cjs/commands/AssociateCreatedArtifactCommand.js.map +0 -1
- package/dist-cjs/commands/AssociateDiscoveredResourceCommand.js.map +0 -1
- package/dist-cjs/commands/CreateProgressUpdateStreamCommand.js.map +0 -1
- package/dist-cjs/commands/DeleteProgressUpdateStreamCommand.js.map +0 -1
- package/dist-cjs/commands/DescribeApplicationStateCommand.js.map +0 -1
- package/dist-cjs/commands/DescribeMigrationTaskCommand.js.map +0 -1
- package/dist-cjs/commands/DisassociateCreatedArtifactCommand.js.map +0 -1
- package/dist-cjs/commands/DisassociateDiscoveredResourceCommand.js.map +0 -1
- package/dist-cjs/commands/ImportMigrationTaskCommand.js.map +0 -1
- package/dist-cjs/commands/ListApplicationStatesCommand.js.map +0 -1
- package/dist-cjs/commands/ListCreatedArtifactsCommand.js.map +0 -1
- package/dist-cjs/commands/ListDiscoveredResourcesCommand.js.map +0 -1
- package/dist-cjs/commands/ListMigrationTasksCommand.js.map +0 -1
- package/dist-cjs/commands/ListProgressUpdateStreamsCommand.js.map +0 -1
- package/dist-cjs/commands/NotifyApplicationStateCommand.js.map +0 -1
- package/dist-cjs/commands/NotifyMigrationTaskStateCommand.js.map +0 -1
- package/dist-cjs/commands/PutResourceAttributesCommand.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/ListApplicationStatesPaginator.js.map +0 -1
- package/dist-cjs/pagination/ListCreatedArtifactsPaginator.js.map +0 -1
- package/dist-cjs/pagination/ListDiscoveredResourcesPaginator.js.map +0 -1
- package/dist-cjs/pagination/ListMigrationTasksPaginator.js.map +0 -1
- package/dist-cjs/pagination/ListProgressUpdateStreamsPaginator.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/MigrationHub.js.map +0 -1
- package/dist-es/MigrationHubClient.js.map +0 -1
- package/dist-es/commands/AssociateCreatedArtifactCommand.js.map +0 -1
- package/dist-es/commands/AssociateDiscoveredResourceCommand.js.map +0 -1
- package/dist-es/commands/CreateProgressUpdateStreamCommand.js.map +0 -1
- package/dist-es/commands/DeleteProgressUpdateStreamCommand.js.map +0 -1
- package/dist-es/commands/DescribeApplicationStateCommand.js.map +0 -1
- package/dist-es/commands/DescribeMigrationTaskCommand.js.map +0 -1
- package/dist-es/commands/DisassociateCreatedArtifactCommand.js.map +0 -1
- package/dist-es/commands/DisassociateDiscoveredResourceCommand.js.map +0 -1
- package/dist-es/commands/ImportMigrationTaskCommand.js.map +0 -1
- package/dist-es/commands/ListApplicationStatesCommand.js.map +0 -1
- package/dist-es/commands/ListCreatedArtifactsCommand.js.map +0 -1
- package/dist-es/commands/ListDiscoveredResourcesCommand.js.map +0 -1
- package/dist-es/commands/ListMigrationTasksCommand.js.map +0 -1
- package/dist-es/commands/ListProgressUpdateStreamsCommand.js.map +0 -1
- package/dist-es/commands/NotifyApplicationStateCommand.js.map +0 -1
- package/dist-es/commands/NotifyMigrationTaskStateCommand.js.map +0 -1
- package/dist-es/commands/PutResourceAttributesCommand.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/ListApplicationStatesPaginator.js.map +0 -1
- package/dist-es/pagination/ListCreatedArtifactsPaginator.js.map +0 -1
- package/dist-es/pagination/ListDiscoveredResourcesPaginator.js.map +0 -1
- package/dist-es/pagination/ListMigrationTasksPaginator.js.map +0 -1
- package/dist-es/pagination/ListProgressUpdateStreamsPaginator.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/MigrationHub.ts +0 -788
- package/src/MigrationHubClient.ts +0 -340
- package/src/commands/AssociateCreatedArtifactCommand.ts +0 -112
- package/src/commands/AssociateDiscoveredResourceCommand.ts +0 -99
- package/src/commands/CreateProgressUpdateStreamCommand.ts +0 -102
- package/src/commands/DeleteProgressUpdateStreamCommand.ts +0 -128
- package/src/commands/DescribeApplicationStateCommand.ts +0 -95
- package/src/commands/DescribeMigrationTaskCommand.ts +0 -95
- package/src/commands/DisassociateCreatedArtifactCommand.ts +0 -114
- package/src/commands/DisassociateDiscoveredResourceCommand.ts +0 -104
- package/src/commands/ImportMigrationTaskCommand.ts +0 -98
- package/src/commands/ListApplicationStatesCommand.ts +0 -97
- package/src/commands/ListCreatedArtifactsCommand.ts +0 -109
- package/src/commands/ListDiscoveredResourcesCommand.ts +0 -95
- package/src/commands/ListMigrationTasksCommand.ts +0 -108
- package/src/commands/ListProgressUpdateStreamsCommand.ts +0 -98
- package/src/commands/NotifyApplicationStateCommand.ts +0 -98
- package/src/commands/NotifyMigrationTaskStateCommand.ts +0 -112
- package/src/commands/PutResourceAttributesCommand.ts +0 -120
- package/src/endpoints.ts +0 -57
- package/src/index.ts +0 -26
- package/src/models/index.ts +0 -1
- package/src/models/models_0.ts +0 -1319
- package/src/pagination/Interfaces.ts +0 -8
- package/src/pagination/ListApplicationStatesPaginator.ts +0 -59
- package/src/pagination/ListCreatedArtifactsPaginator.ts +0 -59
- package/src/pagination/ListDiscoveredResourcesPaginator.ts +0 -59
- package/src/pagination/ListMigrationTasksPaginator.ts +0 -59
- package/src/pagination/ListProgressUpdateStreamsPaginator.ts +0 -59
- package/src/protocols/Aws_json1_1.ts +0 -3163
- 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,3163 +0,0 @@
|
|
|
1
|
-
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
|
|
2
|
-
import {
|
|
3
|
-
expectInt32 as __expectInt32,
|
|
4
|
-
expectNonNull as __expectNonNull,
|
|
5
|
-
expectNumber as __expectNumber,
|
|
6
|
-
expectString as __expectString,
|
|
7
|
-
parseEpochTimestamp as __parseEpochTimestamp,
|
|
8
|
-
} from "@aws-sdk/smithy-client";
|
|
9
|
-
import {
|
|
10
|
-
Endpoint as __Endpoint,
|
|
11
|
-
HeaderBag as __HeaderBag,
|
|
12
|
-
MetadataBearer as __MetadataBearer,
|
|
13
|
-
ResponseMetadata as __ResponseMetadata,
|
|
14
|
-
SerdeContext as __SerdeContext,
|
|
15
|
-
SmithyException as __SmithyException,
|
|
16
|
-
} from "@aws-sdk/types";
|
|
17
|
-
|
|
18
|
-
import {
|
|
19
|
-
AssociateCreatedArtifactCommandInput,
|
|
20
|
-
AssociateCreatedArtifactCommandOutput,
|
|
21
|
-
} from "../commands/AssociateCreatedArtifactCommand";
|
|
22
|
-
import {
|
|
23
|
-
AssociateDiscoveredResourceCommandInput,
|
|
24
|
-
AssociateDiscoveredResourceCommandOutput,
|
|
25
|
-
} from "../commands/AssociateDiscoveredResourceCommand";
|
|
26
|
-
import {
|
|
27
|
-
CreateProgressUpdateStreamCommandInput,
|
|
28
|
-
CreateProgressUpdateStreamCommandOutput,
|
|
29
|
-
} from "../commands/CreateProgressUpdateStreamCommand";
|
|
30
|
-
import {
|
|
31
|
-
DeleteProgressUpdateStreamCommandInput,
|
|
32
|
-
DeleteProgressUpdateStreamCommandOutput,
|
|
33
|
-
} from "../commands/DeleteProgressUpdateStreamCommand";
|
|
34
|
-
import {
|
|
35
|
-
DescribeApplicationStateCommandInput,
|
|
36
|
-
DescribeApplicationStateCommandOutput,
|
|
37
|
-
} from "../commands/DescribeApplicationStateCommand";
|
|
38
|
-
import {
|
|
39
|
-
DescribeMigrationTaskCommandInput,
|
|
40
|
-
DescribeMigrationTaskCommandOutput,
|
|
41
|
-
} from "../commands/DescribeMigrationTaskCommand";
|
|
42
|
-
import {
|
|
43
|
-
DisassociateCreatedArtifactCommandInput,
|
|
44
|
-
DisassociateCreatedArtifactCommandOutput,
|
|
45
|
-
} from "../commands/DisassociateCreatedArtifactCommand";
|
|
46
|
-
import {
|
|
47
|
-
DisassociateDiscoveredResourceCommandInput,
|
|
48
|
-
DisassociateDiscoveredResourceCommandOutput,
|
|
49
|
-
} from "../commands/DisassociateDiscoveredResourceCommand";
|
|
50
|
-
import {
|
|
51
|
-
ImportMigrationTaskCommandInput,
|
|
52
|
-
ImportMigrationTaskCommandOutput,
|
|
53
|
-
} from "../commands/ImportMigrationTaskCommand";
|
|
54
|
-
import {
|
|
55
|
-
ListApplicationStatesCommandInput,
|
|
56
|
-
ListApplicationStatesCommandOutput,
|
|
57
|
-
} from "../commands/ListApplicationStatesCommand";
|
|
58
|
-
import {
|
|
59
|
-
ListCreatedArtifactsCommandInput,
|
|
60
|
-
ListCreatedArtifactsCommandOutput,
|
|
61
|
-
} from "../commands/ListCreatedArtifactsCommand";
|
|
62
|
-
import {
|
|
63
|
-
ListDiscoveredResourcesCommandInput,
|
|
64
|
-
ListDiscoveredResourcesCommandOutput,
|
|
65
|
-
} from "../commands/ListDiscoveredResourcesCommand";
|
|
66
|
-
import { ListMigrationTasksCommandInput, ListMigrationTasksCommandOutput } from "../commands/ListMigrationTasksCommand";
|
|
67
|
-
import {
|
|
68
|
-
ListProgressUpdateStreamsCommandInput,
|
|
69
|
-
ListProgressUpdateStreamsCommandOutput,
|
|
70
|
-
} from "../commands/ListProgressUpdateStreamsCommand";
|
|
71
|
-
import {
|
|
72
|
-
NotifyApplicationStateCommandInput,
|
|
73
|
-
NotifyApplicationStateCommandOutput,
|
|
74
|
-
} from "../commands/NotifyApplicationStateCommand";
|
|
75
|
-
import {
|
|
76
|
-
NotifyMigrationTaskStateCommandInput,
|
|
77
|
-
NotifyMigrationTaskStateCommandOutput,
|
|
78
|
-
} from "../commands/NotifyMigrationTaskStateCommand";
|
|
79
|
-
import {
|
|
80
|
-
PutResourceAttributesCommandInput,
|
|
81
|
-
PutResourceAttributesCommandOutput,
|
|
82
|
-
} from "../commands/PutResourceAttributesCommand";
|
|
83
|
-
import {
|
|
84
|
-
AccessDeniedException,
|
|
85
|
-
ApplicationState,
|
|
86
|
-
AssociateCreatedArtifactRequest,
|
|
87
|
-
AssociateCreatedArtifactResult,
|
|
88
|
-
AssociateDiscoveredResourceRequest,
|
|
89
|
-
AssociateDiscoveredResourceResult,
|
|
90
|
-
CreatedArtifact,
|
|
91
|
-
CreateProgressUpdateStreamRequest,
|
|
92
|
-
CreateProgressUpdateStreamResult,
|
|
93
|
-
DeleteProgressUpdateStreamRequest,
|
|
94
|
-
DeleteProgressUpdateStreamResult,
|
|
95
|
-
DescribeApplicationStateRequest,
|
|
96
|
-
DescribeApplicationStateResult,
|
|
97
|
-
DescribeMigrationTaskRequest,
|
|
98
|
-
DescribeMigrationTaskResult,
|
|
99
|
-
DisassociateCreatedArtifactRequest,
|
|
100
|
-
DisassociateCreatedArtifactResult,
|
|
101
|
-
DisassociateDiscoveredResourceRequest,
|
|
102
|
-
DisassociateDiscoveredResourceResult,
|
|
103
|
-
DiscoveredResource,
|
|
104
|
-
DryRunOperation,
|
|
105
|
-
HomeRegionNotSetException,
|
|
106
|
-
ImportMigrationTaskRequest,
|
|
107
|
-
ImportMigrationTaskResult,
|
|
108
|
-
InternalServerError,
|
|
109
|
-
InvalidInputException,
|
|
110
|
-
ListApplicationStatesRequest,
|
|
111
|
-
ListApplicationStatesResult,
|
|
112
|
-
ListCreatedArtifactsRequest,
|
|
113
|
-
ListCreatedArtifactsResult,
|
|
114
|
-
ListDiscoveredResourcesRequest,
|
|
115
|
-
ListDiscoveredResourcesResult,
|
|
116
|
-
ListMigrationTasksRequest,
|
|
117
|
-
ListMigrationTasksResult,
|
|
118
|
-
ListProgressUpdateStreamsRequest,
|
|
119
|
-
ListProgressUpdateStreamsResult,
|
|
120
|
-
MigrationTask,
|
|
121
|
-
MigrationTaskSummary,
|
|
122
|
-
NotifyApplicationStateRequest,
|
|
123
|
-
NotifyApplicationStateResult,
|
|
124
|
-
NotifyMigrationTaskStateRequest,
|
|
125
|
-
NotifyMigrationTaskStateResult,
|
|
126
|
-
PolicyErrorException,
|
|
127
|
-
ProgressUpdateStreamSummary,
|
|
128
|
-
PutResourceAttributesRequest,
|
|
129
|
-
PutResourceAttributesResult,
|
|
130
|
-
ResourceAttribute,
|
|
131
|
-
ResourceNotFoundException,
|
|
132
|
-
ServiceUnavailableException,
|
|
133
|
-
Task,
|
|
134
|
-
ThrottlingException,
|
|
135
|
-
UnauthorizedOperation,
|
|
136
|
-
} from "../models/models_0";
|
|
137
|
-
|
|
138
|
-
export const serializeAws_json1_1AssociateCreatedArtifactCommand = async (
|
|
139
|
-
input: AssociateCreatedArtifactCommandInput,
|
|
140
|
-
context: __SerdeContext
|
|
141
|
-
): Promise<__HttpRequest> => {
|
|
142
|
-
const headers: __HeaderBag = {
|
|
143
|
-
"content-type": "application/x-amz-json-1.1",
|
|
144
|
-
"x-amz-target": "AWSMigrationHub.AssociateCreatedArtifact",
|
|
145
|
-
};
|
|
146
|
-
let body: any;
|
|
147
|
-
body = JSON.stringify(serializeAws_json1_1AssociateCreatedArtifactRequest(input, context));
|
|
148
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
149
|
-
};
|
|
150
|
-
|
|
151
|
-
export const serializeAws_json1_1AssociateDiscoveredResourceCommand = async (
|
|
152
|
-
input: AssociateDiscoveredResourceCommandInput,
|
|
153
|
-
context: __SerdeContext
|
|
154
|
-
): Promise<__HttpRequest> => {
|
|
155
|
-
const headers: __HeaderBag = {
|
|
156
|
-
"content-type": "application/x-amz-json-1.1",
|
|
157
|
-
"x-amz-target": "AWSMigrationHub.AssociateDiscoveredResource",
|
|
158
|
-
};
|
|
159
|
-
let body: any;
|
|
160
|
-
body = JSON.stringify(serializeAws_json1_1AssociateDiscoveredResourceRequest(input, context));
|
|
161
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
162
|
-
};
|
|
163
|
-
|
|
164
|
-
export const serializeAws_json1_1CreateProgressUpdateStreamCommand = async (
|
|
165
|
-
input: CreateProgressUpdateStreamCommandInput,
|
|
166
|
-
context: __SerdeContext
|
|
167
|
-
): Promise<__HttpRequest> => {
|
|
168
|
-
const headers: __HeaderBag = {
|
|
169
|
-
"content-type": "application/x-amz-json-1.1",
|
|
170
|
-
"x-amz-target": "AWSMigrationHub.CreateProgressUpdateStream",
|
|
171
|
-
};
|
|
172
|
-
let body: any;
|
|
173
|
-
body = JSON.stringify(serializeAws_json1_1CreateProgressUpdateStreamRequest(input, context));
|
|
174
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
175
|
-
};
|
|
176
|
-
|
|
177
|
-
export const serializeAws_json1_1DeleteProgressUpdateStreamCommand = async (
|
|
178
|
-
input: DeleteProgressUpdateStreamCommandInput,
|
|
179
|
-
context: __SerdeContext
|
|
180
|
-
): Promise<__HttpRequest> => {
|
|
181
|
-
const headers: __HeaderBag = {
|
|
182
|
-
"content-type": "application/x-amz-json-1.1",
|
|
183
|
-
"x-amz-target": "AWSMigrationHub.DeleteProgressUpdateStream",
|
|
184
|
-
};
|
|
185
|
-
let body: any;
|
|
186
|
-
body = JSON.stringify(serializeAws_json1_1DeleteProgressUpdateStreamRequest(input, context));
|
|
187
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
188
|
-
};
|
|
189
|
-
|
|
190
|
-
export const serializeAws_json1_1DescribeApplicationStateCommand = async (
|
|
191
|
-
input: DescribeApplicationStateCommandInput,
|
|
192
|
-
context: __SerdeContext
|
|
193
|
-
): Promise<__HttpRequest> => {
|
|
194
|
-
const headers: __HeaderBag = {
|
|
195
|
-
"content-type": "application/x-amz-json-1.1",
|
|
196
|
-
"x-amz-target": "AWSMigrationHub.DescribeApplicationState",
|
|
197
|
-
};
|
|
198
|
-
let body: any;
|
|
199
|
-
body = JSON.stringify(serializeAws_json1_1DescribeApplicationStateRequest(input, context));
|
|
200
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
201
|
-
};
|
|
202
|
-
|
|
203
|
-
export const serializeAws_json1_1DescribeMigrationTaskCommand = async (
|
|
204
|
-
input: DescribeMigrationTaskCommandInput,
|
|
205
|
-
context: __SerdeContext
|
|
206
|
-
): Promise<__HttpRequest> => {
|
|
207
|
-
const headers: __HeaderBag = {
|
|
208
|
-
"content-type": "application/x-amz-json-1.1",
|
|
209
|
-
"x-amz-target": "AWSMigrationHub.DescribeMigrationTask",
|
|
210
|
-
};
|
|
211
|
-
let body: any;
|
|
212
|
-
body = JSON.stringify(serializeAws_json1_1DescribeMigrationTaskRequest(input, context));
|
|
213
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
214
|
-
};
|
|
215
|
-
|
|
216
|
-
export const serializeAws_json1_1DisassociateCreatedArtifactCommand = async (
|
|
217
|
-
input: DisassociateCreatedArtifactCommandInput,
|
|
218
|
-
context: __SerdeContext
|
|
219
|
-
): Promise<__HttpRequest> => {
|
|
220
|
-
const headers: __HeaderBag = {
|
|
221
|
-
"content-type": "application/x-amz-json-1.1",
|
|
222
|
-
"x-amz-target": "AWSMigrationHub.DisassociateCreatedArtifact",
|
|
223
|
-
};
|
|
224
|
-
let body: any;
|
|
225
|
-
body = JSON.stringify(serializeAws_json1_1DisassociateCreatedArtifactRequest(input, context));
|
|
226
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
227
|
-
};
|
|
228
|
-
|
|
229
|
-
export const serializeAws_json1_1DisassociateDiscoveredResourceCommand = async (
|
|
230
|
-
input: DisassociateDiscoveredResourceCommandInput,
|
|
231
|
-
context: __SerdeContext
|
|
232
|
-
): Promise<__HttpRequest> => {
|
|
233
|
-
const headers: __HeaderBag = {
|
|
234
|
-
"content-type": "application/x-amz-json-1.1",
|
|
235
|
-
"x-amz-target": "AWSMigrationHub.DisassociateDiscoveredResource",
|
|
236
|
-
};
|
|
237
|
-
let body: any;
|
|
238
|
-
body = JSON.stringify(serializeAws_json1_1DisassociateDiscoveredResourceRequest(input, context));
|
|
239
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
240
|
-
};
|
|
241
|
-
|
|
242
|
-
export const serializeAws_json1_1ImportMigrationTaskCommand = async (
|
|
243
|
-
input: ImportMigrationTaskCommandInput,
|
|
244
|
-
context: __SerdeContext
|
|
245
|
-
): Promise<__HttpRequest> => {
|
|
246
|
-
const headers: __HeaderBag = {
|
|
247
|
-
"content-type": "application/x-amz-json-1.1",
|
|
248
|
-
"x-amz-target": "AWSMigrationHub.ImportMigrationTask",
|
|
249
|
-
};
|
|
250
|
-
let body: any;
|
|
251
|
-
body = JSON.stringify(serializeAws_json1_1ImportMigrationTaskRequest(input, context));
|
|
252
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
253
|
-
};
|
|
254
|
-
|
|
255
|
-
export const serializeAws_json1_1ListApplicationStatesCommand = async (
|
|
256
|
-
input: ListApplicationStatesCommandInput,
|
|
257
|
-
context: __SerdeContext
|
|
258
|
-
): Promise<__HttpRequest> => {
|
|
259
|
-
const headers: __HeaderBag = {
|
|
260
|
-
"content-type": "application/x-amz-json-1.1",
|
|
261
|
-
"x-amz-target": "AWSMigrationHub.ListApplicationStates",
|
|
262
|
-
};
|
|
263
|
-
let body: any;
|
|
264
|
-
body = JSON.stringify(serializeAws_json1_1ListApplicationStatesRequest(input, context));
|
|
265
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
266
|
-
};
|
|
267
|
-
|
|
268
|
-
export const serializeAws_json1_1ListCreatedArtifactsCommand = async (
|
|
269
|
-
input: ListCreatedArtifactsCommandInput,
|
|
270
|
-
context: __SerdeContext
|
|
271
|
-
): Promise<__HttpRequest> => {
|
|
272
|
-
const headers: __HeaderBag = {
|
|
273
|
-
"content-type": "application/x-amz-json-1.1",
|
|
274
|
-
"x-amz-target": "AWSMigrationHub.ListCreatedArtifacts",
|
|
275
|
-
};
|
|
276
|
-
let body: any;
|
|
277
|
-
body = JSON.stringify(serializeAws_json1_1ListCreatedArtifactsRequest(input, context));
|
|
278
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
279
|
-
};
|
|
280
|
-
|
|
281
|
-
export const serializeAws_json1_1ListDiscoveredResourcesCommand = async (
|
|
282
|
-
input: ListDiscoveredResourcesCommandInput,
|
|
283
|
-
context: __SerdeContext
|
|
284
|
-
): Promise<__HttpRequest> => {
|
|
285
|
-
const headers: __HeaderBag = {
|
|
286
|
-
"content-type": "application/x-amz-json-1.1",
|
|
287
|
-
"x-amz-target": "AWSMigrationHub.ListDiscoveredResources",
|
|
288
|
-
};
|
|
289
|
-
let body: any;
|
|
290
|
-
body = JSON.stringify(serializeAws_json1_1ListDiscoveredResourcesRequest(input, context));
|
|
291
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
292
|
-
};
|
|
293
|
-
|
|
294
|
-
export const serializeAws_json1_1ListMigrationTasksCommand = async (
|
|
295
|
-
input: ListMigrationTasksCommandInput,
|
|
296
|
-
context: __SerdeContext
|
|
297
|
-
): Promise<__HttpRequest> => {
|
|
298
|
-
const headers: __HeaderBag = {
|
|
299
|
-
"content-type": "application/x-amz-json-1.1",
|
|
300
|
-
"x-amz-target": "AWSMigrationHub.ListMigrationTasks",
|
|
301
|
-
};
|
|
302
|
-
let body: any;
|
|
303
|
-
body = JSON.stringify(serializeAws_json1_1ListMigrationTasksRequest(input, context));
|
|
304
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
305
|
-
};
|
|
306
|
-
|
|
307
|
-
export const serializeAws_json1_1ListProgressUpdateStreamsCommand = async (
|
|
308
|
-
input: ListProgressUpdateStreamsCommandInput,
|
|
309
|
-
context: __SerdeContext
|
|
310
|
-
): Promise<__HttpRequest> => {
|
|
311
|
-
const headers: __HeaderBag = {
|
|
312
|
-
"content-type": "application/x-amz-json-1.1",
|
|
313
|
-
"x-amz-target": "AWSMigrationHub.ListProgressUpdateStreams",
|
|
314
|
-
};
|
|
315
|
-
let body: any;
|
|
316
|
-
body = JSON.stringify(serializeAws_json1_1ListProgressUpdateStreamsRequest(input, context));
|
|
317
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
318
|
-
};
|
|
319
|
-
|
|
320
|
-
export const serializeAws_json1_1NotifyApplicationStateCommand = async (
|
|
321
|
-
input: NotifyApplicationStateCommandInput,
|
|
322
|
-
context: __SerdeContext
|
|
323
|
-
): Promise<__HttpRequest> => {
|
|
324
|
-
const headers: __HeaderBag = {
|
|
325
|
-
"content-type": "application/x-amz-json-1.1",
|
|
326
|
-
"x-amz-target": "AWSMigrationHub.NotifyApplicationState",
|
|
327
|
-
};
|
|
328
|
-
let body: any;
|
|
329
|
-
body = JSON.stringify(serializeAws_json1_1NotifyApplicationStateRequest(input, context));
|
|
330
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
331
|
-
};
|
|
332
|
-
|
|
333
|
-
export const serializeAws_json1_1NotifyMigrationTaskStateCommand = async (
|
|
334
|
-
input: NotifyMigrationTaskStateCommandInput,
|
|
335
|
-
context: __SerdeContext
|
|
336
|
-
): Promise<__HttpRequest> => {
|
|
337
|
-
const headers: __HeaderBag = {
|
|
338
|
-
"content-type": "application/x-amz-json-1.1",
|
|
339
|
-
"x-amz-target": "AWSMigrationHub.NotifyMigrationTaskState",
|
|
340
|
-
};
|
|
341
|
-
let body: any;
|
|
342
|
-
body = JSON.stringify(serializeAws_json1_1NotifyMigrationTaskStateRequest(input, context));
|
|
343
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
344
|
-
};
|
|
345
|
-
|
|
346
|
-
export const serializeAws_json1_1PutResourceAttributesCommand = async (
|
|
347
|
-
input: PutResourceAttributesCommandInput,
|
|
348
|
-
context: __SerdeContext
|
|
349
|
-
): Promise<__HttpRequest> => {
|
|
350
|
-
const headers: __HeaderBag = {
|
|
351
|
-
"content-type": "application/x-amz-json-1.1",
|
|
352
|
-
"x-amz-target": "AWSMigrationHub.PutResourceAttributes",
|
|
353
|
-
};
|
|
354
|
-
let body: any;
|
|
355
|
-
body = JSON.stringify(serializeAws_json1_1PutResourceAttributesRequest(input, context));
|
|
356
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
357
|
-
};
|
|
358
|
-
|
|
359
|
-
export const deserializeAws_json1_1AssociateCreatedArtifactCommand = async (
|
|
360
|
-
output: __HttpResponse,
|
|
361
|
-
context: __SerdeContext
|
|
362
|
-
): Promise<AssociateCreatedArtifactCommandOutput> => {
|
|
363
|
-
if (output.statusCode >= 300) {
|
|
364
|
-
return deserializeAws_json1_1AssociateCreatedArtifactCommandError(output, context);
|
|
365
|
-
}
|
|
366
|
-
const data: any = await parseBody(output.body, context);
|
|
367
|
-
let contents: any = {};
|
|
368
|
-
contents = deserializeAws_json1_1AssociateCreatedArtifactResult(data, context);
|
|
369
|
-
const response: AssociateCreatedArtifactCommandOutput = {
|
|
370
|
-
$metadata: deserializeMetadata(output),
|
|
371
|
-
...contents,
|
|
372
|
-
};
|
|
373
|
-
return Promise.resolve(response);
|
|
374
|
-
};
|
|
375
|
-
|
|
376
|
-
const deserializeAws_json1_1AssociateCreatedArtifactCommandError = async (
|
|
377
|
-
output: __HttpResponse,
|
|
378
|
-
context: __SerdeContext
|
|
379
|
-
): Promise<AssociateCreatedArtifactCommandOutput> => {
|
|
380
|
-
const parsedOutput: any = {
|
|
381
|
-
...output,
|
|
382
|
-
body: await parseBody(output.body, context),
|
|
383
|
-
};
|
|
384
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
385
|
-
let errorCode = "UnknownError";
|
|
386
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
387
|
-
switch (errorCode) {
|
|
388
|
-
case "AccessDeniedException":
|
|
389
|
-
case "com.amazonaws.migrationhub#AccessDeniedException":
|
|
390
|
-
response = {
|
|
391
|
-
...(await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
392
|
-
name: errorCode,
|
|
393
|
-
$metadata: deserializeMetadata(output),
|
|
394
|
-
};
|
|
395
|
-
break;
|
|
396
|
-
case "DryRunOperation":
|
|
397
|
-
case "com.amazonaws.migrationhub#DryRunOperation":
|
|
398
|
-
response = {
|
|
399
|
-
...(await deserializeAws_json1_1DryRunOperationResponse(parsedOutput, context)),
|
|
400
|
-
name: errorCode,
|
|
401
|
-
$metadata: deserializeMetadata(output),
|
|
402
|
-
};
|
|
403
|
-
break;
|
|
404
|
-
case "HomeRegionNotSetException":
|
|
405
|
-
case "com.amazonaws.migrationhub#HomeRegionNotSetException":
|
|
406
|
-
response = {
|
|
407
|
-
...(await deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context)),
|
|
408
|
-
name: errorCode,
|
|
409
|
-
$metadata: deserializeMetadata(output),
|
|
410
|
-
};
|
|
411
|
-
break;
|
|
412
|
-
case "InternalServerError":
|
|
413
|
-
case "com.amazonaws.migrationhub#InternalServerError":
|
|
414
|
-
response = {
|
|
415
|
-
...(await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)),
|
|
416
|
-
name: errorCode,
|
|
417
|
-
$metadata: deserializeMetadata(output),
|
|
418
|
-
};
|
|
419
|
-
break;
|
|
420
|
-
case "InvalidInputException":
|
|
421
|
-
case "com.amazonaws.migrationhub#InvalidInputException":
|
|
422
|
-
response = {
|
|
423
|
-
...(await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context)),
|
|
424
|
-
name: errorCode,
|
|
425
|
-
$metadata: deserializeMetadata(output),
|
|
426
|
-
};
|
|
427
|
-
break;
|
|
428
|
-
case "ResourceNotFoundException":
|
|
429
|
-
case "com.amazonaws.migrationhub#ResourceNotFoundException":
|
|
430
|
-
response = {
|
|
431
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
432
|
-
name: errorCode,
|
|
433
|
-
$metadata: deserializeMetadata(output),
|
|
434
|
-
};
|
|
435
|
-
break;
|
|
436
|
-
case "ServiceUnavailableException":
|
|
437
|
-
case "com.amazonaws.migrationhub#ServiceUnavailableException":
|
|
438
|
-
response = {
|
|
439
|
-
...(await deserializeAws_json1_1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
440
|
-
name: errorCode,
|
|
441
|
-
$metadata: deserializeMetadata(output),
|
|
442
|
-
};
|
|
443
|
-
break;
|
|
444
|
-
case "ThrottlingException":
|
|
445
|
-
case "com.amazonaws.migrationhub#ThrottlingException":
|
|
446
|
-
response = {
|
|
447
|
-
...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
448
|
-
name: errorCode,
|
|
449
|
-
$metadata: deserializeMetadata(output),
|
|
450
|
-
};
|
|
451
|
-
break;
|
|
452
|
-
case "UnauthorizedOperation":
|
|
453
|
-
case "com.amazonaws.migrationhub#UnauthorizedOperation":
|
|
454
|
-
response = {
|
|
455
|
-
...(await deserializeAws_json1_1UnauthorizedOperationResponse(parsedOutput, context)),
|
|
456
|
-
name: errorCode,
|
|
457
|
-
$metadata: deserializeMetadata(output),
|
|
458
|
-
};
|
|
459
|
-
break;
|
|
460
|
-
default:
|
|
461
|
-
const parsedBody = parsedOutput.body;
|
|
462
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
463
|
-
response = {
|
|
464
|
-
...parsedBody,
|
|
465
|
-
name: `${errorCode}`,
|
|
466
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
467
|
-
$fault: "client",
|
|
468
|
-
$metadata: deserializeMetadata(output),
|
|
469
|
-
} as any;
|
|
470
|
-
}
|
|
471
|
-
const message = response.message || response.Message || errorCode;
|
|
472
|
-
response.message = message;
|
|
473
|
-
delete response.Message;
|
|
474
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
475
|
-
};
|
|
476
|
-
|
|
477
|
-
export const deserializeAws_json1_1AssociateDiscoveredResourceCommand = async (
|
|
478
|
-
output: __HttpResponse,
|
|
479
|
-
context: __SerdeContext
|
|
480
|
-
): Promise<AssociateDiscoveredResourceCommandOutput> => {
|
|
481
|
-
if (output.statusCode >= 300) {
|
|
482
|
-
return deserializeAws_json1_1AssociateDiscoveredResourceCommandError(output, context);
|
|
483
|
-
}
|
|
484
|
-
const data: any = await parseBody(output.body, context);
|
|
485
|
-
let contents: any = {};
|
|
486
|
-
contents = deserializeAws_json1_1AssociateDiscoveredResourceResult(data, context);
|
|
487
|
-
const response: AssociateDiscoveredResourceCommandOutput = {
|
|
488
|
-
$metadata: deserializeMetadata(output),
|
|
489
|
-
...contents,
|
|
490
|
-
};
|
|
491
|
-
return Promise.resolve(response);
|
|
492
|
-
};
|
|
493
|
-
|
|
494
|
-
const deserializeAws_json1_1AssociateDiscoveredResourceCommandError = async (
|
|
495
|
-
output: __HttpResponse,
|
|
496
|
-
context: __SerdeContext
|
|
497
|
-
): Promise<AssociateDiscoveredResourceCommandOutput> => {
|
|
498
|
-
const parsedOutput: any = {
|
|
499
|
-
...output,
|
|
500
|
-
body: await parseBody(output.body, context),
|
|
501
|
-
};
|
|
502
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
503
|
-
let errorCode = "UnknownError";
|
|
504
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
505
|
-
switch (errorCode) {
|
|
506
|
-
case "AccessDeniedException":
|
|
507
|
-
case "com.amazonaws.migrationhub#AccessDeniedException":
|
|
508
|
-
response = {
|
|
509
|
-
...(await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
510
|
-
name: errorCode,
|
|
511
|
-
$metadata: deserializeMetadata(output),
|
|
512
|
-
};
|
|
513
|
-
break;
|
|
514
|
-
case "DryRunOperation":
|
|
515
|
-
case "com.amazonaws.migrationhub#DryRunOperation":
|
|
516
|
-
response = {
|
|
517
|
-
...(await deserializeAws_json1_1DryRunOperationResponse(parsedOutput, context)),
|
|
518
|
-
name: errorCode,
|
|
519
|
-
$metadata: deserializeMetadata(output),
|
|
520
|
-
};
|
|
521
|
-
break;
|
|
522
|
-
case "HomeRegionNotSetException":
|
|
523
|
-
case "com.amazonaws.migrationhub#HomeRegionNotSetException":
|
|
524
|
-
response = {
|
|
525
|
-
...(await deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context)),
|
|
526
|
-
name: errorCode,
|
|
527
|
-
$metadata: deserializeMetadata(output),
|
|
528
|
-
};
|
|
529
|
-
break;
|
|
530
|
-
case "InternalServerError":
|
|
531
|
-
case "com.amazonaws.migrationhub#InternalServerError":
|
|
532
|
-
response = {
|
|
533
|
-
...(await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)),
|
|
534
|
-
name: errorCode,
|
|
535
|
-
$metadata: deserializeMetadata(output),
|
|
536
|
-
};
|
|
537
|
-
break;
|
|
538
|
-
case "InvalidInputException":
|
|
539
|
-
case "com.amazonaws.migrationhub#InvalidInputException":
|
|
540
|
-
response = {
|
|
541
|
-
...(await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context)),
|
|
542
|
-
name: errorCode,
|
|
543
|
-
$metadata: deserializeMetadata(output),
|
|
544
|
-
};
|
|
545
|
-
break;
|
|
546
|
-
case "PolicyErrorException":
|
|
547
|
-
case "com.amazonaws.migrationhub#PolicyErrorException":
|
|
548
|
-
response = {
|
|
549
|
-
...(await deserializeAws_json1_1PolicyErrorExceptionResponse(parsedOutput, context)),
|
|
550
|
-
name: errorCode,
|
|
551
|
-
$metadata: deserializeMetadata(output),
|
|
552
|
-
};
|
|
553
|
-
break;
|
|
554
|
-
case "ResourceNotFoundException":
|
|
555
|
-
case "com.amazonaws.migrationhub#ResourceNotFoundException":
|
|
556
|
-
response = {
|
|
557
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
558
|
-
name: errorCode,
|
|
559
|
-
$metadata: deserializeMetadata(output),
|
|
560
|
-
};
|
|
561
|
-
break;
|
|
562
|
-
case "ServiceUnavailableException":
|
|
563
|
-
case "com.amazonaws.migrationhub#ServiceUnavailableException":
|
|
564
|
-
response = {
|
|
565
|
-
...(await deserializeAws_json1_1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
566
|
-
name: errorCode,
|
|
567
|
-
$metadata: deserializeMetadata(output),
|
|
568
|
-
};
|
|
569
|
-
break;
|
|
570
|
-
case "ThrottlingException":
|
|
571
|
-
case "com.amazonaws.migrationhub#ThrottlingException":
|
|
572
|
-
response = {
|
|
573
|
-
...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
574
|
-
name: errorCode,
|
|
575
|
-
$metadata: deserializeMetadata(output),
|
|
576
|
-
};
|
|
577
|
-
break;
|
|
578
|
-
case "UnauthorizedOperation":
|
|
579
|
-
case "com.amazonaws.migrationhub#UnauthorizedOperation":
|
|
580
|
-
response = {
|
|
581
|
-
...(await deserializeAws_json1_1UnauthorizedOperationResponse(parsedOutput, context)),
|
|
582
|
-
name: errorCode,
|
|
583
|
-
$metadata: deserializeMetadata(output),
|
|
584
|
-
};
|
|
585
|
-
break;
|
|
586
|
-
default:
|
|
587
|
-
const parsedBody = parsedOutput.body;
|
|
588
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
589
|
-
response = {
|
|
590
|
-
...parsedBody,
|
|
591
|
-
name: `${errorCode}`,
|
|
592
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
593
|
-
$fault: "client",
|
|
594
|
-
$metadata: deserializeMetadata(output),
|
|
595
|
-
} as any;
|
|
596
|
-
}
|
|
597
|
-
const message = response.message || response.Message || errorCode;
|
|
598
|
-
response.message = message;
|
|
599
|
-
delete response.Message;
|
|
600
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
601
|
-
};
|
|
602
|
-
|
|
603
|
-
export const deserializeAws_json1_1CreateProgressUpdateStreamCommand = async (
|
|
604
|
-
output: __HttpResponse,
|
|
605
|
-
context: __SerdeContext
|
|
606
|
-
): Promise<CreateProgressUpdateStreamCommandOutput> => {
|
|
607
|
-
if (output.statusCode >= 300) {
|
|
608
|
-
return deserializeAws_json1_1CreateProgressUpdateStreamCommandError(output, context);
|
|
609
|
-
}
|
|
610
|
-
const data: any = await parseBody(output.body, context);
|
|
611
|
-
let contents: any = {};
|
|
612
|
-
contents = deserializeAws_json1_1CreateProgressUpdateStreamResult(data, context);
|
|
613
|
-
const response: CreateProgressUpdateStreamCommandOutput = {
|
|
614
|
-
$metadata: deserializeMetadata(output),
|
|
615
|
-
...contents,
|
|
616
|
-
};
|
|
617
|
-
return Promise.resolve(response);
|
|
618
|
-
};
|
|
619
|
-
|
|
620
|
-
const deserializeAws_json1_1CreateProgressUpdateStreamCommandError = async (
|
|
621
|
-
output: __HttpResponse,
|
|
622
|
-
context: __SerdeContext
|
|
623
|
-
): Promise<CreateProgressUpdateStreamCommandOutput> => {
|
|
624
|
-
const parsedOutput: any = {
|
|
625
|
-
...output,
|
|
626
|
-
body: await parseBody(output.body, context),
|
|
627
|
-
};
|
|
628
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
629
|
-
let errorCode = "UnknownError";
|
|
630
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
631
|
-
switch (errorCode) {
|
|
632
|
-
case "AccessDeniedException":
|
|
633
|
-
case "com.amazonaws.migrationhub#AccessDeniedException":
|
|
634
|
-
response = {
|
|
635
|
-
...(await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
636
|
-
name: errorCode,
|
|
637
|
-
$metadata: deserializeMetadata(output),
|
|
638
|
-
};
|
|
639
|
-
break;
|
|
640
|
-
case "DryRunOperation":
|
|
641
|
-
case "com.amazonaws.migrationhub#DryRunOperation":
|
|
642
|
-
response = {
|
|
643
|
-
...(await deserializeAws_json1_1DryRunOperationResponse(parsedOutput, context)),
|
|
644
|
-
name: errorCode,
|
|
645
|
-
$metadata: deserializeMetadata(output),
|
|
646
|
-
};
|
|
647
|
-
break;
|
|
648
|
-
case "HomeRegionNotSetException":
|
|
649
|
-
case "com.amazonaws.migrationhub#HomeRegionNotSetException":
|
|
650
|
-
response = {
|
|
651
|
-
...(await deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context)),
|
|
652
|
-
name: errorCode,
|
|
653
|
-
$metadata: deserializeMetadata(output),
|
|
654
|
-
};
|
|
655
|
-
break;
|
|
656
|
-
case "InternalServerError":
|
|
657
|
-
case "com.amazonaws.migrationhub#InternalServerError":
|
|
658
|
-
response = {
|
|
659
|
-
...(await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)),
|
|
660
|
-
name: errorCode,
|
|
661
|
-
$metadata: deserializeMetadata(output),
|
|
662
|
-
};
|
|
663
|
-
break;
|
|
664
|
-
case "InvalidInputException":
|
|
665
|
-
case "com.amazonaws.migrationhub#InvalidInputException":
|
|
666
|
-
response = {
|
|
667
|
-
...(await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context)),
|
|
668
|
-
name: errorCode,
|
|
669
|
-
$metadata: deserializeMetadata(output),
|
|
670
|
-
};
|
|
671
|
-
break;
|
|
672
|
-
case "ServiceUnavailableException":
|
|
673
|
-
case "com.amazonaws.migrationhub#ServiceUnavailableException":
|
|
674
|
-
response = {
|
|
675
|
-
...(await deserializeAws_json1_1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
676
|
-
name: errorCode,
|
|
677
|
-
$metadata: deserializeMetadata(output),
|
|
678
|
-
};
|
|
679
|
-
break;
|
|
680
|
-
case "ThrottlingException":
|
|
681
|
-
case "com.amazonaws.migrationhub#ThrottlingException":
|
|
682
|
-
response = {
|
|
683
|
-
...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
684
|
-
name: errorCode,
|
|
685
|
-
$metadata: deserializeMetadata(output),
|
|
686
|
-
};
|
|
687
|
-
break;
|
|
688
|
-
case "UnauthorizedOperation":
|
|
689
|
-
case "com.amazonaws.migrationhub#UnauthorizedOperation":
|
|
690
|
-
response = {
|
|
691
|
-
...(await deserializeAws_json1_1UnauthorizedOperationResponse(parsedOutput, context)),
|
|
692
|
-
name: errorCode,
|
|
693
|
-
$metadata: deserializeMetadata(output),
|
|
694
|
-
};
|
|
695
|
-
break;
|
|
696
|
-
default:
|
|
697
|
-
const parsedBody = parsedOutput.body;
|
|
698
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
699
|
-
response = {
|
|
700
|
-
...parsedBody,
|
|
701
|
-
name: `${errorCode}`,
|
|
702
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
703
|
-
$fault: "client",
|
|
704
|
-
$metadata: deserializeMetadata(output),
|
|
705
|
-
} as any;
|
|
706
|
-
}
|
|
707
|
-
const message = response.message || response.Message || errorCode;
|
|
708
|
-
response.message = message;
|
|
709
|
-
delete response.Message;
|
|
710
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
711
|
-
};
|
|
712
|
-
|
|
713
|
-
export const deserializeAws_json1_1DeleteProgressUpdateStreamCommand = async (
|
|
714
|
-
output: __HttpResponse,
|
|
715
|
-
context: __SerdeContext
|
|
716
|
-
): Promise<DeleteProgressUpdateStreamCommandOutput> => {
|
|
717
|
-
if (output.statusCode >= 300) {
|
|
718
|
-
return deserializeAws_json1_1DeleteProgressUpdateStreamCommandError(output, context);
|
|
719
|
-
}
|
|
720
|
-
const data: any = await parseBody(output.body, context);
|
|
721
|
-
let contents: any = {};
|
|
722
|
-
contents = deserializeAws_json1_1DeleteProgressUpdateStreamResult(data, context);
|
|
723
|
-
const response: DeleteProgressUpdateStreamCommandOutput = {
|
|
724
|
-
$metadata: deserializeMetadata(output),
|
|
725
|
-
...contents,
|
|
726
|
-
};
|
|
727
|
-
return Promise.resolve(response);
|
|
728
|
-
};
|
|
729
|
-
|
|
730
|
-
const deserializeAws_json1_1DeleteProgressUpdateStreamCommandError = async (
|
|
731
|
-
output: __HttpResponse,
|
|
732
|
-
context: __SerdeContext
|
|
733
|
-
): Promise<DeleteProgressUpdateStreamCommandOutput> => {
|
|
734
|
-
const parsedOutput: any = {
|
|
735
|
-
...output,
|
|
736
|
-
body: await parseBody(output.body, context),
|
|
737
|
-
};
|
|
738
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
739
|
-
let errorCode = "UnknownError";
|
|
740
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
741
|
-
switch (errorCode) {
|
|
742
|
-
case "AccessDeniedException":
|
|
743
|
-
case "com.amazonaws.migrationhub#AccessDeniedException":
|
|
744
|
-
response = {
|
|
745
|
-
...(await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
746
|
-
name: errorCode,
|
|
747
|
-
$metadata: deserializeMetadata(output),
|
|
748
|
-
};
|
|
749
|
-
break;
|
|
750
|
-
case "DryRunOperation":
|
|
751
|
-
case "com.amazonaws.migrationhub#DryRunOperation":
|
|
752
|
-
response = {
|
|
753
|
-
...(await deserializeAws_json1_1DryRunOperationResponse(parsedOutput, context)),
|
|
754
|
-
name: errorCode,
|
|
755
|
-
$metadata: deserializeMetadata(output),
|
|
756
|
-
};
|
|
757
|
-
break;
|
|
758
|
-
case "HomeRegionNotSetException":
|
|
759
|
-
case "com.amazonaws.migrationhub#HomeRegionNotSetException":
|
|
760
|
-
response = {
|
|
761
|
-
...(await deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context)),
|
|
762
|
-
name: errorCode,
|
|
763
|
-
$metadata: deserializeMetadata(output),
|
|
764
|
-
};
|
|
765
|
-
break;
|
|
766
|
-
case "InternalServerError":
|
|
767
|
-
case "com.amazonaws.migrationhub#InternalServerError":
|
|
768
|
-
response = {
|
|
769
|
-
...(await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)),
|
|
770
|
-
name: errorCode,
|
|
771
|
-
$metadata: deserializeMetadata(output),
|
|
772
|
-
};
|
|
773
|
-
break;
|
|
774
|
-
case "InvalidInputException":
|
|
775
|
-
case "com.amazonaws.migrationhub#InvalidInputException":
|
|
776
|
-
response = {
|
|
777
|
-
...(await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context)),
|
|
778
|
-
name: errorCode,
|
|
779
|
-
$metadata: deserializeMetadata(output),
|
|
780
|
-
};
|
|
781
|
-
break;
|
|
782
|
-
case "ResourceNotFoundException":
|
|
783
|
-
case "com.amazonaws.migrationhub#ResourceNotFoundException":
|
|
784
|
-
response = {
|
|
785
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
786
|
-
name: errorCode,
|
|
787
|
-
$metadata: deserializeMetadata(output),
|
|
788
|
-
};
|
|
789
|
-
break;
|
|
790
|
-
case "ServiceUnavailableException":
|
|
791
|
-
case "com.amazonaws.migrationhub#ServiceUnavailableException":
|
|
792
|
-
response = {
|
|
793
|
-
...(await deserializeAws_json1_1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
794
|
-
name: errorCode,
|
|
795
|
-
$metadata: deserializeMetadata(output),
|
|
796
|
-
};
|
|
797
|
-
break;
|
|
798
|
-
case "ThrottlingException":
|
|
799
|
-
case "com.amazonaws.migrationhub#ThrottlingException":
|
|
800
|
-
response = {
|
|
801
|
-
...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
802
|
-
name: errorCode,
|
|
803
|
-
$metadata: deserializeMetadata(output),
|
|
804
|
-
};
|
|
805
|
-
break;
|
|
806
|
-
case "UnauthorizedOperation":
|
|
807
|
-
case "com.amazonaws.migrationhub#UnauthorizedOperation":
|
|
808
|
-
response = {
|
|
809
|
-
...(await deserializeAws_json1_1UnauthorizedOperationResponse(parsedOutput, context)),
|
|
810
|
-
name: errorCode,
|
|
811
|
-
$metadata: deserializeMetadata(output),
|
|
812
|
-
};
|
|
813
|
-
break;
|
|
814
|
-
default:
|
|
815
|
-
const parsedBody = parsedOutput.body;
|
|
816
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
817
|
-
response = {
|
|
818
|
-
...parsedBody,
|
|
819
|
-
name: `${errorCode}`,
|
|
820
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
821
|
-
$fault: "client",
|
|
822
|
-
$metadata: deserializeMetadata(output),
|
|
823
|
-
} as any;
|
|
824
|
-
}
|
|
825
|
-
const message = response.message || response.Message || errorCode;
|
|
826
|
-
response.message = message;
|
|
827
|
-
delete response.Message;
|
|
828
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
829
|
-
};
|
|
830
|
-
|
|
831
|
-
export const deserializeAws_json1_1DescribeApplicationStateCommand = async (
|
|
832
|
-
output: __HttpResponse,
|
|
833
|
-
context: __SerdeContext
|
|
834
|
-
): Promise<DescribeApplicationStateCommandOutput> => {
|
|
835
|
-
if (output.statusCode >= 300) {
|
|
836
|
-
return deserializeAws_json1_1DescribeApplicationStateCommandError(output, context);
|
|
837
|
-
}
|
|
838
|
-
const data: any = await parseBody(output.body, context);
|
|
839
|
-
let contents: any = {};
|
|
840
|
-
contents = deserializeAws_json1_1DescribeApplicationStateResult(data, context);
|
|
841
|
-
const response: DescribeApplicationStateCommandOutput = {
|
|
842
|
-
$metadata: deserializeMetadata(output),
|
|
843
|
-
...contents,
|
|
844
|
-
};
|
|
845
|
-
return Promise.resolve(response);
|
|
846
|
-
};
|
|
847
|
-
|
|
848
|
-
const deserializeAws_json1_1DescribeApplicationStateCommandError = async (
|
|
849
|
-
output: __HttpResponse,
|
|
850
|
-
context: __SerdeContext
|
|
851
|
-
): Promise<DescribeApplicationStateCommandOutput> => {
|
|
852
|
-
const parsedOutput: any = {
|
|
853
|
-
...output,
|
|
854
|
-
body: await parseBody(output.body, context),
|
|
855
|
-
};
|
|
856
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
857
|
-
let errorCode = "UnknownError";
|
|
858
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
859
|
-
switch (errorCode) {
|
|
860
|
-
case "AccessDeniedException":
|
|
861
|
-
case "com.amazonaws.migrationhub#AccessDeniedException":
|
|
862
|
-
response = {
|
|
863
|
-
...(await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
864
|
-
name: errorCode,
|
|
865
|
-
$metadata: deserializeMetadata(output),
|
|
866
|
-
};
|
|
867
|
-
break;
|
|
868
|
-
case "HomeRegionNotSetException":
|
|
869
|
-
case "com.amazonaws.migrationhub#HomeRegionNotSetException":
|
|
870
|
-
response = {
|
|
871
|
-
...(await deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context)),
|
|
872
|
-
name: errorCode,
|
|
873
|
-
$metadata: deserializeMetadata(output),
|
|
874
|
-
};
|
|
875
|
-
break;
|
|
876
|
-
case "InternalServerError":
|
|
877
|
-
case "com.amazonaws.migrationhub#InternalServerError":
|
|
878
|
-
response = {
|
|
879
|
-
...(await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)),
|
|
880
|
-
name: errorCode,
|
|
881
|
-
$metadata: deserializeMetadata(output),
|
|
882
|
-
};
|
|
883
|
-
break;
|
|
884
|
-
case "InvalidInputException":
|
|
885
|
-
case "com.amazonaws.migrationhub#InvalidInputException":
|
|
886
|
-
response = {
|
|
887
|
-
...(await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context)),
|
|
888
|
-
name: errorCode,
|
|
889
|
-
$metadata: deserializeMetadata(output),
|
|
890
|
-
};
|
|
891
|
-
break;
|
|
892
|
-
case "PolicyErrorException":
|
|
893
|
-
case "com.amazonaws.migrationhub#PolicyErrorException":
|
|
894
|
-
response = {
|
|
895
|
-
...(await deserializeAws_json1_1PolicyErrorExceptionResponse(parsedOutput, context)),
|
|
896
|
-
name: errorCode,
|
|
897
|
-
$metadata: deserializeMetadata(output),
|
|
898
|
-
};
|
|
899
|
-
break;
|
|
900
|
-
case "ResourceNotFoundException":
|
|
901
|
-
case "com.amazonaws.migrationhub#ResourceNotFoundException":
|
|
902
|
-
response = {
|
|
903
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
904
|
-
name: errorCode,
|
|
905
|
-
$metadata: deserializeMetadata(output),
|
|
906
|
-
};
|
|
907
|
-
break;
|
|
908
|
-
case "ServiceUnavailableException":
|
|
909
|
-
case "com.amazonaws.migrationhub#ServiceUnavailableException":
|
|
910
|
-
response = {
|
|
911
|
-
...(await deserializeAws_json1_1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
912
|
-
name: errorCode,
|
|
913
|
-
$metadata: deserializeMetadata(output),
|
|
914
|
-
};
|
|
915
|
-
break;
|
|
916
|
-
case "ThrottlingException":
|
|
917
|
-
case "com.amazonaws.migrationhub#ThrottlingException":
|
|
918
|
-
response = {
|
|
919
|
-
...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
920
|
-
name: errorCode,
|
|
921
|
-
$metadata: deserializeMetadata(output),
|
|
922
|
-
};
|
|
923
|
-
break;
|
|
924
|
-
default:
|
|
925
|
-
const parsedBody = parsedOutput.body;
|
|
926
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
927
|
-
response = {
|
|
928
|
-
...parsedBody,
|
|
929
|
-
name: `${errorCode}`,
|
|
930
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
931
|
-
$fault: "client",
|
|
932
|
-
$metadata: deserializeMetadata(output),
|
|
933
|
-
} as any;
|
|
934
|
-
}
|
|
935
|
-
const message = response.message || response.Message || errorCode;
|
|
936
|
-
response.message = message;
|
|
937
|
-
delete response.Message;
|
|
938
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
939
|
-
};
|
|
940
|
-
|
|
941
|
-
export const deserializeAws_json1_1DescribeMigrationTaskCommand = async (
|
|
942
|
-
output: __HttpResponse,
|
|
943
|
-
context: __SerdeContext
|
|
944
|
-
): Promise<DescribeMigrationTaskCommandOutput> => {
|
|
945
|
-
if (output.statusCode >= 300) {
|
|
946
|
-
return deserializeAws_json1_1DescribeMigrationTaskCommandError(output, context);
|
|
947
|
-
}
|
|
948
|
-
const data: any = await parseBody(output.body, context);
|
|
949
|
-
let contents: any = {};
|
|
950
|
-
contents = deserializeAws_json1_1DescribeMigrationTaskResult(data, context);
|
|
951
|
-
const response: DescribeMigrationTaskCommandOutput = {
|
|
952
|
-
$metadata: deserializeMetadata(output),
|
|
953
|
-
...contents,
|
|
954
|
-
};
|
|
955
|
-
return Promise.resolve(response);
|
|
956
|
-
};
|
|
957
|
-
|
|
958
|
-
const deserializeAws_json1_1DescribeMigrationTaskCommandError = async (
|
|
959
|
-
output: __HttpResponse,
|
|
960
|
-
context: __SerdeContext
|
|
961
|
-
): Promise<DescribeMigrationTaskCommandOutput> => {
|
|
962
|
-
const parsedOutput: any = {
|
|
963
|
-
...output,
|
|
964
|
-
body: await parseBody(output.body, context),
|
|
965
|
-
};
|
|
966
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
967
|
-
let errorCode = "UnknownError";
|
|
968
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
969
|
-
switch (errorCode) {
|
|
970
|
-
case "AccessDeniedException":
|
|
971
|
-
case "com.amazonaws.migrationhub#AccessDeniedException":
|
|
972
|
-
response = {
|
|
973
|
-
...(await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
974
|
-
name: errorCode,
|
|
975
|
-
$metadata: deserializeMetadata(output),
|
|
976
|
-
};
|
|
977
|
-
break;
|
|
978
|
-
case "HomeRegionNotSetException":
|
|
979
|
-
case "com.amazonaws.migrationhub#HomeRegionNotSetException":
|
|
980
|
-
response = {
|
|
981
|
-
...(await deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context)),
|
|
982
|
-
name: errorCode,
|
|
983
|
-
$metadata: deserializeMetadata(output),
|
|
984
|
-
};
|
|
985
|
-
break;
|
|
986
|
-
case "InternalServerError":
|
|
987
|
-
case "com.amazonaws.migrationhub#InternalServerError":
|
|
988
|
-
response = {
|
|
989
|
-
...(await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)),
|
|
990
|
-
name: errorCode,
|
|
991
|
-
$metadata: deserializeMetadata(output),
|
|
992
|
-
};
|
|
993
|
-
break;
|
|
994
|
-
case "InvalidInputException":
|
|
995
|
-
case "com.amazonaws.migrationhub#InvalidInputException":
|
|
996
|
-
response = {
|
|
997
|
-
...(await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context)),
|
|
998
|
-
name: errorCode,
|
|
999
|
-
$metadata: deserializeMetadata(output),
|
|
1000
|
-
};
|
|
1001
|
-
break;
|
|
1002
|
-
case "ResourceNotFoundException":
|
|
1003
|
-
case "com.amazonaws.migrationhub#ResourceNotFoundException":
|
|
1004
|
-
response = {
|
|
1005
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1006
|
-
name: errorCode,
|
|
1007
|
-
$metadata: deserializeMetadata(output),
|
|
1008
|
-
};
|
|
1009
|
-
break;
|
|
1010
|
-
case "ServiceUnavailableException":
|
|
1011
|
-
case "com.amazonaws.migrationhub#ServiceUnavailableException":
|
|
1012
|
-
response = {
|
|
1013
|
-
...(await deserializeAws_json1_1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
1014
|
-
name: errorCode,
|
|
1015
|
-
$metadata: deserializeMetadata(output),
|
|
1016
|
-
};
|
|
1017
|
-
break;
|
|
1018
|
-
case "ThrottlingException":
|
|
1019
|
-
case "com.amazonaws.migrationhub#ThrottlingException":
|
|
1020
|
-
response = {
|
|
1021
|
-
...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1022
|
-
name: errorCode,
|
|
1023
|
-
$metadata: deserializeMetadata(output),
|
|
1024
|
-
};
|
|
1025
|
-
break;
|
|
1026
|
-
default:
|
|
1027
|
-
const parsedBody = parsedOutput.body;
|
|
1028
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1029
|
-
response = {
|
|
1030
|
-
...parsedBody,
|
|
1031
|
-
name: `${errorCode}`,
|
|
1032
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1033
|
-
$fault: "client",
|
|
1034
|
-
$metadata: deserializeMetadata(output),
|
|
1035
|
-
} as any;
|
|
1036
|
-
}
|
|
1037
|
-
const message = response.message || response.Message || errorCode;
|
|
1038
|
-
response.message = message;
|
|
1039
|
-
delete response.Message;
|
|
1040
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1041
|
-
};
|
|
1042
|
-
|
|
1043
|
-
export const deserializeAws_json1_1DisassociateCreatedArtifactCommand = async (
|
|
1044
|
-
output: __HttpResponse,
|
|
1045
|
-
context: __SerdeContext
|
|
1046
|
-
): Promise<DisassociateCreatedArtifactCommandOutput> => {
|
|
1047
|
-
if (output.statusCode >= 300) {
|
|
1048
|
-
return deserializeAws_json1_1DisassociateCreatedArtifactCommandError(output, context);
|
|
1049
|
-
}
|
|
1050
|
-
const data: any = await parseBody(output.body, context);
|
|
1051
|
-
let contents: any = {};
|
|
1052
|
-
contents = deserializeAws_json1_1DisassociateCreatedArtifactResult(data, context);
|
|
1053
|
-
const response: DisassociateCreatedArtifactCommandOutput = {
|
|
1054
|
-
$metadata: deserializeMetadata(output),
|
|
1055
|
-
...contents,
|
|
1056
|
-
};
|
|
1057
|
-
return Promise.resolve(response);
|
|
1058
|
-
};
|
|
1059
|
-
|
|
1060
|
-
const deserializeAws_json1_1DisassociateCreatedArtifactCommandError = async (
|
|
1061
|
-
output: __HttpResponse,
|
|
1062
|
-
context: __SerdeContext
|
|
1063
|
-
): Promise<DisassociateCreatedArtifactCommandOutput> => {
|
|
1064
|
-
const parsedOutput: any = {
|
|
1065
|
-
...output,
|
|
1066
|
-
body: await parseBody(output.body, context),
|
|
1067
|
-
};
|
|
1068
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1069
|
-
let errorCode = "UnknownError";
|
|
1070
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1071
|
-
switch (errorCode) {
|
|
1072
|
-
case "AccessDeniedException":
|
|
1073
|
-
case "com.amazonaws.migrationhub#AccessDeniedException":
|
|
1074
|
-
response = {
|
|
1075
|
-
...(await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1076
|
-
name: errorCode,
|
|
1077
|
-
$metadata: deserializeMetadata(output),
|
|
1078
|
-
};
|
|
1079
|
-
break;
|
|
1080
|
-
case "DryRunOperation":
|
|
1081
|
-
case "com.amazonaws.migrationhub#DryRunOperation":
|
|
1082
|
-
response = {
|
|
1083
|
-
...(await deserializeAws_json1_1DryRunOperationResponse(parsedOutput, context)),
|
|
1084
|
-
name: errorCode,
|
|
1085
|
-
$metadata: deserializeMetadata(output),
|
|
1086
|
-
};
|
|
1087
|
-
break;
|
|
1088
|
-
case "HomeRegionNotSetException":
|
|
1089
|
-
case "com.amazonaws.migrationhub#HomeRegionNotSetException":
|
|
1090
|
-
response = {
|
|
1091
|
-
...(await deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context)),
|
|
1092
|
-
name: errorCode,
|
|
1093
|
-
$metadata: deserializeMetadata(output),
|
|
1094
|
-
};
|
|
1095
|
-
break;
|
|
1096
|
-
case "InternalServerError":
|
|
1097
|
-
case "com.amazonaws.migrationhub#InternalServerError":
|
|
1098
|
-
response = {
|
|
1099
|
-
...(await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)),
|
|
1100
|
-
name: errorCode,
|
|
1101
|
-
$metadata: deserializeMetadata(output),
|
|
1102
|
-
};
|
|
1103
|
-
break;
|
|
1104
|
-
case "InvalidInputException":
|
|
1105
|
-
case "com.amazonaws.migrationhub#InvalidInputException":
|
|
1106
|
-
response = {
|
|
1107
|
-
...(await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context)),
|
|
1108
|
-
name: errorCode,
|
|
1109
|
-
$metadata: deserializeMetadata(output),
|
|
1110
|
-
};
|
|
1111
|
-
break;
|
|
1112
|
-
case "ResourceNotFoundException":
|
|
1113
|
-
case "com.amazonaws.migrationhub#ResourceNotFoundException":
|
|
1114
|
-
response = {
|
|
1115
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1116
|
-
name: errorCode,
|
|
1117
|
-
$metadata: deserializeMetadata(output),
|
|
1118
|
-
};
|
|
1119
|
-
break;
|
|
1120
|
-
case "ServiceUnavailableException":
|
|
1121
|
-
case "com.amazonaws.migrationhub#ServiceUnavailableException":
|
|
1122
|
-
response = {
|
|
1123
|
-
...(await deserializeAws_json1_1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
1124
|
-
name: errorCode,
|
|
1125
|
-
$metadata: deserializeMetadata(output),
|
|
1126
|
-
};
|
|
1127
|
-
break;
|
|
1128
|
-
case "ThrottlingException":
|
|
1129
|
-
case "com.amazonaws.migrationhub#ThrottlingException":
|
|
1130
|
-
response = {
|
|
1131
|
-
...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1132
|
-
name: errorCode,
|
|
1133
|
-
$metadata: deserializeMetadata(output),
|
|
1134
|
-
};
|
|
1135
|
-
break;
|
|
1136
|
-
case "UnauthorizedOperation":
|
|
1137
|
-
case "com.amazonaws.migrationhub#UnauthorizedOperation":
|
|
1138
|
-
response = {
|
|
1139
|
-
...(await deserializeAws_json1_1UnauthorizedOperationResponse(parsedOutput, context)),
|
|
1140
|
-
name: errorCode,
|
|
1141
|
-
$metadata: deserializeMetadata(output),
|
|
1142
|
-
};
|
|
1143
|
-
break;
|
|
1144
|
-
default:
|
|
1145
|
-
const parsedBody = parsedOutput.body;
|
|
1146
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1147
|
-
response = {
|
|
1148
|
-
...parsedBody,
|
|
1149
|
-
name: `${errorCode}`,
|
|
1150
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1151
|
-
$fault: "client",
|
|
1152
|
-
$metadata: deserializeMetadata(output),
|
|
1153
|
-
} as any;
|
|
1154
|
-
}
|
|
1155
|
-
const message = response.message || response.Message || errorCode;
|
|
1156
|
-
response.message = message;
|
|
1157
|
-
delete response.Message;
|
|
1158
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1159
|
-
};
|
|
1160
|
-
|
|
1161
|
-
export const deserializeAws_json1_1DisassociateDiscoveredResourceCommand = async (
|
|
1162
|
-
output: __HttpResponse,
|
|
1163
|
-
context: __SerdeContext
|
|
1164
|
-
): Promise<DisassociateDiscoveredResourceCommandOutput> => {
|
|
1165
|
-
if (output.statusCode >= 300) {
|
|
1166
|
-
return deserializeAws_json1_1DisassociateDiscoveredResourceCommandError(output, context);
|
|
1167
|
-
}
|
|
1168
|
-
const data: any = await parseBody(output.body, context);
|
|
1169
|
-
let contents: any = {};
|
|
1170
|
-
contents = deserializeAws_json1_1DisassociateDiscoveredResourceResult(data, context);
|
|
1171
|
-
const response: DisassociateDiscoveredResourceCommandOutput = {
|
|
1172
|
-
$metadata: deserializeMetadata(output),
|
|
1173
|
-
...contents,
|
|
1174
|
-
};
|
|
1175
|
-
return Promise.resolve(response);
|
|
1176
|
-
};
|
|
1177
|
-
|
|
1178
|
-
const deserializeAws_json1_1DisassociateDiscoveredResourceCommandError = async (
|
|
1179
|
-
output: __HttpResponse,
|
|
1180
|
-
context: __SerdeContext
|
|
1181
|
-
): Promise<DisassociateDiscoveredResourceCommandOutput> => {
|
|
1182
|
-
const parsedOutput: any = {
|
|
1183
|
-
...output,
|
|
1184
|
-
body: await parseBody(output.body, context),
|
|
1185
|
-
};
|
|
1186
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1187
|
-
let errorCode = "UnknownError";
|
|
1188
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1189
|
-
switch (errorCode) {
|
|
1190
|
-
case "AccessDeniedException":
|
|
1191
|
-
case "com.amazonaws.migrationhub#AccessDeniedException":
|
|
1192
|
-
response = {
|
|
1193
|
-
...(await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1194
|
-
name: errorCode,
|
|
1195
|
-
$metadata: deserializeMetadata(output),
|
|
1196
|
-
};
|
|
1197
|
-
break;
|
|
1198
|
-
case "DryRunOperation":
|
|
1199
|
-
case "com.amazonaws.migrationhub#DryRunOperation":
|
|
1200
|
-
response = {
|
|
1201
|
-
...(await deserializeAws_json1_1DryRunOperationResponse(parsedOutput, context)),
|
|
1202
|
-
name: errorCode,
|
|
1203
|
-
$metadata: deserializeMetadata(output),
|
|
1204
|
-
};
|
|
1205
|
-
break;
|
|
1206
|
-
case "HomeRegionNotSetException":
|
|
1207
|
-
case "com.amazonaws.migrationhub#HomeRegionNotSetException":
|
|
1208
|
-
response = {
|
|
1209
|
-
...(await deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context)),
|
|
1210
|
-
name: errorCode,
|
|
1211
|
-
$metadata: deserializeMetadata(output),
|
|
1212
|
-
};
|
|
1213
|
-
break;
|
|
1214
|
-
case "InternalServerError":
|
|
1215
|
-
case "com.amazonaws.migrationhub#InternalServerError":
|
|
1216
|
-
response = {
|
|
1217
|
-
...(await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)),
|
|
1218
|
-
name: errorCode,
|
|
1219
|
-
$metadata: deserializeMetadata(output),
|
|
1220
|
-
};
|
|
1221
|
-
break;
|
|
1222
|
-
case "InvalidInputException":
|
|
1223
|
-
case "com.amazonaws.migrationhub#InvalidInputException":
|
|
1224
|
-
response = {
|
|
1225
|
-
...(await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context)),
|
|
1226
|
-
name: errorCode,
|
|
1227
|
-
$metadata: deserializeMetadata(output),
|
|
1228
|
-
};
|
|
1229
|
-
break;
|
|
1230
|
-
case "ResourceNotFoundException":
|
|
1231
|
-
case "com.amazonaws.migrationhub#ResourceNotFoundException":
|
|
1232
|
-
response = {
|
|
1233
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1234
|
-
name: errorCode,
|
|
1235
|
-
$metadata: deserializeMetadata(output),
|
|
1236
|
-
};
|
|
1237
|
-
break;
|
|
1238
|
-
case "ServiceUnavailableException":
|
|
1239
|
-
case "com.amazonaws.migrationhub#ServiceUnavailableException":
|
|
1240
|
-
response = {
|
|
1241
|
-
...(await deserializeAws_json1_1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
1242
|
-
name: errorCode,
|
|
1243
|
-
$metadata: deserializeMetadata(output),
|
|
1244
|
-
};
|
|
1245
|
-
break;
|
|
1246
|
-
case "ThrottlingException":
|
|
1247
|
-
case "com.amazonaws.migrationhub#ThrottlingException":
|
|
1248
|
-
response = {
|
|
1249
|
-
...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1250
|
-
name: errorCode,
|
|
1251
|
-
$metadata: deserializeMetadata(output),
|
|
1252
|
-
};
|
|
1253
|
-
break;
|
|
1254
|
-
case "UnauthorizedOperation":
|
|
1255
|
-
case "com.amazonaws.migrationhub#UnauthorizedOperation":
|
|
1256
|
-
response = {
|
|
1257
|
-
...(await deserializeAws_json1_1UnauthorizedOperationResponse(parsedOutput, context)),
|
|
1258
|
-
name: errorCode,
|
|
1259
|
-
$metadata: deserializeMetadata(output),
|
|
1260
|
-
};
|
|
1261
|
-
break;
|
|
1262
|
-
default:
|
|
1263
|
-
const parsedBody = parsedOutput.body;
|
|
1264
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1265
|
-
response = {
|
|
1266
|
-
...parsedBody,
|
|
1267
|
-
name: `${errorCode}`,
|
|
1268
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1269
|
-
$fault: "client",
|
|
1270
|
-
$metadata: deserializeMetadata(output),
|
|
1271
|
-
} as any;
|
|
1272
|
-
}
|
|
1273
|
-
const message = response.message || response.Message || errorCode;
|
|
1274
|
-
response.message = message;
|
|
1275
|
-
delete response.Message;
|
|
1276
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1277
|
-
};
|
|
1278
|
-
|
|
1279
|
-
export const deserializeAws_json1_1ImportMigrationTaskCommand = async (
|
|
1280
|
-
output: __HttpResponse,
|
|
1281
|
-
context: __SerdeContext
|
|
1282
|
-
): Promise<ImportMigrationTaskCommandOutput> => {
|
|
1283
|
-
if (output.statusCode >= 300) {
|
|
1284
|
-
return deserializeAws_json1_1ImportMigrationTaskCommandError(output, context);
|
|
1285
|
-
}
|
|
1286
|
-
const data: any = await parseBody(output.body, context);
|
|
1287
|
-
let contents: any = {};
|
|
1288
|
-
contents = deserializeAws_json1_1ImportMigrationTaskResult(data, context);
|
|
1289
|
-
const response: ImportMigrationTaskCommandOutput = {
|
|
1290
|
-
$metadata: deserializeMetadata(output),
|
|
1291
|
-
...contents,
|
|
1292
|
-
};
|
|
1293
|
-
return Promise.resolve(response);
|
|
1294
|
-
};
|
|
1295
|
-
|
|
1296
|
-
const deserializeAws_json1_1ImportMigrationTaskCommandError = async (
|
|
1297
|
-
output: __HttpResponse,
|
|
1298
|
-
context: __SerdeContext
|
|
1299
|
-
): Promise<ImportMigrationTaskCommandOutput> => {
|
|
1300
|
-
const parsedOutput: any = {
|
|
1301
|
-
...output,
|
|
1302
|
-
body: await parseBody(output.body, context),
|
|
1303
|
-
};
|
|
1304
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1305
|
-
let errorCode = "UnknownError";
|
|
1306
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1307
|
-
switch (errorCode) {
|
|
1308
|
-
case "AccessDeniedException":
|
|
1309
|
-
case "com.amazonaws.migrationhub#AccessDeniedException":
|
|
1310
|
-
response = {
|
|
1311
|
-
...(await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1312
|
-
name: errorCode,
|
|
1313
|
-
$metadata: deserializeMetadata(output),
|
|
1314
|
-
};
|
|
1315
|
-
break;
|
|
1316
|
-
case "DryRunOperation":
|
|
1317
|
-
case "com.amazonaws.migrationhub#DryRunOperation":
|
|
1318
|
-
response = {
|
|
1319
|
-
...(await deserializeAws_json1_1DryRunOperationResponse(parsedOutput, context)),
|
|
1320
|
-
name: errorCode,
|
|
1321
|
-
$metadata: deserializeMetadata(output),
|
|
1322
|
-
};
|
|
1323
|
-
break;
|
|
1324
|
-
case "HomeRegionNotSetException":
|
|
1325
|
-
case "com.amazonaws.migrationhub#HomeRegionNotSetException":
|
|
1326
|
-
response = {
|
|
1327
|
-
...(await deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context)),
|
|
1328
|
-
name: errorCode,
|
|
1329
|
-
$metadata: deserializeMetadata(output),
|
|
1330
|
-
};
|
|
1331
|
-
break;
|
|
1332
|
-
case "InternalServerError":
|
|
1333
|
-
case "com.amazonaws.migrationhub#InternalServerError":
|
|
1334
|
-
response = {
|
|
1335
|
-
...(await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)),
|
|
1336
|
-
name: errorCode,
|
|
1337
|
-
$metadata: deserializeMetadata(output),
|
|
1338
|
-
};
|
|
1339
|
-
break;
|
|
1340
|
-
case "InvalidInputException":
|
|
1341
|
-
case "com.amazonaws.migrationhub#InvalidInputException":
|
|
1342
|
-
response = {
|
|
1343
|
-
...(await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context)),
|
|
1344
|
-
name: errorCode,
|
|
1345
|
-
$metadata: deserializeMetadata(output),
|
|
1346
|
-
};
|
|
1347
|
-
break;
|
|
1348
|
-
case "ResourceNotFoundException":
|
|
1349
|
-
case "com.amazonaws.migrationhub#ResourceNotFoundException":
|
|
1350
|
-
response = {
|
|
1351
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1352
|
-
name: errorCode,
|
|
1353
|
-
$metadata: deserializeMetadata(output),
|
|
1354
|
-
};
|
|
1355
|
-
break;
|
|
1356
|
-
case "ServiceUnavailableException":
|
|
1357
|
-
case "com.amazonaws.migrationhub#ServiceUnavailableException":
|
|
1358
|
-
response = {
|
|
1359
|
-
...(await deserializeAws_json1_1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
1360
|
-
name: errorCode,
|
|
1361
|
-
$metadata: deserializeMetadata(output),
|
|
1362
|
-
};
|
|
1363
|
-
break;
|
|
1364
|
-
case "ThrottlingException":
|
|
1365
|
-
case "com.amazonaws.migrationhub#ThrottlingException":
|
|
1366
|
-
response = {
|
|
1367
|
-
...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1368
|
-
name: errorCode,
|
|
1369
|
-
$metadata: deserializeMetadata(output),
|
|
1370
|
-
};
|
|
1371
|
-
break;
|
|
1372
|
-
case "UnauthorizedOperation":
|
|
1373
|
-
case "com.amazonaws.migrationhub#UnauthorizedOperation":
|
|
1374
|
-
response = {
|
|
1375
|
-
...(await deserializeAws_json1_1UnauthorizedOperationResponse(parsedOutput, context)),
|
|
1376
|
-
name: errorCode,
|
|
1377
|
-
$metadata: deserializeMetadata(output),
|
|
1378
|
-
};
|
|
1379
|
-
break;
|
|
1380
|
-
default:
|
|
1381
|
-
const parsedBody = parsedOutput.body;
|
|
1382
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1383
|
-
response = {
|
|
1384
|
-
...parsedBody,
|
|
1385
|
-
name: `${errorCode}`,
|
|
1386
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1387
|
-
$fault: "client",
|
|
1388
|
-
$metadata: deserializeMetadata(output),
|
|
1389
|
-
} as any;
|
|
1390
|
-
}
|
|
1391
|
-
const message = response.message || response.Message || errorCode;
|
|
1392
|
-
response.message = message;
|
|
1393
|
-
delete response.Message;
|
|
1394
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1395
|
-
};
|
|
1396
|
-
|
|
1397
|
-
export const deserializeAws_json1_1ListApplicationStatesCommand = async (
|
|
1398
|
-
output: __HttpResponse,
|
|
1399
|
-
context: __SerdeContext
|
|
1400
|
-
): Promise<ListApplicationStatesCommandOutput> => {
|
|
1401
|
-
if (output.statusCode >= 300) {
|
|
1402
|
-
return deserializeAws_json1_1ListApplicationStatesCommandError(output, context);
|
|
1403
|
-
}
|
|
1404
|
-
const data: any = await parseBody(output.body, context);
|
|
1405
|
-
let contents: any = {};
|
|
1406
|
-
contents = deserializeAws_json1_1ListApplicationStatesResult(data, context);
|
|
1407
|
-
const response: ListApplicationStatesCommandOutput = {
|
|
1408
|
-
$metadata: deserializeMetadata(output),
|
|
1409
|
-
...contents,
|
|
1410
|
-
};
|
|
1411
|
-
return Promise.resolve(response);
|
|
1412
|
-
};
|
|
1413
|
-
|
|
1414
|
-
const deserializeAws_json1_1ListApplicationStatesCommandError = async (
|
|
1415
|
-
output: __HttpResponse,
|
|
1416
|
-
context: __SerdeContext
|
|
1417
|
-
): Promise<ListApplicationStatesCommandOutput> => {
|
|
1418
|
-
const parsedOutput: any = {
|
|
1419
|
-
...output,
|
|
1420
|
-
body: await parseBody(output.body, context),
|
|
1421
|
-
};
|
|
1422
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1423
|
-
let errorCode = "UnknownError";
|
|
1424
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1425
|
-
switch (errorCode) {
|
|
1426
|
-
case "AccessDeniedException":
|
|
1427
|
-
case "com.amazonaws.migrationhub#AccessDeniedException":
|
|
1428
|
-
response = {
|
|
1429
|
-
...(await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1430
|
-
name: errorCode,
|
|
1431
|
-
$metadata: deserializeMetadata(output),
|
|
1432
|
-
};
|
|
1433
|
-
break;
|
|
1434
|
-
case "HomeRegionNotSetException":
|
|
1435
|
-
case "com.amazonaws.migrationhub#HomeRegionNotSetException":
|
|
1436
|
-
response = {
|
|
1437
|
-
...(await deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context)),
|
|
1438
|
-
name: errorCode,
|
|
1439
|
-
$metadata: deserializeMetadata(output),
|
|
1440
|
-
};
|
|
1441
|
-
break;
|
|
1442
|
-
case "InternalServerError":
|
|
1443
|
-
case "com.amazonaws.migrationhub#InternalServerError":
|
|
1444
|
-
response = {
|
|
1445
|
-
...(await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)),
|
|
1446
|
-
name: errorCode,
|
|
1447
|
-
$metadata: deserializeMetadata(output),
|
|
1448
|
-
};
|
|
1449
|
-
break;
|
|
1450
|
-
case "InvalidInputException":
|
|
1451
|
-
case "com.amazonaws.migrationhub#InvalidInputException":
|
|
1452
|
-
response = {
|
|
1453
|
-
...(await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context)),
|
|
1454
|
-
name: errorCode,
|
|
1455
|
-
$metadata: deserializeMetadata(output),
|
|
1456
|
-
};
|
|
1457
|
-
break;
|
|
1458
|
-
case "ServiceUnavailableException":
|
|
1459
|
-
case "com.amazonaws.migrationhub#ServiceUnavailableException":
|
|
1460
|
-
response = {
|
|
1461
|
-
...(await deserializeAws_json1_1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
1462
|
-
name: errorCode,
|
|
1463
|
-
$metadata: deserializeMetadata(output),
|
|
1464
|
-
};
|
|
1465
|
-
break;
|
|
1466
|
-
case "ThrottlingException":
|
|
1467
|
-
case "com.amazonaws.migrationhub#ThrottlingException":
|
|
1468
|
-
response = {
|
|
1469
|
-
...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1470
|
-
name: errorCode,
|
|
1471
|
-
$metadata: deserializeMetadata(output),
|
|
1472
|
-
};
|
|
1473
|
-
break;
|
|
1474
|
-
default:
|
|
1475
|
-
const parsedBody = parsedOutput.body;
|
|
1476
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1477
|
-
response = {
|
|
1478
|
-
...parsedBody,
|
|
1479
|
-
name: `${errorCode}`,
|
|
1480
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1481
|
-
$fault: "client",
|
|
1482
|
-
$metadata: deserializeMetadata(output),
|
|
1483
|
-
} as any;
|
|
1484
|
-
}
|
|
1485
|
-
const message = response.message || response.Message || errorCode;
|
|
1486
|
-
response.message = message;
|
|
1487
|
-
delete response.Message;
|
|
1488
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1489
|
-
};
|
|
1490
|
-
|
|
1491
|
-
export const deserializeAws_json1_1ListCreatedArtifactsCommand = async (
|
|
1492
|
-
output: __HttpResponse,
|
|
1493
|
-
context: __SerdeContext
|
|
1494
|
-
): Promise<ListCreatedArtifactsCommandOutput> => {
|
|
1495
|
-
if (output.statusCode >= 300) {
|
|
1496
|
-
return deserializeAws_json1_1ListCreatedArtifactsCommandError(output, context);
|
|
1497
|
-
}
|
|
1498
|
-
const data: any = await parseBody(output.body, context);
|
|
1499
|
-
let contents: any = {};
|
|
1500
|
-
contents = deserializeAws_json1_1ListCreatedArtifactsResult(data, context);
|
|
1501
|
-
const response: ListCreatedArtifactsCommandOutput = {
|
|
1502
|
-
$metadata: deserializeMetadata(output),
|
|
1503
|
-
...contents,
|
|
1504
|
-
};
|
|
1505
|
-
return Promise.resolve(response);
|
|
1506
|
-
};
|
|
1507
|
-
|
|
1508
|
-
const deserializeAws_json1_1ListCreatedArtifactsCommandError = async (
|
|
1509
|
-
output: __HttpResponse,
|
|
1510
|
-
context: __SerdeContext
|
|
1511
|
-
): Promise<ListCreatedArtifactsCommandOutput> => {
|
|
1512
|
-
const parsedOutput: any = {
|
|
1513
|
-
...output,
|
|
1514
|
-
body: await parseBody(output.body, context),
|
|
1515
|
-
};
|
|
1516
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1517
|
-
let errorCode = "UnknownError";
|
|
1518
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1519
|
-
switch (errorCode) {
|
|
1520
|
-
case "AccessDeniedException":
|
|
1521
|
-
case "com.amazonaws.migrationhub#AccessDeniedException":
|
|
1522
|
-
response = {
|
|
1523
|
-
...(await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1524
|
-
name: errorCode,
|
|
1525
|
-
$metadata: deserializeMetadata(output),
|
|
1526
|
-
};
|
|
1527
|
-
break;
|
|
1528
|
-
case "HomeRegionNotSetException":
|
|
1529
|
-
case "com.amazonaws.migrationhub#HomeRegionNotSetException":
|
|
1530
|
-
response = {
|
|
1531
|
-
...(await deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context)),
|
|
1532
|
-
name: errorCode,
|
|
1533
|
-
$metadata: deserializeMetadata(output),
|
|
1534
|
-
};
|
|
1535
|
-
break;
|
|
1536
|
-
case "InternalServerError":
|
|
1537
|
-
case "com.amazonaws.migrationhub#InternalServerError":
|
|
1538
|
-
response = {
|
|
1539
|
-
...(await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)),
|
|
1540
|
-
name: errorCode,
|
|
1541
|
-
$metadata: deserializeMetadata(output),
|
|
1542
|
-
};
|
|
1543
|
-
break;
|
|
1544
|
-
case "InvalidInputException":
|
|
1545
|
-
case "com.amazonaws.migrationhub#InvalidInputException":
|
|
1546
|
-
response = {
|
|
1547
|
-
...(await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context)),
|
|
1548
|
-
name: errorCode,
|
|
1549
|
-
$metadata: deserializeMetadata(output),
|
|
1550
|
-
};
|
|
1551
|
-
break;
|
|
1552
|
-
case "ResourceNotFoundException":
|
|
1553
|
-
case "com.amazonaws.migrationhub#ResourceNotFoundException":
|
|
1554
|
-
response = {
|
|
1555
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1556
|
-
name: errorCode,
|
|
1557
|
-
$metadata: deserializeMetadata(output),
|
|
1558
|
-
};
|
|
1559
|
-
break;
|
|
1560
|
-
case "ServiceUnavailableException":
|
|
1561
|
-
case "com.amazonaws.migrationhub#ServiceUnavailableException":
|
|
1562
|
-
response = {
|
|
1563
|
-
...(await deserializeAws_json1_1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
1564
|
-
name: errorCode,
|
|
1565
|
-
$metadata: deserializeMetadata(output),
|
|
1566
|
-
};
|
|
1567
|
-
break;
|
|
1568
|
-
case "ThrottlingException":
|
|
1569
|
-
case "com.amazonaws.migrationhub#ThrottlingException":
|
|
1570
|
-
response = {
|
|
1571
|
-
...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1572
|
-
name: errorCode,
|
|
1573
|
-
$metadata: deserializeMetadata(output),
|
|
1574
|
-
};
|
|
1575
|
-
break;
|
|
1576
|
-
default:
|
|
1577
|
-
const parsedBody = parsedOutput.body;
|
|
1578
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1579
|
-
response = {
|
|
1580
|
-
...parsedBody,
|
|
1581
|
-
name: `${errorCode}`,
|
|
1582
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1583
|
-
$fault: "client",
|
|
1584
|
-
$metadata: deserializeMetadata(output),
|
|
1585
|
-
} as any;
|
|
1586
|
-
}
|
|
1587
|
-
const message = response.message || response.Message || errorCode;
|
|
1588
|
-
response.message = message;
|
|
1589
|
-
delete response.Message;
|
|
1590
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1591
|
-
};
|
|
1592
|
-
|
|
1593
|
-
export const deserializeAws_json1_1ListDiscoveredResourcesCommand = async (
|
|
1594
|
-
output: __HttpResponse,
|
|
1595
|
-
context: __SerdeContext
|
|
1596
|
-
): Promise<ListDiscoveredResourcesCommandOutput> => {
|
|
1597
|
-
if (output.statusCode >= 300) {
|
|
1598
|
-
return deserializeAws_json1_1ListDiscoveredResourcesCommandError(output, context);
|
|
1599
|
-
}
|
|
1600
|
-
const data: any = await parseBody(output.body, context);
|
|
1601
|
-
let contents: any = {};
|
|
1602
|
-
contents = deserializeAws_json1_1ListDiscoveredResourcesResult(data, context);
|
|
1603
|
-
const response: ListDiscoveredResourcesCommandOutput = {
|
|
1604
|
-
$metadata: deserializeMetadata(output),
|
|
1605
|
-
...contents,
|
|
1606
|
-
};
|
|
1607
|
-
return Promise.resolve(response);
|
|
1608
|
-
};
|
|
1609
|
-
|
|
1610
|
-
const deserializeAws_json1_1ListDiscoveredResourcesCommandError = async (
|
|
1611
|
-
output: __HttpResponse,
|
|
1612
|
-
context: __SerdeContext
|
|
1613
|
-
): Promise<ListDiscoveredResourcesCommandOutput> => {
|
|
1614
|
-
const parsedOutput: any = {
|
|
1615
|
-
...output,
|
|
1616
|
-
body: await parseBody(output.body, context),
|
|
1617
|
-
};
|
|
1618
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1619
|
-
let errorCode = "UnknownError";
|
|
1620
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1621
|
-
switch (errorCode) {
|
|
1622
|
-
case "AccessDeniedException":
|
|
1623
|
-
case "com.amazonaws.migrationhub#AccessDeniedException":
|
|
1624
|
-
response = {
|
|
1625
|
-
...(await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1626
|
-
name: errorCode,
|
|
1627
|
-
$metadata: deserializeMetadata(output),
|
|
1628
|
-
};
|
|
1629
|
-
break;
|
|
1630
|
-
case "HomeRegionNotSetException":
|
|
1631
|
-
case "com.amazonaws.migrationhub#HomeRegionNotSetException":
|
|
1632
|
-
response = {
|
|
1633
|
-
...(await deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context)),
|
|
1634
|
-
name: errorCode,
|
|
1635
|
-
$metadata: deserializeMetadata(output),
|
|
1636
|
-
};
|
|
1637
|
-
break;
|
|
1638
|
-
case "InternalServerError":
|
|
1639
|
-
case "com.amazonaws.migrationhub#InternalServerError":
|
|
1640
|
-
response = {
|
|
1641
|
-
...(await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)),
|
|
1642
|
-
name: errorCode,
|
|
1643
|
-
$metadata: deserializeMetadata(output),
|
|
1644
|
-
};
|
|
1645
|
-
break;
|
|
1646
|
-
case "InvalidInputException":
|
|
1647
|
-
case "com.amazonaws.migrationhub#InvalidInputException":
|
|
1648
|
-
response = {
|
|
1649
|
-
...(await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context)),
|
|
1650
|
-
name: errorCode,
|
|
1651
|
-
$metadata: deserializeMetadata(output),
|
|
1652
|
-
};
|
|
1653
|
-
break;
|
|
1654
|
-
case "ResourceNotFoundException":
|
|
1655
|
-
case "com.amazonaws.migrationhub#ResourceNotFoundException":
|
|
1656
|
-
response = {
|
|
1657
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1658
|
-
name: errorCode,
|
|
1659
|
-
$metadata: deserializeMetadata(output),
|
|
1660
|
-
};
|
|
1661
|
-
break;
|
|
1662
|
-
case "ServiceUnavailableException":
|
|
1663
|
-
case "com.amazonaws.migrationhub#ServiceUnavailableException":
|
|
1664
|
-
response = {
|
|
1665
|
-
...(await deserializeAws_json1_1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
1666
|
-
name: errorCode,
|
|
1667
|
-
$metadata: deserializeMetadata(output),
|
|
1668
|
-
};
|
|
1669
|
-
break;
|
|
1670
|
-
case "ThrottlingException":
|
|
1671
|
-
case "com.amazonaws.migrationhub#ThrottlingException":
|
|
1672
|
-
response = {
|
|
1673
|
-
...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1674
|
-
name: errorCode,
|
|
1675
|
-
$metadata: deserializeMetadata(output),
|
|
1676
|
-
};
|
|
1677
|
-
break;
|
|
1678
|
-
default:
|
|
1679
|
-
const parsedBody = parsedOutput.body;
|
|
1680
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1681
|
-
response = {
|
|
1682
|
-
...parsedBody,
|
|
1683
|
-
name: `${errorCode}`,
|
|
1684
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1685
|
-
$fault: "client",
|
|
1686
|
-
$metadata: deserializeMetadata(output),
|
|
1687
|
-
} as any;
|
|
1688
|
-
}
|
|
1689
|
-
const message = response.message || response.Message || errorCode;
|
|
1690
|
-
response.message = message;
|
|
1691
|
-
delete response.Message;
|
|
1692
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1693
|
-
};
|
|
1694
|
-
|
|
1695
|
-
export const deserializeAws_json1_1ListMigrationTasksCommand = async (
|
|
1696
|
-
output: __HttpResponse,
|
|
1697
|
-
context: __SerdeContext
|
|
1698
|
-
): Promise<ListMigrationTasksCommandOutput> => {
|
|
1699
|
-
if (output.statusCode >= 300) {
|
|
1700
|
-
return deserializeAws_json1_1ListMigrationTasksCommandError(output, context);
|
|
1701
|
-
}
|
|
1702
|
-
const data: any = await parseBody(output.body, context);
|
|
1703
|
-
let contents: any = {};
|
|
1704
|
-
contents = deserializeAws_json1_1ListMigrationTasksResult(data, context);
|
|
1705
|
-
const response: ListMigrationTasksCommandOutput = {
|
|
1706
|
-
$metadata: deserializeMetadata(output),
|
|
1707
|
-
...contents,
|
|
1708
|
-
};
|
|
1709
|
-
return Promise.resolve(response);
|
|
1710
|
-
};
|
|
1711
|
-
|
|
1712
|
-
const deserializeAws_json1_1ListMigrationTasksCommandError = async (
|
|
1713
|
-
output: __HttpResponse,
|
|
1714
|
-
context: __SerdeContext
|
|
1715
|
-
): Promise<ListMigrationTasksCommandOutput> => {
|
|
1716
|
-
const parsedOutput: any = {
|
|
1717
|
-
...output,
|
|
1718
|
-
body: await parseBody(output.body, context),
|
|
1719
|
-
};
|
|
1720
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1721
|
-
let errorCode = "UnknownError";
|
|
1722
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1723
|
-
switch (errorCode) {
|
|
1724
|
-
case "AccessDeniedException":
|
|
1725
|
-
case "com.amazonaws.migrationhub#AccessDeniedException":
|
|
1726
|
-
response = {
|
|
1727
|
-
...(await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1728
|
-
name: errorCode,
|
|
1729
|
-
$metadata: deserializeMetadata(output),
|
|
1730
|
-
};
|
|
1731
|
-
break;
|
|
1732
|
-
case "HomeRegionNotSetException":
|
|
1733
|
-
case "com.amazonaws.migrationhub#HomeRegionNotSetException":
|
|
1734
|
-
response = {
|
|
1735
|
-
...(await deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context)),
|
|
1736
|
-
name: errorCode,
|
|
1737
|
-
$metadata: deserializeMetadata(output),
|
|
1738
|
-
};
|
|
1739
|
-
break;
|
|
1740
|
-
case "InternalServerError":
|
|
1741
|
-
case "com.amazonaws.migrationhub#InternalServerError":
|
|
1742
|
-
response = {
|
|
1743
|
-
...(await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)),
|
|
1744
|
-
name: errorCode,
|
|
1745
|
-
$metadata: deserializeMetadata(output),
|
|
1746
|
-
};
|
|
1747
|
-
break;
|
|
1748
|
-
case "InvalidInputException":
|
|
1749
|
-
case "com.amazonaws.migrationhub#InvalidInputException":
|
|
1750
|
-
response = {
|
|
1751
|
-
...(await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context)),
|
|
1752
|
-
name: errorCode,
|
|
1753
|
-
$metadata: deserializeMetadata(output),
|
|
1754
|
-
};
|
|
1755
|
-
break;
|
|
1756
|
-
case "PolicyErrorException":
|
|
1757
|
-
case "com.amazonaws.migrationhub#PolicyErrorException":
|
|
1758
|
-
response = {
|
|
1759
|
-
...(await deserializeAws_json1_1PolicyErrorExceptionResponse(parsedOutput, context)),
|
|
1760
|
-
name: errorCode,
|
|
1761
|
-
$metadata: deserializeMetadata(output),
|
|
1762
|
-
};
|
|
1763
|
-
break;
|
|
1764
|
-
case "ResourceNotFoundException":
|
|
1765
|
-
case "com.amazonaws.migrationhub#ResourceNotFoundException":
|
|
1766
|
-
response = {
|
|
1767
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1768
|
-
name: errorCode,
|
|
1769
|
-
$metadata: deserializeMetadata(output),
|
|
1770
|
-
};
|
|
1771
|
-
break;
|
|
1772
|
-
case "ServiceUnavailableException":
|
|
1773
|
-
case "com.amazonaws.migrationhub#ServiceUnavailableException":
|
|
1774
|
-
response = {
|
|
1775
|
-
...(await deserializeAws_json1_1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
1776
|
-
name: errorCode,
|
|
1777
|
-
$metadata: deserializeMetadata(output),
|
|
1778
|
-
};
|
|
1779
|
-
break;
|
|
1780
|
-
case "ThrottlingException":
|
|
1781
|
-
case "com.amazonaws.migrationhub#ThrottlingException":
|
|
1782
|
-
response = {
|
|
1783
|
-
...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1784
|
-
name: errorCode,
|
|
1785
|
-
$metadata: deserializeMetadata(output),
|
|
1786
|
-
};
|
|
1787
|
-
break;
|
|
1788
|
-
default:
|
|
1789
|
-
const parsedBody = parsedOutput.body;
|
|
1790
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1791
|
-
response = {
|
|
1792
|
-
...parsedBody,
|
|
1793
|
-
name: `${errorCode}`,
|
|
1794
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1795
|
-
$fault: "client",
|
|
1796
|
-
$metadata: deserializeMetadata(output),
|
|
1797
|
-
} as any;
|
|
1798
|
-
}
|
|
1799
|
-
const message = response.message || response.Message || errorCode;
|
|
1800
|
-
response.message = message;
|
|
1801
|
-
delete response.Message;
|
|
1802
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1803
|
-
};
|
|
1804
|
-
|
|
1805
|
-
export const deserializeAws_json1_1ListProgressUpdateStreamsCommand = async (
|
|
1806
|
-
output: __HttpResponse,
|
|
1807
|
-
context: __SerdeContext
|
|
1808
|
-
): Promise<ListProgressUpdateStreamsCommandOutput> => {
|
|
1809
|
-
if (output.statusCode >= 300) {
|
|
1810
|
-
return deserializeAws_json1_1ListProgressUpdateStreamsCommandError(output, context);
|
|
1811
|
-
}
|
|
1812
|
-
const data: any = await parseBody(output.body, context);
|
|
1813
|
-
let contents: any = {};
|
|
1814
|
-
contents = deserializeAws_json1_1ListProgressUpdateStreamsResult(data, context);
|
|
1815
|
-
const response: ListProgressUpdateStreamsCommandOutput = {
|
|
1816
|
-
$metadata: deserializeMetadata(output),
|
|
1817
|
-
...contents,
|
|
1818
|
-
};
|
|
1819
|
-
return Promise.resolve(response);
|
|
1820
|
-
};
|
|
1821
|
-
|
|
1822
|
-
const deserializeAws_json1_1ListProgressUpdateStreamsCommandError = async (
|
|
1823
|
-
output: __HttpResponse,
|
|
1824
|
-
context: __SerdeContext
|
|
1825
|
-
): Promise<ListProgressUpdateStreamsCommandOutput> => {
|
|
1826
|
-
const parsedOutput: any = {
|
|
1827
|
-
...output,
|
|
1828
|
-
body: await parseBody(output.body, context),
|
|
1829
|
-
};
|
|
1830
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1831
|
-
let errorCode = "UnknownError";
|
|
1832
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1833
|
-
switch (errorCode) {
|
|
1834
|
-
case "AccessDeniedException":
|
|
1835
|
-
case "com.amazonaws.migrationhub#AccessDeniedException":
|
|
1836
|
-
response = {
|
|
1837
|
-
...(await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1838
|
-
name: errorCode,
|
|
1839
|
-
$metadata: deserializeMetadata(output),
|
|
1840
|
-
};
|
|
1841
|
-
break;
|
|
1842
|
-
case "HomeRegionNotSetException":
|
|
1843
|
-
case "com.amazonaws.migrationhub#HomeRegionNotSetException":
|
|
1844
|
-
response = {
|
|
1845
|
-
...(await deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context)),
|
|
1846
|
-
name: errorCode,
|
|
1847
|
-
$metadata: deserializeMetadata(output),
|
|
1848
|
-
};
|
|
1849
|
-
break;
|
|
1850
|
-
case "InternalServerError":
|
|
1851
|
-
case "com.amazonaws.migrationhub#InternalServerError":
|
|
1852
|
-
response = {
|
|
1853
|
-
...(await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)),
|
|
1854
|
-
name: errorCode,
|
|
1855
|
-
$metadata: deserializeMetadata(output),
|
|
1856
|
-
};
|
|
1857
|
-
break;
|
|
1858
|
-
case "InvalidInputException":
|
|
1859
|
-
case "com.amazonaws.migrationhub#InvalidInputException":
|
|
1860
|
-
response = {
|
|
1861
|
-
...(await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context)),
|
|
1862
|
-
name: errorCode,
|
|
1863
|
-
$metadata: deserializeMetadata(output),
|
|
1864
|
-
};
|
|
1865
|
-
break;
|
|
1866
|
-
case "ServiceUnavailableException":
|
|
1867
|
-
case "com.amazonaws.migrationhub#ServiceUnavailableException":
|
|
1868
|
-
response = {
|
|
1869
|
-
...(await deserializeAws_json1_1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
1870
|
-
name: errorCode,
|
|
1871
|
-
$metadata: deserializeMetadata(output),
|
|
1872
|
-
};
|
|
1873
|
-
break;
|
|
1874
|
-
case "ThrottlingException":
|
|
1875
|
-
case "com.amazonaws.migrationhub#ThrottlingException":
|
|
1876
|
-
response = {
|
|
1877
|
-
...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1878
|
-
name: errorCode,
|
|
1879
|
-
$metadata: deserializeMetadata(output),
|
|
1880
|
-
};
|
|
1881
|
-
break;
|
|
1882
|
-
default:
|
|
1883
|
-
const parsedBody = parsedOutput.body;
|
|
1884
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1885
|
-
response = {
|
|
1886
|
-
...parsedBody,
|
|
1887
|
-
name: `${errorCode}`,
|
|
1888
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1889
|
-
$fault: "client",
|
|
1890
|
-
$metadata: deserializeMetadata(output),
|
|
1891
|
-
} as any;
|
|
1892
|
-
}
|
|
1893
|
-
const message = response.message || response.Message || errorCode;
|
|
1894
|
-
response.message = message;
|
|
1895
|
-
delete response.Message;
|
|
1896
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1897
|
-
};
|
|
1898
|
-
|
|
1899
|
-
export const deserializeAws_json1_1NotifyApplicationStateCommand = async (
|
|
1900
|
-
output: __HttpResponse,
|
|
1901
|
-
context: __SerdeContext
|
|
1902
|
-
): Promise<NotifyApplicationStateCommandOutput> => {
|
|
1903
|
-
if (output.statusCode >= 300) {
|
|
1904
|
-
return deserializeAws_json1_1NotifyApplicationStateCommandError(output, context);
|
|
1905
|
-
}
|
|
1906
|
-
const data: any = await parseBody(output.body, context);
|
|
1907
|
-
let contents: any = {};
|
|
1908
|
-
contents = deserializeAws_json1_1NotifyApplicationStateResult(data, context);
|
|
1909
|
-
const response: NotifyApplicationStateCommandOutput = {
|
|
1910
|
-
$metadata: deserializeMetadata(output),
|
|
1911
|
-
...contents,
|
|
1912
|
-
};
|
|
1913
|
-
return Promise.resolve(response);
|
|
1914
|
-
};
|
|
1915
|
-
|
|
1916
|
-
const deserializeAws_json1_1NotifyApplicationStateCommandError = async (
|
|
1917
|
-
output: __HttpResponse,
|
|
1918
|
-
context: __SerdeContext
|
|
1919
|
-
): Promise<NotifyApplicationStateCommandOutput> => {
|
|
1920
|
-
const parsedOutput: any = {
|
|
1921
|
-
...output,
|
|
1922
|
-
body: await parseBody(output.body, context),
|
|
1923
|
-
};
|
|
1924
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1925
|
-
let errorCode = "UnknownError";
|
|
1926
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1927
|
-
switch (errorCode) {
|
|
1928
|
-
case "AccessDeniedException":
|
|
1929
|
-
case "com.amazonaws.migrationhub#AccessDeniedException":
|
|
1930
|
-
response = {
|
|
1931
|
-
...(await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1932
|
-
name: errorCode,
|
|
1933
|
-
$metadata: deserializeMetadata(output),
|
|
1934
|
-
};
|
|
1935
|
-
break;
|
|
1936
|
-
case "DryRunOperation":
|
|
1937
|
-
case "com.amazonaws.migrationhub#DryRunOperation":
|
|
1938
|
-
response = {
|
|
1939
|
-
...(await deserializeAws_json1_1DryRunOperationResponse(parsedOutput, context)),
|
|
1940
|
-
name: errorCode,
|
|
1941
|
-
$metadata: deserializeMetadata(output),
|
|
1942
|
-
};
|
|
1943
|
-
break;
|
|
1944
|
-
case "HomeRegionNotSetException":
|
|
1945
|
-
case "com.amazonaws.migrationhub#HomeRegionNotSetException":
|
|
1946
|
-
response = {
|
|
1947
|
-
...(await deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context)),
|
|
1948
|
-
name: errorCode,
|
|
1949
|
-
$metadata: deserializeMetadata(output),
|
|
1950
|
-
};
|
|
1951
|
-
break;
|
|
1952
|
-
case "InternalServerError":
|
|
1953
|
-
case "com.amazonaws.migrationhub#InternalServerError":
|
|
1954
|
-
response = {
|
|
1955
|
-
...(await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)),
|
|
1956
|
-
name: errorCode,
|
|
1957
|
-
$metadata: deserializeMetadata(output),
|
|
1958
|
-
};
|
|
1959
|
-
break;
|
|
1960
|
-
case "InvalidInputException":
|
|
1961
|
-
case "com.amazonaws.migrationhub#InvalidInputException":
|
|
1962
|
-
response = {
|
|
1963
|
-
...(await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context)),
|
|
1964
|
-
name: errorCode,
|
|
1965
|
-
$metadata: deserializeMetadata(output),
|
|
1966
|
-
};
|
|
1967
|
-
break;
|
|
1968
|
-
case "PolicyErrorException":
|
|
1969
|
-
case "com.amazonaws.migrationhub#PolicyErrorException":
|
|
1970
|
-
response = {
|
|
1971
|
-
...(await deserializeAws_json1_1PolicyErrorExceptionResponse(parsedOutput, context)),
|
|
1972
|
-
name: errorCode,
|
|
1973
|
-
$metadata: deserializeMetadata(output),
|
|
1974
|
-
};
|
|
1975
|
-
break;
|
|
1976
|
-
case "ResourceNotFoundException":
|
|
1977
|
-
case "com.amazonaws.migrationhub#ResourceNotFoundException":
|
|
1978
|
-
response = {
|
|
1979
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1980
|
-
name: errorCode,
|
|
1981
|
-
$metadata: deserializeMetadata(output),
|
|
1982
|
-
};
|
|
1983
|
-
break;
|
|
1984
|
-
case "ServiceUnavailableException":
|
|
1985
|
-
case "com.amazonaws.migrationhub#ServiceUnavailableException":
|
|
1986
|
-
response = {
|
|
1987
|
-
...(await deserializeAws_json1_1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
1988
|
-
name: errorCode,
|
|
1989
|
-
$metadata: deserializeMetadata(output),
|
|
1990
|
-
};
|
|
1991
|
-
break;
|
|
1992
|
-
case "ThrottlingException":
|
|
1993
|
-
case "com.amazonaws.migrationhub#ThrottlingException":
|
|
1994
|
-
response = {
|
|
1995
|
-
...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1996
|
-
name: errorCode,
|
|
1997
|
-
$metadata: deserializeMetadata(output),
|
|
1998
|
-
};
|
|
1999
|
-
break;
|
|
2000
|
-
case "UnauthorizedOperation":
|
|
2001
|
-
case "com.amazonaws.migrationhub#UnauthorizedOperation":
|
|
2002
|
-
response = {
|
|
2003
|
-
...(await deserializeAws_json1_1UnauthorizedOperationResponse(parsedOutput, context)),
|
|
2004
|
-
name: errorCode,
|
|
2005
|
-
$metadata: deserializeMetadata(output),
|
|
2006
|
-
};
|
|
2007
|
-
break;
|
|
2008
|
-
default:
|
|
2009
|
-
const parsedBody = parsedOutput.body;
|
|
2010
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2011
|
-
response = {
|
|
2012
|
-
...parsedBody,
|
|
2013
|
-
name: `${errorCode}`,
|
|
2014
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2015
|
-
$fault: "client",
|
|
2016
|
-
$metadata: deserializeMetadata(output),
|
|
2017
|
-
} as any;
|
|
2018
|
-
}
|
|
2019
|
-
const message = response.message || response.Message || errorCode;
|
|
2020
|
-
response.message = message;
|
|
2021
|
-
delete response.Message;
|
|
2022
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2023
|
-
};
|
|
2024
|
-
|
|
2025
|
-
export const deserializeAws_json1_1NotifyMigrationTaskStateCommand = async (
|
|
2026
|
-
output: __HttpResponse,
|
|
2027
|
-
context: __SerdeContext
|
|
2028
|
-
): Promise<NotifyMigrationTaskStateCommandOutput> => {
|
|
2029
|
-
if (output.statusCode >= 300) {
|
|
2030
|
-
return deserializeAws_json1_1NotifyMigrationTaskStateCommandError(output, context);
|
|
2031
|
-
}
|
|
2032
|
-
const data: any = await parseBody(output.body, context);
|
|
2033
|
-
let contents: any = {};
|
|
2034
|
-
contents = deserializeAws_json1_1NotifyMigrationTaskStateResult(data, context);
|
|
2035
|
-
const response: NotifyMigrationTaskStateCommandOutput = {
|
|
2036
|
-
$metadata: deserializeMetadata(output),
|
|
2037
|
-
...contents,
|
|
2038
|
-
};
|
|
2039
|
-
return Promise.resolve(response);
|
|
2040
|
-
};
|
|
2041
|
-
|
|
2042
|
-
const deserializeAws_json1_1NotifyMigrationTaskStateCommandError = async (
|
|
2043
|
-
output: __HttpResponse,
|
|
2044
|
-
context: __SerdeContext
|
|
2045
|
-
): Promise<NotifyMigrationTaskStateCommandOutput> => {
|
|
2046
|
-
const parsedOutput: any = {
|
|
2047
|
-
...output,
|
|
2048
|
-
body: await parseBody(output.body, context),
|
|
2049
|
-
};
|
|
2050
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2051
|
-
let errorCode = "UnknownError";
|
|
2052
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2053
|
-
switch (errorCode) {
|
|
2054
|
-
case "AccessDeniedException":
|
|
2055
|
-
case "com.amazonaws.migrationhub#AccessDeniedException":
|
|
2056
|
-
response = {
|
|
2057
|
-
...(await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
2058
|
-
name: errorCode,
|
|
2059
|
-
$metadata: deserializeMetadata(output),
|
|
2060
|
-
};
|
|
2061
|
-
break;
|
|
2062
|
-
case "DryRunOperation":
|
|
2063
|
-
case "com.amazonaws.migrationhub#DryRunOperation":
|
|
2064
|
-
response = {
|
|
2065
|
-
...(await deserializeAws_json1_1DryRunOperationResponse(parsedOutput, context)),
|
|
2066
|
-
name: errorCode,
|
|
2067
|
-
$metadata: deserializeMetadata(output),
|
|
2068
|
-
};
|
|
2069
|
-
break;
|
|
2070
|
-
case "HomeRegionNotSetException":
|
|
2071
|
-
case "com.amazonaws.migrationhub#HomeRegionNotSetException":
|
|
2072
|
-
response = {
|
|
2073
|
-
...(await deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context)),
|
|
2074
|
-
name: errorCode,
|
|
2075
|
-
$metadata: deserializeMetadata(output),
|
|
2076
|
-
};
|
|
2077
|
-
break;
|
|
2078
|
-
case "InternalServerError":
|
|
2079
|
-
case "com.amazonaws.migrationhub#InternalServerError":
|
|
2080
|
-
response = {
|
|
2081
|
-
...(await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)),
|
|
2082
|
-
name: errorCode,
|
|
2083
|
-
$metadata: deserializeMetadata(output),
|
|
2084
|
-
};
|
|
2085
|
-
break;
|
|
2086
|
-
case "InvalidInputException":
|
|
2087
|
-
case "com.amazonaws.migrationhub#InvalidInputException":
|
|
2088
|
-
response = {
|
|
2089
|
-
...(await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context)),
|
|
2090
|
-
name: errorCode,
|
|
2091
|
-
$metadata: deserializeMetadata(output),
|
|
2092
|
-
};
|
|
2093
|
-
break;
|
|
2094
|
-
case "ResourceNotFoundException":
|
|
2095
|
-
case "com.amazonaws.migrationhub#ResourceNotFoundException":
|
|
2096
|
-
response = {
|
|
2097
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2098
|
-
name: errorCode,
|
|
2099
|
-
$metadata: deserializeMetadata(output),
|
|
2100
|
-
};
|
|
2101
|
-
break;
|
|
2102
|
-
case "ServiceUnavailableException":
|
|
2103
|
-
case "com.amazonaws.migrationhub#ServiceUnavailableException":
|
|
2104
|
-
response = {
|
|
2105
|
-
...(await deserializeAws_json1_1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
2106
|
-
name: errorCode,
|
|
2107
|
-
$metadata: deserializeMetadata(output),
|
|
2108
|
-
};
|
|
2109
|
-
break;
|
|
2110
|
-
case "ThrottlingException":
|
|
2111
|
-
case "com.amazonaws.migrationhub#ThrottlingException":
|
|
2112
|
-
response = {
|
|
2113
|
-
...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
2114
|
-
name: errorCode,
|
|
2115
|
-
$metadata: deserializeMetadata(output),
|
|
2116
|
-
};
|
|
2117
|
-
break;
|
|
2118
|
-
case "UnauthorizedOperation":
|
|
2119
|
-
case "com.amazonaws.migrationhub#UnauthorizedOperation":
|
|
2120
|
-
response = {
|
|
2121
|
-
...(await deserializeAws_json1_1UnauthorizedOperationResponse(parsedOutput, context)),
|
|
2122
|
-
name: errorCode,
|
|
2123
|
-
$metadata: deserializeMetadata(output),
|
|
2124
|
-
};
|
|
2125
|
-
break;
|
|
2126
|
-
default:
|
|
2127
|
-
const parsedBody = parsedOutput.body;
|
|
2128
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2129
|
-
response = {
|
|
2130
|
-
...parsedBody,
|
|
2131
|
-
name: `${errorCode}`,
|
|
2132
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2133
|
-
$fault: "client",
|
|
2134
|
-
$metadata: deserializeMetadata(output),
|
|
2135
|
-
} as any;
|
|
2136
|
-
}
|
|
2137
|
-
const message = response.message || response.Message || errorCode;
|
|
2138
|
-
response.message = message;
|
|
2139
|
-
delete response.Message;
|
|
2140
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2141
|
-
};
|
|
2142
|
-
|
|
2143
|
-
export const deserializeAws_json1_1PutResourceAttributesCommand = async (
|
|
2144
|
-
output: __HttpResponse,
|
|
2145
|
-
context: __SerdeContext
|
|
2146
|
-
): Promise<PutResourceAttributesCommandOutput> => {
|
|
2147
|
-
if (output.statusCode >= 300) {
|
|
2148
|
-
return deserializeAws_json1_1PutResourceAttributesCommandError(output, context);
|
|
2149
|
-
}
|
|
2150
|
-
const data: any = await parseBody(output.body, context);
|
|
2151
|
-
let contents: any = {};
|
|
2152
|
-
contents = deserializeAws_json1_1PutResourceAttributesResult(data, context);
|
|
2153
|
-
const response: PutResourceAttributesCommandOutput = {
|
|
2154
|
-
$metadata: deserializeMetadata(output),
|
|
2155
|
-
...contents,
|
|
2156
|
-
};
|
|
2157
|
-
return Promise.resolve(response);
|
|
2158
|
-
};
|
|
2159
|
-
|
|
2160
|
-
const deserializeAws_json1_1PutResourceAttributesCommandError = async (
|
|
2161
|
-
output: __HttpResponse,
|
|
2162
|
-
context: __SerdeContext
|
|
2163
|
-
): Promise<PutResourceAttributesCommandOutput> => {
|
|
2164
|
-
const parsedOutput: any = {
|
|
2165
|
-
...output,
|
|
2166
|
-
body: await parseBody(output.body, context),
|
|
2167
|
-
};
|
|
2168
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2169
|
-
let errorCode = "UnknownError";
|
|
2170
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2171
|
-
switch (errorCode) {
|
|
2172
|
-
case "AccessDeniedException":
|
|
2173
|
-
case "com.amazonaws.migrationhub#AccessDeniedException":
|
|
2174
|
-
response = {
|
|
2175
|
-
...(await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
2176
|
-
name: errorCode,
|
|
2177
|
-
$metadata: deserializeMetadata(output),
|
|
2178
|
-
};
|
|
2179
|
-
break;
|
|
2180
|
-
case "DryRunOperation":
|
|
2181
|
-
case "com.amazonaws.migrationhub#DryRunOperation":
|
|
2182
|
-
response = {
|
|
2183
|
-
...(await deserializeAws_json1_1DryRunOperationResponse(parsedOutput, context)),
|
|
2184
|
-
name: errorCode,
|
|
2185
|
-
$metadata: deserializeMetadata(output),
|
|
2186
|
-
};
|
|
2187
|
-
break;
|
|
2188
|
-
case "HomeRegionNotSetException":
|
|
2189
|
-
case "com.amazonaws.migrationhub#HomeRegionNotSetException":
|
|
2190
|
-
response = {
|
|
2191
|
-
...(await deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context)),
|
|
2192
|
-
name: errorCode,
|
|
2193
|
-
$metadata: deserializeMetadata(output),
|
|
2194
|
-
};
|
|
2195
|
-
break;
|
|
2196
|
-
case "InternalServerError":
|
|
2197
|
-
case "com.amazonaws.migrationhub#InternalServerError":
|
|
2198
|
-
response = {
|
|
2199
|
-
...(await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)),
|
|
2200
|
-
name: errorCode,
|
|
2201
|
-
$metadata: deserializeMetadata(output),
|
|
2202
|
-
};
|
|
2203
|
-
break;
|
|
2204
|
-
case "InvalidInputException":
|
|
2205
|
-
case "com.amazonaws.migrationhub#InvalidInputException":
|
|
2206
|
-
response = {
|
|
2207
|
-
...(await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context)),
|
|
2208
|
-
name: errorCode,
|
|
2209
|
-
$metadata: deserializeMetadata(output),
|
|
2210
|
-
};
|
|
2211
|
-
break;
|
|
2212
|
-
case "ResourceNotFoundException":
|
|
2213
|
-
case "com.amazonaws.migrationhub#ResourceNotFoundException":
|
|
2214
|
-
response = {
|
|
2215
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2216
|
-
name: errorCode,
|
|
2217
|
-
$metadata: deserializeMetadata(output),
|
|
2218
|
-
};
|
|
2219
|
-
break;
|
|
2220
|
-
case "ServiceUnavailableException":
|
|
2221
|
-
case "com.amazonaws.migrationhub#ServiceUnavailableException":
|
|
2222
|
-
response = {
|
|
2223
|
-
...(await deserializeAws_json1_1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
2224
|
-
name: errorCode,
|
|
2225
|
-
$metadata: deserializeMetadata(output),
|
|
2226
|
-
};
|
|
2227
|
-
break;
|
|
2228
|
-
case "ThrottlingException":
|
|
2229
|
-
case "com.amazonaws.migrationhub#ThrottlingException":
|
|
2230
|
-
response = {
|
|
2231
|
-
...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
2232
|
-
name: errorCode,
|
|
2233
|
-
$metadata: deserializeMetadata(output),
|
|
2234
|
-
};
|
|
2235
|
-
break;
|
|
2236
|
-
case "UnauthorizedOperation":
|
|
2237
|
-
case "com.amazonaws.migrationhub#UnauthorizedOperation":
|
|
2238
|
-
response = {
|
|
2239
|
-
...(await deserializeAws_json1_1UnauthorizedOperationResponse(parsedOutput, context)),
|
|
2240
|
-
name: errorCode,
|
|
2241
|
-
$metadata: deserializeMetadata(output),
|
|
2242
|
-
};
|
|
2243
|
-
break;
|
|
2244
|
-
default:
|
|
2245
|
-
const parsedBody = parsedOutput.body;
|
|
2246
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2247
|
-
response = {
|
|
2248
|
-
...parsedBody,
|
|
2249
|
-
name: `${errorCode}`,
|
|
2250
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2251
|
-
$fault: "client",
|
|
2252
|
-
$metadata: deserializeMetadata(output),
|
|
2253
|
-
} as any;
|
|
2254
|
-
}
|
|
2255
|
-
const message = response.message || response.Message || errorCode;
|
|
2256
|
-
response.message = message;
|
|
2257
|
-
delete response.Message;
|
|
2258
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2259
|
-
};
|
|
2260
|
-
|
|
2261
|
-
const deserializeAws_json1_1AccessDeniedExceptionResponse = async (
|
|
2262
|
-
parsedOutput: any,
|
|
2263
|
-
context: __SerdeContext
|
|
2264
|
-
): Promise<AccessDeniedException> => {
|
|
2265
|
-
const body = parsedOutput.body;
|
|
2266
|
-
const deserialized: any = deserializeAws_json1_1AccessDeniedException(body, context);
|
|
2267
|
-
const contents: AccessDeniedException = {
|
|
2268
|
-
name: "AccessDeniedException",
|
|
2269
|
-
$fault: "client",
|
|
2270
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2271
|
-
...deserialized,
|
|
2272
|
-
};
|
|
2273
|
-
return contents;
|
|
2274
|
-
};
|
|
2275
|
-
|
|
2276
|
-
const deserializeAws_json1_1DryRunOperationResponse = async (
|
|
2277
|
-
parsedOutput: any,
|
|
2278
|
-
context: __SerdeContext
|
|
2279
|
-
): Promise<DryRunOperation> => {
|
|
2280
|
-
const body = parsedOutput.body;
|
|
2281
|
-
const deserialized: any = deserializeAws_json1_1DryRunOperation(body, context);
|
|
2282
|
-
const contents: DryRunOperation = {
|
|
2283
|
-
name: "DryRunOperation",
|
|
2284
|
-
$fault: "client",
|
|
2285
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2286
|
-
...deserialized,
|
|
2287
|
-
};
|
|
2288
|
-
return contents;
|
|
2289
|
-
};
|
|
2290
|
-
|
|
2291
|
-
const deserializeAws_json1_1HomeRegionNotSetExceptionResponse = async (
|
|
2292
|
-
parsedOutput: any,
|
|
2293
|
-
context: __SerdeContext
|
|
2294
|
-
): Promise<HomeRegionNotSetException> => {
|
|
2295
|
-
const body = parsedOutput.body;
|
|
2296
|
-
const deserialized: any = deserializeAws_json1_1HomeRegionNotSetException(body, context);
|
|
2297
|
-
const contents: HomeRegionNotSetException = {
|
|
2298
|
-
name: "HomeRegionNotSetException",
|
|
2299
|
-
$fault: "client",
|
|
2300
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2301
|
-
...deserialized,
|
|
2302
|
-
};
|
|
2303
|
-
return contents;
|
|
2304
|
-
};
|
|
2305
|
-
|
|
2306
|
-
const deserializeAws_json1_1InternalServerErrorResponse = async (
|
|
2307
|
-
parsedOutput: any,
|
|
2308
|
-
context: __SerdeContext
|
|
2309
|
-
): Promise<InternalServerError> => {
|
|
2310
|
-
const body = parsedOutput.body;
|
|
2311
|
-
const deserialized: any = deserializeAws_json1_1InternalServerError(body, context);
|
|
2312
|
-
const contents: InternalServerError = {
|
|
2313
|
-
name: "InternalServerError",
|
|
2314
|
-
$fault: "server",
|
|
2315
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2316
|
-
...deserialized,
|
|
2317
|
-
};
|
|
2318
|
-
return contents;
|
|
2319
|
-
};
|
|
2320
|
-
|
|
2321
|
-
const deserializeAws_json1_1InvalidInputExceptionResponse = async (
|
|
2322
|
-
parsedOutput: any,
|
|
2323
|
-
context: __SerdeContext
|
|
2324
|
-
): Promise<InvalidInputException> => {
|
|
2325
|
-
const body = parsedOutput.body;
|
|
2326
|
-
const deserialized: any = deserializeAws_json1_1InvalidInputException(body, context);
|
|
2327
|
-
const contents: InvalidInputException = {
|
|
2328
|
-
name: "InvalidInputException",
|
|
2329
|
-
$fault: "client",
|
|
2330
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2331
|
-
...deserialized,
|
|
2332
|
-
};
|
|
2333
|
-
return contents;
|
|
2334
|
-
};
|
|
2335
|
-
|
|
2336
|
-
const deserializeAws_json1_1PolicyErrorExceptionResponse = async (
|
|
2337
|
-
parsedOutput: any,
|
|
2338
|
-
context: __SerdeContext
|
|
2339
|
-
): Promise<PolicyErrorException> => {
|
|
2340
|
-
const body = parsedOutput.body;
|
|
2341
|
-
const deserialized: any = deserializeAws_json1_1PolicyErrorException(body, context);
|
|
2342
|
-
const contents: PolicyErrorException = {
|
|
2343
|
-
name: "PolicyErrorException",
|
|
2344
|
-
$fault: "client",
|
|
2345
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2346
|
-
...deserialized,
|
|
2347
|
-
};
|
|
2348
|
-
return contents;
|
|
2349
|
-
};
|
|
2350
|
-
|
|
2351
|
-
const deserializeAws_json1_1ResourceNotFoundExceptionResponse = async (
|
|
2352
|
-
parsedOutput: any,
|
|
2353
|
-
context: __SerdeContext
|
|
2354
|
-
): Promise<ResourceNotFoundException> => {
|
|
2355
|
-
const body = parsedOutput.body;
|
|
2356
|
-
const deserialized: any = deserializeAws_json1_1ResourceNotFoundException(body, context);
|
|
2357
|
-
const contents: ResourceNotFoundException = {
|
|
2358
|
-
name: "ResourceNotFoundException",
|
|
2359
|
-
$fault: "client",
|
|
2360
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2361
|
-
...deserialized,
|
|
2362
|
-
};
|
|
2363
|
-
return contents;
|
|
2364
|
-
};
|
|
2365
|
-
|
|
2366
|
-
const deserializeAws_json1_1ServiceUnavailableExceptionResponse = async (
|
|
2367
|
-
parsedOutput: any,
|
|
2368
|
-
context: __SerdeContext
|
|
2369
|
-
): Promise<ServiceUnavailableException> => {
|
|
2370
|
-
const body = parsedOutput.body;
|
|
2371
|
-
const deserialized: any = deserializeAws_json1_1ServiceUnavailableException(body, context);
|
|
2372
|
-
const contents: ServiceUnavailableException = {
|
|
2373
|
-
name: "ServiceUnavailableException",
|
|
2374
|
-
$fault: "server",
|
|
2375
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2376
|
-
...deserialized,
|
|
2377
|
-
};
|
|
2378
|
-
return contents;
|
|
2379
|
-
};
|
|
2380
|
-
|
|
2381
|
-
const deserializeAws_json1_1ThrottlingExceptionResponse = async (
|
|
2382
|
-
parsedOutput: any,
|
|
2383
|
-
context: __SerdeContext
|
|
2384
|
-
): Promise<ThrottlingException> => {
|
|
2385
|
-
const body = parsedOutput.body;
|
|
2386
|
-
const deserialized: any = deserializeAws_json1_1ThrottlingException(body, context);
|
|
2387
|
-
const contents: ThrottlingException = {
|
|
2388
|
-
name: "ThrottlingException",
|
|
2389
|
-
$fault: "client",
|
|
2390
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2391
|
-
...deserialized,
|
|
2392
|
-
};
|
|
2393
|
-
return contents;
|
|
2394
|
-
};
|
|
2395
|
-
|
|
2396
|
-
const deserializeAws_json1_1UnauthorizedOperationResponse = async (
|
|
2397
|
-
parsedOutput: any,
|
|
2398
|
-
context: __SerdeContext
|
|
2399
|
-
): Promise<UnauthorizedOperation> => {
|
|
2400
|
-
const body = parsedOutput.body;
|
|
2401
|
-
const deserialized: any = deserializeAws_json1_1UnauthorizedOperation(body, context);
|
|
2402
|
-
const contents: UnauthorizedOperation = {
|
|
2403
|
-
name: "UnauthorizedOperation",
|
|
2404
|
-
$fault: "client",
|
|
2405
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2406
|
-
...deserialized,
|
|
2407
|
-
};
|
|
2408
|
-
return contents;
|
|
2409
|
-
};
|
|
2410
|
-
|
|
2411
|
-
const serializeAws_json1_1ApplicationIds = (input: string[], context: __SerdeContext): any => {
|
|
2412
|
-
return input
|
|
2413
|
-
.filter((e: any) => e != null)
|
|
2414
|
-
.map((entry) => {
|
|
2415
|
-
if (entry === null) {
|
|
2416
|
-
return null as any;
|
|
2417
|
-
}
|
|
2418
|
-
return entry;
|
|
2419
|
-
});
|
|
2420
|
-
};
|
|
2421
|
-
|
|
2422
|
-
const serializeAws_json1_1AssociateCreatedArtifactRequest = (
|
|
2423
|
-
input: AssociateCreatedArtifactRequest,
|
|
2424
|
-
context: __SerdeContext
|
|
2425
|
-
): any => {
|
|
2426
|
-
return {
|
|
2427
|
-
...(input.CreatedArtifact !== undefined &&
|
|
2428
|
-
input.CreatedArtifact !== null && {
|
|
2429
|
-
CreatedArtifact: serializeAws_json1_1CreatedArtifact(input.CreatedArtifact, context),
|
|
2430
|
-
}),
|
|
2431
|
-
...(input.DryRun !== undefined && input.DryRun !== null && { DryRun: input.DryRun }),
|
|
2432
|
-
...(input.MigrationTaskName !== undefined &&
|
|
2433
|
-
input.MigrationTaskName !== null && { MigrationTaskName: input.MigrationTaskName }),
|
|
2434
|
-
...(input.ProgressUpdateStream !== undefined &&
|
|
2435
|
-
input.ProgressUpdateStream !== null && { ProgressUpdateStream: input.ProgressUpdateStream }),
|
|
2436
|
-
};
|
|
2437
|
-
};
|
|
2438
|
-
|
|
2439
|
-
const serializeAws_json1_1AssociateDiscoveredResourceRequest = (
|
|
2440
|
-
input: AssociateDiscoveredResourceRequest,
|
|
2441
|
-
context: __SerdeContext
|
|
2442
|
-
): any => {
|
|
2443
|
-
return {
|
|
2444
|
-
...(input.DiscoveredResource !== undefined &&
|
|
2445
|
-
input.DiscoveredResource !== null && {
|
|
2446
|
-
DiscoveredResource: serializeAws_json1_1DiscoveredResource(input.DiscoveredResource, context),
|
|
2447
|
-
}),
|
|
2448
|
-
...(input.DryRun !== undefined && input.DryRun !== null && { DryRun: input.DryRun }),
|
|
2449
|
-
...(input.MigrationTaskName !== undefined &&
|
|
2450
|
-
input.MigrationTaskName !== null && { MigrationTaskName: input.MigrationTaskName }),
|
|
2451
|
-
...(input.ProgressUpdateStream !== undefined &&
|
|
2452
|
-
input.ProgressUpdateStream !== null && { ProgressUpdateStream: input.ProgressUpdateStream }),
|
|
2453
|
-
};
|
|
2454
|
-
};
|
|
2455
|
-
|
|
2456
|
-
const serializeAws_json1_1CreatedArtifact = (input: CreatedArtifact, context: __SerdeContext): any => {
|
|
2457
|
-
return {
|
|
2458
|
-
...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
|
|
2459
|
-
...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
|
|
2460
|
-
};
|
|
2461
|
-
};
|
|
2462
|
-
|
|
2463
|
-
const serializeAws_json1_1CreateProgressUpdateStreamRequest = (
|
|
2464
|
-
input: CreateProgressUpdateStreamRequest,
|
|
2465
|
-
context: __SerdeContext
|
|
2466
|
-
): any => {
|
|
2467
|
-
return {
|
|
2468
|
-
...(input.DryRun !== undefined && input.DryRun !== null && { DryRun: input.DryRun }),
|
|
2469
|
-
...(input.ProgressUpdateStreamName !== undefined &&
|
|
2470
|
-
input.ProgressUpdateStreamName !== null && { ProgressUpdateStreamName: input.ProgressUpdateStreamName }),
|
|
2471
|
-
};
|
|
2472
|
-
};
|
|
2473
|
-
|
|
2474
|
-
const serializeAws_json1_1DeleteProgressUpdateStreamRequest = (
|
|
2475
|
-
input: DeleteProgressUpdateStreamRequest,
|
|
2476
|
-
context: __SerdeContext
|
|
2477
|
-
): any => {
|
|
2478
|
-
return {
|
|
2479
|
-
...(input.DryRun !== undefined && input.DryRun !== null && { DryRun: input.DryRun }),
|
|
2480
|
-
...(input.ProgressUpdateStreamName !== undefined &&
|
|
2481
|
-
input.ProgressUpdateStreamName !== null && { ProgressUpdateStreamName: input.ProgressUpdateStreamName }),
|
|
2482
|
-
};
|
|
2483
|
-
};
|
|
2484
|
-
|
|
2485
|
-
const serializeAws_json1_1DescribeApplicationStateRequest = (
|
|
2486
|
-
input: DescribeApplicationStateRequest,
|
|
2487
|
-
context: __SerdeContext
|
|
2488
|
-
): any => {
|
|
2489
|
-
return {
|
|
2490
|
-
...(input.ApplicationId !== undefined && input.ApplicationId !== null && { ApplicationId: input.ApplicationId }),
|
|
2491
|
-
};
|
|
2492
|
-
};
|
|
2493
|
-
|
|
2494
|
-
const serializeAws_json1_1DescribeMigrationTaskRequest = (
|
|
2495
|
-
input: DescribeMigrationTaskRequest,
|
|
2496
|
-
context: __SerdeContext
|
|
2497
|
-
): any => {
|
|
2498
|
-
return {
|
|
2499
|
-
...(input.MigrationTaskName !== undefined &&
|
|
2500
|
-
input.MigrationTaskName !== null && { MigrationTaskName: input.MigrationTaskName }),
|
|
2501
|
-
...(input.ProgressUpdateStream !== undefined &&
|
|
2502
|
-
input.ProgressUpdateStream !== null && { ProgressUpdateStream: input.ProgressUpdateStream }),
|
|
2503
|
-
};
|
|
2504
|
-
};
|
|
2505
|
-
|
|
2506
|
-
const serializeAws_json1_1DisassociateCreatedArtifactRequest = (
|
|
2507
|
-
input: DisassociateCreatedArtifactRequest,
|
|
2508
|
-
context: __SerdeContext
|
|
2509
|
-
): any => {
|
|
2510
|
-
return {
|
|
2511
|
-
...(input.CreatedArtifactName !== undefined &&
|
|
2512
|
-
input.CreatedArtifactName !== null && { CreatedArtifactName: input.CreatedArtifactName }),
|
|
2513
|
-
...(input.DryRun !== undefined && input.DryRun !== null && { DryRun: input.DryRun }),
|
|
2514
|
-
...(input.MigrationTaskName !== undefined &&
|
|
2515
|
-
input.MigrationTaskName !== null && { MigrationTaskName: input.MigrationTaskName }),
|
|
2516
|
-
...(input.ProgressUpdateStream !== undefined &&
|
|
2517
|
-
input.ProgressUpdateStream !== null && { ProgressUpdateStream: input.ProgressUpdateStream }),
|
|
2518
|
-
};
|
|
2519
|
-
};
|
|
2520
|
-
|
|
2521
|
-
const serializeAws_json1_1DisassociateDiscoveredResourceRequest = (
|
|
2522
|
-
input: DisassociateDiscoveredResourceRequest,
|
|
2523
|
-
context: __SerdeContext
|
|
2524
|
-
): any => {
|
|
2525
|
-
return {
|
|
2526
|
-
...(input.ConfigurationId !== undefined &&
|
|
2527
|
-
input.ConfigurationId !== null && { ConfigurationId: input.ConfigurationId }),
|
|
2528
|
-
...(input.DryRun !== undefined && input.DryRun !== null && { DryRun: input.DryRun }),
|
|
2529
|
-
...(input.MigrationTaskName !== undefined &&
|
|
2530
|
-
input.MigrationTaskName !== null && { MigrationTaskName: input.MigrationTaskName }),
|
|
2531
|
-
...(input.ProgressUpdateStream !== undefined &&
|
|
2532
|
-
input.ProgressUpdateStream !== null && { ProgressUpdateStream: input.ProgressUpdateStream }),
|
|
2533
|
-
};
|
|
2534
|
-
};
|
|
2535
|
-
|
|
2536
|
-
const serializeAws_json1_1DiscoveredResource = (input: DiscoveredResource, context: __SerdeContext): any => {
|
|
2537
|
-
return {
|
|
2538
|
-
...(input.ConfigurationId !== undefined &&
|
|
2539
|
-
input.ConfigurationId !== null && { ConfigurationId: input.ConfigurationId }),
|
|
2540
|
-
...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
|
|
2541
|
-
};
|
|
2542
|
-
};
|
|
2543
|
-
|
|
2544
|
-
const serializeAws_json1_1ImportMigrationTaskRequest = (
|
|
2545
|
-
input: ImportMigrationTaskRequest,
|
|
2546
|
-
context: __SerdeContext
|
|
2547
|
-
): any => {
|
|
2548
|
-
return {
|
|
2549
|
-
...(input.DryRun !== undefined && input.DryRun !== null && { DryRun: input.DryRun }),
|
|
2550
|
-
...(input.MigrationTaskName !== undefined &&
|
|
2551
|
-
input.MigrationTaskName !== null && { MigrationTaskName: input.MigrationTaskName }),
|
|
2552
|
-
...(input.ProgressUpdateStream !== undefined &&
|
|
2553
|
-
input.ProgressUpdateStream !== null && { ProgressUpdateStream: input.ProgressUpdateStream }),
|
|
2554
|
-
};
|
|
2555
|
-
};
|
|
2556
|
-
|
|
2557
|
-
const serializeAws_json1_1ListApplicationStatesRequest = (
|
|
2558
|
-
input: ListApplicationStatesRequest,
|
|
2559
|
-
context: __SerdeContext
|
|
2560
|
-
): any => {
|
|
2561
|
-
return {
|
|
2562
|
-
...(input.ApplicationIds !== undefined &&
|
|
2563
|
-
input.ApplicationIds !== null && {
|
|
2564
|
-
ApplicationIds: serializeAws_json1_1ApplicationIds(input.ApplicationIds, context),
|
|
2565
|
-
}),
|
|
2566
|
-
...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
|
|
2567
|
-
...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
|
|
2568
|
-
};
|
|
2569
|
-
};
|
|
2570
|
-
|
|
2571
|
-
const serializeAws_json1_1ListCreatedArtifactsRequest = (
|
|
2572
|
-
input: ListCreatedArtifactsRequest,
|
|
2573
|
-
context: __SerdeContext
|
|
2574
|
-
): any => {
|
|
2575
|
-
return {
|
|
2576
|
-
...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
|
|
2577
|
-
...(input.MigrationTaskName !== undefined &&
|
|
2578
|
-
input.MigrationTaskName !== null && { MigrationTaskName: input.MigrationTaskName }),
|
|
2579
|
-
...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
|
|
2580
|
-
...(input.ProgressUpdateStream !== undefined &&
|
|
2581
|
-
input.ProgressUpdateStream !== null && { ProgressUpdateStream: input.ProgressUpdateStream }),
|
|
2582
|
-
};
|
|
2583
|
-
};
|
|
2584
|
-
|
|
2585
|
-
const serializeAws_json1_1ListDiscoveredResourcesRequest = (
|
|
2586
|
-
input: ListDiscoveredResourcesRequest,
|
|
2587
|
-
context: __SerdeContext
|
|
2588
|
-
): any => {
|
|
2589
|
-
return {
|
|
2590
|
-
...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
|
|
2591
|
-
...(input.MigrationTaskName !== undefined &&
|
|
2592
|
-
input.MigrationTaskName !== null && { MigrationTaskName: input.MigrationTaskName }),
|
|
2593
|
-
...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
|
|
2594
|
-
...(input.ProgressUpdateStream !== undefined &&
|
|
2595
|
-
input.ProgressUpdateStream !== null && { ProgressUpdateStream: input.ProgressUpdateStream }),
|
|
2596
|
-
};
|
|
2597
|
-
};
|
|
2598
|
-
|
|
2599
|
-
const serializeAws_json1_1ListMigrationTasksRequest = (
|
|
2600
|
-
input: ListMigrationTasksRequest,
|
|
2601
|
-
context: __SerdeContext
|
|
2602
|
-
): any => {
|
|
2603
|
-
return {
|
|
2604
|
-
...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
|
|
2605
|
-
...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
|
|
2606
|
-
...(input.ResourceName !== undefined && input.ResourceName !== null && { ResourceName: input.ResourceName }),
|
|
2607
|
-
};
|
|
2608
|
-
};
|
|
2609
|
-
|
|
2610
|
-
const serializeAws_json1_1ListProgressUpdateStreamsRequest = (
|
|
2611
|
-
input: ListProgressUpdateStreamsRequest,
|
|
2612
|
-
context: __SerdeContext
|
|
2613
|
-
): any => {
|
|
2614
|
-
return {
|
|
2615
|
-
...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
|
|
2616
|
-
...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
|
|
2617
|
-
};
|
|
2618
|
-
};
|
|
2619
|
-
|
|
2620
|
-
const serializeAws_json1_1NotifyApplicationStateRequest = (
|
|
2621
|
-
input: NotifyApplicationStateRequest,
|
|
2622
|
-
context: __SerdeContext
|
|
2623
|
-
): any => {
|
|
2624
|
-
return {
|
|
2625
|
-
...(input.ApplicationId !== undefined && input.ApplicationId !== null && { ApplicationId: input.ApplicationId }),
|
|
2626
|
-
...(input.DryRun !== undefined && input.DryRun !== null && { DryRun: input.DryRun }),
|
|
2627
|
-
...(input.Status !== undefined && input.Status !== null && { Status: input.Status }),
|
|
2628
|
-
...(input.UpdateDateTime !== undefined &&
|
|
2629
|
-
input.UpdateDateTime !== null && { UpdateDateTime: Math.round(input.UpdateDateTime.getTime() / 1000) }),
|
|
2630
|
-
};
|
|
2631
|
-
};
|
|
2632
|
-
|
|
2633
|
-
const serializeAws_json1_1NotifyMigrationTaskStateRequest = (
|
|
2634
|
-
input: NotifyMigrationTaskStateRequest,
|
|
2635
|
-
context: __SerdeContext
|
|
2636
|
-
): any => {
|
|
2637
|
-
return {
|
|
2638
|
-
...(input.DryRun !== undefined && input.DryRun !== null && { DryRun: input.DryRun }),
|
|
2639
|
-
...(input.MigrationTaskName !== undefined &&
|
|
2640
|
-
input.MigrationTaskName !== null && { MigrationTaskName: input.MigrationTaskName }),
|
|
2641
|
-
...(input.NextUpdateSeconds !== undefined &&
|
|
2642
|
-
input.NextUpdateSeconds !== null && { NextUpdateSeconds: input.NextUpdateSeconds }),
|
|
2643
|
-
...(input.ProgressUpdateStream !== undefined &&
|
|
2644
|
-
input.ProgressUpdateStream !== null && { ProgressUpdateStream: input.ProgressUpdateStream }),
|
|
2645
|
-
...(input.Task !== undefined && input.Task !== null && { Task: serializeAws_json1_1Task(input.Task, context) }),
|
|
2646
|
-
...(input.UpdateDateTime !== undefined &&
|
|
2647
|
-
input.UpdateDateTime !== null && { UpdateDateTime: Math.round(input.UpdateDateTime.getTime() / 1000) }),
|
|
2648
|
-
};
|
|
2649
|
-
};
|
|
2650
|
-
|
|
2651
|
-
const serializeAws_json1_1PutResourceAttributesRequest = (
|
|
2652
|
-
input: PutResourceAttributesRequest,
|
|
2653
|
-
context: __SerdeContext
|
|
2654
|
-
): any => {
|
|
2655
|
-
return {
|
|
2656
|
-
...(input.DryRun !== undefined && input.DryRun !== null && { DryRun: input.DryRun }),
|
|
2657
|
-
...(input.MigrationTaskName !== undefined &&
|
|
2658
|
-
input.MigrationTaskName !== null && { MigrationTaskName: input.MigrationTaskName }),
|
|
2659
|
-
...(input.ProgressUpdateStream !== undefined &&
|
|
2660
|
-
input.ProgressUpdateStream !== null && { ProgressUpdateStream: input.ProgressUpdateStream }),
|
|
2661
|
-
...(input.ResourceAttributeList !== undefined &&
|
|
2662
|
-
input.ResourceAttributeList !== null && {
|
|
2663
|
-
ResourceAttributeList: serializeAws_json1_1ResourceAttributeList(input.ResourceAttributeList, context),
|
|
2664
|
-
}),
|
|
2665
|
-
};
|
|
2666
|
-
};
|
|
2667
|
-
|
|
2668
|
-
const serializeAws_json1_1ResourceAttribute = (input: ResourceAttribute, context: __SerdeContext): any => {
|
|
2669
|
-
return {
|
|
2670
|
-
...(input.Type !== undefined && input.Type !== null && { Type: input.Type }),
|
|
2671
|
-
...(input.Value !== undefined && input.Value !== null && { Value: input.Value }),
|
|
2672
|
-
};
|
|
2673
|
-
};
|
|
2674
|
-
|
|
2675
|
-
const serializeAws_json1_1ResourceAttributeList = (input: ResourceAttribute[], context: __SerdeContext): any => {
|
|
2676
|
-
return input
|
|
2677
|
-
.filter((e: any) => e != null)
|
|
2678
|
-
.map((entry) => {
|
|
2679
|
-
if (entry === null) {
|
|
2680
|
-
return null as any;
|
|
2681
|
-
}
|
|
2682
|
-
return serializeAws_json1_1ResourceAttribute(entry, context);
|
|
2683
|
-
});
|
|
2684
|
-
};
|
|
2685
|
-
|
|
2686
|
-
const serializeAws_json1_1Task = (input: Task, context: __SerdeContext): any => {
|
|
2687
|
-
return {
|
|
2688
|
-
...(input.ProgressPercent !== undefined &&
|
|
2689
|
-
input.ProgressPercent !== null && { ProgressPercent: input.ProgressPercent }),
|
|
2690
|
-
...(input.Status !== undefined && input.Status !== null && { Status: input.Status }),
|
|
2691
|
-
...(input.StatusDetail !== undefined && input.StatusDetail !== null && { StatusDetail: input.StatusDetail }),
|
|
2692
|
-
};
|
|
2693
|
-
};
|
|
2694
|
-
|
|
2695
|
-
const deserializeAws_json1_1AccessDeniedException = (output: any, context: __SerdeContext): AccessDeniedException => {
|
|
2696
|
-
return {
|
|
2697
|
-
Message: __expectString(output.Message),
|
|
2698
|
-
} as any;
|
|
2699
|
-
};
|
|
2700
|
-
|
|
2701
|
-
const deserializeAws_json1_1ApplicationState = (output: any, context: __SerdeContext): ApplicationState => {
|
|
2702
|
-
return {
|
|
2703
|
-
ApplicationId: __expectString(output.ApplicationId),
|
|
2704
|
-
ApplicationStatus: __expectString(output.ApplicationStatus),
|
|
2705
|
-
LastUpdatedTime:
|
|
2706
|
-
output.LastUpdatedTime !== undefined && output.LastUpdatedTime !== null
|
|
2707
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTime)))
|
|
2708
|
-
: undefined,
|
|
2709
|
-
} as any;
|
|
2710
|
-
};
|
|
2711
|
-
|
|
2712
|
-
const deserializeAws_json1_1ApplicationStateList = (output: any, context: __SerdeContext): ApplicationState[] => {
|
|
2713
|
-
return (output || [])
|
|
2714
|
-
.filter((e: any) => e != null)
|
|
2715
|
-
.map((entry: any) => {
|
|
2716
|
-
if (entry === null) {
|
|
2717
|
-
return null as any;
|
|
2718
|
-
}
|
|
2719
|
-
return deserializeAws_json1_1ApplicationState(entry, context);
|
|
2720
|
-
});
|
|
2721
|
-
};
|
|
2722
|
-
|
|
2723
|
-
const deserializeAws_json1_1AssociateCreatedArtifactResult = (
|
|
2724
|
-
output: any,
|
|
2725
|
-
context: __SerdeContext
|
|
2726
|
-
): AssociateCreatedArtifactResult => {
|
|
2727
|
-
return {} as any;
|
|
2728
|
-
};
|
|
2729
|
-
|
|
2730
|
-
const deserializeAws_json1_1AssociateDiscoveredResourceResult = (
|
|
2731
|
-
output: any,
|
|
2732
|
-
context: __SerdeContext
|
|
2733
|
-
): AssociateDiscoveredResourceResult => {
|
|
2734
|
-
return {} as any;
|
|
2735
|
-
};
|
|
2736
|
-
|
|
2737
|
-
const deserializeAws_json1_1CreatedArtifact = (output: any, context: __SerdeContext): CreatedArtifact => {
|
|
2738
|
-
return {
|
|
2739
|
-
Description: __expectString(output.Description),
|
|
2740
|
-
Name: __expectString(output.Name),
|
|
2741
|
-
} as any;
|
|
2742
|
-
};
|
|
2743
|
-
|
|
2744
|
-
const deserializeAws_json1_1CreatedArtifactList = (output: any, context: __SerdeContext): CreatedArtifact[] => {
|
|
2745
|
-
return (output || [])
|
|
2746
|
-
.filter((e: any) => e != null)
|
|
2747
|
-
.map((entry: any) => {
|
|
2748
|
-
if (entry === null) {
|
|
2749
|
-
return null as any;
|
|
2750
|
-
}
|
|
2751
|
-
return deserializeAws_json1_1CreatedArtifact(entry, context);
|
|
2752
|
-
});
|
|
2753
|
-
};
|
|
2754
|
-
|
|
2755
|
-
const deserializeAws_json1_1CreateProgressUpdateStreamResult = (
|
|
2756
|
-
output: any,
|
|
2757
|
-
context: __SerdeContext
|
|
2758
|
-
): CreateProgressUpdateStreamResult => {
|
|
2759
|
-
return {} as any;
|
|
2760
|
-
};
|
|
2761
|
-
|
|
2762
|
-
const deserializeAws_json1_1DeleteProgressUpdateStreamResult = (
|
|
2763
|
-
output: any,
|
|
2764
|
-
context: __SerdeContext
|
|
2765
|
-
): DeleteProgressUpdateStreamResult => {
|
|
2766
|
-
return {} as any;
|
|
2767
|
-
};
|
|
2768
|
-
|
|
2769
|
-
const deserializeAws_json1_1DescribeApplicationStateResult = (
|
|
2770
|
-
output: any,
|
|
2771
|
-
context: __SerdeContext
|
|
2772
|
-
): DescribeApplicationStateResult => {
|
|
2773
|
-
return {
|
|
2774
|
-
ApplicationStatus: __expectString(output.ApplicationStatus),
|
|
2775
|
-
LastUpdatedTime:
|
|
2776
|
-
output.LastUpdatedTime !== undefined && output.LastUpdatedTime !== null
|
|
2777
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTime)))
|
|
2778
|
-
: undefined,
|
|
2779
|
-
} as any;
|
|
2780
|
-
};
|
|
2781
|
-
|
|
2782
|
-
const deserializeAws_json1_1DescribeMigrationTaskResult = (
|
|
2783
|
-
output: any,
|
|
2784
|
-
context: __SerdeContext
|
|
2785
|
-
): DescribeMigrationTaskResult => {
|
|
2786
|
-
return {
|
|
2787
|
-
MigrationTask:
|
|
2788
|
-
output.MigrationTask !== undefined && output.MigrationTask !== null
|
|
2789
|
-
? deserializeAws_json1_1MigrationTask(output.MigrationTask, context)
|
|
2790
|
-
: undefined,
|
|
2791
|
-
} as any;
|
|
2792
|
-
};
|
|
2793
|
-
|
|
2794
|
-
const deserializeAws_json1_1DisassociateCreatedArtifactResult = (
|
|
2795
|
-
output: any,
|
|
2796
|
-
context: __SerdeContext
|
|
2797
|
-
): DisassociateCreatedArtifactResult => {
|
|
2798
|
-
return {} as any;
|
|
2799
|
-
};
|
|
2800
|
-
|
|
2801
|
-
const deserializeAws_json1_1DisassociateDiscoveredResourceResult = (
|
|
2802
|
-
output: any,
|
|
2803
|
-
context: __SerdeContext
|
|
2804
|
-
): DisassociateDiscoveredResourceResult => {
|
|
2805
|
-
return {} as any;
|
|
2806
|
-
};
|
|
2807
|
-
|
|
2808
|
-
const deserializeAws_json1_1DiscoveredResource = (output: any, context: __SerdeContext): DiscoveredResource => {
|
|
2809
|
-
return {
|
|
2810
|
-
ConfigurationId: __expectString(output.ConfigurationId),
|
|
2811
|
-
Description: __expectString(output.Description),
|
|
2812
|
-
} as any;
|
|
2813
|
-
};
|
|
2814
|
-
|
|
2815
|
-
const deserializeAws_json1_1DiscoveredResourceList = (output: any, context: __SerdeContext): DiscoveredResource[] => {
|
|
2816
|
-
return (output || [])
|
|
2817
|
-
.filter((e: any) => e != null)
|
|
2818
|
-
.map((entry: any) => {
|
|
2819
|
-
if (entry === null) {
|
|
2820
|
-
return null as any;
|
|
2821
|
-
}
|
|
2822
|
-
return deserializeAws_json1_1DiscoveredResource(entry, context);
|
|
2823
|
-
});
|
|
2824
|
-
};
|
|
2825
|
-
|
|
2826
|
-
const deserializeAws_json1_1DryRunOperation = (output: any, context: __SerdeContext): DryRunOperation => {
|
|
2827
|
-
return {
|
|
2828
|
-
Message: __expectString(output.Message),
|
|
2829
|
-
} as any;
|
|
2830
|
-
};
|
|
2831
|
-
|
|
2832
|
-
const deserializeAws_json1_1HomeRegionNotSetException = (
|
|
2833
|
-
output: any,
|
|
2834
|
-
context: __SerdeContext
|
|
2835
|
-
): HomeRegionNotSetException => {
|
|
2836
|
-
return {
|
|
2837
|
-
Message: __expectString(output.Message),
|
|
2838
|
-
} as any;
|
|
2839
|
-
};
|
|
2840
|
-
|
|
2841
|
-
const deserializeAws_json1_1ImportMigrationTaskResult = (
|
|
2842
|
-
output: any,
|
|
2843
|
-
context: __SerdeContext
|
|
2844
|
-
): ImportMigrationTaskResult => {
|
|
2845
|
-
return {} as any;
|
|
2846
|
-
};
|
|
2847
|
-
|
|
2848
|
-
const deserializeAws_json1_1InternalServerError = (output: any, context: __SerdeContext): InternalServerError => {
|
|
2849
|
-
return {
|
|
2850
|
-
Message: __expectString(output.Message),
|
|
2851
|
-
} as any;
|
|
2852
|
-
};
|
|
2853
|
-
|
|
2854
|
-
const deserializeAws_json1_1InvalidInputException = (output: any, context: __SerdeContext): InvalidInputException => {
|
|
2855
|
-
return {
|
|
2856
|
-
Message: __expectString(output.Message),
|
|
2857
|
-
} as any;
|
|
2858
|
-
};
|
|
2859
|
-
|
|
2860
|
-
const deserializeAws_json1_1LatestResourceAttributeList = (
|
|
2861
|
-
output: any,
|
|
2862
|
-
context: __SerdeContext
|
|
2863
|
-
): ResourceAttribute[] => {
|
|
2864
|
-
return (output || [])
|
|
2865
|
-
.filter((e: any) => e != null)
|
|
2866
|
-
.map((entry: any) => {
|
|
2867
|
-
if (entry === null) {
|
|
2868
|
-
return null as any;
|
|
2869
|
-
}
|
|
2870
|
-
return deserializeAws_json1_1ResourceAttribute(entry, context);
|
|
2871
|
-
});
|
|
2872
|
-
};
|
|
2873
|
-
|
|
2874
|
-
const deserializeAws_json1_1ListApplicationStatesResult = (
|
|
2875
|
-
output: any,
|
|
2876
|
-
context: __SerdeContext
|
|
2877
|
-
): ListApplicationStatesResult => {
|
|
2878
|
-
return {
|
|
2879
|
-
ApplicationStateList:
|
|
2880
|
-
output.ApplicationStateList !== undefined && output.ApplicationStateList !== null
|
|
2881
|
-
? deserializeAws_json1_1ApplicationStateList(output.ApplicationStateList, context)
|
|
2882
|
-
: undefined,
|
|
2883
|
-
NextToken: __expectString(output.NextToken),
|
|
2884
|
-
} as any;
|
|
2885
|
-
};
|
|
2886
|
-
|
|
2887
|
-
const deserializeAws_json1_1ListCreatedArtifactsResult = (
|
|
2888
|
-
output: any,
|
|
2889
|
-
context: __SerdeContext
|
|
2890
|
-
): ListCreatedArtifactsResult => {
|
|
2891
|
-
return {
|
|
2892
|
-
CreatedArtifactList:
|
|
2893
|
-
output.CreatedArtifactList !== undefined && output.CreatedArtifactList !== null
|
|
2894
|
-
? deserializeAws_json1_1CreatedArtifactList(output.CreatedArtifactList, context)
|
|
2895
|
-
: undefined,
|
|
2896
|
-
NextToken: __expectString(output.NextToken),
|
|
2897
|
-
} as any;
|
|
2898
|
-
};
|
|
2899
|
-
|
|
2900
|
-
const deserializeAws_json1_1ListDiscoveredResourcesResult = (
|
|
2901
|
-
output: any,
|
|
2902
|
-
context: __SerdeContext
|
|
2903
|
-
): ListDiscoveredResourcesResult => {
|
|
2904
|
-
return {
|
|
2905
|
-
DiscoveredResourceList:
|
|
2906
|
-
output.DiscoveredResourceList !== undefined && output.DiscoveredResourceList !== null
|
|
2907
|
-
? deserializeAws_json1_1DiscoveredResourceList(output.DiscoveredResourceList, context)
|
|
2908
|
-
: undefined,
|
|
2909
|
-
NextToken: __expectString(output.NextToken),
|
|
2910
|
-
} as any;
|
|
2911
|
-
};
|
|
2912
|
-
|
|
2913
|
-
const deserializeAws_json1_1ListMigrationTasksResult = (
|
|
2914
|
-
output: any,
|
|
2915
|
-
context: __SerdeContext
|
|
2916
|
-
): ListMigrationTasksResult => {
|
|
2917
|
-
return {
|
|
2918
|
-
MigrationTaskSummaryList:
|
|
2919
|
-
output.MigrationTaskSummaryList !== undefined && output.MigrationTaskSummaryList !== null
|
|
2920
|
-
? deserializeAws_json1_1MigrationTaskSummaryList(output.MigrationTaskSummaryList, context)
|
|
2921
|
-
: undefined,
|
|
2922
|
-
NextToken: __expectString(output.NextToken),
|
|
2923
|
-
} as any;
|
|
2924
|
-
};
|
|
2925
|
-
|
|
2926
|
-
const deserializeAws_json1_1ListProgressUpdateStreamsResult = (
|
|
2927
|
-
output: any,
|
|
2928
|
-
context: __SerdeContext
|
|
2929
|
-
): ListProgressUpdateStreamsResult => {
|
|
2930
|
-
return {
|
|
2931
|
-
NextToken: __expectString(output.NextToken),
|
|
2932
|
-
ProgressUpdateStreamSummaryList:
|
|
2933
|
-
output.ProgressUpdateStreamSummaryList !== undefined && output.ProgressUpdateStreamSummaryList !== null
|
|
2934
|
-
? deserializeAws_json1_1ProgressUpdateStreamSummaryList(output.ProgressUpdateStreamSummaryList, context)
|
|
2935
|
-
: undefined,
|
|
2936
|
-
} as any;
|
|
2937
|
-
};
|
|
2938
|
-
|
|
2939
|
-
const deserializeAws_json1_1MigrationTask = (output: any, context: __SerdeContext): MigrationTask => {
|
|
2940
|
-
return {
|
|
2941
|
-
MigrationTaskName: __expectString(output.MigrationTaskName),
|
|
2942
|
-
ProgressUpdateStream: __expectString(output.ProgressUpdateStream),
|
|
2943
|
-
ResourceAttributeList:
|
|
2944
|
-
output.ResourceAttributeList !== undefined && output.ResourceAttributeList !== null
|
|
2945
|
-
? deserializeAws_json1_1LatestResourceAttributeList(output.ResourceAttributeList, context)
|
|
2946
|
-
: undefined,
|
|
2947
|
-
Task:
|
|
2948
|
-
output.Task !== undefined && output.Task !== null ? deserializeAws_json1_1Task(output.Task, context) : undefined,
|
|
2949
|
-
UpdateDateTime:
|
|
2950
|
-
output.UpdateDateTime !== undefined && output.UpdateDateTime !== null
|
|
2951
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdateDateTime)))
|
|
2952
|
-
: undefined,
|
|
2953
|
-
} as any;
|
|
2954
|
-
};
|
|
2955
|
-
|
|
2956
|
-
const deserializeAws_json1_1MigrationTaskSummary = (output: any, context: __SerdeContext): MigrationTaskSummary => {
|
|
2957
|
-
return {
|
|
2958
|
-
MigrationTaskName: __expectString(output.MigrationTaskName),
|
|
2959
|
-
ProgressPercent: __expectInt32(output.ProgressPercent),
|
|
2960
|
-
ProgressUpdateStream: __expectString(output.ProgressUpdateStream),
|
|
2961
|
-
Status: __expectString(output.Status),
|
|
2962
|
-
StatusDetail: __expectString(output.StatusDetail),
|
|
2963
|
-
UpdateDateTime:
|
|
2964
|
-
output.UpdateDateTime !== undefined && output.UpdateDateTime !== null
|
|
2965
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdateDateTime)))
|
|
2966
|
-
: undefined,
|
|
2967
|
-
} as any;
|
|
2968
|
-
};
|
|
2969
|
-
|
|
2970
|
-
const deserializeAws_json1_1MigrationTaskSummaryList = (
|
|
2971
|
-
output: any,
|
|
2972
|
-
context: __SerdeContext
|
|
2973
|
-
): MigrationTaskSummary[] => {
|
|
2974
|
-
return (output || [])
|
|
2975
|
-
.filter((e: any) => e != null)
|
|
2976
|
-
.map((entry: any) => {
|
|
2977
|
-
if (entry === null) {
|
|
2978
|
-
return null as any;
|
|
2979
|
-
}
|
|
2980
|
-
return deserializeAws_json1_1MigrationTaskSummary(entry, context);
|
|
2981
|
-
});
|
|
2982
|
-
};
|
|
2983
|
-
|
|
2984
|
-
const deserializeAws_json1_1NotifyApplicationStateResult = (
|
|
2985
|
-
output: any,
|
|
2986
|
-
context: __SerdeContext
|
|
2987
|
-
): NotifyApplicationStateResult => {
|
|
2988
|
-
return {} as any;
|
|
2989
|
-
};
|
|
2990
|
-
|
|
2991
|
-
const deserializeAws_json1_1NotifyMigrationTaskStateResult = (
|
|
2992
|
-
output: any,
|
|
2993
|
-
context: __SerdeContext
|
|
2994
|
-
): NotifyMigrationTaskStateResult => {
|
|
2995
|
-
return {} as any;
|
|
2996
|
-
};
|
|
2997
|
-
|
|
2998
|
-
const deserializeAws_json1_1PolicyErrorException = (output: any, context: __SerdeContext): PolicyErrorException => {
|
|
2999
|
-
return {
|
|
3000
|
-
Message: __expectString(output.Message),
|
|
3001
|
-
} as any;
|
|
3002
|
-
};
|
|
3003
|
-
|
|
3004
|
-
const deserializeAws_json1_1ProgressUpdateStreamSummary = (
|
|
3005
|
-
output: any,
|
|
3006
|
-
context: __SerdeContext
|
|
3007
|
-
): ProgressUpdateStreamSummary => {
|
|
3008
|
-
return {
|
|
3009
|
-
ProgressUpdateStreamName: __expectString(output.ProgressUpdateStreamName),
|
|
3010
|
-
} as any;
|
|
3011
|
-
};
|
|
3012
|
-
|
|
3013
|
-
const deserializeAws_json1_1ProgressUpdateStreamSummaryList = (
|
|
3014
|
-
output: any,
|
|
3015
|
-
context: __SerdeContext
|
|
3016
|
-
): ProgressUpdateStreamSummary[] => {
|
|
3017
|
-
return (output || [])
|
|
3018
|
-
.filter((e: any) => e != null)
|
|
3019
|
-
.map((entry: any) => {
|
|
3020
|
-
if (entry === null) {
|
|
3021
|
-
return null as any;
|
|
3022
|
-
}
|
|
3023
|
-
return deserializeAws_json1_1ProgressUpdateStreamSummary(entry, context);
|
|
3024
|
-
});
|
|
3025
|
-
};
|
|
3026
|
-
|
|
3027
|
-
const deserializeAws_json1_1PutResourceAttributesResult = (
|
|
3028
|
-
output: any,
|
|
3029
|
-
context: __SerdeContext
|
|
3030
|
-
): PutResourceAttributesResult => {
|
|
3031
|
-
return {} as any;
|
|
3032
|
-
};
|
|
3033
|
-
|
|
3034
|
-
const deserializeAws_json1_1ResourceAttribute = (output: any, context: __SerdeContext): ResourceAttribute => {
|
|
3035
|
-
return {
|
|
3036
|
-
Type: __expectString(output.Type),
|
|
3037
|
-
Value: __expectString(output.Value),
|
|
3038
|
-
} as any;
|
|
3039
|
-
};
|
|
3040
|
-
|
|
3041
|
-
const deserializeAws_json1_1ResourceNotFoundException = (
|
|
3042
|
-
output: any,
|
|
3043
|
-
context: __SerdeContext
|
|
3044
|
-
): ResourceNotFoundException => {
|
|
3045
|
-
return {
|
|
3046
|
-
Message: __expectString(output.Message),
|
|
3047
|
-
} as any;
|
|
3048
|
-
};
|
|
3049
|
-
|
|
3050
|
-
const deserializeAws_json1_1ServiceUnavailableException = (
|
|
3051
|
-
output: any,
|
|
3052
|
-
context: __SerdeContext
|
|
3053
|
-
): ServiceUnavailableException => {
|
|
3054
|
-
return {
|
|
3055
|
-
Message: __expectString(output.Message),
|
|
3056
|
-
} as any;
|
|
3057
|
-
};
|
|
3058
|
-
|
|
3059
|
-
const deserializeAws_json1_1Task = (output: any, context: __SerdeContext): Task => {
|
|
3060
|
-
return {
|
|
3061
|
-
ProgressPercent: __expectInt32(output.ProgressPercent),
|
|
3062
|
-
Status: __expectString(output.Status),
|
|
3063
|
-
StatusDetail: __expectString(output.StatusDetail),
|
|
3064
|
-
} as any;
|
|
3065
|
-
};
|
|
3066
|
-
|
|
3067
|
-
const deserializeAws_json1_1ThrottlingException = (output: any, context: __SerdeContext): ThrottlingException => {
|
|
3068
|
-
return {
|
|
3069
|
-
Message: __expectString(output.Message),
|
|
3070
|
-
RetryAfterSeconds: __expectInt32(output.RetryAfterSeconds),
|
|
3071
|
-
} as any;
|
|
3072
|
-
};
|
|
3073
|
-
|
|
3074
|
-
const deserializeAws_json1_1UnauthorizedOperation = (output: any, context: __SerdeContext): UnauthorizedOperation => {
|
|
3075
|
-
return {
|
|
3076
|
-
Message: __expectString(output.Message),
|
|
3077
|
-
} as any;
|
|
3078
|
-
};
|
|
3079
|
-
|
|
3080
|
-
const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({
|
|
3081
|
-
httpStatusCode: output.statusCode,
|
|
3082
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
|
|
3083
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
3084
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
3085
|
-
});
|
|
3086
|
-
|
|
3087
|
-
// Collect low-level response body stream to Uint8Array.
|
|
3088
|
-
const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext): Promise<Uint8Array> => {
|
|
3089
|
-
if (streamBody instanceof Uint8Array) {
|
|
3090
|
-
return Promise.resolve(streamBody);
|
|
3091
|
-
}
|
|
3092
|
-
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
3093
|
-
};
|
|
3094
|
-
|
|
3095
|
-
// Encode Uint8Array data into string with utf-8.
|
|
3096
|
-
const collectBodyString = (streamBody: any, context: __SerdeContext): Promise<string> =>
|
|
3097
|
-
collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
3098
|
-
|
|
3099
|
-
const buildHttpRpcRequest = async (
|
|
3100
|
-
context: __SerdeContext,
|
|
3101
|
-
headers: __HeaderBag,
|
|
3102
|
-
path: string,
|
|
3103
|
-
resolvedHostname: string | undefined,
|
|
3104
|
-
body: any
|
|
3105
|
-
): Promise<__HttpRequest> => {
|
|
3106
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
3107
|
-
const contents: any = {
|
|
3108
|
-
protocol,
|
|
3109
|
-
hostname,
|
|
3110
|
-
port,
|
|
3111
|
-
method: "POST",
|
|
3112
|
-
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
3113
|
-
headers,
|
|
3114
|
-
};
|
|
3115
|
-
if (resolvedHostname !== undefined) {
|
|
3116
|
-
contents.hostname = resolvedHostname;
|
|
3117
|
-
}
|
|
3118
|
-
if (body !== undefined) {
|
|
3119
|
-
contents.body = body;
|
|
3120
|
-
}
|
|
3121
|
-
return new __HttpRequest(contents);
|
|
3122
|
-
};
|
|
3123
|
-
|
|
3124
|
-
const parseBody = (streamBody: any, context: __SerdeContext): any =>
|
|
3125
|
-
collectBodyString(streamBody, context).then((encoded) => {
|
|
3126
|
-
if (encoded.length) {
|
|
3127
|
-
return JSON.parse(encoded);
|
|
3128
|
-
}
|
|
3129
|
-
return {};
|
|
3130
|
-
});
|
|
3131
|
-
|
|
3132
|
-
/**
|
|
3133
|
-
* Load an error code for the aws.rest-json-1.1 protocol.
|
|
3134
|
-
*/
|
|
3135
|
-
const loadRestJsonErrorCode = (output: __HttpResponse, data: any): string => {
|
|
3136
|
-
const findKey = (object: any, key: string) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
3137
|
-
|
|
3138
|
-
const sanitizeErrorCode = (rawValue: string): string => {
|
|
3139
|
-
let cleanValue = rawValue;
|
|
3140
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
3141
|
-
cleanValue = cleanValue.split(":")[0];
|
|
3142
|
-
}
|
|
3143
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
3144
|
-
cleanValue = cleanValue.split("#")[1];
|
|
3145
|
-
}
|
|
3146
|
-
return cleanValue;
|
|
3147
|
-
};
|
|
3148
|
-
|
|
3149
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
3150
|
-
if (headerKey !== undefined) {
|
|
3151
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
3152
|
-
}
|
|
3153
|
-
|
|
3154
|
-
if (data.code !== undefined) {
|
|
3155
|
-
return sanitizeErrorCode(data.code);
|
|
3156
|
-
}
|
|
3157
|
-
|
|
3158
|
-
if (data["__type"] !== undefined) {
|
|
3159
|
-
return sanitizeErrorCode(data["__type"]);
|
|
3160
|
-
}
|
|
3161
|
-
|
|
3162
|
-
return "";
|
|
3163
|
-
};
|