@aws-sdk/client-arc-zonal-shift 3.312.0 → 3.316.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/ARCZonalShift.js +10 -84
- package/dist-cjs/protocols/Aws_restJson1.js +123 -204
- package/dist-es/ARCZonalShift.js +10 -84
- package/dist-es/protocols/Aws_restJson1.js +110 -191
- package/dist-types/ARCZonalShift.d.ts +27 -45
- package/dist-types/ts3.4/ARCZonalShift.d.ts +4 -1
- package/package.json +6 -6
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ARCZonalShift = void 0;
|
|
4
|
+
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
4
5
|
const ARCZonalShiftClient_1 = require("./ARCZonalShiftClient");
|
|
5
6
|
const CancelZonalShiftCommand_1 = require("./commands/CancelZonalShiftCommand");
|
|
6
7
|
const GetManagedResourceCommand_1 = require("./commands/GetManagedResourceCommand");
|
|
@@ -8,90 +9,15 @@ const ListManagedResourcesCommand_1 = require("./commands/ListManagedResourcesCo
|
|
|
8
9
|
const ListZonalShiftsCommand_1 = require("./commands/ListZonalShiftsCommand");
|
|
9
10
|
const StartZonalShiftCommand_1 = require("./commands/StartZonalShiftCommand");
|
|
10
11
|
const UpdateZonalShiftCommand_1 = require("./commands/UpdateZonalShiftCommand");
|
|
12
|
+
const commands = {
|
|
13
|
+
CancelZonalShiftCommand: CancelZonalShiftCommand_1.CancelZonalShiftCommand,
|
|
14
|
+
GetManagedResourceCommand: GetManagedResourceCommand_1.GetManagedResourceCommand,
|
|
15
|
+
ListManagedResourcesCommand: ListManagedResourcesCommand_1.ListManagedResourcesCommand,
|
|
16
|
+
ListZonalShiftsCommand: ListZonalShiftsCommand_1.ListZonalShiftsCommand,
|
|
17
|
+
StartZonalShiftCommand: StartZonalShiftCommand_1.StartZonalShiftCommand,
|
|
18
|
+
UpdateZonalShiftCommand: UpdateZonalShiftCommand_1.UpdateZonalShiftCommand,
|
|
19
|
+
};
|
|
11
20
|
class ARCZonalShift extends ARCZonalShiftClient_1.ARCZonalShiftClient {
|
|
12
|
-
cancelZonalShift(args, optionsOrCb, cb) {
|
|
13
|
-
const command = new CancelZonalShiftCommand_1.CancelZonalShiftCommand(args);
|
|
14
|
-
if (typeof optionsOrCb === "function") {
|
|
15
|
-
this.send(command, optionsOrCb);
|
|
16
|
-
}
|
|
17
|
-
else if (typeof cb === "function") {
|
|
18
|
-
if (typeof optionsOrCb !== "object")
|
|
19
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
20
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
21
|
-
}
|
|
22
|
-
else {
|
|
23
|
-
return this.send(command, optionsOrCb);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
getManagedResource(args, optionsOrCb, cb) {
|
|
27
|
-
const command = new GetManagedResourceCommand_1.GetManagedResourceCommand(args);
|
|
28
|
-
if (typeof optionsOrCb === "function") {
|
|
29
|
-
this.send(command, optionsOrCb);
|
|
30
|
-
}
|
|
31
|
-
else if (typeof cb === "function") {
|
|
32
|
-
if (typeof optionsOrCb !== "object")
|
|
33
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
34
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
35
|
-
}
|
|
36
|
-
else {
|
|
37
|
-
return this.send(command, optionsOrCb);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
listManagedResources(args, optionsOrCb, cb) {
|
|
41
|
-
const command = new ListManagedResourcesCommand_1.ListManagedResourcesCommand(args);
|
|
42
|
-
if (typeof optionsOrCb === "function") {
|
|
43
|
-
this.send(command, optionsOrCb);
|
|
44
|
-
}
|
|
45
|
-
else if (typeof cb === "function") {
|
|
46
|
-
if (typeof optionsOrCb !== "object")
|
|
47
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
48
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
49
|
-
}
|
|
50
|
-
else {
|
|
51
|
-
return this.send(command, optionsOrCb);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
listZonalShifts(args, optionsOrCb, cb) {
|
|
55
|
-
const command = new ListZonalShiftsCommand_1.ListZonalShiftsCommand(args);
|
|
56
|
-
if (typeof optionsOrCb === "function") {
|
|
57
|
-
this.send(command, optionsOrCb);
|
|
58
|
-
}
|
|
59
|
-
else if (typeof cb === "function") {
|
|
60
|
-
if (typeof optionsOrCb !== "object")
|
|
61
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
62
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
63
|
-
}
|
|
64
|
-
else {
|
|
65
|
-
return this.send(command, optionsOrCb);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
startZonalShift(args, optionsOrCb, cb) {
|
|
69
|
-
const command = new StartZonalShiftCommand_1.StartZonalShiftCommand(args);
|
|
70
|
-
if (typeof optionsOrCb === "function") {
|
|
71
|
-
this.send(command, optionsOrCb);
|
|
72
|
-
}
|
|
73
|
-
else if (typeof cb === "function") {
|
|
74
|
-
if (typeof optionsOrCb !== "object")
|
|
75
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
76
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
77
|
-
}
|
|
78
|
-
else {
|
|
79
|
-
return this.send(command, optionsOrCb);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
updateZonalShift(args, optionsOrCb, cb) {
|
|
83
|
-
const command = new UpdateZonalShiftCommand_1.UpdateZonalShiftCommand(args);
|
|
84
|
-
if (typeof optionsOrCb === "function") {
|
|
85
|
-
this.send(command, optionsOrCb);
|
|
86
|
-
}
|
|
87
|
-
else if (typeof cb === "function") {
|
|
88
|
-
if (typeof optionsOrCb !== "object")
|
|
89
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
90
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
91
|
-
}
|
|
92
|
-
else {
|
|
93
|
-
return this.send(command, optionsOrCb);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
21
|
}
|
|
97
22
|
exports.ARCZonalShift = ARCZonalShift;
|
|
23
|
+
(0, smithy_client_1.createAggregatedClient)(commands, ARCZonalShift);
|
|
@@ -43,7 +43,7 @@ const se_ListManagedResourcesCommand = async (input, context) => {
|
|
|
43
43
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
44
44
|
const headers = {};
|
|
45
45
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/managedresources";
|
|
46
|
-
const query = map({
|
|
46
|
+
const query = (0, smithy_client_1.map)({
|
|
47
47
|
nextToken: [, input.nextToken],
|
|
48
48
|
maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
|
|
49
49
|
});
|
|
@@ -64,7 +64,7 @@ const se_ListZonalShiftsCommand = async (input, context) => {
|
|
|
64
64
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
65
65
|
const headers = {};
|
|
66
66
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/zonalshifts";
|
|
67
|
-
const query = map({
|
|
67
|
+
const query = (0, smithy_client_1.map)({
|
|
68
68
|
nextToken: [, input.nextToken],
|
|
69
69
|
status: [, input.status],
|
|
70
70
|
maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
|
|
@@ -89,12 +89,12 @@ const se_StartZonalShiftCommand = async (input, context) => {
|
|
|
89
89
|
};
|
|
90
90
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/zonalshifts";
|
|
91
91
|
let body;
|
|
92
|
-
body = JSON.stringify({
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
});
|
|
92
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
93
|
+
awayFrom: [],
|
|
94
|
+
comment: [],
|
|
95
|
+
expiresIn: [],
|
|
96
|
+
resourceIdentifier: [],
|
|
97
|
+
}));
|
|
98
98
|
return new protocol_http_1.HttpRequest({
|
|
99
99
|
protocol,
|
|
100
100
|
hostname,
|
|
@@ -114,10 +114,10 @@ const se_UpdateZonalShiftCommand = async (input, context) => {
|
|
|
114
114
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/zonalshifts/{zonalShiftId}";
|
|
115
115
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "zonalShiftId", () => input.zonalShiftId, "{zonalShiftId}", false);
|
|
116
116
|
let body;
|
|
117
|
-
body = JSON.stringify({
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
});
|
|
117
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
118
|
+
comment: [],
|
|
119
|
+
expiresIn: [],
|
|
120
|
+
}));
|
|
121
121
|
return new protocol_http_1.HttpRequest({
|
|
122
122
|
protocol,
|
|
123
123
|
hostname,
|
|
@@ -133,31 +133,20 @@ const de_CancelZonalShiftCommand = async (output, context) => {
|
|
|
133
133
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
134
134
|
return de_CancelZonalShiftCommandError(output, context);
|
|
135
135
|
}
|
|
136
|
-
const contents = map({
|
|
136
|
+
const contents = (0, smithy_client_1.map)({
|
|
137
137
|
$metadata: deserializeMetadata(output),
|
|
138
138
|
});
|
|
139
139
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
contents.resourceIdentifier = (0, smithy_client_1.expectString)(data.resourceIdentifier);
|
|
151
|
-
}
|
|
152
|
-
if (data.startTime != null) {
|
|
153
|
-
contents.startTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.startTime)));
|
|
154
|
-
}
|
|
155
|
-
if (data.status != null) {
|
|
156
|
-
contents.status = (0, smithy_client_1.expectString)(data.status);
|
|
157
|
-
}
|
|
158
|
-
if (data.zonalShiftId != null) {
|
|
159
|
-
contents.zonalShiftId = (0, smithy_client_1.expectString)(data.zonalShiftId);
|
|
160
|
-
}
|
|
140
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
141
|
+
awayFrom: smithy_client_1.expectString,
|
|
142
|
+
comment: smithy_client_1.expectString,
|
|
143
|
+
expiryTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
144
|
+
resourceIdentifier: smithy_client_1.expectString,
|
|
145
|
+
startTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
146
|
+
status: smithy_client_1.expectString,
|
|
147
|
+
zonalShiftId: smithy_client_1.expectString,
|
|
148
|
+
});
|
|
149
|
+
Object.assign(contents, doc);
|
|
161
150
|
return contents;
|
|
162
151
|
};
|
|
163
152
|
exports.de_CancelZonalShiftCommand = de_CancelZonalShiftCommand;
|
|
@@ -188,10 +177,9 @@ const de_CancelZonalShiftCommandError = async (output, context) => {
|
|
|
188
177
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
189
178
|
default:
|
|
190
179
|
const parsedBody = parsedOutput.body;
|
|
191
|
-
|
|
180
|
+
return throwDefaultError({
|
|
192
181
|
output,
|
|
193
182
|
parsedBody,
|
|
194
|
-
exceptionCtor: ARCZonalShiftServiceException_1.ARCZonalShiftServiceException,
|
|
195
183
|
errorCode,
|
|
196
184
|
});
|
|
197
185
|
}
|
|
@@ -200,22 +188,17 @@ const de_GetManagedResourceCommand = async (output, context) => {
|
|
|
200
188
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
201
189
|
return de_GetManagedResourceCommandError(output, context);
|
|
202
190
|
}
|
|
203
|
-
const contents = map({
|
|
191
|
+
const contents = (0, smithy_client_1.map)({
|
|
204
192
|
$metadata: deserializeMetadata(output),
|
|
205
193
|
});
|
|
206
194
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
contents.name = (0, smithy_client_1.expectString)(data.name);
|
|
215
|
-
}
|
|
216
|
-
if (data.zonalShifts != null) {
|
|
217
|
-
contents.zonalShifts = de_ZonalShiftsInResource(data.zonalShifts, context);
|
|
218
|
-
}
|
|
195
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
196
|
+
appliedWeights: (_) => de_AppliedWeights(_, context),
|
|
197
|
+
arn: smithy_client_1.expectString,
|
|
198
|
+
name: smithy_client_1.expectString,
|
|
199
|
+
zonalShifts: (_) => de_ZonalShiftsInResource(_, context),
|
|
200
|
+
});
|
|
201
|
+
Object.assign(contents, doc);
|
|
219
202
|
return contents;
|
|
220
203
|
};
|
|
221
204
|
exports.de_GetManagedResourceCommand = de_GetManagedResourceCommand;
|
|
@@ -243,10 +226,9 @@ const de_GetManagedResourceCommandError = async (output, context) => {
|
|
|
243
226
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
244
227
|
default:
|
|
245
228
|
const parsedBody = parsedOutput.body;
|
|
246
|
-
|
|
229
|
+
return throwDefaultError({
|
|
247
230
|
output,
|
|
248
231
|
parsedBody,
|
|
249
|
-
exceptionCtor: ARCZonalShiftServiceException_1.ARCZonalShiftServiceException,
|
|
250
232
|
errorCode,
|
|
251
233
|
});
|
|
252
234
|
}
|
|
@@ -255,16 +237,15 @@ const de_ListManagedResourcesCommand = async (output, context) => {
|
|
|
255
237
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
256
238
|
return de_ListManagedResourcesCommandError(output, context);
|
|
257
239
|
}
|
|
258
|
-
const contents = map({
|
|
240
|
+
const contents = (0, smithy_client_1.map)({
|
|
259
241
|
$metadata: deserializeMetadata(output),
|
|
260
242
|
});
|
|
261
243
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
}
|
|
244
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
245
|
+
items: smithy_client_1._json,
|
|
246
|
+
nextToken: smithy_client_1.expectString,
|
|
247
|
+
});
|
|
248
|
+
Object.assign(contents, doc);
|
|
268
249
|
return contents;
|
|
269
250
|
};
|
|
270
251
|
exports.de_ListManagedResourcesCommand = de_ListManagedResourcesCommand;
|
|
@@ -289,10 +270,9 @@ const de_ListManagedResourcesCommandError = async (output, context) => {
|
|
|
289
270
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
290
271
|
default:
|
|
291
272
|
const parsedBody = parsedOutput.body;
|
|
292
|
-
|
|
273
|
+
return throwDefaultError({
|
|
293
274
|
output,
|
|
294
275
|
parsedBody,
|
|
295
|
-
exceptionCtor: ARCZonalShiftServiceException_1.ARCZonalShiftServiceException,
|
|
296
276
|
errorCode,
|
|
297
277
|
});
|
|
298
278
|
}
|
|
@@ -301,16 +281,15 @@ const de_ListZonalShiftsCommand = async (output, context) => {
|
|
|
301
281
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
302
282
|
return de_ListZonalShiftsCommandError(output, context);
|
|
303
283
|
}
|
|
304
|
-
const contents = map({
|
|
284
|
+
const contents = (0, smithy_client_1.map)({
|
|
305
285
|
$metadata: deserializeMetadata(output),
|
|
306
286
|
});
|
|
307
287
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
}
|
|
288
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
289
|
+
items: (_) => de_ZonalShiftSummaries(_, context),
|
|
290
|
+
nextToken: smithy_client_1.expectString,
|
|
291
|
+
});
|
|
292
|
+
Object.assign(contents, doc);
|
|
314
293
|
return contents;
|
|
315
294
|
};
|
|
316
295
|
exports.de_ListZonalShiftsCommand = de_ListZonalShiftsCommand;
|
|
@@ -335,10 +314,9 @@ const de_ListZonalShiftsCommandError = async (output, context) => {
|
|
|
335
314
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
336
315
|
default:
|
|
337
316
|
const parsedBody = parsedOutput.body;
|
|
338
|
-
|
|
317
|
+
return throwDefaultError({
|
|
339
318
|
output,
|
|
340
319
|
parsedBody,
|
|
341
|
-
exceptionCtor: ARCZonalShiftServiceException_1.ARCZonalShiftServiceException,
|
|
342
320
|
errorCode,
|
|
343
321
|
});
|
|
344
322
|
}
|
|
@@ -347,31 +325,20 @@ const de_StartZonalShiftCommand = async (output, context) => {
|
|
|
347
325
|
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
348
326
|
return de_StartZonalShiftCommandError(output, context);
|
|
349
327
|
}
|
|
350
|
-
const contents = map({
|
|
328
|
+
const contents = (0, smithy_client_1.map)({
|
|
351
329
|
$metadata: deserializeMetadata(output),
|
|
352
330
|
});
|
|
353
331
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
contents.resourceIdentifier = (0, smithy_client_1.expectString)(data.resourceIdentifier);
|
|
365
|
-
}
|
|
366
|
-
if (data.startTime != null) {
|
|
367
|
-
contents.startTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.startTime)));
|
|
368
|
-
}
|
|
369
|
-
if (data.status != null) {
|
|
370
|
-
contents.status = (0, smithy_client_1.expectString)(data.status);
|
|
371
|
-
}
|
|
372
|
-
if (data.zonalShiftId != null) {
|
|
373
|
-
contents.zonalShiftId = (0, smithy_client_1.expectString)(data.zonalShiftId);
|
|
374
|
-
}
|
|
332
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
333
|
+
awayFrom: smithy_client_1.expectString,
|
|
334
|
+
comment: smithy_client_1.expectString,
|
|
335
|
+
expiryTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
336
|
+
resourceIdentifier: smithy_client_1.expectString,
|
|
337
|
+
startTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
338
|
+
status: smithy_client_1.expectString,
|
|
339
|
+
zonalShiftId: smithy_client_1.expectString,
|
|
340
|
+
});
|
|
341
|
+
Object.assign(contents, doc);
|
|
375
342
|
return contents;
|
|
376
343
|
};
|
|
377
344
|
exports.de_StartZonalShiftCommand = de_StartZonalShiftCommand;
|
|
@@ -402,10 +369,9 @@ const de_StartZonalShiftCommandError = async (output, context) => {
|
|
|
402
369
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
403
370
|
default:
|
|
404
371
|
const parsedBody = parsedOutput.body;
|
|
405
|
-
|
|
372
|
+
return throwDefaultError({
|
|
406
373
|
output,
|
|
407
374
|
parsedBody,
|
|
408
|
-
exceptionCtor: ARCZonalShiftServiceException_1.ARCZonalShiftServiceException,
|
|
409
375
|
errorCode,
|
|
410
376
|
});
|
|
411
377
|
}
|
|
@@ -414,31 +380,20 @@ const de_UpdateZonalShiftCommand = async (output, context) => {
|
|
|
414
380
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
415
381
|
return de_UpdateZonalShiftCommandError(output, context);
|
|
416
382
|
}
|
|
417
|
-
const contents = map({
|
|
383
|
+
const contents = (0, smithy_client_1.map)({
|
|
418
384
|
$metadata: deserializeMetadata(output),
|
|
419
385
|
});
|
|
420
386
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
contents.resourceIdentifier = (0, smithy_client_1.expectString)(data.resourceIdentifier);
|
|
432
|
-
}
|
|
433
|
-
if (data.startTime != null) {
|
|
434
|
-
contents.startTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.startTime)));
|
|
435
|
-
}
|
|
436
|
-
if (data.status != null) {
|
|
437
|
-
contents.status = (0, smithy_client_1.expectString)(data.status);
|
|
438
|
-
}
|
|
439
|
-
if (data.zonalShiftId != null) {
|
|
440
|
-
contents.zonalShiftId = (0, smithy_client_1.expectString)(data.zonalShiftId);
|
|
441
|
-
}
|
|
387
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
388
|
+
awayFrom: smithy_client_1.expectString,
|
|
389
|
+
comment: smithy_client_1.expectString,
|
|
390
|
+
expiryTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
391
|
+
resourceIdentifier: smithy_client_1.expectString,
|
|
392
|
+
startTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
393
|
+
status: smithy_client_1.expectString,
|
|
394
|
+
zonalShiftId: smithy_client_1.expectString,
|
|
395
|
+
});
|
|
396
|
+
Object.assign(contents, doc);
|
|
442
397
|
return contents;
|
|
443
398
|
};
|
|
444
399
|
exports.de_UpdateZonalShiftCommand = de_UpdateZonalShiftCommand;
|
|
@@ -469,21 +424,21 @@ const de_UpdateZonalShiftCommandError = async (output, context) => {
|
|
|
469
424
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
470
425
|
default:
|
|
471
426
|
const parsedBody = parsedOutput.body;
|
|
472
|
-
|
|
427
|
+
return throwDefaultError({
|
|
473
428
|
output,
|
|
474
429
|
parsedBody,
|
|
475
|
-
exceptionCtor: ARCZonalShiftServiceException_1.ARCZonalShiftServiceException,
|
|
476
430
|
errorCode,
|
|
477
431
|
});
|
|
478
432
|
}
|
|
479
433
|
};
|
|
480
|
-
const
|
|
434
|
+
const throwDefaultError = (0, smithy_client_1.withBaseException)(ARCZonalShiftServiceException_1.ARCZonalShiftServiceException);
|
|
481
435
|
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
482
|
-
const contents = map({});
|
|
436
|
+
const contents = (0, smithy_client_1.map)({});
|
|
483
437
|
const data = parsedOutput.body;
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
}
|
|
438
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
439
|
+
message: smithy_client_1.expectString,
|
|
440
|
+
});
|
|
441
|
+
Object.assign(contents, doc);
|
|
487
442
|
const exception = new models_0_1.AccessDeniedException({
|
|
488
443
|
$metadata: deserializeMetadata(parsedOutput),
|
|
489
444
|
...contents,
|
|
@@ -491,17 +446,14 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
|
491
446
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
492
447
|
};
|
|
493
448
|
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
494
|
-
const contents = map({});
|
|
449
|
+
const contents = (0, smithy_client_1.map)({});
|
|
495
450
|
const data = parsedOutput.body;
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
if (data.zonalShiftId != null) {
|
|
503
|
-
contents.zonalShiftId = (0, smithy_client_1.expectString)(data.zonalShiftId);
|
|
504
|
-
}
|
|
451
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
452
|
+
message: smithy_client_1.expectString,
|
|
453
|
+
reason: smithy_client_1.expectString,
|
|
454
|
+
zonalShiftId: smithy_client_1.expectString,
|
|
455
|
+
});
|
|
456
|
+
Object.assign(contents, doc);
|
|
505
457
|
const exception = new models_0_1.ConflictException({
|
|
506
458
|
$metadata: deserializeMetadata(parsedOutput),
|
|
507
459
|
...contents,
|
|
@@ -509,11 +461,12 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
|
509
461
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
510
462
|
};
|
|
511
463
|
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
512
|
-
const contents = map({});
|
|
464
|
+
const contents = (0, smithy_client_1.map)({});
|
|
513
465
|
const data = parsedOutput.body;
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
}
|
|
466
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
467
|
+
message: smithy_client_1.expectString,
|
|
468
|
+
});
|
|
469
|
+
Object.assign(contents, doc);
|
|
517
470
|
const exception = new models_0_1.InternalServerException({
|
|
518
471
|
$metadata: deserializeMetadata(parsedOutput),
|
|
519
472
|
...contents,
|
|
@@ -521,11 +474,12 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
|
521
474
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
522
475
|
};
|
|
523
476
|
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
524
|
-
const contents = map({});
|
|
477
|
+
const contents = (0, smithy_client_1.map)({});
|
|
525
478
|
const data = parsedOutput.body;
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
}
|
|
479
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
480
|
+
message: smithy_client_1.expectString,
|
|
481
|
+
});
|
|
482
|
+
Object.assign(contents, doc);
|
|
529
483
|
const exception = new models_0_1.ResourceNotFoundException({
|
|
530
484
|
$metadata: deserializeMetadata(parsedOutput),
|
|
531
485
|
...contents,
|
|
@@ -533,11 +487,12 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
|
533
487
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
534
488
|
};
|
|
535
489
|
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
536
|
-
const contents = map({});
|
|
490
|
+
const contents = (0, smithy_client_1.map)({});
|
|
537
491
|
const data = parsedOutput.body;
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
}
|
|
492
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
493
|
+
message: smithy_client_1.expectString,
|
|
494
|
+
});
|
|
495
|
+
Object.assign(contents, doc);
|
|
541
496
|
const exception = new models_0_1.ThrottlingException({
|
|
542
497
|
$metadata: deserializeMetadata(parsedOutput),
|
|
543
498
|
...contents,
|
|
@@ -545,14 +500,13 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
|
545
500
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
546
501
|
};
|
|
547
502
|
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
548
|
-
const contents = map({});
|
|
503
|
+
const contents = (0, smithy_client_1.map)({});
|
|
549
504
|
const data = parsedOutput.body;
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
}
|
|
505
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
506
|
+
message: smithy_client_1.expectString,
|
|
507
|
+
reason: smithy_client_1.expectString,
|
|
508
|
+
});
|
|
509
|
+
Object.assign(contents, doc);
|
|
556
510
|
const exception = new models_0_1.ValidationException({
|
|
557
511
|
$metadata: deserializeMetadata(parsedOutput),
|
|
558
512
|
...contents,
|
|
@@ -568,53 +522,21 @@ const de_AppliedWeights = (output, context) => {
|
|
|
568
522
|
return acc;
|
|
569
523
|
}, {});
|
|
570
524
|
};
|
|
571
|
-
const de_AvailabilityZones = (output, context) => {
|
|
572
|
-
const retVal = (output || [])
|
|
573
|
-
.filter((e) => e != null)
|
|
574
|
-
.map((entry) => {
|
|
575
|
-
if (entry === null) {
|
|
576
|
-
return null;
|
|
577
|
-
}
|
|
578
|
-
return (0, smithy_client_1.expectString)(entry);
|
|
579
|
-
});
|
|
580
|
-
return retVal;
|
|
581
|
-
};
|
|
582
|
-
const de_ManagedResourceSummaries = (output, context) => {
|
|
583
|
-
const retVal = (output || [])
|
|
584
|
-
.filter((e) => e != null)
|
|
585
|
-
.map((entry) => {
|
|
586
|
-
if (entry === null) {
|
|
587
|
-
return null;
|
|
588
|
-
}
|
|
589
|
-
return de_ManagedResourceSummary(entry, context);
|
|
590
|
-
});
|
|
591
|
-
return retVal;
|
|
592
|
-
};
|
|
593
|
-
const de_ManagedResourceSummary = (output, context) => {
|
|
594
|
-
return {
|
|
595
|
-
arn: (0, smithy_client_1.expectString)(output.arn),
|
|
596
|
-
availabilityZones: output.availabilityZones != null ? de_AvailabilityZones(output.availabilityZones, context) : undefined,
|
|
597
|
-
name: (0, smithy_client_1.expectString)(output.name),
|
|
598
|
-
};
|
|
599
|
-
};
|
|
600
525
|
const de_ZonalShiftInResource = (output, context) => {
|
|
601
|
-
return {
|
|
602
|
-
appliedStatus:
|
|
603
|
-
awayFrom:
|
|
604
|
-
comment:
|
|
605
|
-
expiryTime:
|
|
606
|
-
resourceIdentifier:
|
|
607
|
-
startTime:
|
|
608
|
-
zonalShiftId:
|
|
609
|
-
};
|
|
526
|
+
return (0, smithy_client_1.take)(output, {
|
|
527
|
+
appliedStatus: smithy_client_1.expectString,
|
|
528
|
+
awayFrom: smithy_client_1.expectString,
|
|
529
|
+
comment: smithy_client_1.expectString,
|
|
530
|
+
expiryTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
531
|
+
resourceIdentifier: smithy_client_1.expectString,
|
|
532
|
+
startTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
533
|
+
zonalShiftId: smithy_client_1.expectString,
|
|
534
|
+
});
|
|
610
535
|
};
|
|
611
536
|
const de_ZonalShiftsInResource = (output, context) => {
|
|
612
537
|
const retVal = (output || [])
|
|
613
538
|
.filter((e) => e != null)
|
|
614
539
|
.map((entry) => {
|
|
615
|
-
if (entry === null) {
|
|
616
|
-
return null;
|
|
617
|
-
}
|
|
618
540
|
return de_ZonalShiftInResource(entry, context);
|
|
619
541
|
});
|
|
620
542
|
return retVal;
|
|
@@ -623,23 +545,20 @@ const de_ZonalShiftSummaries = (output, context) => {
|
|
|
623
545
|
const retVal = (output || [])
|
|
624
546
|
.filter((e) => e != null)
|
|
625
547
|
.map((entry) => {
|
|
626
|
-
if (entry === null) {
|
|
627
|
-
return null;
|
|
628
|
-
}
|
|
629
548
|
return de_ZonalShiftSummary(entry, context);
|
|
630
549
|
});
|
|
631
550
|
return retVal;
|
|
632
551
|
};
|
|
633
552
|
const de_ZonalShiftSummary = (output, context) => {
|
|
634
|
-
return {
|
|
635
|
-
awayFrom:
|
|
636
|
-
comment:
|
|
637
|
-
expiryTime:
|
|
638
|
-
resourceIdentifier:
|
|
639
|
-
startTime:
|
|
640
|
-
status:
|
|
641
|
-
zonalShiftId:
|
|
642
|
-
};
|
|
553
|
+
return (0, smithy_client_1.take)(output, {
|
|
554
|
+
awayFrom: smithy_client_1.expectString,
|
|
555
|
+
comment: smithy_client_1.expectString,
|
|
556
|
+
expiryTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
557
|
+
resourceIdentifier: smithy_client_1.expectString,
|
|
558
|
+
startTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
559
|
+
status: smithy_client_1.expectString,
|
|
560
|
+
zonalShiftId: smithy_client_1.expectString,
|
|
561
|
+
});
|
|
643
562
|
};
|
|
644
563
|
const deserializeMetadata = (output) => ({
|
|
645
564
|
httpStatusCode: output.statusCode,
|