@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
package/dist-es/ARCZonalShift.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { createAggregatedClient } from "@aws-sdk/smithy-client";
|
|
1
2
|
import { ARCZonalShiftClient } from "./ARCZonalShiftClient";
|
|
2
3
|
import { CancelZonalShiftCommand, } from "./commands/CancelZonalShiftCommand";
|
|
3
4
|
import { GetManagedResourceCommand, } from "./commands/GetManagedResourceCommand";
|
|
@@ -5,89 +6,14 @@ import { ListManagedResourcesCommand, } from "./commands/ListManagedResourcesCom
|
|
|
5
6
|
import { ListZonalShiftsCommand, } from "./commands/ListZonalShiftsCommand";
|
|
6
7
|
import { StartZonalShiftCommand, } from "./commands/StartZonalShiftCommand";
|
|
7
8
|
import { UpdateZonalShiftCommand, } from "./commands/UpdateZonalShiftCommand";
|
|
9
|
+
const commands = {
|
|
10
|
+
CancelZonalShiftCommand,
|
|
11
|
+
GetManagedResourceCommand,
|
|
12
|
+
ListManagedResourcesCommand,
|
|
13
|
+
ListZonalShiftsCommand,
|
|
14
|
+
StartZonalShiftCommand,
|
|
15
|
+
UpdateZonalShiftCommand,
|
|
16
|
+
};
|
|
8
17
|
export class ARCZonalShift extends ARCZonalShiftClient {
|
|
9
|
-
cancelZonalShift(args, optionsOrCb, cb) {
|
|
10
|
-
const command = new CancelZonalShiftCommand(args);
|
|
11
|
-
if (typeof optionsOrCb === "function") {
|
|
12
|
-
this.send(command, optionsOrCb);
|
|
13
|
-
}
|
|
14
|
-
else if (typeof cb === "function") {
|
|
15
|
-
if (typeof optionsOrCb !== "object")
|
|
16
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
17
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
return this.send(command, optionsOrCb);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
getManagedResource(args, optionsOrCb, cb) {
|
|
24
|
-
const command = new GetManagedResourceCommand(args);
|
|
25
|
-
if (typeof optionsOrCb === "function") {
|
|
26
|
-
this.send(command, optionsOrCb);
|
|
27
|
-
}
|
|
28
|
-
else if (typeof cb === "function") {
|
|
29
|
-
if (typeof optionsOrCb !== "object")
|
|
30
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
31
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
32
|
-
}
|
|
33
|
-
else {
|
|
34
|
-
return this.send(command, optionsOrCb);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
listManagedResources(args, optionsOrCb, cb) {
|
|
38
|
-
const command = new ListManagedResourcesCommand(args);
|
|
39
|
-
if (typeof optionsOrCb === "function") {
|
|
40
|
-
this.send(command, optionsOrCb);
|
|
41
|
-
}
|
|
42
|
-
else if (typeof cb === "function") {
|
|
43
|
-
if (typeof optionsOrCb !== "object")
|
|
44
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
45
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
46
|
-
}
|
|
47
|
-
else {
|
|
48
|
-
return this.send(command, optionsOrCb);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
listZonalShifts(args, optionsOrCb, cb) {
|
|
52
|
-
const command = new ListZonalShiftsCommand(args);
|
|
53
|
-
if (typeof optionsOrCb === "function") {
|
|
54
|
-
this.send(command, optionsOrCb);
|
|
55
|
-
}
|
|
56
|
-
else if (typeof cb === "function") {
|
|
57
|
-
if (typeof optionsOrCb !== "object")
|
|
58
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
59
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
60
|
-
}
|
|
61
|
-
else {
|
|
62
|
-
return this.send(command, optionsOrCb);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
startZonalShift(args, optionsOrCb, cb) {
|
|
66
|
-
const command = new StartZonalShiftCommand(args);
|
|
67
|
-
if (typeof optionsOrCb === "function") {
|
|
68
|
-
this.send(command, optionsOrCb);
|
|
69
|
-
}
|
|
70
|
-
else if (typeof cb === "function") {
|
|
71
|
-
if (typeof optionsOrCb !== "object")
|
|
72
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
73
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
74
|
-
}
|
|
75
|
-
else {
|
|
76
|
-
return this.send(command, optionsOrCb);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
updateZonalShift(args, optionsOrCb, cb) {
|
|
80
|
-
const command = new UpdateZonalShiftCommand(args);
|
|
81
|
-
if (typeof optionsOrCb === "function") {
|
|
82
|
-
this.send(command, optionsOrCb);
|
|
83
|
-
}
|
|
84
|
-
else if (typeof cb === "function") {
|
|
85
|
-
if (typeof optionsOrCb !== "object")
|
|
86
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
87
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
88
|
-
}
|
|
89
|
-
else {
|
|
90
|
-
return this.send(command, optionsOrCb);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
18
|
}
|
|
19
|
+
createAggregatedClient(commands, ARCZonalShift);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
2
|
-
import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, limitedParseFloat32 as __limitedParseFloat32, map
|
|
2
|
+
import { _json, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, limitedParseFloat32 as __limitedParseFloat32, map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, take, withBaseException, } from "@aws-sdk/smithy-client";
|
|
3
3
|
import { ARCZonalShiftServiceException as __BaseException } from "../models/ARCZonalShiftServiceException";
|
|
4
4
|
import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ThrottlingException, ValidationException, } from "../models/models_0";
|
|
5
5
|
export const se_CancelZonalShiftCommand = async (input, context) => {
|
|
@@ -82,12 +82,12 @@ export const se_StartZonalShiftCommand = async (input, context) => {
|
|
|
82
82
|
};
|
|
83
83
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/zonalshifts";
|
|
84
84
|
let body;
|
|
85
|
-
body = JSON.stringify({
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
});
|
|
85
|
+
body = JSON.stringify(take(input, {
|
|
86
|
+
awayFrom: [],
|
|
87
|
+
comment: [],
|
|
88
|
+
expiresIn: [],
|
|
89
|
+
resourceIdentifier: [],
|
|
90
|
+
}));
|
|
91
91
|
return new __HttpRequest({
|
|
92
92
|
protocol,
|
|
93
93
|
hostname,
|
|
@@ -106,10 +106,10 @@ export const se_UpdateZonalShiftCommand = async (input, context) => {
|
|
|
106
106
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/zonalshifts/{zonalShiftId}";
|
|
107
107
|
resolvedPath = __resolvedPath(resolvedPath, input, "zonalShiftId", () => input.zonalShiftId, "{zonalShiftId}", false);
|
|
108
108
|
let body;
|
|
109
|
-
body = JSON.stringify({
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
});
|
|
109
|
+
body = JSON.stringify(take(input, {
|
|
110
|
+
comment: [],
|
|
111
|
+
expiresIn: [],
|
|
112
|
+
}));
|
|
113
113
|
return new __HttpRequest({
|
|
114
114
|
protocol,
|
|
115
115
|
hostname,
|
|
@@ -128,27 +128,16 @@ export const de_CancelZonalShiftCommand = async (output, context) => {
|
|
|
128
128
|
$metadata: deserializeMetadata(output),
|
|
129
129
|
});
|
|
130
130
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
contents.resourceIdentifier = __expectString(data.resourceIdentifier);
|
|
142
|
-
}
|
|
143
|
-
if (data.startTime != null) {
|
|
144
|
-
contents.startTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.startTime)));
|
|
145
|
-
}
|
|
146
|
-
if (data.status != null) {
|
|
147
|
-
contents.status = __expectString(data.status);
|
|
148
|
-
}
|
|
149
|
-
if (data.zonalShiftId != null) {
|
|
150
|
-
contents.zonalShiftId = __expectString(data.zonalShiftId);
|
|
151
|
-
}
|
|
131
|
+
const doc = take(data, {
|
|
132
|
+
awayFrom: __expectString,
|
|
133
|
+
comment: __expectString,
|
|
134
|
+
expiryTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
135
|
+
resourceIdentifier: __expectString,
|
|
136
|
+
startTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
137
|
+
status: __expectString,
|
|
138
|
+
zonalShiftId: __expectString,
|
|
139
|
+
});
|
|
140
|
+
Object.assign(contents, doc);
|
|
152
141
|
return contents;
|
|
153
142
|
};
|
|
154
143
|
const de_CancelZonalShiftCommandError = async (output, context) => {
|
|
@@ -178,10 +167,9 @@ const de_CancelZonalShiftCommandError = async (output, context) => {
|
|
|
178
167
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
179
168
|
default:
|
|
180
169
|
const parsedBody = parsedOutput.body;
|
|
181
|
-
throwDefaultError({
|
|
170
|
+
return throwDefaultError({
|
|
182
171
|
output,
|
|
183
172
|
parsedBody,
|
|
184
|
-
exceptionCtor: __BaseException,
|
|
185
173
|
errorCode,
|
|
186
174
|
});
|
|
187
175
|
}
|
|
@@ -194,18 +182,13 @@ export const de_GetManagedResourceCommand = async (output, context) => {
|
|
|
194
182
|
$metadata: deserializeMetadata(output),
|
|
195
183
|
});
|
|
196
184
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
contents.name = __expectString(data.name);
|
|
205
|
-
}
|
|
206
|
-
if (data.zonalShifts != null) {
|
|
207
|
-
contents.zonalShifts = de_ZonalShiftsInResource(data.zonalShifts, context);
|
|
208
|
-
}
|
|
185
|
+
const doc = take(data, {
|
|
186
|
+
appliedWeights: (_) => de_AppliedWeights(_, context),
|
|
187
|
+
arn: __expectString,
|
|
188
|
+
name: __expectString,
|
|
189
|
+
zonalShifts: (_) => de_ZonalShiftsInResource(_, context),
|
|
190
|
+
});
|
|
191
|
+
Object.assign(contents, doc);
|
|
209
192
|
return contents;
|
|
210
193
|
};
|
|
211
194
|
const de_GetManagedResourceCommandError = async (output, context) => {
|
|
@@ -232,10 +215,9 @@ const de_GetManagedResourceCommandError = async (output, context) => {
|
|
|
232
215
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
233
216
|
default:
|
|
234
217
|
const parsedBody = parsedOutput.body;
|
|
235
|
-
throwDefaultError({
|
|
218
|
+
return throwDefaultError({
|
|
236
219
|
output,
|
|
237
220
|
parsedBody,
|
|
238
|
-
exceptionCtor: __BaseException,
|
|
239
221
|
errorCode,
|
|
240
222
|
});
|
|
241
223
|
}
|
|
@@ -248,12 +230,11 @@ export const de_ListManagedResourcesCommand = async (output, context) => {
|
|
|
248
230
|
$metadata: deserializeMetadata(output),
|
|
249
231
|
});
|
|
250
232
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
}
|
|
233
|
+
const doc = take(data, {
|
|
234
|
+
items: _json,
|
|
235
|
+
nextToken: __expectString,
|
|
236
|
+
});
|
|
237
|
+
Object.assign(contents, doc);
|
|
257
238
|
return contents;
|
|
258
239
|
};
|
|
259
240
|
const de_ListManagedResourcesCommandError = async (output, context) => {
|
|
@@ -277,10 +258,9 @@ const de_ListManagedResourcesCommandError = async (output, context) => {
|
|
|
277
258
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
278
259
|
default:
|
|
279
260
|
const parsedBody = parsedOutput.body;
|
|
280
|
-
throwDefaultError({
|
|
261
|
+
return throwDefaultError({
|
|
281
262
|
output,
|
|
282
263
|
parsedBody,
|
|
283
|
-
exceptionCtor: __BaseException,
|
|
284
264
|
errorCode,
|
|
285
265
|
});
|
|
286
266
|
}
|
|
@@ -293,12 +273,11 @@ export const de_ListZonalShiftsCommand = async (output, context) => {
|
|
|
293
273
|
$metadata: deserializeMetadata(output),
|
|
294
274
|
});
|
|
295
275
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
}
|
|
276
|
+
const doc = take(data, {
|
|
277
|
+
items: (_) => de_ZonalShiftSummaries(_, context),
|
|
278
|
+
nextToken: __expectString,
|
|
279
|
+
});
|
|
280
|
+
Object.assign(contents, doc);
|
|
302
281
|
return contents;
|
|
303
282
|
};
|
|
304
283
|
const de_ListZonalShiftsCommandError = async (output, context) => {
|
|
@@ -322,10 +301,9 @@ const de_ListZonalShiftsCommandError = async (output, context) => {
|
|
|
322
301
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
323
302
|
default:
|
|
324
303
|
const parsedBody = parsedOutput.body;
|
|
325
|
-
throwDefaultError({
|
|
304
|
+
return throwDefaultError({
|
|
326
305
|
output,
|
|
327
306
|
parsedBody,
|
|
328
|
-
exceptionCtor: __BaseException,
|
|
329
307
|
errorCode,
|
|
330
308
|
});
|
|
331
309
|
}
|
|
@@ -338,27 +316,16 @@ export const de_StartZonalShiftCommand = async (output, context) => {
|
|
|
338
316
|
$metadata: deserializeMetadata(output),
|
|
339
317
|
});
|
|
340
318
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
contents.resourceIdentifier = __expectString(data.resourceIdentifier);
|
|
352
|
-
}
|
|
353
|
-
if (data.startTime != null) {
|
|
354
|
-
contents.startTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.startTime)));
|
|
355
|
-
}
|
|
356
|
-
if (data.status != null) {
|
|
357
|
-
contents.status = __expectString(data.status);
|
|
358
|
-
}
|
|
359
|
-
if (data.zonalShiftId != null) {
|
|
360
|
-
contents.zonalShiftId = __expectString(data.zonalShiftId);
|
|
361
|
-
}
|
|
319
|
+
const doc = take(data, {
|
|
320
|
+
awayFrom: __expectString,
|
|
321
|
+
comment: __expectString,
|
|
322
|
+
expiryTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
323
|
+
resourceIdentifier: __expectString,
|
|
324
|
+
startTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
325
|
+
status: __expectString,
|
|
326
|
+
zonalShiftId: __expectString,
|
|
327
|
+
});
|
|
328
|
+
Object.assign(contents, doc);
|
|
362
329
|
return contents;
|
|
363
330
|
};
|
|
364
331
|
const de_StartZonalShiftCommandError = async (output, context) => {
|
|
@@ -388,10 +355,9 @@ const de_StartZonalShiftCommandError = async (output, context) => {
|
|
|
388
355
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
389
356
|
default:
|
|
390
357
|
const parsedBody = parsedOutput.body;
|
|
391
|
-
throwDefaultError({
|
|
358
|
+
return throwDefaultError({
|
|
392
359
|
output,
|
|
393
360
|
parsedBody,
|
|
394
|
-
exceptionCtor: __BaseException,
|
|
395
361
|
errorCode,
|
|
396
362
|
});
|
|
397
363
|
}
|
|
@@ -404,27 +370,16 @@ export const de_UpdateZonalShiftCommand = async (output, context) => {
|
|
|
404
370
|
$metadata: deserializeMetadata(output),
|
|
405
371
|
});
|
|
406
372
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
contents.resourceIdentifier = __expectString(data.resourceIdentifier);
|
|
418
|
-
}
|
|
419
|
-
if (data.startTime != null) {
|
|
420
|
-
contents.startTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.startTime)));
|
|
421
|
-
}
|
|
422
|
-
if (data.status != null) {
|
|
423
|
-
contents.status = __expectString(data.status);
|
|
424
|
-
}
|
|
425
|
-
if (data.zonalShiftId != null) {
|
|
426
|
-
contents.zonalShiftId = __expectString(data.zonalShiftId);
|
|
427
|
-
}
|
|
373
|
+
const doc = take(data, {
|
|
374
|
+
awayFrom: __expectString,
|
|
375
|
+
comment: __expectString,
|
|
376
|
+
expiryTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
377
|
+
resourceIdentifier: __expectString,
|
|
378
|
+
startTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
379
|
+
status: __expectString,
|
|
380
|
+
zonalShiftId: __expectString,
|
|
381
|
+
});
|
|
382
|
+
Object.assign(contents, doc);
|
|
428
383
|
return contents;
|
|
429
384
|
};
|
|
430
385
|
const de_UpdateZonalShiftCommandError = async (output, context) => {
|
|
@@ -454,21 +409,21 @@ const de_UpdateZonalShiftCommandError = async (output, context) => {
|
|
|
454
409
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
455
410
|
default:
|
|
456
411
|
const parsedBody = parsedOutput.body;
|
|
457
|
-
throwDefaultError({
|
|
412
|
+
return throwDefaultError({
|
|
458
413
|
output,
|
|
459
414
|
parsedBody,
|
|
460
|
-
exceptionCtor: __BaseException,
|
|
461
415
|
errorCode,
|
|
462
416
|
});
|
|
463
417
|
}
|
|
464
418
|
};
|
|
465
|
-
const
|
|
419
|
+
const throwDefaultError = withBaseException(__BaseException);
|
|
466
420
|
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
467
421
|
const contents = map({});
|
|
468
422
|
const data = parsedOutput.body;
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
}
|
|
423
|
+
const doc = take(data, {
|
|
424
|
+
message: __expectString,
|
|
425
|
+
});
|
|
426
|
+
Object.assign(contents, doc);
|
|
472
427
|
const exception = new AccessDeniedException({
|
|
473
428
|
$metadata: deserializeMetadata(parsedOutput),
|
|
474
429
|
...contents,
|
|
@@ -478,15 +433,12 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
|
478
433
|
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
479
434
|
const contents = map({});
|
|
480
435
|
const data = parsedOutput.body;
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
if (data.zonalShiftId != null) {
|
|
488
|
-
contents.zonalShiftId = __expectString(data.zonalShiftId);
|
|
489
|
-
}
|
|
436
|
+
const doc = take(data, {
|
|
437
|
+
message: __expectString,
|
|
438
|
+
reason: __expectString,
|
|
439
|
+
zonalShiftId: __expectString,
|
|
440
|
+
});
|
|
441
|
+
Object.assign(contents, doc);
|
|
490
442
|
const exception = new ConflictException({
|
|
491
443
|
$metadata: deserializeMetadata(parsedOutput),
|
|
492
444
|
...contents,
|
|
@@ -496,9 +448,10 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
|
496
448
|
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
497
449
|
const contents = map({});
|
|
498
450
|
const data = parsedOutput.body;
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
}
|
|
451
|
+
const doc = take(data, {
|
|
452
|
+
message: __expectString,
|
|
453
|
+
});
|
|
454
|
+
Object.assign(contents, doc);
|
|
502
455
|
const exception = new InternalServerException({
|
|
503
456
|
$metadata: deserializeMetadata(parsedOutput),
|
|
504
457
|
...contents,
|
|
@@ -508,9 +461,10 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
|
508
461
|
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
509
462
|
const contents = map({});
|
|
510
463
|
const data = parsedOutput.body;
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
}
|
|
464
|
+
const doc = take(data, {
|
|
465
|
+
message: __expectString,
|
|
466
|
+
});
|
|
467
|
+
Object.assign(contents, doc);
|
|
514
468
|
const exception = new ResourceNotFoundException({
|
|
515
469
|
$metadata: deserializeMetadata(parsedOutput),
|
|
516
470
|
...contents,
|
|
@@ -520,9 +474,10 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
|
520
474
|
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
521
475
|
const contents = map({});
|
|
522
476
|
const data = parsedOutput.body;
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
}
|
|
477
|
+
const doc = take(data, {
|
|
478
|
+
message: __expectString,
|
|
479
|
+
});
|
|
480
|
+
Object.assign(contents, doc);
|
|
526
481
|
const exception = new ThrottlingException({
|
|
527
482
|
$metadata: deserializeMetadata(parsedOutput),
|
|
528
483
|
...contents,
|
|
@@ -532,12 +487,11 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
|
532
487
|
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
533
488
|
const contents = map({});
|
|
534
489
|
const data = parsedOutput.body;
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
}
|
|
490
|
+
const doc = take(data, {
|
|
491
|
+
message: __expectString,
|
|
492
|
+
reason: __expectString,
|
|
493
|
+
});
|
|
494
|
+
Object.assign(contents, doc);
|
|
541
495
|
const exception = new ValidationException({
|
|
542
496
|
$metadata: deserializeMetadata(parsedOutput),
|
|
543
497
|
...contents,
|
|
@@ -553,53 +507,21 @@ const de_AppliedWeights = (output, context) => {
|
|
|
553
507
|
return acc;
|
|
554
508
|
}, {});
|
|
555
509
|
};
|
|
556
|
-
const de_AvailabilityZones = (output, context) => {
|
|
557
|
-
const retVal = (output || [])
|
|
558
|
-
.filter((e) => e != null)
|
|
559
|
-
.map((entry) => {
|
|
560
|
-
if (entry === null) {
|
|
561
|
-
return null;
|
|
562
|
-
}
|
|
563
|
-
return __expectString(entry);
|
|
564
|
-
});
|
|
565
|
-
return retVal;
|
|
566
|
-
};
|
|
567
|
-
const de_ManagedResourceSummaries = (output, context) => {
|
|
568
|
-
const retVal = (output || [])
|
|
569
|
-
.filter((e) => e != null)
|
|
570
|
-
.map((entry) => {
|
|
571
|
-
if (entry === null) {
|
|
572
|
-
return null;
|
|
573
|
-
}
|
|
574
|
-
return de_ManagedResourceSummary(entry, context);
|
|
575
|
-
});
|
|
576
|
-
return retVal;
|
|
577
|
-
};
|
|
578
|
-
const de_ManagedResourceSummary = (output, context) => {
|
|
579
|
-
return {
|
|
580
|
-
arn: __expectString(output.arn),
|
|
581
|
-
availabilityZones: output.availabilityZones != null ? de_AvailabilityZones(output.availabilityZones, context) : undefined,
|
|
582
|
-
name: __expectString(output.name),
|
|
583
|
-
};
|
|
584
|
-
};
|
|
585
510
|
const de_ZonalShiftInResource = (output, context) => {
|
|
586
|
-
return {
|
|
587
|
-
appliedStatus: __expectString
|
|
588
|
-
awayFrom: __expectString
|
|
589
|
-
comment: __expectString
|
|
590
|
-
expiryTime:
|
|
591
|
-
resourceIdentifier: __expectString
|
|
592
|
-
startTime:
|
|
593
|
-
zonalShiftId: __expectString
|
|
594
|
-
};
|
|
511
|
+
return take(output, {
|
|
512
|
+
appliedStatus: __expectString,
|
|
513
|
+
awayFrom: __expectString,
|
|
514
|
+
comment: __expectString,
|
|
515
|
+
expiryTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
516
|
+
resourceIdentifier: __expectString,
|
|
517
|
+
startTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
518
|
+
zonalShiftId: __expectString,
|
|
519
|
+
});
|
|
595
520
|
};
|
|
596
521
|
const de_ZonalShiftsInResource = (output, context) => {
|
|
597
522
|
const retVal = (output || [])
|
|
598
523
|
.filter((e) => e != null)
|
|
599
524
|
.map((entry) => {
|
|
600
|
-
if (entry === null) {
|
|
601
|
-
return null;
|
|
602
|
-
}
|
|
603
525
|
return de_ZonalShiftInResource(entry, context);
|
|
604
526
|
});
|
|
605
527
|
return retVal;
|
|
@@ -608,23 +530,20 @@ const de_ZonalShiftSummaries = (output, context) => {
|
|
|
608
530
|
const retVal = (output || [])
|
|
609
531
|
.filter((e) => e != null)
|
|
610
532
|
.map((entry) => {
|
|
611
|
-
if (entry === null) {
|
|
612
|
-
return null;
|
|
613
|
-
}
|
|
614
533
|
return de_ZonalShiftSummary(entry, context);
|
|
615
534
|
});
|
|
616
535
|
return retVal;
|
|
617
536
|
};
|
|
618
537
|
const de_ZonalShiftSummary = (output, context) => {
|
|
619
|
-
return {
|
|
620
|
-
awayFrom: __expectString
|
|
621
|
-
comment: __expectString
|
|
622
|
-
expiryTime:
|
|
623
|
-
resourceIdentifier: __expectString
|
|
624
|
-
startTime:
|
|
625
|
-
status: __expectString
|
|
626
|
-
zonalShiftId: __expectString
|
|
627
|
-
};
|
|
538
|
+
return take(output, {
|
|
539
|
+
awayFrom: __expectString,
|
|
540
|
+
comment: __expectString,
|
|
541
|
+
expiryTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
542
|
+
resourceIdentifier: __expectString,
|
|
543
|
+
startTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
544
|
+
status: __expectString,
|
|
545
|
+
zonalShiftId: __expectString,
|
|
546
|
+
});
|
|
628
547
|
};
|
|
629
548
|
const deserializeMetadata = (output) => ({
|
|
630
549
|
httpStatusCode: output.statusCode,
|