@aws-sdk/client-arc-zonal-shift 3.310.0 → 3.315.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/protocols/Aws_restJson1.js +123 -204
- package/dist-es/protocols/Aws_restJson1.js +110 -191
- package/package.json +6 -6
|
@@ -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,
|
|
@@ -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,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-arc-zonal-shift",
|
|
3
3
|
"description": "AWS SDK for JavaScript Arc Zonal Shift Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.315.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@aws-crypto/sha256-browser": "3.0.0",
|
|
23
23
|
"@aws-crypto/sha256-js": "3.0.0",
|
|
24
|
-
"@aws-sdk/client-sts": "3.
|
|
24
|
+
"@aws-sdk/client-sts": "3.315.0",
|
|
25
25
|
"@aws-sdk/config-resolver": "3.310.0",
|
|
26
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
26
|
+
"@aws-sdk/credential-provider-node": "3.315.0",
|
|
27
27
|
"@aws-sdk/fetch-http-handler": "3.310.0",
|
|
28
28
|
"@aws-sdk/hash-node": "3.310.0",
|
|
29
29
|
"@aws-sdk/invalid-dependency": "3.310.0",
|
|
@@ -40,14 +40,14 @@
|
|
|
40
40
|
"@aws-sdk/node-config-provider": "3.310.0",
|
|
41
41
|
"@aws-sdk/node-http-handler": "3.310.0",
|
|
42
42
|
"@aws-sdk/protocol-http": "3.310.0",
|
|
43
|
-
"@aws-sdk/smithy-client": "3.
|
|
43
|
+
"@aws-sdk/smithy-client": "3.315.0",
|
|
44
44
|
"@aws-sdk/types": "3.310.0",
|
|
45
45
|
"@aws-sdk/url-parser": "3.310.0",
|
|
46
46
|
"@aws-sdk/util-base64": "3.310.0",
|
|
47
47
|
"@aws-sdk/util-body-length-browser": "3.310.0",
|
|
48
48
|
"@aws-sdk/util-body-length-node": "3.310.0",
|
|
49
|
-
"@aws-sdk/util-defaults-mode-browser": "3.
|
|
50
|
-
"@aws-sdk/util-defaults-mode-node": "3.
|
|
49
|
+
"@aws-sdk/util-defaults-mode-browser": "3.315.0",
|
|
50
|
+
"@aws-sdk/util-defaults-mode-node": "3.315.0",
|
|
51
51
|
"@aws-sdk/util-endpoints": "3.310.0",
|
|
52
52
|
"@aws-sdk/util-retry": "3.310.0",
|
|
53
53
|
"@aws-sdk/util-user-agent-browser": "3.310.0",
|