@aws-sdk/client-backup-gateway 3.489.0 → 3.495.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/dist-cjs/BackupGateway.js +1 -61
- package/dist-cjs/BackupGatewayClient.js +1 -43
- package/dist-cjs/commands/AssociateGatewayToServerCommand.js +1 -28
- package/dist-cjs/commands/CreateGatewayCommand.js +1 -28
- package/dist-cjs/commands/DeleteGatewayCommand.js +1 -28
- package/dist-cjs/commands/DeleteHypervisorCommand.js +1 -28
- package/dist-cjs/commands/DisassociateGatewayFromServerCommand.js +1 -28
- package/dist-cjs/commands/GetBandwidthRateLimitScheduleCommand.js +1 -28
- package/dist-cjs/commands/GetGatewayCommand.js +1 -28
- package/dist-cjs/commands/GetHypervisorCommand.js +1 -28
- package/dist-cjs/commands/GetHypervisorPropertyMappingsCommand.js +1 -28
- package/dist-cjs/commands/GetVirtualMachineCommand.js +1 -28
- package/dist-cjs/commands/ImportHypervisorConfigurationCommand.js +1 -29
- package/dist-cjs/commands/ListGatewaysCommand.js +1 -28
- package/dist-cjs/commands/ListHypervisorsCommand.js +1 -28
- package/dist-cjs/commands/ListTagsForResourceCommand.js +1 -28
- package/dist-cjs/commands/ListVirtualMachinesCommand.js +1 -28
- package/dist-cjs/commands/PutBandwidthRateLimitScheduleCommand.js +1 -28
- package/dist-cjs/commands/PutHypervisorPropertyMappingsCommand.js +1 -28
- package/dist-cjs/commands/PutMaintenanceStartTimeCommand.js +1 -28
- package/dist-cjs/commands/StartVirtualMachinesMetadataSyncCommand.js +1 -28
- package/dist-cjs/commands/TagResourceCommand.js +1 -28
- package/dist-cjs/commands/TestHypervisorConfigurationCommand.js +1 -29
- package/dist-cjs/commands/UntagResourceCommand.js +1 -28
- package/dist-cjs/commands/UpdateGatewayInformationCommand.js +1 -28
- package/dist-cjs/commands/UpdateGatewaySoftwareNowCommand.js +1 -28
- package/dist-cjs/commands/UpdateHypervisorCommand.js +1 -29
- package/dist-cjs/commands/index.js +1 -28
- package/dist-cjs/endpoint/EndpointParameters.js +1 -18
- package/dist-cjs/extensionConfiguration.js +1 -2
- package/dist-cjs/index.js +2267 -11
- package/dist-cjs/models/BackupGatewayServiceException.js +1 -12
- package/dist-cjs/models/index.js +1 -4
- package/dist-cjs/models/models_0.js +1 -129
- package/dist-cjs/pagination/Interfaces.js +1 -2
- package/dist-cjs/pagination/ListGatewaysPaginator.js +1 -7
- package/dist-cjs/pagination/ListHypervisorsPaginator.js +1 -7
- package/dist-cjs/pagination/ListVirtualMachinesPaginator.js +1 -7
- package/dist-cjs/pagination/index.js +1 -7
- package/dist-cjs/protocols/Aws_json1_0.js +1 -1480
- package/dist-cjs/runtimeExtensions.js +1 -22
- package/package.json +40 -40
|
@@ -1,1480 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_UpdateHypervisorCommand = exports.de_UpdateGatewaySoftwareNowCommand = exports.de_UpdateGatewayInformationCommand = exports.de_UntagResourceCommand = exports.de_TestHypervisorConfigurationCommand = exports.de_TagResourceCommand = exports.de_StartVirtualMachinesMetadataSyncCommand = exports.de_PutMaintenanceStartTimeCommand = exports.de_PutHypervisorPropertyMappingsCommand = exports.de_PutBandwidthRateLimitScheduleCommand = exports.de_ListVirtualMachinesCommand = exports.de_ListTagsForResourceCommand = exports.de_ListHypervisorsCommand = exports.de_ListGatewaysCommand = exports.de_ImportHypervisorConfigurationCommand = exports.de_GetVirtualMachineCommand = exports.de_GetHypervisorPropertyMappingsCommand = exports.de_GetHypervisorCommand = exports.de_GetGatewayCommand = exports.de_GetBandwidthRateLimitScheduleCommand = exports.de_DisassociateGatewayFromServerCommand = exports.de_DeleteHypervisorCommand = exports.de_DeleteGatewayCommand = exports.de_CreateGatewayCommand = exports.de_AssociateGatewayToServerCommand = exports.se_UpdateHypervisorCommand = exports.se_UpdateGatewaySoftwareNowCommand = exports.se_UpdateGatewayInformationCommand = exports.se_UntagResourceCommand = exports.se_TestHypervisorConfigurationCommand = exports.se_TagResourceCommand = exports.se_StartVirtualMachinesMetadataSyncCommand = exports.se_PutMaintenanceStartTimeCommand = exports.se_PutHypervisorPropertyMappingsCommand = exports.se_PutBandwidthRateLimitScheduleCommand = exports.se_ListVirtualMachinesCommand = exports.se_ListTagsForResourceCommand = exports.se_ListHypervisorsCommand = exports.se_ListGatewaysCommand = exports.se_ImportHypervisorConfigurationCommand = exports.se_GetVirtualMachineCommand = exports.se_GetHypervisorPropertyMappingsCommand = exports.se_GetHypervisorCommand = exports.se_GetGatewayCommand = exports.se_GetBandwidthRateLimitScheduleCommand = exports.se_DisassociateGatewayFromServerCommand = exports.se_DeleteHypervisorCommand = exports.se_DeleteGatewayCommand = exports.se_CreateGatewayCommand = exports.se_AssociateGatewayToServerCommand = void 0;
|
|
4
|
-
const protocol_http_1 = require("@smithy/protocol-http");
|
|
5
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
6
|
-
const BackupGatewayServiceException_1 = require("../models/BackupGatewayServiceException");
|
|
7
|
-
const models_0_1 = require("../models/models_0");
|
|
8
|
-
const se_AssociateGatewayToServerCommand = async (input, context) => {
|
|
9
|
-
const headers = sharedHeaders("AssociateGatewayToServer");
|
|
10
|
-
let body;
|
|
11
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
12
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
13
|
-
};
|
|
14
|
-
exports.se_AssociateGatewayToServerCommand = se_AssociateGatewayToServerCommand;
|
|
15
|
-
const se_CreateGatewayCommand = async (input, context) => {
|
|
16
|
-
const headers = sharedHeaders("CreateGateway");
|
|
17
|
-
let body;
|
|
18
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
19
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
20
|
-
};
|
|
21
|
-
exports.se_CreateGatewayCommand = se_CreateGatewayCommand;
|
|
22
|
-
const se_DeleteGatewayCommand = async (input, context) => {
|
|
23
|
-
const headers = sharedHeaders("DeleteGateway");
|
|
24
|
-
let body;
|
|
25
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
26
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
27
|
-
};
|
|
28
|
-
exports.se_DeleteGatewayCommand = se_DeleteGatewayCommand;
|
|
29
|
-
const se_DeleteHypervisorCommand = async (input, context) => {
|
|
30
|
-
const headers = sharedHeaders("DeleteHypervisor");
|
|
31
|
-
let body;
|
|
32
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
33
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
34
|
-
};
|
|
35
|
-
exports.se_DeleteHypervisorCommand = se_DeleteHypervisorCommand;
|
|
36
|
-
const se_DisassociateGatewayFromServerCommand = async (input, context) => {
|
|
37
|
-
const headers = sharedHeaders("DisassociateGatewayFromServer");
|
|
38
|
-
let body;
|
|
39
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
40
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
41
|
-
};
|
|
42
|
-
exports.se_DisassociateGatewayFromServerCommand = se_DisassociateGatewayFromServerCommand;
|
|
43
|
-
const se_GetBandwidthRateLimitScheduleCommand = async (input, context) => {
|
|
44
|
-
const headers = sharedHeaders("GetBandwidthRateLimitSchedule");
|
|
45
|
-
let body;
|
|
46
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
47
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
48
|
-
};
|
|
49
|
-
exports.se_GetBandwidthRateLimitScheduleCommand = se_GetBandwidthRateLimitScheduleCommand;
|
|
50
|
-
const se_GetGatewayCommand = async (input, context) => {
|
|
51
|
-
const headers = sharedHeaders("GetGateway");
|
|
52
|
-
let body;
|
|
53
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
54
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
55
|
-
};
|
|
56
|
-
exports.se_GetGatewayCommand = se_GetGatewayCommand;
|
|
57
|
-
const se_GetHypervisorCommand = async (input, context) => {
|
|
58
|
-
const headers = sharedHeaders("GetHypervisor");
|
|
59
|
-
let body;
|
|
60
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
61
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
62
|
-
};
|
|
63
|
-
exports.se_GetHypervisorCommand = se_GetHypervisorCommand;
|
|
64
|
-
const se_GetHypervisorPropertyMappingsCommand = async (input, context) => {
|
|
65
|
-
const headers = sharedHeaders("GetHypervisorPropertyMappings");
|
|
66
|
-
let body;
|
|
67
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
68
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
69
|
-
};
|
|
70
|
-
exports.se_GetHypervisorPropertyMappingsCommand = se_GetHypervisorPropertyMappingsCommand;
|
|
71
|
-
const se_GetVirtualMachineCommand = async (input, context) => {
|
|
72
|
-
const headers = sharedHeaders("GetVirtualMachine");
|
|
73
|
-
let body;
|
|
74
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
75
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
76
|
-
};
|
|
77
|
-
exports.se_GetVirtualMachineCommand = se_GetVirtualMachineCommand;
|
|
78
|
-
const se_ImportHypervisorConfigurationCommand = async (input, context) => {
|
|
79
|
-
const headers = sharedHeaders("ImportHypervisorConfiguration");
|
|
80
|
-
let body;
|
|
81
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
82
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
83
|
-
};
|
|
84
|
-
exports.se_ImportHypervisorConfigurationCommand = se_ImportHypervisorConfigurationCommand;
|
|
85
|
-
const se_ListGatewaysCommand = async (input, context) => {
|
|
86
|
-
const headers = sharedHeaders("ListGateways");
|
|
87
|
-
let body;
|
|
88
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
89
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
90
|
-
};
|
|
91
|
-
exports.se_ListGatewaysCommand = se_ListGatewaysCommand;
|
|
92
|
-
const se_ListHypervisorsCommand = async (input, context) => {
|
|
93
|
-
const headers = sharedHeaders("ListHypervisors");
|
|
94
|
-
let body;
|
|
95
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
96
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
97
|
-
};
|
|
98
|
-
exports.se_ListHypervisorsCommand = se_ListHypervisorsCommand;
|
|
99
|
-
const se_ListTagsForResourceCommand = async (input, context) => {
|
|
100
|
-
const headers = sharedHeaders("ListTagsForResource");
|
|
101
|
-
let body;
|
|
102
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
103
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
104
|
-
};
|
|
105
|
-
exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
|
|
106
|
-
const se_ListVirtualMachinesCommand = async (input, context) => {
|
|
107
|
-
const headers = sharedHeaders("ListVirtualMachines");
|
|
108
|
-
let body;
|
|
109
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
110
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
111
|
-
};
|
|
112
|
-
exports.se_ListVirtualMachinesCommand = se_ListVirtualMachinesCommand;
|
|
113
|
-
const se_PutBandwidthRateLimitScheduleCommand = async (input, context) => {
|
|
114
|
-
const headers = sharedHeaders("PutBandwidthRateLimitSchedule");
|
|
115
|
-
let body;
|
|
116
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
117
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
118
|
-
};
|
|
119
|
-
exports.se_PutBandwidthRateLimitScheduleCommand = se_PutBandwidthRateLimitScheduleCommand;
|
|
120
|
-
const se_PutHypervisorPropertyMappingsCommand = async (input, context) => {
|
|
121
|
-
const headers = sharedHeaders("PutHypervisorPropertyMappings");
|
|
122
|
-
let body;
|
|
123
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
124
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
125
|
-
};
|
|
126
|
-
exports.se_PutHypervisorPropertyMappingsCommand = se_PutHypervisorPropertyMappingsCommand;
|
|
127
|
-
const se_PutMaintenanceStartTimeCommand = async (input, context) => {
|
|
128
|
-
const headers = sharedHeaders("PutMaintenanceStartTime");
|
|
129
|
-
let body;
|
|
130
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
131
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
132
|
-
};
|
|
133
|
-
exports.se_PutMaintenanceStartTimeCommand = se_PutMaintenanceStartTimeCommand;
|
|
134
|
-
const se_StartVirtualMachinesMetadataSyncCommand = async (input, context) => {
|
|
135
|
-
const headers = sharedHeaders("StartVirtualMachinesMetadataSync");
|
|
136
|
-
let body;
|
|
137
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
138
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
139
|
-
};
|
|
140
|
-
exports.se_StartVirtualMachinesMetadataSyncCommand = se_StartVirtualMachinesMetadataSyncCommand;
|
|
141
|
-
const se_TagResourceCommand = async (input, context) => {
|
|
142
|
-
const headers = sharedHeaders("TagResource");
|
|
143
|
-
let body;
|
|
144
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
145
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
146
|
-
};
|
|
147
|
-
exports.se_TagResourceCommand = se_TagResourceCommand;
|
|
148
|
-
const se_TestHypervisorConfigurationCommand = async (input, context) => {
|
|
149
|
-
const headers = sharedHeaders("TestHypervisorConfiguration");
|
|
150
|
-
let body;
|
|
151
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
152
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
153
|
-
};
|
|
154
|
-
exports.se_TestHypervisorConfigurationCommand = se_TestHypervisorConfigurationCommand;
|
|
155
|
-
const se_UntagResourceCommand = async (input, context) => {
|
|
156
|
-
const headers = sharedHeaders("UntagResource");
|
|
157
|
-
let body;
|
|
158
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
159
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
160
|
-
};
|
|
161
|
-
exports.se_UntagResourceCommand = se_UntagResourceCommand;
|
|
162
|
-
const se_UpdateGatewayInformationCommand = async (input, context) => {
|
|
163
|
-
const headers = sharedHeaders("UpdateGatewayInformation");
|
|
164
|
-
let body;
|
|
165
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
166
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
167
|
-
};
|
|
168
|
-
exports.se_UpdateGatewayInformationCommand = se_UpdateGatewayInformationCommand;
|
|
169
|
-
const se_UpdateGatewaySoftwareNowCommand = async (input, context) => {
|
|
170
|
-
const headers = sharedHeaders("UpdateGatewaySoftwareNow");
|
|
171
|
-
let body;
|
|
172
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
173
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
174
|
-
};
|
|
175
|
-
exports.se_UpdateGatewaySoftwareNowCommand = se_UpdateGatewaySoftwareNowCommand;
|
|
176
|
-
const se_UpdateHypervisorCommand = async (input, context) => {
|
|
177
|
-
const headers = sharedHeaders("UpdateHypervisor");
|
|
178
|
-
let body;
|
|
179
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
180
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
181
|
-
};
|
|
182
|
-
exports.se_UpdateHypervisorCommand = se_UpdateHypervisorCommand;
|
|
183
|
-
const de_AssociateGatewayToServerCommand = async (output, context) => {
|
|
184
|
-
if (output.statusCode >= 300) {
|
|
185
|
-
return de_AssociateGatewayToServerCommandError(output, context);
|
|
186
|
-
}
|
|
187
|
-
const data = await parseBody(output.body, context);
|
|
188
|
-
let contents = {};
|
|
189
|
-
contents = (0, smithy_client_1._json)(data);
|
|
190
|
-
const response = {
|
|
191
|
-
$metadata: deserializeMetadata(output),
|
|
192
|
-
...contents,
|
|
193
|
-
};
|
|
194
|
-
return response;
|
|
195
|
-
};
|
|
196
|
-
exports.de_AssociateGatewayToServerCommand = de_AssociateGatewayToServerCommand;
|
|
197
|
-
const de_AssociateGatewayToServerCommandError = async (output, context) => {
|
|
198
|
-
const parsedOutput = {
|
|
199
|
-
...output,
|
|
200
|
-
body: await parseErrorBody(output.body, context),
|
|
201
|
-
};
|
|
202
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
203
|
-
switch (errorCode) {
|
|
204
|
-
case "ConflictException":
|
|
205
|
-
case "com.amazonaws.backupgateway#ConflictException":
|
|
206
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
207
|
-
case "InternalServerException":
|
|
208
|
-
case "com.amazonaws.backupgateway#InternalServerException":
|
|
209
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
210
|
-
case "ThrottlingException":
|
|
211
|
-
case "com.amazonaws.backupgateway#ThrottlingException":
|
|
212
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
213
|
-
case "ValidationException":
|
|
214
|
-
case "com.amazonaws.backupgateway#ValidationException":
|
|
215
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
216
|
-
default:
|
|
217
|
-
const parsedBody = parsedOutput.body;
|
|
218
|
-
return throwDefaultError({
|
|
219
|
-
output,
|
|
220
|
-
parsedBody,
|
|
221
|
-
errorCode,
|
|
222
|
-
});
|
|
223
|
-
}
|
|
224
|
-
};
|
|
225
|
-
const de_CreateGatewayCommand = async (output, context) => {
|
|
226
|
-
if (output.statusCode >= 300) {
|
|
227
|
-
return de_CreateGatewayCommandError(output, context);
|
|
228
|
-
}
|
|
229
|
-
const data = await parseBody(output.body, context);
|
|
230
|
-
let contents = {};
|
|
231
|
-
contents = (0, smithy_client_1._json)(data);
|
|
232
|
-
const response = {
|
|
233
|
-
$metadata: deserializeMetadata(output),
|
|
234
|
-
...contents,
|
|
235
|
-
};
|
|
236
|
-
return response;
|
|
237
|
-
};
|
|
238
|
-
exports.de_CreateGatewayCommand = de_CreateGatewayCommand;
|
|
239
|
-
const de_CreateGatewayCommandError = async (output, context) => {
|
|
240
|
-
const parsedOutput = {
|
|
241
|
-
...output,
|
|
242
|
-
body: await parseErrorBody(output.body, context),
|
|
243
|
-
};
|
|
244
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
245
|
-
switch (errorCode) {
|
|
246
|
-
case "InternalServerException":
|
|
247
|
-
case "com.amazonaws.backupgateway#InternalServerException":
|
|
248
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
249
|
-
case "ThrottlingException":
|
|
250
|
-
case "com.amazonaws.backupgateway#ThrottlingException":
|
|
251
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
252
|
-
case "ValidationException":
|
|
253
|
-
case "com.amazonaws.backupgateway#ValidationException":
|
|
254
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
255
|
-
default:
|
|
256
|
-
const parsedBody = parsedOutput.body;
|
|
257
|
-
return throwDefaultError({
|
|
258
|
-
output,
|
|
259
|
-
parsedBody,
|
|
260
|
-
errorCode,
|
|
261
|
-
});
|
|
262
|
-
}
|
|
263
|
-
};
|
|
264
|
-
const de_DeleteGatewayCommand = async (output, context) => {
|
|
265
|
-
if (output.statusCode >= 300) {
|
|
266
|
-
return de_DeleteGatewayCommandError(output, context);
|
|
267
|
-
}
|
|
268
|
-
const data = await parseBody(output.body, context);
|
|
269
|
-
let contents = {};
|
|
270
|
-
contents = (0, smithy_client_1._json)(data);
|
|
271
|
-
const response = {
|
|
272
|
-
$metadata: deserializeMetadata(output),
|
|
273
|
-
...contents,
|
|
274
|
-
};
|
|
275
|
-
return response;
|
|
276
|
-
};
|
|
277
|
-
exports.de_DeleteGatewayCommand = de_DeleteGatewayCommand;
|
|
278
|
-
const de_DeleteGatewayCommandError = async (output, context) => {
|
|
279
|
-
const parsedOutput = {
|
|
280
|
-
...output,
|
|
281
|
-
body: await parseErrorBody(output.body, context),
|
|
282
|
-
};
|
|
283
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
284
|
-
switch (errorCode) {
|
|
285
|
-
case "InternalServerException":
|
|
286
|
-
case "com.amazonaws.backupgateway#InternalServerException":
|
|
287
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
288
|
-
case "ResourceNotFoundException":
|
|
289
|
-
case "com.amazonaws.backupgateway#ResourceNotFoundException":
|
|
290
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
291
|
-
case "ThrottlingException":
|
|
292
|
-
case "com.amazonaws.backupgateway#ThrottlingException":
|
|
293
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
294
|
-
case "ValidationException":
|
|
295
|
-
case "com.amazonaws.backupgateway#ValidationException":
|
|
296
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
297
|
-
default:
|
|
298
|
-
const parsedBody = parsedOutput.body;
|
|
299
|
-
return throwDefaultError({
|
|
300
|
-
output,
|
|
301
|
-
parsedBody,
|
|
302
|
-
errorCode,
|
|
303
|
-
});
|
|
304
|
-
}
|
|
305
|
-
};
|
|
306
|
-
const de_DeleteHypervisorCommand = async (output, context) => {
|
|
307
|
-
if (output.statusCode >= 300) {
|
|
308
|
-
return de_DeleteHypervisorCommandError(output, context);
|
|
309
|
-
}
|
|
310
|
-
const data = await parseBody(output.body, context);
|
|
311
|
-
let contents = {};
|
|
312
|
-
contents = (0, smithy_client_1._json)(data);
|
|
313
|
-
const response = {
|
|
314
|
-
$metadata: deserializeMetadata(output),
|
|
315
|
-
...contents,
|
|
316
|
-
};
|
|
317
|
-
return response;
|
|
318
|
-
};
|
|
319
|
-
exports.de_DeleteHypervisorCommand = de_DeleteHypervisorCommand;
|
|
320
|
-
const de_DeleteHypervisorCommandError = async (output, context) => {
|
|
321
|
-
const parsedOutput = {
|
|
322
|
-
...output,
|
|
323
|
-
body: await parseErrorBody(output.body, context),
|
|
324
|
-
};
|
|
325
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
326
|
-
switch (errorCode) {
|
|
327
|
-
case "AccessDeniedException":
|
|
328
|
-
case "com.amazonaws.backupgateway#AccessDeniedException":
|
|
329
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
330
|
-
case "ConflictException":
|
|
331
|
-
case "com.amazonaws.backupgateway#ConflictException":
|
|
332
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
333
|
-
case "InternalServerException":
|
|
334
|
-
case "com.amazonaws.backupgateway#InternalServerException":
|
|
335
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
336
|
-
case "ResourceNotFoundException":
|
|
337
|
-
case "com.amazonaws.backupgateway#ResourceNotFoundException":
|
|
338
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
339
|
-
case "ThrottlingException":
|
|
340
|
-
case "com.amazonaws.backupgateway#ThrottlingException":
|
|
341
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
342
|
-
case "ValidationException":
|
|
343
|
-
case "com.amazonaws.backupgateway#ValidationException":
|
|
344
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
345
|
-
default:
|
|
346
|
-
const parsedBody = parsedOutput.body;
|
|
347
|
-
return throwDefaultError({
|
|
348
|
-
output,
|
|
349
|
-
parsedBody,
|
|
350
|
-
errorCode,
|
|
351
|
-
});
|
|
352
|
-
}
|
|
353
|
-
};
|
|
354
|
-
const de_DisassociateGatewayFromServerCommand = async (output, context) => {
|
|
355
|
-
if (output.statusCode >= 300) {
|
|
356
|
-
return de_DisassociateGatewayFromServerCommandError(output, context);
|
|
357
|
-
}
|
|
358
|
-
const data = await parseBody(output.body, context);
|
|
359
|
-
let contents = {};
|
|
360
|
-
contents = (0, smithy_client_1._json)(data);
|
|
361
|
-
const response = {
|
|
362
|
-
$metadata: deserializeMetadata(output),
|
|
363
|
-
...contents,
|
|
364
|
-
};
|
|
365
|
-
return response;
|
|
366
|
-
};
|
|
367
|
-
exports.de_DisassociateGatewayFromServerCommand = de_DisassociateGatewayFromServerCommand;
|
|
368
|
-
const de_DisassociateGatewayFromServerCommandError = async (output, context) => {
|
|
369
|
-
const parsedOutput = {
|
|
370
|
-
...output,
|
|
371
|
-
body: await parseErrorBody(output.body, context),
|
|
372
|
-
};
|
|
373
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
374
|
-
switch (errorCode) {
|
|
375
|
-
case "ConflictException":
|
|
376
|
-
case "com.amazonaws.backupgateway#ConflictException":
|
|
377
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
378
|
-
case "InternalServerException":
|
|
379
|
-
case "com.amazonaws.backupgateway#InternalServerException":
|
|
380
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
381
|
-
case "ResourceNotFoundException":
|
|
382
|
-
case "com.amazonaws.backupgateway#ResourceNotFoundException":
|
|
383
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
384
|
-
case "ThrottlingException":
|
|
385
|
-
case "com.amazonaws.backupgateway#ThrottlingException":
|
|
386
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
387
|
-
case "ValidationException":
|
|
388
|
-
case "com.amazonaws.backupgateway#ValidationException":
|
|
389
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
390
|
-
default:
|
|
391
|
-
const parsedBody = parsedOutput.body;
|
|
392
|
-
return throwDefaultError({
|
|
393
|
-
output,
|
|
394
|
-
parsedBody,
|
|
395
|
-
errorCode,
|
|
396
|
-
});
|
|
397
|
-
}
|
|
398
|
-
};
|
|
399
|
-
const de_GetBandwidthRateLimitScheduleCommand = async (output, context) => {
|
|
400
|
-
if (output.statusCode >= 300) {
|
|
401
|
-
return de_GetBandwidthRateLimitScheduleCommandError(output, context);
|
|
402
|
-
}
|
|
403
|
-
const data = await parseBody(output.body, context);
|
|
404
|
-
let contents = {};
|
|
405
|
-
contents = (0, smithy_client_1._json)(data);
|
|
406
|
-
const response = {
|
|
407
|
-
$metadata: deserializeMetadata(output),
|
|
408
|
-
...contents,
|
|
409
|
-
};
|
|
410
|
-
return response;
|
|
411
|
-
};
|
|
412
|
-
exports.de_GetBandwidthRateLimitScheduleCommand = de_GetBandwidthRateLimitScheduleCommand;
|
|
413
|
-
const de_GetBandwidthRateLimitScheduleCommandError = async (output, context) => {
|
|
414
|
-
const parsedOutput = {
|
|
415
|
-
...output,
|
|
416
|
-
body: await parseErrorBody(output.body, context),
|
|
417
|
-
};
|
|
418
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
419
|
-
switch (errorCode) {
|
|
420
|
-
case "InternalServerException":
|
|
421
|
-
case "com.amazonaws.backupgateway#InternalServerException":
|
|
422
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
423
|
-
case "ResourceNotFoundException":
|
|
424
|
-
case "com.amazonaws.backupgateway#ResourceNotFoundException":
|
|
425
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
426
|
-
case "ThrottlingException":
|
|
427
|
-
case "com.amazonaws.backupgateway#ThrottlingException":
|
|
428
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
429
|
-
case "ValidationException":
|
|
430
|
-
case "com.amazonaws.backupgateway#ValidationException":
|
|
431
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
432
|
-
default:
|
|
433
|
-
const parsedBody = parsedOutput.body;
|
|
434
|
-
return throwDefaultError({
|
|
435
|
-
output,
|
|
436
|
-
parsedBody,
|
|
437
|
-
errorCode,
|
|
438
|
-
});
|
|
439
|
-
}
|
|
440
|
-
};
|
|
441
|
-
const de_GetGatewayCommand = async (output, context) => {
|
|
442
|
-
if (output.statusCode >= 300) {
|
|
443
|
-
return de_GetGatewayCommandError(output, context);
|
|
444
|
-
}
|
|
445
|
-
const data = await parseBody(output.body, context);
|
|
446
|
-
let contents = {};
|
|
447
|
-
contents = de_GetGatewayOutput(data, context);
|
|
448
|
-
const response = {
|
|
449
|
-
$metadata: deserializeMetadata(output),
|
|
450
|
-
...contents,
|
|
451
|
-
};
|
|
452
|
-
return response;
|
|
453
|
-
};
|
|
454
|
-
exports.de_GetGatewayCommand = de_GetGatewayCommand;
|
|
455
|
-
const de_GetGatewayCommandError = async (output, context) => {
|
|
456
|
-
const parsedOutput = {
|
|
457
|
-
...output,
|
|
458
|
-
body: await parseErrorBody(output.body, context),
|
|
459
|
-
};
|
|
460
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
461
|
-
switch (errorCode) {
|
|
462
|
-
case "InternalServerException":
|
|
463
|
-
case "com.amazonaws.backupgateway#InternalServerException":
|
|
464
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
465
|
-
case "ResourceNotFoundException":
|
|
466
|
-
case "com.amazonaws.backupgateway#ResourceNotFoundException":
|
|
467
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
468
|
-
case "ThrottlingException":
|
|
469
|
-
case "com.amazonaws.backupgateway#ThrottlingException":
|
|
470
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
471
|
-
case "ValidationException":
|
|
472
|
-
case "com.amazonaws.backupgateway#ValidationException":
|
|
473
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
474
|
-
default:
|
|
475
|
-
const parsedBody = parsedOutput.body;
|
|
476
|
-
return throwDefaultError({
|
|
477
|
-
output,
|
|
478
|
-
parsedBody,
|
|
479
|
-
errorCode,
|
|
480
|
-
});
|
|
481
|
-
}
|
|
482
|
-
};
|
|
483
|
-
const de_GetHypervisorCommand = async (output, context) => {
|
|
484
|
-
if (output.statusCode >= 300) {
|
|
485
|
-
return de_GetHypervisorCommandError(output, context);
|
|
486
|
-
}
|
|
487
|
-
const data = await parseBody(output.body, context);
|
|
488
|
-
let contents = {};
|
|
489
|
-
contents = de_GetHypervisorOutput(data, context);
|
|
490
|
-
const response = {
|
|
491
|
-
$metadata: deserializeMetadata(output),
|
|
492
|
-
...contents,
|
|
493
|
-
};
|
|
494
|
-
return response;
|
|
495
|
-
};
|
|
496
|
-
exports.de_GetHypervisorCommand = de_GetHypervisorCommand;
|
|
497
|
-
const de_GetHypervisorCommandError = async (output, context) => {
|
|
498
|
-
const parsedOutput = {
|
|
499
|
-
...output,
|
|
500
|
-
body: await parseErrorBody(output.body, context),
|
|
501
|
-
};
|
|
502
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
503
|
-
switch (errorCode) {
|
|
504
|
-
case "InternalServerException":
|
|
505
|
-
case "com.amazonaws.backupgateway#InternalServerException":
|
|
506
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
507
|
-
case "ResourceNotFoundException":
|
|
508
|
-
case "com.amazonaws.backupgateway#ResourceNotFoundException":
|
|
509
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
510
|
-
case "ThrottlingException":
|
|
511
|
-
case "com.amazonaws.backupgateway#ThrottlingException":
|
|
512
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
513
|
-
case "ValidationException":
|
|
514
|
-
case "com.amazonaws.backupgateway#ValidationException":
|
|
515
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
516
|
-
default:
|
|
517
|
-
const parsedBody = parsedOutput.body;
|
|
518
|
-
return throwDefaultError({
|
|
519
|
-
output,
|
|
520
|
-
parsedBody,
|
|
521
|
-
errorCode,
|
|
522
|
-
});
|
|
523
|
-
}
|
|
524
|
-
};
|
|
525
|
-
const de_GetHypervisorPropertyMappingsCommand = async (output, context) => {
|
|
526
|
-
if (output.statusCode >= 300) {
|
|
527
|
-
return de_GetHypervisorPropertyMappingsCommandError(output, context);
|
|
528
|
-
}
|
|
529
|
-
const data = await parseBody(output.body, context);
|
|
530
|
-
let contents = {};
|
|
531
|
-
contents = (0, smithy_client_1._json)(data);
|
|
532
|
-
const response = {
|
|
533
|
-
$metadata: deserializeMetadata(output),
|
|
534
|
-
...contents,
|
|
535
|
-
};
|
|
536
|
-
return response;
|
|
537
|
-
};
|
|
538
|
-
exports.de_GetHypervisorPropertyMappingsCommand = de_GetHypervisorPropertyMappingsCommand;
|
|
539
|
-
const de_GetHypervisorPropertyMappingsCommandError = async (output, context) => {
|
|
540
|
-
const parsedOutput = {
|
|
541
|
-
...output,
|
|
542
|
-
body: await parseErrorBody(output.body, context),
|
|
543
|
-
};
|
|
544
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
545
|
-
switch (errorCode) {
|
|
546
|
-
case "InternalServerException":
|
|
547
|
-
case "com.amazonaws.backupgateway#InternalServerException":
|
|
548
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
549
|
-
case "ResourceNotFoundException":
|
|
550
|
-
case "com.amazonaws.backupgateway#ResourceNotFoundException":
|
|
551
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
552
|
-
case "ThrottlingException":
|
|
553
|
-
case "com.amazonaws.backupgateway#ThrottlingException":
|
|
554
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
555
|
-
case "ValidationException":
|
|
556
|
-
case "com.amazonaws.backupgateway#ValidationException":
|
|
557
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
558
|
-
default:
|
|
559
|
-
const parsedBody = parsedOutput.body;
|
|
560
|
-
return throwDefaultError({
|
|
561
|
-
output,
|
|
562
|
-
parsedBody,
|
|
563
|
-
errorCode,
|
|
564
|
-
});
|
|
565
|
-
}
|
|
566
|
-
};
|
|
567
|
-
const de_GetVirtualMachineCommand = async (output, context) => {
|
|
568
|
-
if (output.statusCode >= 300) {
|
|
569
|
-
return de_GetVirtualMachineCommandError(output, context);
|
|
570
|
-
}
|
|
571
|
-
const data = await parseBody(output.body, context);
|
|
572
|
-
let contents = {};
|
|
573
|
-
contents = de_GetVirtualMachineOutput(data, context);
|
|
574
|
-
const response = {
|
|
575
|
-
$metadata: deserializeMetadata(output),
|
|
576
|
-
...contents,
|
|
577
|
-
};
|
|
578
|
-
return response;
|
|
579
|
-
};
|
|
580
|
-
exports.de_GetVirtualMachineCommand = de_GetVirtualMachineCommand;
|
|
581
|
-
const de_GetVirtualMachineCommandError = async (output, context) => {
|
|
582
|
-
const parsedOutput = {
|
|
583
|
-
...output,
|
|
584
|
-
body: await parseErrorBody(output.body, context),
|
|
585
|
-
};
|
|
586
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
587
|
-
switch (errorCode) {
|
|
588
|
-
case "InternalServerException":
|
|
589
|
-
case "com.amazonaws.backupgateway#InternalServerException":
|
|
590
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
591
|
-
case "ResourceNotFoundException":
|
|
592
|
-
case "com.amazonaws.backupgateway#ResourceNotFoundException":
|
|
593
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
594
|
-
case "ThrottlingException":
|
|
595
|
-
case "com.amazonaws.backupgateway#ThrottlingException":
|
|
596
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
597
|
-
case "ValidationException":
|
|
598
|
-
case "com.amazonaws.backupgateway#ValidationException":
|
|
599
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
600
|
-
default:
|
|
601
|
-
const parsedBody = parsedOutput.body;
|
|
602
|
-
return throwDefaultError({
|
|
603
|
-
output,
|
|
604
|
-
parsedBody,
|
|
605
|
-
errorCode,
|
|
606
|
-
});
|
|
607
|
-
}
|
|
608
|
-
};
|
|
609
|
-
const de_ImportHypervisorConfigurationCommand = async (output, context) => {
|
|
610
|
-
if (output.statusCode >= 300) {
|
|
611
|
-
return de_ImportHypervisorConfigurationCommandError(output, context);
|
|
612
|
-
}
|
|
613
|
-
const data = await parseBody(output.body, context);
|
|
614
|
-
let contents = {};
|
|
615
|
-
contents = (0, smithy_client_1._json)(data);
|
|
616
|
-
const response = {
|
|
617
|
-
$metadata: deserializeMetadata(output),
|
|
618
|
-
...contents,
|
|
619
|
-
};
|
|
620
|
-
return response;
|
|
621
|
-
};
|
|
622
|
-
exports.de_ImportHypervisorConfigurationCommand = de_ImportHypervisorConfigurationCommand;
|
|
623
|
-
const de_ImportHypervisorConfigurationCommandError = async (output, context) => {
|
|
624
|
-
const parsedOutput = {
|
|
625
|
-
...output,
|
|
626
|
-
body: await parseErrorBody(output.body, context),
|
|
627
|
-
};
|
|
628
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
629
|
-
switch (errorCode) {
|
|
630
|
-
case "AccessDeniedException":
|
|
631
|
-
case "com.amazonaws.backupgateway#AccessDeniedException":
|
|
632
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
633
|
-
case "ConflictException":
|
|
634
|
-
case "com.amazonaws.backupgateway#ConflictException":
|
|
635
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
636
|
-
case "InternalServerException":
|
|
637
|
-
case "com.amazonaws.backupgateway#InternalServerException":
|
|
638
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
639
|
-
case "ThrottlingException":
|
|
640
|
-
case "com.amazonaws.backupgateway#ThrottlingException":
|
|
641
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
642
|
-
case "ValidationException":
|
|
643
|
-
case "com.amazonaws.backupgateway#ValidationException":
|
|
644
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
645
|
-
default:
|
|
646
|
-
const parsedBody = parsedOutput.body;
|
|
647
|
-
return throwDefaultError({
|
|
648
|
-
output,
|
|
649
|
-
parsedBody,
|
|
650
|
-
errorCode,
|
|
651
|
-
});
|
|
652
|
-
}
|
|
653
|
-
};
|
|
654
|
-
const de_ListGatewaysCommand = async (output, context) => {
|
|
655
|
-
if (output.statusCode >= 300) {
|
|
656
|
-
return de_ListGatewaysCommandError(output, context);
|
|
657
|
-
}
|
|
658
|
-
const data = await parseBody(output.body, context);
|
|
659
|
-
let contents = {};
|
|
660
|
-
contents = de_ListGatewaysOutput(data, context);
|
|
661
|
-
const response = {
|
|
662
|
-
$metadata: deserializeMetadata(output),
|
|
663
|
-
...contents,
|
|
664
|
-
};
|
|
665
|
-
return response;
|
|
666
|
-
};
|
|
667
|
-
exports.de_ListGatewaysCommand = de_ListGatewaysCommand;
|
|
668
|
-
const de_ListGatewaysCommandError = async (output, context) => {
|
|
669
|
-
const parsedOutput = {
|
|
670
|
-
...output,
|
|
671
|
-
body: await parseErrorBody(output.body, context),
|
|
672
|
-
};
|
|
673
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
674
|
-
switch (errorCode) {
|
|
675
|
-
case "InternalServerException":
|
|
676
|
-
case "com.amazonaws.backupgateway#InternalServerException":
|
|
677
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
678
|
-
case "ThrottlingException":
|
|
679
|
-
case "com.amazonaws.backupgateway#ThrottlingException":
|
|
680
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
681
|
-
case "ValidationException":
|
|
682
|
-
case "com.amazonaws.backupgateway#ValidationException":
|
|
683
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
684
|
-
default:
|
|
685
|
-
const parsedBody = parsedOutput.body;
|
|
686
|
-
return throwDefaultError({
|
|
687
|
-
output,
|
|
688
|
-
parsedBody,
|
|
689
|
-
errorCode,
|
|
690
|
-
});
|
|
691
|
-
}
|
|
692
|
-
};
|
|
693
|
-
const de_ListHypervisorsCommand = async (output, context) => {
|
|
694
|
-
if (output.statusCode >= 300) {
|
|
695
|
-
return de_ListHypervisorsCommandError(output, context);
|
|
696
|
-
}
|
|
697
|
-
const data = await parseBody(output.body, context);
|
|
698
|
-
let contents = {};
|
|
699
|
-
contents = (0, smithy_client_1._json)(data);
|
|
700
|
-
const response = {
|
|
701
|
-
$metadata: deserializeMetadata(output),
|
|
702
|
-
...contents,
|
|
703
|
-
};
|
|
704
|
-
return response;
|
|
705
|
-
};
|
|
706
|
-
exports.de_ListHypervisorsCommand = de_ListHypervisorsCommand;
|
|
707
|
-
const de_ListHypervisorsCommandError = async (output, context) => {
|
|
708
|
-
const parsedOutput = {
|
|
709
|
-
...output,
|
|
710
|
-
body: await parseErrorBody(output.body, context),
|
|
711
|
-
};
|
|
712
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
713
|
-
switch (errorCode) {
|
|
714
|
-
case "InternalServerException":
|
|
715
|
-
case "com.amazonaws.backupgateway#InternalServerException":
|
|
716
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
717
|
-
case "ThrottlingException":
|
|
718
|
-
case "com.amazonaws.backupgateway#ThrottlingException":
|
|
719
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
720
|
-
case "ValidationException":
|
|
721
|
-
case "com.amazonaws.backupgateway#ValidationException":
|
|
722
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
723
|
-
default:
|
|
724
|
-
const parsedBody = parsedOutput.body;
|
|
725
|
-
return throwDefaultError({
|
|
726
|
-
output,
|
|
727
|
-
parsedBody,
|
|
728
|
-
errorCode,
|
|
729
|
-
});
|
|
730
|
-
}
|
|
731
|
-
};
|
|
732
|
-
const de_ListTagsForResourceCommand = async (output, context) => {
|
|
733
|
-
if (output.statusCode >= 300) {
|
|
734
|
-
return de_ListTagsForResourceCommandError(output, context);
|
|
735
|
-
}
|
|
736
|
-
const data = await parseBody(output.body, context);
|
|
737
|
-
let contents = {};
|
|
738
|
-
contents = (0, smithy_client_1._json)(data);
|
|
739
|
-
const response = {
|
|
740
|
-
$metadata: deserializeMetadata(output),
|
|
741
|
-
...contents,
|
|
742
|
-
};
|
|
743
|
-
return response;
|
|
744
|
-
};
|
|
745
|
-
exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
|
|
746
|
-
const de_ListTagsForResourceCommandError = async (output, context) => {
|
|
747
|
-
const parsedOutput = {
|
|
748
|
-
...output,
|
|
749
|
-
body: await parseErrorBody(output.body, context),
|
|
750
|
-
};
|
|
751
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
752
|
-
switch (errorCode) {
|
|
753
|
-
case "InternalServerException":
|
|
754
|
-
case "com.amazonaws.backupgateway#InternalServerException":
|
|
755
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
756
|
-
case "ResourceNotFoundException":
|
|
757
|
-
case "com.amazonaws.backupgateway#ResourceNotFoundException":
|
|
758
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
759
|
-
case "ThrottlingException":
|
|
760
|
-
case "com.amazonaws.backupgateway#ThrottlingException":
|
|
761
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
762
|
-
case "ValidationException":
|
|
763
|
-
case "com.amazonaws.backupgateway#ValidationException":
|
|
764
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
765
|
-
default:
|
|
766
|
-
const parsedBody = parsedOutput.body;
|
|
767
|
-
return throwDefaultError({
|
|
768
|
-
output,
|
|
769
|
-
parsedBody,
|
|
770
|
-
errorCode,
|
|
771
|
-
});
|
|
772
|
-
}
|
|
773
|
-
};
|
|
774
|
-
const de_ListVirtualMachinesCommand = async (output, context) => {
|
|
775
|
-
if (output.statusCode >= 300) {
|
|
776
|
-
return de_ListVirtualMachinesCommandError(output, context);
|
|
777
|
-
}
|
|
778
|
-
const data = await parseBody(output.body, context);
|
|
779
|
-
let contents = {};
|
|
780
|
-
contents = de_ListVirtualMachinesOutput(data, context);
|
|
781
|
-
const response = {
|
|
782
|
-
$metadata: deserializeMetadata(output),
|
|
783
|
-
...contents,
|
|
784
|
-
};
|
|
785
|
-
return response;
|
|
786
|
-
};
|
|
787
|
-
exports.de_ListVirtualMachinesCommand = de_ListVirtualMachinesCommand;
|
|
788
|
-
const de_ListVirtualMachinesCommandError = async (output, context) => {
|
|
789
|
-
const parsedOutput = {
|
|
790
|
-
...output,
|
|
791
|
-
body: await parseErrorBody(output.body, context),
|
|
792
|
-
};
|
|
793
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
794
|
-
switch (errorCode) {
|
|
795
|
-
case "InternalServerException":
|
|
796
|
-
case "com.amazonaws.backupgateway#InternalServerException":
|
|
797
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
798
|
-
case "ThrottlingException":
|
|
799
|
-
case "com.amazonaws.backupgateway#ThrottlingException":
|
|
800
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
801
|
-
case "ValidationException":
|
|
802
|
-
case "com.amazonaws.backupgateway#ValidationException":
|
|
803
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
804
|
-
default:
|
|
805
|
-
const parsedBody = parsedOutput.body;
|
|
806
|
-
return throwDefaultError({
|
|
807
|
-
output,
|
|
808
|
-
parsedBody,
|
|
809
|
-
errorCode,
|
|
810
|
-
});
|
|
811
|
-
}
|
|
812
|
-
};
|
|
813
|
-
const de_PutBandwidthRateLimitScheduleCommand = async (output, context) => {
|
|
814
|
-
if (output.statusCode >= 300) {
|
|
815
|
-
return de_PutBandwidthRateLimitScheduleCommandError(output, context);
|
|
816
|
-
}
|
|
817
|
-
const data = await parseBody(output.body, context);
|
|
818
|
-
let contents = {};
|
|
819
|
-
contents = (0, smithy_client_1._json)(data);
|
|
820
|
-
const response = {
|
|
821
|
-
$metadata: deserializeMetadata(output),
|
|
822
|
-
...contents,
|
|
823
|
-
};
|
|
824
|
-
return response;
|
|
825
|
-
};
|
|
826
|
-
exports.de_PutBandwidthRateLimitScheduleCommand = de_PutBandwidthRateLimitScheduleCommand;
|
|
827
|
-
const de_PutBandwidthRateLimitScheduleCommandError = async (output, context) => {
|
|
828
|
-
const parsedOutput = {
|
|
829
|
-
...output,
|
|
830
|
-
body: await parseErrorBody(output.body, context),
|
|
831
|
-
};
|
|
832
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
833
|
-
switch (errorCode) {
|
|
834
|
-
case "InternalServerException":
|
|
835
|
-
case "com.amazonaws.backupgateway#InternalServerException":
|
|
836
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
837
|
-
case "ResourceNotFoundException":
|
|
838
|
-
case "com.amazonaws.backupgateway#ResourceNotFoundException":
|
|
839
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
840
|
-
case "ThrottlingException":
|
|
841
|
-
case "com.amazonaws.backupgateway#ThrottlingException":
|
|
842
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
843
|
-
case "ValidationException":
|
|
844
|
-
case "com.amazonaws.backupgateway#ValidationException":
|
|
845
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
846
|
-
default:
|
|
847
|
-
const parsedBody = parsedOutput.body;
|
|
848
|
-
return throwDefaultError({
|
|
849
|
-
output,
|
|
850
|
-
parsedBody,
|
|
851
|
-
errorCode,
|
|
852
|
-
});
|
|
853
|
-
}
|
|
854
|
-
};
|
|
855
|
-
const de_PutHypervisorPropertyMappingsCommand = async (output, context) => {
|
|
856
|
-
if (output.statusCode >= 300) {
|
|
857
|
-
return de_PutHypervisorPropertyMappingsCommandError(output, context);
|
|
858
|
-
}
|
|
859
|
-
const data = await parseBody(output.body, context);
|
|
860
|
-
let contents = {};
|
|
861
|
-
contents = (0, smithy_client_1._json)(data);
|
|
862
|
-
const response = {
|
|
863
|
-
$metadata: deserializeMetadata(output),
|
|
864
|
-
...contents,
|
|
865
|
-
};
|
|
866
|
-
return response;
|
|
867
|
-
};
|
|
868
|
-
exports.de_PutHypervisorPropertyMappingsCommand = de_PutHypervisorPropertyMappingsCommand;
|
|
869
|
-
const de_PutHypervisorPropertyMappingsCommandError = async (output, context) => {
|
|
870
|
-
const parsedOutput = {
|
|
871
|
-
...output,
|
|
872
|
-
body: await parseErrorBody(output.body, context),
|
|
873
|
-
};
|
|
874
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
875
|
-
switch (errorCode) {
|
|
876
|
-
case "AccessDeniedException":
|
|
877
|
-
case "com.amazonaws.backupgateway#AccessDeniedException":
|
|
878
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
879
|
-
case "ConflictException":
|
|
880
|
-
case "com.amazonaws.backupgateway#ConflictException":
|
|
881
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
882
|
-
case "InternalServerException":
|
|
883
|
-
case "com.amazonaws.backupgateway#InternalServerException":
|
|
884
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
885
|
-
case "ResourceNotFoundException":
|
|
886
|
-
case "com.amazonaws.backupgateway#ResourceNotFoundException":
|
|
887
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
888
|
-
case "ThrottlingException":
|
|
889
|
-
case "com.amazonaws.backupgateway#ThrottlingException":
|
|
890
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
891
|
-
case "ValidationException":
|
|
892
|
-
case "com.amazonaws.backupgateway#ValidationException":
|
|
893
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
894
|
-
default:
|
|
895
|
-
const parsedBody = parsedOutput.body;
|
|
896
|
-
return throwDefaultError({
|
|
897
|
-
output,
|
|
898
|
-
parsedBody,
|
|
899
|
-
errorCode,
|
|
900
|
-
});
|
|
901
|
-
}
|
|
902
|
-
};
|
|
903
|
-
const de_PutMaintenanceStartTimeCommand = async (output, context) => {
|
|
904
|
-
if (output.statusCode >= 300) {
|
|
905
|
-
return de_PutMaintenanceStartTimeCommandError(output, context);
|
|
906
|
-
}
|
|
907
|
-
const data = await parseBody(output.body, context);
|
|
908
|
-
let contents = {};
|
|
909
|
-
contents = (0, smithy_client_1._json)(data);
|
|
910
|
-
const response = {
|
|
911
|
-
$metadata: deserializeMetadata(output),
|
|
912
|
-
...contents,
|
|
913
|
-
};
|
|
914
|
-
return response;
|
|
915
|
-
};
|
|
916
|
-
exports.de_PutMaintenanceStartTimeCommand = de_PutMaintenanceStartTimeCommand;
|
|
917
|
-
const de_PutMaintenanceStartTimeCommandError = async (output, context) => {
|
|
918
|
-
const parsedOutput = {
|
|
919
|
-
...output,
|
|
920
|
-
body: await parseErrorBody(output.body, context),
|
|
921
|
-
};
|
|
922
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
923
|
-
switch (errorCode) {
|
|
924
|
-
case "ConflictException":
|
|
925
|
-
case "com.amazonaws.backupgateway#ConflictException":
|
|
926
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
927
|
-
case "InternalServerException":
|
|
928
|
-
case "com.amazonaws.backupgateway#InternalServerException":
|
|
929
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
930
|
-
case "ResourceNotFoundException":
|
|
931
|
-
case "com.amazonaws.backupgateway#ResourceNotFoundException":
|
|
932
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
933
|
-
case "ThrottlingException":
|
|
934
|
-
case "com.amazonaws.backupgateway#ThrottlingException":
|
|
935
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
936
|
-
case "ValidationException":
|
|
937
|
-
case "com.amazonaws.backupgateway#ValidationException":
|
|
938
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
939
|
-
default:
|
|
940
|
-
const parsedBody = parsedOutput.body;
|
|
941
|
-
return throwDefaultError({
|
|
942
|
-
output,
|
|
943
|
-
parsedBody,
|
|
944
|
-
errorCode,
|
|
945
|
-
});
|
|
946
|
-
}
|
|
947
|
-
};
|
|
948
|
-
const de_StartVirtualMachinesMetadataSyncCommand = async (output, context) => {
|
|
949
|
-
if (output.statusCode >= 300) {
|
|
950
|
-
return de_StartVirtualMachinesMetadataSyncCommandError(output, context);
|
|
951
|
-
}
|
|
952
|
-
const data = await parseBody(output.body, context);
|
|
953
|
-
let contents = {};
|
|
954
|
-
contents = (0, smithy_client_1._json)(data);
|
|
955
|
-
const response = {
|
|
956
|
-
$metadata: deserializeMetadata(output),
|
|
957
|
-
...contents,
|
|
958
|
-
};
|
|
959
|
-
return response;
|
|
960
|
-
};
|
|
961
|
-
exports.de_StartVirtualMachinesMetadataSyncCommand = de_StartVirtualMachinesMetadataSyncCommand;
|
|
962
|
-
const de_StartVirtualMachinesMetadataSyncCommandError = async (output, context) => {
|
|
963
|
-
const parsedOutput = {
|
|
964
|
-
...output,
|
|
965
|
-
body: await parseErrorBody(output.body, context),
|
|
966
|
-
};
|
|
967
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
968
|
-
switch (errorCode) {
|
|
969
|
-
case "AccessDeniedException":
|
|
970
|
-
case "com.amazonaws.backupgateway#AccessDeniedException":
|
|
971
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
972
|
-
case "InternalServerException":
|
|
973
|
-
case "com.amazonaws.backupgateway#InternalServerException":
|
|
974
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
975
|
-
case "ResourceNotFoundException":
|
|
976
|
-
case "com.amazonaws.backupgateway#ResourceNotFoundException":
|
|
977
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
978
|
-
case "ThrottlingException":
|
|
979
|
-
case "com.amazonaws.backupgateway#ThrottlingException":
|
|
980
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
981
|
-
case "ValidationException":
|
|
982
|
-
case "com.amazonaws.backupgateway#ValidationException":
|
|
983
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
984
|
-
default:
|
|
985
|
-
const parsedBody = parsedOutput.body;
|
|
986
|
-
return throwDefaultError({
|
|
987
|
-
output,
|
|
988
|
-
parsedBody,
|
|
989
|
-
errorCode,
|
|
990
|
-
});
|
|
991
|
-
}
|
|
992
|
-
};
|
|
993
|
-
const de_TagResourceCommand = async (output, context) => {
|
|
994
|
-
if (output.statusCode >= 300) {
|
|
995
|
-
return de_TagResourceCommandError(output, context);
|
|
996
|
-
}
|
|
997
|
-
const data = await parseBody(output.body, context);
|
|
998
|
-
let contents = {};
|
|
999
|
-
contents = (0, smithy_client_1._json)(data);
|
|
1000
|
-
const response = {
|
|
1001
|
-
$metadata: deserializeMetadata(output),
|
|
1002
|
-
...contents,
|
|
1003
|
-
};
|
|
1004
|
-
return response;
|
|
1005
|
-
};
|
|
1006
|
-
exports.de_TagResourceCommand = de_TagResourceCommand;
|
|
1007
|
-
const de_TagResourceCommandError = async (output, context) => {
|
|
1008
|
-
const parsedOutput = {
|
|
1009
|
-
...output,
|
|
1010
|
-
body: await parseErrorBody(output.body, context),
|
|
1011
|
-
};
|
|
1012
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1013
|
-
switch (errorCode) {
|
|
1014
|
-
case "InternalServerException":
|
|
1015
|
-
case "com.amazonaws.backupgateway#InternalServerException":
|
|
1016
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1017
|
-
case "ResourceNotFoundException":
|
|
1018
|
-
case "com.amazonaws.backupgateway#ResourceNotFoundException":
|
|
1019
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1020
|
-
case "ThrottlingException":
|
|
1021
|
-
case "com.amazonaws.backupgateway#ThrottlingException":
|
|
1022
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1023
|
-
case "ValidationException":
|
|
1024
|
-
case "com.amazonaws.backupgateway#ValidationException":
|
|
1025
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1026
|
-
default:
|
|
1027
|
-
const parsedBody = parsedOutput.body;
|
|
1028
|
-
return throwDefaultError({
|
|
1029
|
-
output,
|
|
1030
|
-
parsedBody,
|
|
1031
|
-
errorCode,
|
|
1032
|
-
});
|
|
1033
|
-
}
|
|
1034
|
-
};
|
|
1035
|
-
const de_TestHypervisorConfigurationCommand = async (output, context) => {
|
|
1036
|
-
if (output.statusCode >= 300) {
|
|
1037
|
-
return de_TestHypervisorConfigurationCommandError(output, context);
|
|
1038
|
-
}
|
|
1039
|
-
const data = await parseBody(output.body, context);
|
|
1040
|
-
let contents = {};
|
|
1041
|
-
contents = (0, smithy_client_1._json)(data);
|
|
1042
|
-
const response = {
|
|
1043
|
-
$metadata: deserializeMetadata(output),
|
|
1044
|
-
...contents,
|
|
1045
|
-
};
|
|
1046
|
-
return response;
|
|
1047
|
-
};
|
|
1048
|
-
exports.de_TestHypervisorConfigurationCommand = de_TestHypervisorConfigurationCommand;
|
|
1049
|
-
const de_TestHypervisorConfigurationCommandError = async (output, context) => {
|
|
1050
|
-
const parsedOutput = {
|
|
1051
|
-
...output,
|
|
1052
|
-
body: await parseErrorBody(output.body, context),
|
|
1053
|
-
};
|
|
1054
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1055
|
-
switch (errorCode) {
|
|
1056
|
-
case "ConflictException":
|
|
1057
|
-
case "com.amazonaws.backupgateway#ConflictException":
|
|
1058
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
1059
|
-
case "InternalServerException":
|
|
1060
|
-
case "com.amazonaws.backupgateway#InternalServerException":
|
|
1061
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1062
|
-
case "ResourceNotFoundException":
|
|
1063
|
-
case "com.amazonaws.backupgateway#ResourceNotFoundException":
|
|
1064
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1065
|
-
case "ThrottlingException":
|
|
1066
|
-
case "com.amazonaws.backupgateway#ThrottlingException":
|
|
1067
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1068
|
-
case "ValidationException":
|
|
1069
|
-
case "com.amazonaws.backupgateway#ValidationException":
|
|
1070
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1071
|
-
default:
|
|
1072
|
-
const parsedBody = parsedOutput.body;
|
|
1073
|
-
return throwDefaultError({
|
|
1074
|
-
output,
|
|
1075
|
-
parsedBody,
|
|
1076
|
-
errorCode,
|
|
1077
|
-
});
|
|
1078
|
-
}
|
|
1079
|
-
};
|
|
1080
|
-
const de_UntagResourceCommand = async (output, context) => {
|
|
1081
|
-
if (output.statusCode >= 300) {
|
|
1082
|
-
return de_UntagResourceCommandError(output, context);
|
|
1083
|
-
}
|
|
1084
|
-
const data = await parseBody(output.body, context);
|
|
1085
|
-
let contents = {};
|
|
1086
|
-
contents = (0, smithy_client_1._json)(data);
|
|
1087
|
-
const response = {
|
|
1088
|
-
$metadata: deserializeMetadata(output),
|
|
1089
|
-
...contents,
|
|
1090
|
-
};
|
|
1091
|
-
return response;
|
|
1092
|
-
};
|
|
1093
|
-
exports.de_UntagResourceCommand = de_UntagResourceCommand;
|
|
1094
|
-
const de_UntagResourceCommandError = async (output, context) => {
|
|
1095
|
-
const parsedOutput = {
|
|
1096
|
-
...output,
|
|
1097
|
-
body: await parseErrorBody(output.body, context),
|
|
1098
|
-
};
|
|
1099
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1100
|
-
switch (errorCode) {
|
|
1101
|
-
case "InternalServerException":
|
|
1102
|
-
case "com.amazonaws.backupgateway#InternalServerException":
|
|
1103
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1104
|
-
case "ResourceNotFoundException":
|
|
1105
|
-
case "com.amazonaws.backupgateway#ResourceNotFoundException":
|
|
1106
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1107
|
-
case "ThrottlingException":
|
|
1108
|
-
case "com.amazonaws.backupgateway#ThrottlingException":
|
|
1109
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1110
|
-
case "ValidationException":
|
|
1111
|
-
case "com.amazonaws.backupgateway#ValidationException":
|
|
1112
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1113
|
-
default:
|
|
1114
|
-
const parsedBody = parsedOutput.body;
|
|
1115
|
-
return throwDefaultError({
|
|
1116
|
-
output,
|
|
1117
|
-
parsedBody,
|
|
1118
|
-
errorCode,
|
|
1119
|
-
});
|
|
1120
|
-
}
|
|
1121
|
-
};
|
|
1122
|
-
const de_UpdateGatewayInformationCommand = async (output, context) => {
|
|
1123
|
-
if (output.statusCode >= 300) {
|
|
1124
|
-
return de_UpdateGatewayInformationCommandError(output, context);
|
|
1125
|
-
}
|
|
1126
|
-
const data = await parseBody(output.body, context);
|
|
1127
|
-
let contents = {};
|
|
1128
|
-
contents = (0, smithy_client_1._json)(data);
|
|
1129
|
-
const response = {
|
|
1130
|
-
$metadata: deserializeMetadata(output),
|
|
1131
|
-
...contents,
|
|
1132
|
-
};
|
|
1133
|
-
return response;
|
|
1134
|
-
};
|
|
1135
|
-
exports.de_UpdateGatewayInformationCommand = de_UpdateGatewayInformationCommand;
|
|
1136
|
-
const de_UpdateGatewayInformationCommandError = async (output, context) => {
|
|
1137
|
-
const parsedOutput = {
|
|
1138
|
-
...output,
|
|
1139
|
-
body: await parseErrorBody(output.body, context),
|
|
1140
|
-
};
|
|
1141
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1142
|
-
switch (errorCode) {
|
|
1143
|
-
case "ConflictException":
|
|
1144
|
-
case "com.amazonaws.backupgateway#ConflictException":
|
|
1145
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
1146
|
-
case "InternalServerException":
|
|
1147
|
-
case "com.amazonaws.backupgateway#InternalServerException":
|
|
1148
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1149
|
-
case "ResourceNotFoundException":
|
|
1150
|
-
case "com.amazonaws.backupgateway#ResourceNotFoundException":
|
|
1151
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1152
|
-
case "ThrottlingException":
|
|
1153
|
-
case "com.amazonaws.backupgateway#ThrottlingException":
|
|
1154
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1155
|
-
case "ValidationException":
|
|
1156
|
-
case "com.amazonaws.backupgateway#ValidationException":
|
|
1157
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1158
|
-
default:
|
|
1159
|
-
const parsedBody = parsedOutput.body;
|
|
1160
|
-
return throwDefaultError({
|
|
1161
|
-
output,
|
|
1162
|
-
parsedBody,
|
|
1163
|
-
errorCode,
|
|
1164
|
-
});
|
|
1165
|
-
}
|
|
1166
|
-
};
|
|
1167
|
-
const de_UpdateGatewaySoftwareNowCommand = async (output, context) => {
|
|
1168
|
-
if (output.statusCode >= 300) {
|
|
1169
|
-
return de_UpdateGatewaySoftwareNowCommandError(output, context);
|
|
1170
|
-
}
|
|
1171
|
-
const data = await parseBody(output.body, context);
|
|
1172
|
-
let contents = {};
|
|
1173
|
-
contents = (0, smithy_client_1._json)(data);
|
|
1174
|
-
const response = {
|
|
1175
|
-
$metadata: deserializeMetadata(output),
|
|
1176
|
-
...contents,
|
|
1177
|
-
};
|
|
1178
|
-
return response;
|
|
1179
|
-
};
|
|
1180
|
-
exports.de_UpdateGatewaySoftwareNowCommand = de_UpdateGatewaySoftwareNowCommand;
|
|
1181
|
-
const de_UpdateGatewaySoftwareNowCommandError = async (output, context) => {
|
|
1182
|
-
const parsedOutput = {
|
|
1183
|
-
...output,
|
|
1184
|
-
body: await parseErrorBody(output.body, context),
|
|
1185
|
-
};
|
|
1186
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1187
|
-
switch (errorCode) {
|
|
1188
|
-
case "InternalServerException":
|
|
1189
|
-
case "com.amazonaws.backupgateway#InternalServerException":
|
|
1190
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1191
|
-
case "ResourceNotFoundException":
|
|
1192
|
-
case "com.amazonaws.backupgateway#ResourceNotFoundException":
|
|
1193
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1194
|
-
case "ThrottlingException":
|
|
1195
|
-
case "com.amazonaws.backupgateway#ThrottlingException":
|
|
1196
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1197
|
-
case "ValidationException":
|
|
1198
|
-
case "com.amazonaws.backupgateway#ValidationException":
|
|
1199
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1200
|
-
default:
|
|
1201
|
-
const parsedBody = parsedOutput.body;
|
|
1202
|
-
return throwDefaultError({
|
|
1203
|
-
output,
|
|
1204
|
-
parsedBody,
|
|
1205
|
-
errorCode,
|
|
1206
|
-
});
|
|
1207
|
-
}
|
|
1208
|
-
};
|
|
1209
|
-
const de_UpdateHypervisorCommand = async (output, context) => {
|
|
1210
|
-
if (output.statusCode >= 300) {
|
|
1211
|
-
return de_UpdateHypervisorCommandError(output, context);
|
|
1212
|
-
}
|
|
1213
|
-
const data = await parseBody(output.body, context);
|
|
1214
|
-
let contents = {};
|
|
1215
|
-
contents = (0, smithy_client_1._json)(data);
|
|
1216
|
-
const response = {
|
|
1217
|
-
$metadata: deserializeMetadata(output),
|
|
1218
|
-
...contents,
|
|
1219
|
-
};
|
|
1220
|
-
return response;
|
|
1221
|
-
};
|
|
1222
|
-
exports.de_UpdateHypervisorCommand = de_UpdateHypervisorCommand;
|
|
1223
|
-
const de_UpdateHypervisorCommandError = async (output, context) => {
|
|
1224
|
-
const parsedOutput = {
|
|
1225
|
-
...output,
|
|
1226
|
-
body: await parseErrorBody(output.body, context),
|
|
1227
|
-
};
|
|
1228
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1229
|
-
switch (errorCode) {
|
|
1230
|
-
case "AccessDeniedException":
|
|
1231
|
-
case "com.amazonaws.backupgateway#AccessDeniedException":
|
|
1232
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1233
|
-
case "ConflictException":
|
|
1234
|
-
case "com.amazonaws.backupgateway#ConflictException":
|
|
1235
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
1236
|
-
case "InternalServerException":
|
|
1237
|
-
case "com.amazonaws.backupgateway#InternalServerException":
|
|
1238
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1239
|
-
case "ResourceNotFoundException":
|
|
1240
|
-
case "com.amazonaws.backupgateway#ResourceNotFoundException":
|
|
1241
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1242
|
-
case "ThrottlingException":
|
|
1243
|
-
case "com.amazonaws.backupgateway#ThrottlingException":
|
|
1244
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1245
|
-
case "ValidationException":
|
|
1246
|
-
case "com.amazonaws.backupgateway#ValidationException":
|
|
1247
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1248
|
-
default:
|
|
1249
|
-
const parsedBody = parsedOutput.body;
|
|
1250
|
-
return throwDefaultError({
|
|
1251
|
-
output,
|
|
1252
|
-
parsedBody,
|
|
1253
|
-
errorCode,
|
|
1254
|
-
});
|
|
1255
|
-
}
|
|
1256
|
-
};
|
|
1257
|
-
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
1258
|
-
const body = parsedOutput.body;
|
|
1259
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1260
|
-
const exception = new models_0_1.AccessDeniedException({
|
|
1261
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1262
|
-
...deserialized,
|
|
1263
|
-
});
|
|
1264
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1265
|
-
};
|
|
1266
|
-
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
1267
|
-
const body = parsedOutput.body;
|
|
1268
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1269
|
-
const exception = new models_0_1.ConflictException({
|
|
1270
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1271
|
-
...deserialized,
|
|
1272
|
-
});
|
|
1273
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1274
|
-
};
|
|
1275
|
-
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
1276
|
-
const body = parsedOutput.body;
|
|
1277
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1278
|
-
const exception = new models_0_1.InternalServerException({
|
|
1279
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1280
|
-
...deserialized,
|
|
1281
|
-
});
|
|
1282
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1283
|
-
};
|
|
1284
|
-
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
1285
|
-
const body = parsedOutput.body;
|
|
1286
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1287
|
-
const exception = new models_0_1.ResourceNotFoundException({
|
|
1288
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1289
|
-
...deserialized,
|
|
1290
|
-
});
|
|
1291
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1292
|
-
};
|
|
1293
|
-
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
1294
|
-
const body = parsedOutput.body;
|
|
1295
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1296
|
-
const exception = new models_0_1.ThrottlingException({
|
|
1297
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1298
|
-
...deserialized,
|
|
1299
|
-
});
|
|
1300
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1301
|
-
};
|
|
1302
|
-
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
1303
|
-
const body = parsedOutput.body;
|
|
1304
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1305
|
-
const exception = new models_0_1.ValidationException({
|
|
1306
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1307
|
-
...deserialized,
|
|
1308
|
-
});
|
|
1309
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1310
|
-
};
|
|
1311
|
-
const de_Gateway = (output, context) => {
|
|
1312
|
-
return (0, smithy_client_1.take)(output, {
|
|
1313
|
-
GatewayArn: smithy_client_1.expectString,
|
|
1314
|
-
GatewayDisplayName: smithy_client_1.expectString,
|
|
1315
|
-
GatewayType: smithy_client_1.expectString,
|
|
1316
|
-
HypervisorId: smithy_client_1.expectString,
|
|
1317
|
-
LastSeenTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1318
|
-
});
|
|
1319
|
-
};
|
|
1320
|
-
const de_GatewayDetails = (output, context) => {
|
|
1321
|
-
return (0, smithy_client_1.take)(output, {
|
|
1322
|
-
GatewayArn: smithy_client_1.expectString,
|
|
1323
|
-
GatewayDisplayName: smithy_client_1.expectString,
|
|
1324
|
-
GatewayType: smithy_client_1.expectString,
|
|
1325
|
-
HypervisorId: smithy_client_1.expectString,
|
|
1326
|
-
LastSeenTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1327
|
-
MaintenanceStartTime: smithy_client_1._json,
|
|
1328
|
-
NextUpdateAvailabilityTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1329
|
-
VpcEndpoint: smithy_client_1.expectString,
|
|
1330
|
-
});
|
|
1331
|
-
};
|
|
1332
|
-
const de_Gateways = (output, context) => {
|
|
1333
|
-
const retVal = (output || [])
|
|
1334
|
-
.filter((e) => e != null)
|
|
1335
|
-
.map((entry) => {
|
|
1336
|
-
return de_Gateway(entry, context);
|
|
1337
|
-
});
|
|
1338
|
-
return retVal;
|
|
1339
|
-
};
|
|
1340
|
-
const de_GetGatewayOutput = (output, context) => {
|
|
1341
|
-
return (0, smithy_client_1.take)(output, {
|
|
1342
|
-
Gateway: (_) => de_GatewayDetails(_, context),
|
|
1343
|
-
});
|
|
1344
|
-
};
|
|
1345
|
-
const de_GetHypervisorOutput = (output, context) => {
|
|
1346
|
-
return (0, smithy_client_1.take)(output, {
|
|
1347
|
-
Hypervisor: (_) => de_HypervisorDetails(_, context),
|
|
1348
|
-
});
|
|
1349
|
-
};
|
|
1350
|
-
const de_GetVirtualMachineOutput = (output, context) => {
|
|
1351
|
-
return (0, smithy_client_1.take)(output, {
|
|
1352
|
-
VirtualMachine: (_) => de_VirtualMachineDetails(_, context),
|
|
1353
|
-
});
|
|
1354
|
-
};
|
|
1355
|
-
const de_HypervisorDetails = (output, context) => {
|
|
1356
|
-
return (0, smithy_client_1.take)(output, {
|
|
1357
|
-
Host: smithy_client_1.expectString,
|
|
1358
|
-
HypervisorArn: smithy_client_1.expectString,
|
|
1359
|
-
KmsKeyArn: smithy_client_1.expectString,
|
|
1360
|
-
LastSuccessfulMetadataSyncTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1361
|
-
LatestMetadataSyncStatus: smithy_client_1.expectString,
|
|
1362
|
-
LatestMetadataSyncStatusMessage: smithy_client_1.expectString,
|
|
1363
|
-
LogGroupArn: smithy_client_1.expectString,
|
|
1364
|
-
Name: smithy_client_1.expectString,
|
|
1365
|
-
State: smithy_client_1.expectString,
|
|
1366
|
-
});
|
|
1367
|
-
};
|
|
1368
|
-
const de_ListGatewaysOutput = (output, context) => {
|
|
1369
|
-
return (0, smithy_client_1.take)(output, {
|
|
1370
|
-
Gateways: (_) => de_Gateways(_, context),
|
|
1371
|
-
NextToken: smithy_client_1.expectString,
|
|
1372
|
-
});
|
|
1373
|
-
};
|
|
1374
|
-
const de_ListVirtualMachinesOutput = (output, context) => {
|
|
1375
|
-
return (0, smithy_client_1.take)(output, {
|
|
1376
|
-
NextToken: smithy_client_1.expectString,
|
|
1377
|
-
VirtualMachines: (_) => de_VirtualMachines(_, context),
|
|
1378
|
-
});
|
|
1379
|
-
};
|
|
1380
|
-
const de_VirtualMachine = (output, context) => {
|
|
1381
|
-
return (0, smithy_client_1.take)(output, {
|
|
1382
|
-
HostName: smithy_client_1.expectString,
|
|
1383
|
-
HypervisorId: smithy_client_1.expectString,
|
|
1384
|
-
LastBackupDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1385
|
-
Name: smithy_client_1.expectString,
|
|
1386
|
-
Path: smithy_client_1.expectString,
|
|
1387
|
-
ResourceArn: smithy_client_1.expectString,
|
|
1388
|
-
});
|
|
1389
|
-
};
|
|
1390
|
-
const de_VirtualMachineDetails = (output, context) => {
|
|
1391
|
-
return (0, smithy_client_1.take)(output, {
|
|
1392
|
-
HostName: smithy_client_1.expectString,
|
|
1393
|
-
HypervisorId: smithy_client_1.expectString,
|
|
1394
|
-
LastBackupDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1395
|
-
Name: smithy_client_1.expectString,
|
|
1396
|
-
Path: smithy_client_1.expectString,
|
|
1397
|
-
ResourceArn: smithy_client_1.expectString,
|
|
1398
|
-
VmwareTags: smithy_client_1._json,
|
|
1399
|
-
});
|
|
1400
|
-
};
|
|
1401
|
-
const de_VirtualMachines = (output, context) => {
|
|
1402
|
-
const retVal = (output || [])
|
|
1403
|
-
.filter((e) => e != null)
|
|
1404
|
-
.map((entry) => {
|
|
1405
|
-
return de_VirtualMachine(entry, context);
|
|
1406
|
-
});
|
|
1407
|
-
return retVal;
|
|
1408
|
-
};
|
|
1409
|
-
const deserializeMetadata = (output) => ({
|
|
1410
|
-
httpStatusCode: output.statusCode,
|
|
1411
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
1412
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1413
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
1414
|
-
});
|
|
1415
|
-
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
1416
|
-
const throwDefaultError = (0, smithy_client_1.withBaseException)(BackupGatewayServiceException_1.BackupGatewayServiceException);
|
|
1417
|
-
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
|
|
1418
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1419
|
-
const contents = {
|
|
1420
|
-
protocol,
|
|
1421
|
-
hostname,
|
|
1422
|
-
port,
|
|
1423
|
-
method: "POST",
|
|
1424
|
-
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
1425
|
-
headers,
|
|
1426
|
-
};
|
|
1427
|
-
if (resolvedHostname !== undefined) {
|
|
1428
|
-
contents.hostname = resolvedHostname;
|
|
1429
|
-
}
|
|
1430
|
-
if (body !== undefined) {
|
|
1431
|
-
contents.body = body;
|
|
1432
|
-
}
|
|
1433
|
-
return new protocol_http_1.HttpRequest(contents);
|
|
1434
|
-
};
|
|
1435
|
-
function sharedHeaders(operation) {
|
|
1436
|
-
return {
|
|
1437
|
-
"content-type": "application/x-amz-json-1.0",
|
|
1438
|
-
"x-amz-target": `BackupOnPremises_v20210101.${operation}`,
|
|
1439
|
-
};
|
|
1440
|
-
}
|
|
1441
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1442
|
-
if (encoded.length) {
|
|
1443
|
-
return JSON.parse(encoded);
|
|
1444
|
-
}
|
|
1445
|
-
return {};
|
|
1446
|
-
});
|
|
1447
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
1448
|
-
const value = await parseBody(errorBody, context);
|
|
1449
|
-
value.message = value.message ?? value.Message;
|
|
1450
|
-
return value;
|
|
1451
|
-
};
|
|
1452
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
1453
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1454
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
1455
|
-
let cleanValue = rawValue;
|
|
1456
|
-
if (typeof cleanValue === "number") {
|
|
1457
|
-
cleanValue = cleanValue.toString();
|
|
1458
|
-
}
|
|
1459
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
1460
|
-
cleanValue = cleanValue.split(",")[0];
|
|
1461
|
-
}
|
|
1462
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
1463
|
-
cleanValue = cleanValue.split(":")[0];
|
|
1464
|
-
}
|
|
1465
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
1466
|
-
cleanValue = cleanValue.split("#")[1];
|
|
1467
|
-
}
|
|
1468
|
-
return cleanValue;
|
|
1469
|
-
};
|
|
1470
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1471
|
-
if (headerKey !== undefined) {
|
|
1472
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1473
|
-
}
|
|
1474
|
-
if (data.code !== undefined) {
|
|
1475
|
-
return sanitizeErrorCode(data.code);
|
|
1476
|
-
}
|
|
1477
|
-
if (data["__type"] !== undefined) {
|
|
1478
|
-
return sanitizeErrorCode(data["__type"]);
|
|
1479
|
-
}
|
|
1480
|
-
};
|
|
1
|
+
module.exports = require("../index.js");
|