@aws-sdk/client-bcm-data-exports 3.458.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/LICENSE +201 -0
- package/README.md +308 -0
- package/dist-cjs/BCMDataExports.js +35 -0
- package/dist-cjs/BCMDataExportsClient.js +43 -0
- package/dist-cjs/commands/CreateExportCommand.js +50 -0
- package/dist-cjs/commands/DeleteExportCommand.js +50 -0
- package/dist-cjs/commands/GetExecutionCommand.js +50 -0
- package/dist-cjs/commands/GetExportCommand.js +50 -0
- package/dist-cjs/commands/GetTableCommand.js +50 -0
- package/dist-cjs/commands/ListExecutionsCommand.js +50 -0
- package/dist-cjs/commands/ListExportsCommand.js +50 -0
- package/dist-cjs/commands/ListTablesCommand.js +50 -0
- package/dist-cjs/commands/ListTagsForResourceCommand.js +50 -0
- package/dist-cjs/commands/TagResourceCommand.js +50 -0
- package/dist-cjs/commands/UntagResourceCommand.js +50 -0
- package/dist-cjs/commands/UpdateExportCommand.js +50 -0
- package/dist-cjs/commands/index.js +15 -0
- package/dist-cjs/endpoint/EndpointParameters.js +11 -0
- package/dist-cjs/endpoint/endpointResolver.js +12 -0
- package/dist-cjs/endpoint/ruleset.js +7 -0
- package/dist-cjs/extensionConfiguration.js +2 -0
- package/dist-cjs/index.js +12 -0
- package/dist-cjs/models/BCMDataExportsServiceException.js +12 -0
- package/dist-cjs/models/index.js +4 -0
- package/dist-cjs/models/models_0.js +126 -0
- package/dist-cjs/pagination/Interfaces.js +2 -0
- package/dist-cjs/pagination/ListExecutionsPaginator.js +29 -0
- package/dist-cjs/pagination/ListExportsPaginator.js +29 -0
- package/dist-cjs/pagination/ListTablesPaginator.js +29 -0
- package/dist-cjs/pagination/index.js +7 -0
- package/dist-cjs/protocols/Aws_json1_1.js +775 -0
- package/dist-cjs/runtimeConfig.browser.js +39 -0
- package/dist-cjs/runtimeConfig.js +50 -0
- package/dist-cjs/runtimeConfig.native.js +15 -0
- package/dist-cjs/runtimeConfig.shared.js +24 -0
- package/dist-cjs/runtimeExtensions.js +22 -0
- package/dist-es/BCMDataExports.js +31 -0
- package/dist-es/BCMDataExportsClient.js +39 -0
- package/dist-es/commands/CreateExportCommand.js +46 -0
- package/dist-es/commands/DeleteExportCommand.js +46 -0
- package/dist-es/commands/GetExecutionCommand.js +46 -0
- package/dist-es/commands/GetExportCommand.js +46 -0
- package/dist-es/commands/GetTableCommand.js +46 -0
- package/dist-es/commands/ListExecutionsCommand.js +46 -0
- package/dist-es/commands/ListExportsCommand.js +46 -0
- package/dist-es/commands/ListTablesCommand.js +46 -0
- package/dist-es/commands/ListTagsForResourceCommand.js +46 -0
- package/dist-es/commands/TagResourceCommand.js +46 -0
- package/dist-es/commands/UntagResourceCommand.js +46 -0
- package/dist-es/commands/UpdateExportCommand.js +46 -0
- package/dist-es/commands/index.js +12 -0
- package/dist-es/endpoint/EndpointParameters.js +7 -0
- package/dist-es/endpoint/endpointResolver.js +8 -0
- package/dist-es/endpoint/ruleset.js +4 -0
- package/dist-es/extensionConfiguration.js +1 -0
- package/dist-es/index.js +7 -0
- package/dist-es/models/BCMDataExportsServiceException.js +8 -0
- package/dist-es/models/index.js +1 -0
- package/dist-es/models/models_0.js +118 -0
- package/dist-es/pagination/Interfaces.js +1 -0
- package/dist-es/pagination/ListExecutionsPaginator.js +25 -0
- package/dist-es/pagination/ListExportsPaginator.js +25 -0
- package/dist-es/pagination/ListTablesPaginator.js +25 -0
- package/dist-es/pagination/index.js +4 -0
- package/dist-es/protocols/Aws_json1_1.js +748 -0
- package/dist-es/runtimeConfig.browser.js +34 -0
- package/dist-es/runtimeConfig.js +45 -0
- package/dist-es/runtimeConfig.native.js +11 -0
- package/dist-es/runtimeConfig.shared.js +20 -0
- package/dist-es/runtimeExtensions.js +18 -0
- package/dist-types/BCMDataExports.d.ts +101 -0
- package/dist-types/BCMDataExportsClient.d.ts +188 -0
- package/dist-types/commands/CreateExportCommand.d.ts +138 -0
- package/dist-types/commands/DeleteExportCommand.d.ts +87 -0
- package/dist-types/commands/GetExecutionCommand.d.ts +124 -0
- package/dist-types/commands/GetExportCommand.d.ts +122 -0
- package/dist-types/commands/GetTableCommand.d.ts +99 -0
- package/dist-types/commands/ListExecutionsCommand.d.ts +101 -0
- package/dist-types/commands/ListExportsCommand.d.ts +98 -0
- package/dist-types/commands/ListTablesCommand.d.ts +101 -0
- package/dist-types/commands/ListTagsForResourceCommand.d.ts +95 -0
- package/dist-types/commands/TagResourceCommand.d.ts +91 -0
- package/dist-types/commands/UntagResourceCommand.d.ts +88 -0
- package/dist-types/commands/UpdateExportCommand.d.ts +117 -0
- package/dist-types/commands/index.d.ts +12 -0
- package/dist-types/endpoint/EndpointParameters.d.ts +20 -0
- package/dist-types/endpoint/endpointResolver.d.ts +5 -0
- package/dist-types/endpoint/ruleset.d.ts +2 -0
- package/dist-types/extensionConfiguration.d.ts +8 -0
- package/dist-types/index.d.ts +22 -0
- package/dist-types/models/BCMDataExportsServiceException.d.ts +13 -0
- package/dist-types/models/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +921 -0
- package/dist-types/pagination/Interfaces.d.ts +8 -0
- package/dist-types/pagination/ListExecutionsPaginator.d.ts +7 -0
- package/dist-types/pagination/ListExportsPaginator.d.ts +7 -0
- package/dist-types/pagination/ListTablesPaginator.d.ts +7 -0
- package/dist-types/pagination/index.d.ts +4 -0
- package/dist-types/protocols/Aws_json1_1.d.ts +110 -0
- package/dist-types/runtimeConfig.browser.d.ts +46 -0
- package/dist-types/runtimeConfig.d.ts +46 -0
- package/dist-types/runtimeConfig.native.d.ts +45 -0
- package/dist-types/runtimeConfig.shared.d.ts +19 -0
- package/dist-types/runtimeExtensions.d.ts +17 -0
- package/dist-types/ts3.4/BCMDataExports.d.ts +211 -0
- package/dist-types/ts3.4/BCMDataExportsClient.d.ts +191 -0
- package/dist-types/ts3.4/commands/CreateExportCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/DeleteExportCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/GetExecutionCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/GetExportCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/GetTableCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/ListExecutionsCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/ListExportsCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/ListTablesCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/UpdateExportCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/index.d.ts +12 -0
- package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +31 -0
- package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
- package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
- package/dist-types/ts3.4/extensionConfiguration.d.ts +7 -0
- package/dist-types/ts3.4/index.d.ts +10 -0
- package/dist-types/ts3.4/models/BCMDataExportsServiceException.d.ts +8 -0
- package/dist-types/ts3.4/models/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +277 -0
- package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
- package/dist-types/ts3.4/pagination/ListExecutionsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListExportsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListTablesPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +4 -0
- package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +149 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +97 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +97 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +88 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +19 -0
- package/dist-types/ts3.4/runtimeExtensions.d.ts +11 -0
- package/package.json +102 -0
|
@@ -0,0 +1,775 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.de_UpdateExportCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_ListTagsForResourceCommand = exports.de_ListTablesCommand = exports.de_ListExportsCommand = exports.de_ListExecutionsCommand = exports.de_GetTableCommand = exports.de_GetExportCommand = exports.de_GetExecutionCommand = exports.de_DeleteExportCommand = exports.de_CreateExportCommand = exports.se_UpdateExportCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_ListTagsForResourceCommand = exports.se_ListTablesCommand = exports.se_ListExportsCommand = exports.se_ListExecutionsCommand = exports.se_GetTableCommand = exports.se_GetExportCommand = exports.se_GetExecutionCommand = exports.se_DeleteExportCommand = exports.se_CreateExportCommand = void 0;
|
|
4
|
+
const protocol_http_1 = require("@smithy/protocol-http");
|
|
5
|
+
const smithy_client_1 = require("@smithy/smithy-client");
|
|
6
|
+
const BCMDataExportsServiceException_1 = require("../models/BCMDataExportsServiceException");
|
|
7
|
+
const models_0_1 = require("../models/models_0");
|
|
8
|
+
const se_CreateExportCommand = async (input, context) => {
|
|
9
|
+
const headers = sharedHeaders("CreateExport");
|
|
10
|
+
let body;
|
|
11
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
12
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
13
|
+
};
|
|
14
|
+
exports.se_CreateExportCommand = se_CreateExportCommand;
|
|
15
|
+
const se_DeleteExportCommand = async (input, context) => {
|
|
16
|
+
const headers = sharedHeaders("DeleteExport");
|
|
17
|
+
let body;
|
|
18
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
19
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
20
|
+
};
|
|
21
|
+
exports.se_DeleteExportCommand = se_DeleteExportCommand;
|
|
22
|
+
const se_GetExecutionCommand = async (input, context) => {
|
|
23
|
+
const headers = sharedHeaders("GetExecution");
|
|
24
|
+
let body;
|
|
25
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
26
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
27
|
+
};
|
|
28
|
+
exports.se_GetExecutionCommand = se_GetExecutionCommand;
|
|
29
|
+
const se_GetExportCommand = async (input, context) => {
|
|
30
|
+
const headers = sharedHeaders("GetExport");
|
|
31
|
+
let body;
|
|
32
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
33
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
34
|
+
};
|
|
35
|
+
exports.se_GetExportCommand = se_GetExportCommand;
|
|
36
|
+
const se_GetTableCommand = async (input, context) => {
|
|
37
|
+
const headers = sharedHeaders("GetTable");
|
|
38
|
+
let body;
|
|
39
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
40
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
41
|
+
};
|
|
42
|
+
exports.se_GetTableCommand = se_GetTableCommand;
|
|
43
|
+
const se_ListExecutionsCommand = async (input, context) => {
|
|
44
|
+
const headers = sharedHeaders("ListExecutions");
|
|
45
|
+
let body;
|
|
46
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
47
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
48
|
+
};
|
|
49
|
+
exports.se_ListExecutionsCommand = se_ListExecutionsCommand;
|
|
50
|
+
const se_ListExportsCommand = async (input, context) => {
|
|
51
|
+
const headers = sharedHeaders("ListExports");
|
|
52
|
+
let body;
|
|
53
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
54
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
55
|
+
};
|
|
56
|
+
exports.se_ListExportsCommand = se_ListExportsCommand;
|
|
57
|
+
const se_ListTablesCommand = async (input, context) => {
|
|
58
|
+
const headers = sharedHeaders("ListTables");
|
|
59
|
+
let body;
|
|
60
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
61
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
62
|
+
};
|
|
63
|
+
exports.se_ListTablesCommand = se_ListTablesCommand;
|
|
64
|
+
const se_ListTagsForResourceCommand = async (input, context) => {
|
|
65
|
+
const headers = sharedHeaders("ListTagsForResource");
|
|
66
|
+
let body;
|
|
67
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
68
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
69
|
+
};
|
|
70
|
+
exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
|
|
71
|
+
const se_TagResourceCommand = async (input, context) => {
|
|
72
|
+
const headers = sharedHeaders("TagResource");
|
|
73
|
+
let body;
|
|
74
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
75
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
76
|
+
};
|
|
77
|
+
exports.se_TagResourceCommand = se_TagResourceCommand;
|
|
78
|
+
const se_UntagResourceCommand = async (input, context) => {
|
|
79
|
+
const headers = sharedHeaders("UntagResource");
|
|
80
|
+
let body;
|
|
81
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
82
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
83
|
+
};
|
|
84
|
+
exports.se_UntagResourceCommand = se_UntagResourceCommand;
|
|
85
|
+
const se_UpdateExportCommand = async (input, context) => {
|
|
86
|
+
const headers = sharedHeaders("UpdateExport");
|
|
87
|
+
let body;
|
|
88
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
89
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
90
|
+
};
|
|
91
|
+
exports.se_UpdateExportCommand = se_UpdateExportCommand;
|
|
92
|
+
const de_CreateExportCommand = async (output, context) => {
|
|
93
|
+
if (output.statusCode >= 300) {
|
|
94
|
+
return de_CreateExportCommandError(output, context);
|
|
95
|
+
}
|
|
96
|
+
const data = await parseBody(output.body, context);
|
|
97
|
+
let contents = {};
|
|
98
|
+
contents = (0, smithy_client_1._json)(data);
|
|
99
|
+
const response = {
|
|
100
|
+
$metadata: deserializeMetadata(output),
|
|
101
|
+
...contents,
|
|
102
|
+
};
|
|
103
|
+
return response;
|
|
104
|
+
};
|
|
105
|
+
exports.de_CreateExportCommand = de_CreateExportCommand;
|
|
106
|
+
const de_CreateExportCommandError = async (output, context) => {
|
|
107
|
+
const parsedOutput = {
|
|
108
|
+
...output,
|
|
109
|
+
body: await parseErrorBody(output.body, context),
|
|
110
|
+
};
|
|
111
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
112
|
+
switch (errorCode) {
|
|
113
|
+
case "InternalServerException":
|
|
114
|
+
case "com.amazonaws.bcmdataexports#InternalServerException":
|
|
115
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
116
|
+
case "ServiceQuotaExceededException":
|
|
117
|
+
case "com.amazonaws.bcmdataexports#ServiceQuotaExceededException":
|
|
118
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
119
|
+
case "ThrottlingException":
|
|
120
|
+
case "com.amazonaws.bcmdataexports#ThrottlingException":
|
|
121
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
122
|
+
case "ValidationException":
|
|
123
|
+
case "com.amazonaws.bcmdataexports#ValidationException":
|
|
124
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
125
|
+
default:
|
|
126
|
+
const parsedBody = parsedOutput.body;
|
|
127
|
+
return throwDefaultError({
|
|
128
|
+
output,
|
|
129
|
+
parsedBody,
|
|
130
|
+
errorCode,
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
const de_DeleteExportCommand = async (output, context) => {
|
|
135
|
+
if (output.statusCode >= 300) {
|
|
136
|
+
return de_DeleteExportCommandError(output, context);
|
|
137
|
+
}
|
|
138
|
+
const data = await parseBody(output.body, context);
|
|
139
|
+
let contents = {};
|
|
140
|
+
contents = (0, smithy_client_1._json)(data);
|
|
141
|
+
const response = {
|
|
142
|
+
$metadata: deserializeMetadata(output),
|
|
143
|
+
...contents,
|
|
144
|
+
};
|
|
145
|
+
return response;
|
|
146
|
+
};
|
|
147
|
+
exports.de_DeleteExportCommand = de_DeleteExportCommand;
|
|
148
|
+
const de_DeleteExportCommandError = async (output, context) => {
|
|
149
|
+
const parsedOutput = {
|
|
150
|
+
...output,
|
|
151
|
+
body: await parseErrorBody(output.body, context),
|
|
152
|
+
};
|
|
153
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
154
|
+
switch (errorCode) {
|
|
155
|
+
case "InternalServerException":
|
|
156
|
+
case "com.amazonaws.bcmdataexports#InternalServerException":
|
|
157
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
158
|
+
case "ResourceNotFoundException":
|
|
159
|
+
case "com.amazonaws.bcmdataexports#ResourceNotFoundException":
|
|
160
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
161
|
+
case "ThrottlingException":
|
|
162
|
+
case "com.amazonaws.bcmdataexports#ThrottlingException":
|
|
163
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
164
|
+
case "ValidationException":
|
|
165
|
+
case "com.amazonaws.bcmdataexports#ValidationException":
|
|
166
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
167
|
+
default:
|
|
168
|
+
const parsedBody = parsedOutput.body;
|
|
169
|
+
return throwDefaultError({
|
|
170
|
+
output,
|
|
171
|
+
parsedBody,
|
|
172
|
+
errorCode,
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
const de_GetExecutionCommand = async (output, context) => {
|
|
177
|
+
if (output.statusCode >= 300) {
|
|
178
|
+
return de_GetExecutionCommandError(output, context);
|
|
179
|
+
}
|
|
180
|
+
const data = await parseBody(output.body, context);
|
|
181
|
+
let contents = {};
|
|
182
|
+
contents = de_GetExecutionResponse(data, context);
|
|
183
|
+
const response = {
|
|
184
|
+
$metadata: deserializeMetadata(output),
|
|
185
|
+
...contents,
|
|
186
|
+
};
|
|
187
|
+
return response;
|
|
188
|
+
};
|
|
189
|
+
exports.de_GetExecutionCommand = de_GetExecutionCommand;
|
|
190
|
+
const de_GetExecutionCommandError = async (output, context) => {
|
|
191
|
+
const parsedOutput = {
|
|
192
|
+
...output,
|
|
193
|
+
body: await parseErrorBody(output.body, context),
|
|
194
|
+
};
|
|
195
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
196
|
+
switch (errorCode) {
|
|
197
|
+
case "InternalServerException":
|
|
198
|
+
case "com.amazonaws.bcmdataexports#InternalServerException":
|
|
199
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
200
|
+
case "ResourceNotFoundException":
|
|
201
|
+
case "com.amazonaws.bcmdataexports#ResourceNotFoundException":
|
|
202
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
203
|
+
case "ThrottlingException":
|
|
204
|
+
case "com.amazonaws.bcmdataexports#ThrottlingException":
|
|
205
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
206
|
+
case "ValidationException":
|
|
207
|
+
case "com.amazonaws.bcmdataexports#ValidationException":
|
|
208
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
209
|
+
default:
|
|
210
|
+
const parsedBody = parsedOutput.body;
|
|
211
|
+
return throwDefaultError({
|
|
212
|
+
output,
|
|
213
|
+
parsedBody,
|
|
214
|
+
errorCode,
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
};
|
|
218
|
+
const de_GetExportCommand = async (output, context) => {
|
|
219
|
+
if (output.statusCode >= 300) {
|
|
220
|
+
return de_GetExportCommandError(output, context);
|
|
221
|
+
}
|
|
222
|
+
const data = await parseBody(output.body, context);
|
|
223
|
+
let contents = {};
|
|
224
|
+
contents = de_GetExportResponse(data, context);
|
|
225
|
+
const response = {
|
|
226
|
+
$metadata: deserializeMetadata(output),
|
|
227
|
+
...contents,
|
|
228
|
+
};
|
|
229
|
+
return response;
|
|
230
|
+
};
|
|
231
|
+
exports.de_GetExportCommand = de_GetExportCommand;
|
|
232
|
+
const de_GetExportCommandError = async (output, context) => {
|
|
233
|
+
const parsedOutput = {
|
|
234
|
+
...output,
|
|
235
|
+
body: await parseErrorBody(output.body, context),
|
|
236
|
+
};
|
|
237
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
238
|
+
switch (errorCode) {
|
|
239
|
+
case "InternalServerException":
|
|
240
|
+
case "com.amazonaws.bcmdataexports#InternalServerException":
|
|
241
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
242
|
+
case "ResourceNotFoundException":
|
|
243
|
+
case "com.amazonaws.bcmdataexports#ResourceNotFoundException":
|
|
244
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
245
|
+
case "ThrottlingException":
|
|
246
|
+
case "com.amazonaws.bcmdataexports#ThrottlingException":
|
|
247
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
248
|
+
case "ValidationException":
|
|
249
|
+
case "com.amazonaws.bcmdataexports#ValidationException":
|
|
250
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
251
|
+
default:
|
|
252
|
+
const parsedBody = parsedOutput.body;
|
|
253
|
+
return throwDefaultError({
|
|
254
|
+
output,
|
|
255
|
+
parsedBody,
|
|
256
|
+
errorCode,
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
};
|
|
260
|
+
const de_GetTableCommand = async (output, context) => {
|
|
261
|
+
if (output.statusCode >= 300) {
|
|
262
|
+
return de_GetTableCommandError(output, context);
|
|
263
|
+
}
|
|
264
|
+
const data = await parseBody(output.body, context);
|
|
265
|
+
let contents = {};
|
|
266
|
+
contents = (0, smithy_client_1._json)(data);
|
|
267
|
+
const response = {
|
|
268
|
+
$metadata: deserializeMetadata(output),
|
|
269
|
+
...contents,
|
|
270
|
+
};
|
|
271
|
+
return response;
|
|
272
|
+
};
|
|
273
|
+
exports.de_GetTableCommand = de_GetTableCommand;
|
|
274
|
+
const de_GetTableCommandError = async (output, context) => {
|
|
275
|
+
const parsedOutput = {
|
|
276
|
+
...output,
|
|
277
|
+
body: await parseErrorBody(output.body, context),
|
|
278
|
+
};
|
|
279
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
280
|
+
switch (errorCode) {
|
|
281
|
+
case "InternalServerException":
|
|
282
|
+
case "com.amazonaws.bcmdataexports#InternalServerException":
|
|
283
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
284
|
+
case "ThrottlingException":
|
|
285
|
+
case "com.amazonaws.bcmdataexports#ThrottlingException":
|
|
286
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
287
|
+
case "ValidationException":
|
|
288
|
+
case "com.amazonaws.bcmdataexports#ValidationException":
|
|
289
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
290
|
+
default:
|
|
291
|
+
const parsedBody = parsedOutput.body;
|
|
292
|
+
return throwDefaultError({
|
|
293
|
+
output,
|
|
294
|
+
parsedBody,
|
|
295
|
+
errorCode,
|
|
296
|
+
});
|
|
297
|
+
}
|
|
298
|
+
};
|
|
299
|
+
const de_ListExecutionsCommand = async (output, context) => {
|
|
300
|
+
if (output.statusCode >= 300) {
|
|
301
|
+
return de_ListExecutionsCommandError(output, context);
|
|
302
|
+
}
|
|
303
|
+
const data = await parseBody(output.body, context);
|
|
304
|
+
let contents = {};
|
|
305
|
+
contents = de_ListExecutionsResponse(data, context);
|
|
306
|
+
const response = {
|
|
307
|
+
$metadata: deserializeMetadata(output),
|
|
308
|
+
...contents,
|
|
309
|
+
};
|
|
310
|
+
return response;
|
|
311
|
+
};
|
|
312
|
+
exports.de_ListExecutionsCommand = de_ListExecutionsCommand;
|
|
313
|
+
const de_ListExecutionsCommandError = async (output, context) => {
|
|
314
|
+
const parsedOutput = {
|
|
315
|
+
...output,
|
|
316
|
+
body: await parseErrorBody(output.body, context),
|
|
317
|
+
};
|
|
318
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
319
|
+
switch (errorCode) {
|
|
320
|
+
case "InternalServerException":
|
|
321
|
+
case "com.amazonaws.bcmdataexports#InternalServerException":
|
|
322
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
323
|
+
case "ResourceNotFoundException":
|
|
324
|
+
case "com.amazonaws.bcmdataexports#ResourceNotFoundException":
|
|
325
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
326
|
+
case "ThrottlingException":
|
|
327
|
+
case "com.amazonaws.bcmdataexports#ThrottlingException":
|
|
328
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
329
|
+
case "ValidationException":
|
|
330
|
+
case "com.amazonaws.bcmdataexports#ValidationException":
|
|
331
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
332
|
+
default:
|
|
333
|
+
const parsedBody = parsedOutput.body;
|
|
334
|
+
return throwDefaultError({
|
|
335
|
+
output,
|
|
336
|
+
parsedBody,
|
|
337
|
+
errorCode,
|
|
338
|
+
});
|
|
339
|
+
}
|
|
340
|
+
};
|
|
341
|
+
const de_ListExportsCommand = async (output, context) => {
|
|
342
|
+
if (output.statusCode >= 300) {
|
|
343
|
+
return de_ListExportsCommandError(output, context);
|
|
344
|
+
}
|
|
345
|
+
const data = await parseBody(output.body, context);
|
|
346
|
+
let contents = {};
|
|
347
|
+
contents = de_ListExportsResponse(data, context);
|
|
348
|
+
const response = {
|
|
349
|
+
$metadata: deserializeMetadata(output),
|
|
350
|
+
...contents,
|
|
351
|
+
};
|
|
352
|
+
return response;
|
|
353
|
+
};
|
|
354
|
+
exports.de_ListExportsCommand = de_ListExportsCommand;
|
|
355
|
+
const de_ListExportsCommandError = async (output, context) => {
|
|
356
|
+
const parsedOutput = {
|
|
357
|
+
...output,
|
|
358
|
+
body: await parseErrorBody(output.body, context),
|
|
359
|
+
};
|
|
360
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
361
|
+
switch (errorCode) {
|
|
362
|
+
case "InternalServerException":
|
|
363
|
+
case "com.amazonaws.bcmdataexports#InternalServerException":
|
|
364
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
365
|
+
case "ThrottlingException":
|
|
366
|
+
case "com.amazonaws.bcmdataexports#ThrottlingException":
|
|
367
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
368
|
+
case "ValidationException":
|
|
369
|
+
case "com.amazonaws.bcmdataexports#ValidationException":
|
|
370
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
371
|
+
default:
|
|
372
|
+
const parsedBody = parsedOutput.body;
|
|
373
|
+
return throwDefaultError({
|
|
374
|
+
output,
|
|
375
|
+
parsedBody,
|
|
376
|
+
errorCode,
|
|
377
|
+
});
|
|
378
|
+
}
|
|
379
|
+
};
|
|
380
|
+
const de_ListTablesCommand = async (output, context) => {
|
|
381
|
+
if (output.statusCode >= 300) {
|
|
382
|
+
return de_ListTablesCommandError(output, context);
|
|
383
|
+
}
|
|
384
|
+
const data = await parseBody(output.body, context);
|
|
385
|
+
let contents = {};
|
|
386
|
+
contents = (0, smithy_client_1._json)(data);
|
|
387
|
+
const response = {
|
|
388
|
+
$metadata: deserializeMetadata(output),
|
|
389
|
+
...contents,
|
|
390
|
+
};
|
|
391
|
+
return response;
|
|
392
|
+
};
|
|
393
|
+
exports.de_ListTablesCommand = de_ListTablesCommand;
|
|
394
|
+
const de_ListTablesCommandError = async (output, context) => {
|
|
395
|
+
const parsedOutput = {
|
|
396
|
+
...output,
|
|
397
|
+
body: await parseErrorBody(output.body, context),
|
|
398
|
+
};
|
|
399
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
400
|
+
switch (errorCode) {
|
|
401
|
+
case "InternalServerException":
|
|
402
|
+
case "com.amazonaws.bcmdataexports#InternalServerException":
|
|
403
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
404
|
+
case "ThrottlingException":
|
|
405
|
+
case "com.amazonaws.bcmdataexports#ThrottlingException":
|
|
406
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
407
|
+
case "ValidationException":
|
|
408
|
+
case "com.amazonaws.bcmdataexports#ValidationException":
|
|
409
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
410
|
+
default:
|
|
411
|
+
const parsedBody = parsedOutput.body;
|
|
412
|
+
return throwDefaultError({
|
|
413
|
+
output,
|
|
414
|
+
parsedBody,
|
|
415
|
+
errorCode,
|
|
416
|
+
});
|
|
417
|
+
}
|
|
418
|
+
};
|
|
419
|
+
const de_ListTagsForResourceCommand = async (output, context) => {
|
|
420
|
+
if (output.statusCode >= 300) {
|
|
421
|
+
return de_ListTagsForResourceCommandError(output, context);
|
|
422
|
+
}
|
|
423
|
+
const data = await parseBody(output.body, context);
|
|
424
|
+
let contents = {};
|
|
425
|
+
contents = (0, smithy_client_1._json)(data);
|
|
426
|
+
const response = {
|
|
427
|
+
$metadata: deserializeMetadata(output),
|
|
428
|
+
...contents,
|
|
429
|
+
};
|
|
430
|
+
return response;
|
|
431
|
+
};
|
|
432
|
+
exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
|
|
433
|
+
const de_ListTagsForResourceCommandError = async (output, context) => {
|
|
434
|
+
const parsedOutput = {
|
|
435
|
+
...output,
|
|
436
|
+
body: await parseErrorBody(output.body, context),
|
|
437
|
+
};
|
|
438
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
439
|
+
switch (errorCode) {
|
|
440
|
+
case "InternalServerException":
|
|
441
|
+
case "com.amazonaws.bcmdataexports#InternalServerException":
|
|
442
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
443
|
+
case "ResourceNotFoundException":
|
|
444
|
+
case "com.amazonaws.bcmdataexports#ResourceNotFoundException":
|
|
445
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
446
|
+
case "ThrottlingException":
|
|
447
|
+
case "com.amazonaws.bcmdataexports#ThrottlingException":
|
|
448
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
449
|
+
case "ValidationException":
|
|
450
|
+
case "com.amazonaws.bcmdataexports#ValidationException":
|
|
451
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
452
|
+
default:
|
|
453
|
+
const parsedBody = parsedOutput.body;
|
|
454
|
+
return throwDefaultError({
|
|
455
|
+
output,
|
|
456
|
+
parsedBody,
|
|
457
|
+
errorCode,
|
|
458
|
+
});
|
|
459
|
+
}
|
|
460
|
+
};
|
|
461
|
+
const de_TagResourceCommand = async (output, context) => {
|
|
462
|
+
if (output.statusCode >= 300) {
|
|
463
|
+
return de_TagResourceCommandError(output, context);
|
|
464
|
+
}
|
|
465
|
+
const data = await parseBody(output.body, context);
|
|
466
|
+
let contents = {};
|
|
467
|
+
contents = (0, smithy_client_1._json)(data);
|
|
468
|
+
const response = {
|
|
469
|
+
$metadata: deserializeMetadata(output),
|
|
470
|
+
...contents,
|
|
471
|
+
};
|
|
472
|
+
return response;
|
|
473
|
+
};
|
|
474
|
+
exports.de_TagResourceCommand = de_TagResourceCommand;
|
|
475
|
+
const de_TagResourceCommandError = async (output, context) => {
|
|
476
|
+
const parsedOutput = {
|
|
477
|
+
...output,
|
|
478
|
+
body: await parseErrorBody(output.body, context),
|
|
479
|
+
};
|
|
480
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
481
|
+
switch (errorCode) {
|
|
482
|
+
case "InternalServerException":
|
|
483
|
+
case "com.amazonaws.bcmdataexports#InternalServerException":
|
|
484
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
485
|
+
case "ResourceNotFoundException":
|
|
486
|
+
case "com.amazonaws.bcmdataexports#ResourceNotFoundException":
|
|
487
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
488
|
+
case "ThrottlingException":
|
|
489
|
+
case "com.amazonaws.bcmdataexports#ThrottlingException":
|
|
490
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
491
|
+
case "ValidationException":
|
|
492
|
+
case "com.amazonaws.bcmdataexports#ValidationException":
|
|
493
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
494
|
+
default:
|
|
495
|
+
const parsedBody = parsedOutput.body;
|
|
496
|
+
return throwDefaultError({
|
|
497
|
+
output,
|
|
498
|
+
parsedBody,
|
|
499
|
+
errorCode,
|
|
500
|
+
});
|
|
501
|
+
}
|
|
502
|
+
};
|
|
503
|
+
const de_UntagResourceCommand = async (output, context) => {
|
|
504
|
+
if (output.statusCode >= 300) {
|
|
505
|
+
return de_UntagResourceCommandError(output, context);
|
|
506
|
+
}
|
|
507
|
+
const data = await parseBody(output.body, context);
|
|
508
|
+
let contents = {};
|
|
509
|
+
contents = (0, smithy_client_1._json)(data);
|
|
510
|
+
const response = {
|
|
511
|
+
$metadata: deserializeMetadata(output),
|
|
512
|
+
...contents,
|
|
513
|
+
};
|
|
514
|
+
return response;
|
|
515
|
+
};
|
|
516
|
+
exports.de_UntagResourceCommand = de_UntagResourceCommand;
|
|
517
|
+
const de_UntagResourceCommandError = async (output, context) => {
|
|
518
|
+
const parsedOutput = {
|
|
519
|
+
...output,
|
|
520
|
+
body: await parseErrorBody(output.body, context),
|
|
521
|
+
};
|
|
522
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
523
|
+
switch (errorCode) {
|
|
524
|
+
case "InternalServerException":
|
|
525
|
+
case "com.amazonaws.bcmdataexports#InternalServerException":
|
|
526
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
527
|
+
case "ResourceNotFoundException":
|
|
528
|
+
case "com.amazonaws.bcmdataexports#ResourceNotFoundException":
|
|
529
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
530
|
+
case "ThrottlingException":
|
|
531
|
+
case "com.amazonaws.bcmdataexports#ThrottlingException":
|
|
532
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
533
|
+
case "ValidationException":
|
|
534
|
+
case "com.amazonaws.bcmdataexports#ValidationException":
|
|
535
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
536
|
+
default:
|
|
537
|
+
const parsedBody = parsedOutput.body;
|
|
538
|
+
return throwDefaultError({
|
|
539
|
+
output,
|
|
540
|
+
parsedBody,
|
|
541
|
+
errorCode,
|
|
542
|
+
});
|
|
543
|
+
}
|
|
544
|
+
};
|
|
545
|
+
const de_UpdateExportCommand = async (output, context) => {
|
|
546
|
+
if (output.statusCode >= 300) {
|
|
547
|
+
return de_UpdateExportCommandError(output, context);
|
|
548
|
+
}
|
|
549
|
+
const data = await parseBody(output.body, context);
|
|
550
|
+
let contents = {};
|
|
551
|
+
contents = (0, smithy_client_1._json)(data);
|
|
552
|
+
const response = {
|
|
553
|
+
$metadata: deserializeMetadata(output),
|
|
554
|
+
...contents,
|
|
555
|
+
};
|
|
556
|
+
return response;
|
|
557
|
+
};
|
|
558
|
+
exports.de_UpdateExportCommand = de_UpdateExportCommand;
|
|
559
|
+
const de_UpdateExportCommandError = async (output, context) => {
|
|
560
|
+
const parsedOutput = {
|
|
561
|
+
...output,
|
|
562
|
+
body: await parseErrorBody(output.body, context),
|
|
563
|
+
};
|
|
564
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
565
|
+
switch (errorCode) {
|
|
566
|
+
case "InternalServerException":
|
|
567
|
+
case "com.amazonaws.bcmdataexports#InternalServerException":
|
|
568
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
569
|
+
case "ResourceNotFoundException":
|
|
570
|
+
case "com.amazonaws.bcmdataexports#ResourceNotFoundException":
|
|
571
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
572
|
+
case "ThrottlingException":
|
|
573
|
+
case "com.amazonaws.bcmdataexports#ThrottlingException":
|
|
574
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
575
|
+
case "ValidationException":
|
|
576
|
+
case "com.amazonaws.bcmdataexports#ValidationException":
|
|
577
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
578
|
+
default:
|
|
579
|
+
const parsedBody = parsedOutput.body;
|
|
580
|
+
return throwDefaultError({
|
|
581
|
+
output,
|
|
582
|
+
parsedBody,
|
|
583
|
+
errorCode,
|
|
584
|
+
});
|
|
585
|
+
}
|
|
586
|
+
};
|
|
587
|
+
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
588
|
+
const body = parsedOutput.body;
|
|
589
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
590
|
+
const exception = new models_0_1.InternalServerException({
|
|
591
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
592
|
+
...deserialized,
|
|
593
|
+
});
|
|
594
|
+
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
595
|
+
};
|
|
596
|
+
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
597
|
+
const body = parsedOutput.body;
|
|
598
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
599
|
+
const exception = new models_0_1.ResourceNotFoundException({
|
|
600
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
601
|
+
...deserialized,
|
|
602
|
+
});
|
|
603
|
+
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
604
|
+
};
|
|
605
|
+
const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
606
|
+
const body = parsedOutput.body;
|
|
607
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
608
|
+
const exception = new models_0_1.ServiceQuotaExceededException({
|
|
609
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
610
|
+
...deserialized,
|
|
611
|
+
});
|
|
612
|
+
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
613
|
+
};
|
|
614
|
+
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
615
|
+
const body = parsedOutput.body;
|
|
616
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
617
|
+
const exception = new models_0_1.ThrottlingException({
|
|
618
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
619
|
+
...deserialized,
|
|
620
|
+
});
|
|
621
|
+
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
622
|
+
};
|
|
623
|
+
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
624
|
+
const body = parsedOutput.body;
|
|
625
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
626
|
+
const exception = new models_0_1.ValidationException({
|
|
627
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
628
|
+
...deserialized,
|
|
629
|
+
});
|
|
630
|
+
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
631
|
+
};
|
|
632
|
+
const de_ExecutionReference = (output, context) => {
|
|
633
|
+
return (0, smithy_client_1.take)(output, {
|
|
634
|
+
ExecutionId: smithy_client_1.expectString,
|
|
635
|
+
ExecutionStatus: (_) => de_ExecutionStatus(_, context),
|
|
636
|
+
});
|
|
637
|
+
};
|
|
638
|
+
const de_ExecutionReferenceList = (output, context) => {
|
|
639
|
+
const retVal = (output || [])
|
|
640
|
+
.filter((e) => e != null)
|
|
641
|
+
.map((entry) => {
|
|
642
|
+
return de_ExecutionReference(entry, context);
|
|
643
|
+
});
|
|
644
|
+
return retVal;
|
|
645
|
+
};
|
|
646
|
+
const de_ExecutionStatus = (output, context) => {
|
|
647
|
+
return (0, smithy_client_1.take)(output, {
|
|
648
|
+
CompletedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
649
|
+
CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
650
|
+
LastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
651
|
+
StatusCode: smithy_client_1.expectString,
|
|
652
|
+
StatusReason: smithy_client_1.expectString,
|
|
653
|
+
});
|
|
654
|
+
};
|
|
655
|
+
const de_ExportReference = (output, context) => {
|
|
656
|
+
return (0, smithy_client_1.take)(output, {
|
|
657
|
+
ExportArn: smithy_client_1.expectString,
|
|
658
|
+
ExportName: smithy_client_1.expectString,
|
|
659
|
+
ExportStatus: (_) => de_ExportStatus(_, context),
|
|
660
|
+
});
|
|
661
|
+
};
|
|
662
|
+
const de_ExportReferenceList = (output, context) => {
|
|
663
|
+
const retVal = (output || [])
|
|
664
|
+
.filter((e) => e != null)
|
|
665
|
+
.map((entry) => {
|
|
666
|
+
return de_ExportReference(entry, context);
|
|
667
|
+
});
|
|
668
|
+
return retVal;
|
|
669
|
+
};
|
|
670
|
+
const de_ExportStatus = (output, context) => {
|
|
671
|
+
return (0, smithy_client_1.take)(output, {
|
|
672
|
+
CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
673
|
+
LastRefreshedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
674
|
+
LastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
675
|
+
StatusCode: smithy_client_1.expectString,
|
|
676
|
+
StatusReason: smithy_client_1.expectString,
|
|
677
|
+
});
|
|
678
|
+
};
|
|
679
|
+
const de_GetExecutionResponse = (output, context) => {
|
|
680
|
+
return (0, smithy_client_1.take)(output, {
|
|
681
|
+
ExecutionId: smithy_client_1.expectString,
|
|
682
|
+
ExecutionStatus: (_) => de_ExecutionStatus(_, context),
|
|
683
|
+
Export: smithy_client_1._json,
|
|
684
|
+
});
|
|
685
|
+
};
|
|
686
|
+
const de_GetExportResponse = (output, context) => {
|
|
687
|
+
return (0, smithy_client_1.take)(output, {
|
|
688
|
+
Export: smithy_client_1._json,
|
|
689
|
+
ExportStatus: (_) => de_ExportStatus(_, context),
|
|
690
|
+
});
|
|
691
|
+
};
|
|
692
|
+
const de_ListExecutionsResponse = (output, context) => {
|
|
693
|
+
return (0, smithy_client_1.take)(output, {
|
|
694
|
+
Executions: (_) => de_ExecutionReferenceList(_, context),
|
|
695
|
+
NextToken: smithy_client_1.expectString,
|
|
696
|
+
});
|
|
697
|
+
};
|
|
698
|
+
const de_ListExportsResponse = (output, context) => {
|
|
699
|
+
return (0, smithy_client_1.take)(output, {
|
|
700
|
+
Exports: (_) => de_ExportReferenceList(_, context),
|
|
701
|
+
NextToken: smithy_client_1.expectString,
|
|
702
|
+
});
|
|
703
|
+
};
|
|
704
|
+
const deserializeMetadata = (output) => ({
|
|
705
|
+
httpStatusCode: output.statusCode,
|
|
706
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
707
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
708
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
709
|
+
});
|
|
710
|
+
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
711
|
+
const throwDefaultError = (0, smithy_client_1.withBaseException)(BCMDataExportsServiceException_1.BCMDataExportsServiceException);
|
|
712
|
+
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
|
|
713
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
714
|
+
const contents = {
|
|
715
|
+
protocol,
|
|
716
|
+
hostname,
|
|
717
|
+
port,
|
|
718
|
+
method: "POST",
|
|
719
|
+
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
720
|
+
headers,
|
|
721
|
+
};
|
|
722
|
+
if (resolvedHostname !== undefined) {
|
|
723
|
+
contents.hostname = resolvedHostname;
|
|
724
|
+
}
|
|
725
|
+
if (body !== undefined) {
|
|
726
|
+
contents.body = body;
|
|
727
|
+
}
|
|
728
|
+
return new protocol_http_1.HttpRequest(contents);
|
|
729
|
+
};
|
|
730
|
+
function sharedHeaders(operation) {
|
|
731
|
+
return {
|
|
732
|
+
"content-type": "application/x-amz-json-1.1",
|
|
733
|
+
"x-amz-target": `AWSBillingAndCostManagementDataExports.${operation}`,
|
|
734
|
+
};
|
|
735
|
+
}
|
|
736
|
+
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
737
|
+
if (encoded.length) {
|
|
738
|
+
return JSON.parse(encoded);
|
|
739
|
+
}
|
|
740
|
+
return {};
|
|
741
|
+
});
|
|
742
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
743
|
+
const value = await parseBody(errorBody, context);
|
|
744
|
+
value.message = value.message ?? value.Message;
|
|
745
|
+
return value;
|
|
746
|
+
};
|
|
747
|
+
const loadRestJsonErrorCode = (output, data) => {
|
|
748
|
+
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
749
|
+
const sanitizeErrorCode = (rawValue) => {
|
|
750
|
+
let cleanValue = rawValue;
|
|
751
|
+
if (typeof cleanValue === "number") {
|
|
752
|
+
cleanValue = cleanValue.toString();
|
|
753
|
+
}
|
|
754
|
+
if (cleanValue.indexOf(",") >= 0) {
|
|
755
|
+
cleanValue = cleanValue.split(",")[0];
|
|
756
|
+
}
|
|
757
|
+
if (cleanValue.indexOf(":") >= 0) {
|
|
758
|
+
cleanValue = cleanValue.split(":")[0];
|
|
759
|
+
}
|
|
760
|
+
if (cleanValue.indexOf("#") >= 0) {
|
|
761
|
+
cleanValue = cleanValue.split("#")[1];
|
|
762
|
+
}
|
|
763
|
+
return cleanValue;
|
|
764
|
+
};
|
|
765
|
+
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
766
|
+
if (headerKey !== undefined) {
|
|
767
|
+
return sanitizeErrorCode(output.headers[headerKey]);
|
|
768
|
+
}
|
|
769
|
+
if (data.code !== undefined) {
|
|
770
|
+
return sanitizeErrorCode(data.code);
|
|
771
|
+
}
|
|
772
|
+
if (data["__type"] !== undefined) {
|
|
773
|
+
return sanitizeErrorCode(data["__type"]);
|
|
774
|
+
}
|
|
775
|
+
};
|