@aws-sdk/client-cloudcontrol 3.183.0 → 3.186.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.
@@ -1,916 +1,1121 @@
1
+ import { __assign, __awaiter, __generator } from "tslib";
1
2
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
3
  import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, throwDefaultError, } from "@aws-sdk/smithy-client";
3
4
  import { v4 as generateIdempotencyToken } from "uuid";
4
5
  import { CloudControlServiceException as __BaseException } from "../models/CloudControlServiceException";
5
6
  import { AlreadyExistsException, ClientTokenConflictException, ConcurrentModificationException, ConcurrentOperationException, GeneralServiceException, HandlerFailureException, HandlerInternalFailureException, InvalidCredentialsException, InvalidRequestException, NetworkFailureException, NotStabilizedException, NotUpdatableException, PrivateTypeException, RequestTokenNotFoundException, ResourceConflictException, ResourceNotFoundException, ServiceInternalErrorException, ServiceLimitExceededException, ThrottlingException, TypeNotFoundException, UnsupportedActionException, } from "../models/models_0";
6
- export const serializeAws_json1_0CancelResourceRequestCommand = async (input, context) => {
7
- const headers = {
8
- "content-type": "application/x-amz-json-1.0",
9
- "x-amz-target": "CloudApiService.CancelResourceRequest",
10
- };
11
- let body;
12
- body = JSON.stringify(serializeAws_json1_0CancelResourceRequestInput(input, context));
13
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
14
- };
15
- export const serializeAws_json1_0CreateResourceCommand = async (input, context) => {
16
- const headers = {
17
- "content-type": "application/x-amz-json-1.0",
18
- "x-amz-target": "CloudApiService.CreateResource",
19
- };
20
- let body;
21
- body = JSON.stringify(serializeAws_json1_0CreateResourceInput(input, context));
22
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
23
- };
24
- export const serializeAws_json1_0DeleteResourceCommand = async (input, context) => {
25
- const headers = {
26
- "content-type": "application/x-amz-json-1.0",
27
- "x-amz-target": "CloudApiService.DeleteResource",
28
- };
29
- let body;
30
- body = JSON.stringify(serializeAws_json1_0DeleteResourceInput(input, context));
31
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
32
- };
33
- export const serializeAws_json1_0GetResourceCommand = async (input, context) => {
34
- const headers = {
35
- "content-type": "application/x-amz-json-1.0",
36
- "x-amz-target": "CloudApiService.GetResource",
37
- };
38
- let body;
39
- body = JSON.stringify(serializeAws_json1_0GetResourceInput(input, context));
40
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
41
- };
42
- export const serializeAws_json1_0GetResourceRequestStatusCommand = async (input, context) => {
43
- const headers = {
44
- "content-type": "application/x-amz-json-1.0",
45
- "x-amz-target": "CloudApiService.GetResourceRequestStatus",
46
- };
47
- let body;
48
- body = JSON.stringify(serializeAws_json1_0GetResourceRequestStatusInput(input, context));
49
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
50
- };
51
- export const serializeAws_json1_0ListResourceRequestsCommand = async (input, context) => {
52
- const headers = {
53
- "content-type": "application/x-amz-json-1.0",
54
- "x-amz-target": "CloudApiService.ListResourceRequests",
55
- };
56
- let body;
57
- body = JSON.stringify(serializeAws_json1_0ListResourceRequestsInput(input, context));
58
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
59
- };
60
- export const serializeAws_json1_0ListResourcesCommand = async (input, context) => {
61
- const headers = {
62
- "content-type": "application/x-amz-json-1.0",
63
- "x-amz-target": "CloudApiService.ListResources",
64
- };
65
- let body;
66
- body = JSON.stringify(serializeAws_json1_0ListResourcesInput(input, context));
67
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
68
- };
69
- export const serializeAws_json1_0UpdateResourceCommand = async (input, context) => {
70
- const headers = {
71
- "content-type": "application/x-amz-json-1.0",
72
- "x-amz-target": "CloudApiService.UpdateResource",
73
- };
74
- let body;
75
- body = JSON.stringify(serializeAws_json1_0UpdateResourceInput(input, context));
76
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
77
- };
78
- export const deserializeAws_json1_0CancelResourceRequestCommand = async (output, context) => {
79
- if (output.statusCode >= 300) {
80
- return deserializeAws_json1_0CancelResourceRequestCommandError(output, context);
81
- }
82
- const data = await parseBody(output.body, context);
83
- let contents = {};
84
- contents = deserializeAws_json1_0CancelResourceRequestOutput(data, context);
85
- const response = {
86
- $metadata: deserializeMetadata(output),
87
- ...contents,
88
- };
89
- return Promise.resolve(response);
90
- };
91
- const deserializeAws_json1_0CancelResourceRequestCommandError = async (output, context) => {
92
- const parsedOutput = {
93
- ...output,
94
- body: await parseErrorBody(output.body, context),
95
- };
96
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
97
- switch (errorCode) {
98
- case "ConcurrentModificationException":
99
- case "com.amazonaws.cloudcontrol#ConcurrentModificationException":
100
- throw await deserializeAws_json1_0ConcurrentModificationExceptionResponse(parsedOutput, context);
101
- case "RequestTokenNotFoundException":
102
- case "com.amazonaws.cloudcontrol#RequestTokenNotFoundException":
103
- throw await deserializeAws_json1_0RequestTokenNotFoundExceptionResponse(parsedOutput, context);
104
- default:
105
- const parsedBody = parsedOutput.body;
106
- throwDefaultError({
107
- output,
108
- parsedBody,
109
- exceptionCtor: __BaseException,
110
- errorCode,
111
- });
112
- }
113
- };
114
- export const deserializeAws_json1_0CreateResourceCommand = async (output, context) => {
115
- if (output.statusCode >= 300) {
116
- return deserializeAws_json1_0CreateResourceCommandError(output, context);
117
- }
118
- const data = await parseBody(output.body, context);
119
- let contents = {};
120
- contents = deserializeAws_json1_0CreateResourceOutput(data, context);
121
- const response = {
122
- $metadata: deserializeMetadata(output),
123
- ...contents,
124
- };
125
- return Promise.resolve(response);
126
- };
127
- const deserializeAws_json1_0CreateResourceCommandError = async (output, context) => {
128
- const parsedOutput = {
129
- ...output,
130
- body: await parseErrorBody(output.body, context),
131
- };
132
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
133
- switch (errorCode) {
134
- case "AlreadyExistsException":
135
- case "com.amazonaws.cloudcontrol#AlreadyExistsException":
136
- throw await deserializeAws_json1_0AlreadyExistsExceptionResponse(parsedOutput, context);
137
- case "ClientTokenConflictException":
138
- case "com.amazonaws.cloudcontrol#ClientTokenConflictException":
139
- throw await deserializeAws_json1_0ClientTokenConflictExceptionResponse(parsedOutput, context);
140
- case "ConcurrentOperationException":
141
- case "com.amazonaws.cloudcontrol#ConcurrentOperationException":
142
- throw await deserializeAws_json1_0ConcurrentOperationExceptionResponse(parsedOutput, context);
143
- case "GeneralServiceException":
144
- case "com.amazonaws.cloudcontrol#GeneralServiceException":
145
- throw await deserializeAws_json1_0GeneralServiceExceptionResponse(parsedOutput, context);
146
- case "HandlerFailureException":
147
- case "com.amazonaws.cloudcontrol#HandlerFailureException":
148
- throw await deserializeAws_json1_0HandlerFailureExceptionResponse(parsedOutput, context);
149
- case "HandlerInternalFailureException":
150
- case "com.amazonaws.cloudcontrol#HandlerInternalFailureException":
151
- throw await deserializeAws_json1_0HandlerInternalFailureExceptionResponse(parsedOutput, context);
152
- case "InvalidCredentialsException":
153
- case "com.amazonaws.cloudcontrol#InvalidCredentialsException":
154
- throw await deserializeAws_json1_0InvalidCredentialsExceptionResponse(parsedOutput, context);
155
- case "InvalidRequestException":
156
- case "com.amazonaws.cloudcontrol#InvalidRequestException":
157
- throw await deserializeAws_json1_0InvalidRequestExceptionResponse(parsedOutput, context);
158
- case "NetworkFailureException":
159
- case "com.amazonaws.cloudcontrol#NetworkFailureException":
160
- throw await deserializeAws_json1_0NetworkFailureExceptionResponse(parsedOutput, context);
161
- case "NotStabilizedException":
162
- case "com.amazonaws.cloudcontrol#NotStabilizedException":
163
- throw await deserializeAws_json1_0NotStabilizedExceptionResponse(parsedOutput, context);
164
- case "NotUpdatableException":
165
- case "com.amazonaws.cloudcontrol#NotUpdatableException":
166
- throw await deserializeAws_json1_0NotUpdatableExceptionResponse(parsedOutput, context);
167
- case "PrivateTypeException":
168
- case "com.amazonaws.cloudcontrol#PrivateTypeException":
169
- throw await deserializeAws_json1_0PrivateTypeExceptionResponse(parsedOutput, context);
170
- case "ResourceConflictException":
171
- case "com.amazonaws.cloudcontrol#ResourceConflictException":
172
- throw await deserializeAws_json1_0ResourceConflictExceptionResponse(parsedOutput, context);
173
- case "ResourceNotFoundException":
174
- case "com.amazonaws.cloudcontrol#ResourceNotFoundException":
175
- throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
176
- case "ServiceInternalErrorException":
177
- case "com.amazonaws.cloudcontrol#ServiceInternalErrorException":
178
- throw await deserializeAws_json1_0ServiceInternalErrorExceptionResponse(parsedOutput, context);
179
- case "ServiceLimitExceededException":
180
- case "com.amazonaws.cloudcontrol#ServiceLimitExceededException":
181
- throw await deserializeAws_json1_0ServiceLimitExceededExceptionResponse(parsedOutput, context);
182
- case "ThrottlingException":
183
- case "com.amazonaws.cloudcontrol#ThrottlingException":
184
- throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
185
- case "TypeNotFoundException":
186
- case "com.amazonaws.cloudcontrol#TypeNotFoundException":
187
- throw await deserializeAws_json1_0TypeNotFoundExceptionResponse(parsedOutput, context);
188
- case "UnsupportedActionException":
189
- case "com.amazonaws.cloudcontrol#UnsupportedActionException":
190
- throw await deserializeAws_json1_0UnsupportedActionExceptionResponse(parsedOutput, context);
191
- default:
192
- const parsedBody = parsedOutput.body;
193
- throwDefaultError({
194
- output,
195
- parsedBody,
196
- exceptionCtor: __BaseException,
197
- errorCode,
198
- });
199
- }
200
- };
201
- export const deserializeAws_json1_0DeleteResourceCommand = async (output, context) => {
202
- if (output.statusCode >= 300) {
203
- return deserializeAws_json1_0DeleteResourceCommandError(output, context);
204
- }
205
- const data = await parseBody(output.body, context);
206
- let contents = {};
207
- contents = deserializeAws_json1_0DeleteResourceOutput(data, context);
208
- const response = {
209
- $metadata: deserializeMetadata(output),
210
- ...contents,
211
- };
212
- return Promise.resolve(response);
213
- };
214
- const deserializeAws_json1_0DeleteResourceCommandError = async (output, context) => {
215
- const parsedOutput = {
216
- ...output,
217
- body: await parseErrorBody(output.body, context),
218
- };
219
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
220
- switch (errorCode) {
221
- case "AlreadyExistsException":
222
- case "com.amazonaws.cloudcontrol#AlreadyExistsException":
223
- throw await deserializeAws_json1_0AlreadyExistsExceptionResponse(parsedOutput, context);
224
- case "ClientTokenConflictException":
225
- case "com.amazonaws.cloudcontrol#ClientTokenConflictException":
226
- throw await deserializeAws_json1_0ClientTokenConflictExceptionResponse(parsedOutput, context);
227
- case "ConcurrentOperationException":
228
- case "com.amazonaws.cloudcontrol#ConcurrentOperationException":
229
- throw await deserializeAws_json1_0ConcurrentOperationExceptionResponse(parsedOutput, context);
230
- case "GeneralServiceException":
231
- case "com.amazonaws.cloudcontrol#GeneralServiceException":
232
- throw await deserializeAws_json1_0GeneralServiceExceptionResponse(parsedOutput, context);
233
- case "HandlerFailureException":
234
- case "com.amazonaws.cloudcontrol#HandlerFailureException":
235
- throw await deserializeAws_json1_0HandlerFailureExceptionResponse(parsedOutput, context);
236
- case "HandlerInternalFailureException":
237
- case "com.amazonaws.cloudcontrol#HandlerInternalFailureException":
238
- throw await deserializeAws_json1_0HandlerInternalFailureExceptionResponse(parsedOutput, context);
239
- case "InvalidCredentialsException":
240
- case "com.amazonaws.cloudcontrol#InvalidCredentialsException":
241
- throw await deserializeAws_json1_0InvalidCredentialsExceptionResponse(parsedOutput, context);
242
- case "InvalidRequestException":
243
- case "com.amazonaws.cloudcontrol#InvalidRequestException":
244
- throw await deserializeAws_json1_0InvalidRequestExceptionResponse(parsedOutput, context);
245
- case "NetworkFailureException":
246
- case "com.amazonaws.cloudcontrol#NetworkFailureException":
247
- throw await deserializeAws_json1_0NetworkFailureExceptionResponse(parsedOutput, context);
248
- case "NotStabilizedException":
249
- case "com.amazonaws.cloudcontrol#NotStabilizedException":
250
- throw await deserializeAws_json1_0NotStabilizedExceptionResponse(parsedOutput, context);
251
- case "NotUpdatableException":
252
- case "com.amazonaws.cloudcontrol#NotUpdatableException":
253
- throw await deserializeAws_json1_0NotUpdatableExceptionResponse(parsedOutput, context);
254
- case "PrivateTypeException":
255
- case "com.amazonaws.cloudcontrol#PrivateTypeException":
256
- throw await deserializeAws_json1_0PrivateTypeExceptionResponse(parsedOutput, context);
257
- case "ResourceConflictException":
258
- case "com.amazonaws.cloudcontrol#ResourceConflictException":
259
- throw await deserializeAws_json1_0ResourceConflictExceptionResponse(parsedOutput, context);
260
- case "ResourceNotFoundException":
261
- case "com.amazonaws.cloudcontrol#ResourceNotFoundException":
262
- throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
263
- case "ServiceInternalErrorException":
264
- case "com.amazonaws.cloudcontrol#ServiceInternalErrorException":
265
- throw await deserializeAws_json1_0ServiceInternalErrorExceptionResponse(parsedOutput, context);
266
- case "ServiceLimitExceededException":
267
- case "com.amazonaws.cloudcontrol#ServiceLimitExceededException":
268
- throw await deserializeAws_json1_0ServiceLimitExceededExceptionResponse(parsedOutput, context);
269
- case "ThrottlingException":
270
- case "com.amazonaws.cloudcontrol#ThrottlingException":
271
- throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
272
- case "TypeNotFoundException":
273
- case "com.amazonaws.cloudcontrol#TypeNotFoundException":
274
- throw await deserializeAws_json1_0TypeNotFoundExceptionResponse(parsedOutput, context);
275
- case "UnsupportedActionException":
276
- case "com.amazonaws.cloudcontrol#UnsupportedActionException":
277
- throw await deserializeAws_json1_0UnsupportedActionExceptionResponse(parsedOutput, context);
278
- default:
279
- const parsedBody = parsedOutput.body;
280
- throwDefaultError({
281
- output,
282
- parsedBody,
283
- exceptionCtor: __BaseException,
284
- errorCode,
285
- });
286
- }
287
- };
288
- export const deserializeAws_json1_0GetResourceCommand = async (output, context) => {
289
- if (output.statusCode >= 300) {
290
- return deserializeAws_json1_0GetResourceCommandError(output, context);
291
- }
292
- const data = await parseBody(output.body, context);
293
- let contents = {};
294
- contents = deserializeAws_json1_0GetResourceOutput(data, context);
295
- const response = {
296
- $metadata: deserializeMetadata(output),
297
- ...contents,
298
- };
299
- return Promise.resolve(response);
300
- };
301
- const deserializeAws_json1_0GetResourceCommandError = async (output, context) => {
302
- const parsedOutput = {
303
- ...output,
304
- body: await parseErrorBody(output.body, context),
305
- };
306
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
307
- switch (errorCode) {
308
- case "AlreadyExistsException":
309
- case "com.amazonaws.cloudcontrol#AlreadyExistsException":
310
- throw await deserializeAws_json1_0AlreadyExistsExceptionResponse(parsedOutput, context);
311
- case "GeneralServiceException":
312
- case "com.amazonaws.cloudcontrol#GeneralServiceException":
313
- throw await deserializeAws_json1_0GeneralServiceExceptionResponse(parsedOutput, context);
314
- case "HandlerFailureException":
315
- case "com.amazonaws.cloudcontrol#HandlerFailureException":
316
- throw await deserializeAws_json1_0HandlerFailureExceptionResponse(parsedOutput, context);
317
- case "HandlerInternalFailureException":
318
- case "com.amazonaws.cloudcontrol#HandlerInternalFailureException":
319
- throw await deserializeAws_json1_0HandlerInternalFailureExceptionResponse(parsedOutput, context);
320
- case "InvalidCredentialsException":
321
- case "com.amazonaws.cloudcontrol#InvalidCredentialsException":
322
- throw await deserializeAws_json1_0InvalidCredentialsExceptionResponse(parsedOutput, context);
323
- case "InvalidRequestException":
324
- case "com.amazonaws.cloudcontrol#InvalidRequestException":
325
- throw await deserializeAws_json1_0InvalidRequestExceptionResponse(parsedOutput, context);
326
- case "NetworkFailureException":
327
- case "com.amazonaws.cloudcontrol#NetworkFailureException":
328
- throw await deserializeAws_json1_0NetworkFailureExceptionResponse(parsedOutput, context);
329
- case "NotStabilizedException":
330
- case "com.amazonaws.cloudcontrol#NotStabilizedException":
331
- throw await deserializeAws_json1_0NotStabilizedExceptionResponse(parsedOutput, context);
332
- case "NotUpdatableException":
333
- case "com.amazonaws.cloudcontrol#NotUpdatableException":
334
- throw await deserializeAws_json1_0NotUpdatableExceptionResponse(parsedOutput, context);
335
- case "PrivateTypeException":
336
- case "com.amazonaws.cloudcontrol#PrivateTypeException":
337
- throw await deserializeAws_json1_0PrivateTypeExceptionResponse(parsedOutput, context);
338
- case "ResourceConflictException":
339
- case "com.amazonaws.cloudcontrol#ResourceConflictException":
340
- throw await deserializeAws_json1_0ResourceConflictExceptionResponse(parsedOutput, context);
341
- case "ResourceNotFoundException":
342
- case "com.amazonaws.cloudcontrol#ResourceNotFoundException":
343
- throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
344
- case "ServiceInternalErrorException":
345
- case "com.amazonaws.cloudcontrol#ServiceInternalErrorException":
346
- throw await deserializeAws_json1_0ServiceInternalErrorExceptionResponse(parsedOutput, context);
347
- case "ServiceLimitExceededException":
348
- case "com.amazonaws.cloudcontrol#ServiceLimitExceededException":
349
- throw await deserializeAws_json1_0ServiceLimitExceededExceptionResponse(parsedOutput, context);
350
- case "ThrottlingException":
351
- case "com.amazonaws.cloudcontrol#ThrottlingException":
352
- throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
353
- case "TypeNotFoundException":
354
- case "com.amazonaws.cloudcontrol#TypeNotFoundException":
355
- throw await deserializeAws_json1_0TypeNotFoundExceptionResponse(parsedOutput, context);
356
- case "UnsupportedActionException":
357
- case "com.amazonaws.cloudcontrol#UnsupportedActionException":
358
- throw await deserializeAws_json1_0UnsupportedActionExceptionResponse(parsedOutput, context);
359
- default:
360
- const parsedBody = parsedOutput.body;
361
- throwDefaultError({
362
- output,
363
- parsedBody,
364
- exceptionCtor: __BaseException,
365
- errorCode,
366
- });
367
- }
368
- };
369
- export const deserializeAws_json1_0GetResourceRequestStatusCommand = async (output, context) => {
370
- if (output.statusCode >= 300) {
371
- return deserializeAws_json1_0GetResourceRequestStatusCommandError(output, context);
372
- }
373
- const data = await parseBody(output.body, context);
374
- let contents = {};
375
- contents = deserializeAws_json1_0GetResourceRequestStatusOutput(data, context);
376
- const response = {
377
- $metadata: deserializeMetadata(output),
378
- ...contents,
379
- };
380
- return Promise.resolve(response);
381
- };
382
- const deserializeAws_json1_0GetResourceRequestStatusCommandError = async (output, context) => {
383
- const parsedOutput = {
384
- ...output,
385
- body: await parseErrorBody(output.body, context),
386
- };
387
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
388
- switch (errorCode) {
389
- case "RequestTokenNotFoundException":
390
- case "com.amazonaws.cloudcontrol#RequestTokenNotFoundException":
391
- throw await deserializeAws_json1_0RequestTokenNotFoundExceptionResponse(parsedOutput, context);
392
- default:
393
- const parsedBody = parsedOutput.body;
394
- throwDefaultError({
395
- output,
396
- parsedBody,
397
- exceptionCtor: __BaseException,
398
- errorCode,
399
- });
400
- }
401
- };
402
- export const deserializeAws_json1_0ListResourceRequestsCommand = async (output, context) => {
403
- if (output.statusCode >= 300) {
404
- return deserializeAws_json1_0ListResourceRequestsCommandError(output, context);
405
- }
406
- const data = await parseBody(output.body, context);
407
- let contents = {};
408
- contents = deserializeAws_json1_0ListResourceRequestsOutput(data, context);
409
- const response = {
410
- $metadata: deserializeMetadata(output),
411
- ...contents,
412
- };
413
- return Promise.resolve(response);
414
- };
415
- const deserializeAws_json1_0ListResourceRequestsCommandError = async (output, context) => {
416
- const parsedOutput = {
417
- ...output,
418
- body: await parseErrorBody(output.body, context),
419
- };
420
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
421
- const parsedBody = parsedOutput.body;
422
- throwDefaultError({
423
- output,
424
- parsedBody,
425
- exceptionCtor: __BaseException,
426
- errorCode,
7
+ export var serializeAws_json1_0CancelResourceRequestCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
8
+ var headers, body;
9
+ return __generator(this, function (_a) {
10
+ headers = {
11
+ "content-type": "application/x-amz-json-1.0",
12
+ "x-amz-target": "CloudApiService.CancelResourceRequest",
13
+ };
14
+ body = JSON.stringify(serializeAws_json1_0CancelResourceRequestInput(input, context));
15
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
427
16
  });
428
- };
429
- export const deserializeAws_json1_0ListResourcesCommand = async (output, context) => {
430
- if (output.statusCode >= 300) {
431
- return deserializeAws_json1_0ListResourcesCommandError(output, context);
432
- }
433
- const data = await parseBody(output.body, context);
434
- let contents = {};
435
- contents = deserializeAws_json1_0ListResourcesOutput(data, context);
436
- const response = {
437
- $metadata: deserializeMetadata(output),
438
- ...contents,
439
- };
440
- return Promise.resolve(response);
441
- };
442
- const deserializeAws_json1_0ListResourcesCommandError = async (output, context) => {
443
- const parsedOutput = {
444
- ...output,
445
- body: await parseErrorBody(output.body, context),
446
- };
447
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
448
- switch (errorCode) {
449
- case "AlreadyExistsException":
450
- case "com.amazonaws.cloudcontrol#AlreadyExistsException":
451
- throw await deserializeAws_json1_0AlreadyExistsExceptionResponse(parsedOutput, context);
452
- case "GeneralServiceException":
453
- case "com.amazonaws.cloudcontrol#GeneralServiceException":
454
- throw await deserializeAws_json1_0GeneralServiceExceptionResponse(parsedOutput, context);
455
- case "HandlerFailureException":
456
- case "com.amazonaws.cloudcontrol#HandlerFailureException":
457
- throw await deserializeAws_json1_0HandlerFailureExceptionResponse(parsedOutput, context);
458
- case "HandlerInternalFailureException":
459
- case "com.amazonaws.cloudcontrol#HandlerInternalFailureException":
460
- throw await deserializeAws_json1_0HandlerInternalFailureExceptionResponse(parsedOutput, context);
461
- case "InvalidCredentialsException":
462
- case "com.amazonaws.cloudcontrol#InvalidCredentialsException":
463
- throw await deserializeAws_json1_0InvalidCredentialsExceptionResponse(parsedOutput, context);
464
- case "InvalidRequestException":
465
- case "com.amazonaws.cloudcontrol#InvalidRequestException":
466
- throw await deserializeAws_json1_0InvalidRequestExceptionResponse(parsedOutput, context);
467
- case "NetworkFailureException":
468
- case "com.amazonaws.cloudcontrol#NetworkFailureException":
469
- throw await deserializeAws_json1_0NetworkFailureExceptionResponse(parsedOutput, context);
470
- case "NotStabilizedException":
471
- case "com.amazonaws.cloudcontrol#NotStabilizedException":
472
- throw await deserializeAws_json1_0NotStabilizedExceptionResponse(parsedOutput, context);
473
- case "NotUpdatableException":
474
- case "com.amazonaws.cloudcontrol#NotUpdatableException":
475
- throw await deserializeAws_json1_0NotUpdatableExceptionResponse(parsedOutput, context);
476
- case "PrivateTypeException":
477
- case "com.amazonaws.cloudcontrol#PrivateTypeException":
478
- throw await deserializeAws_json1_0PrivateTypeExceptionResponse(parsedOutput, context);
479
- case "ResourceConflictException":
480
- case "com.amazonaws.cloudcontrol#ResourceConflictException":
481
- throw await deserializeAws_json1_0ResourceConflictExceptionResponse(parsedOutput, context);
482
- case "ResourceNotFoundException":
483
- case "com.amazonaws.cloudcontrol#ResourceNotFoundException":
484
- throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
485
- case "ServiceInternalErrorException":
486
- case "com.amazonaws.cloudcontrol#ServiceInternalErrorException":
487
- throw await deserializeAws_json1_0ServiceInternalErrorExceptionResponse(parsedOutput, context);
488
- case "ServiceLimitExceededException":
489
- case "com.amazonaws.cloudcontrol#ServiceLimitExceededException":
490
- throw await deserializeAws_json1_0ServiceLimitExceededExceptionResponse(parsedOutput, context);
491
- case "ThrottlingException":
492
- case "com.amazonaws.cloudcontrol#ThrottlingException":
493
- throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
494
- case "TypeNotFoundException":
495
- case "com.amazonaws.cloudcontrol#TypeNotFoundException":
496
- throw await deserializeAws_json1_0TypeNotFoundExceptionResponse(parsedOutput, context);
497
- case "UnsupportedActionException":
498
- case "com.amazonaws.cloudcontrol#UnsupportedActionException":
499
- throw await deserializeAws_json1_0UnsupportedActionExceptionResponse(parsedOutput, context);
500
- default:
501
- const parsedBody = parsedOutput.body;
502
- throwDefaultError({
503
- output,
504
- parsedBody,
505
- exceptionCtor: __BaseException,
506
- errorCode,
507
- });
508
- }
509
- };
510
- export const deserializeAws_json1_0UpdateResourceCommand = async (output, context) => {
511
- if (output.statusCode >= 300) {
512
- return deserializeAws_json1_0UpdateResourceCommandError(output, context);
513
- }
514
- const data = await parseBody(output.body, context);
515
- let contents = {};
516
- contents = deserializeAws_json1_0UpdateResourceOutput(data, context);
517
- const response = {
518
- $metadata: deserializeMetadata(output),
519
- ...contents,
520
- };
521
- return Promise.resolve(response);
522
- };
523
- const deserializeAws_json1_0UpdateResourceCommandError = async (output, context) => {
524
- const parsedOutput = {
525
- ...output,
526
- body: await parseErrorBody(output.body, context),
527
- };
528
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
529
- switch (errorCode) {
530
- case "AlreadyExistsException":
531
- case "com.amazonaws.cloudcontrol#AlreadyExistsException":
532
- throw await deserializeAws_json1_0AlreadyExistsExceptionResponse(parsedOutput, context);
533
- case "ClientTokenConflictException":
534
- case "com.amazonaws.cloudcontrol#ClientTokenConflictException":
535
- throw await deserializeAws_json1_0ClientTokenConflictExceptionResponse(parsedOutput, context);
536
- case "ConcurrentOperationException":
537
- case "com.amazonaws.cloudcontrol#ConcurrentOperationException":
538
- throw await deserializeAws_json1_0ConcurrentOperationExceptionResponse(parsedOutput, context);
539
- case "GeneralServiceException":
540
- case "com.amazonaws.cloudcontrol#GeneralServiceException":
541
- throw await deserializeAws_json1_0GeneralServiceExceptionResponse(parsedOutput, context);
542
- case "HandlerFailureException":
543
- case "com.amazonaws.cloudcontrol#HandlerFailureException":
544
- throw await deserializeAws_json1_0HandlerFailureExceptionResponse(parsedOutput, context);
545
- case "HandlerInternalFailureException":
546
- case "com.amazonaws.cloudcontrol#HandlerInternalFailureException":
547
- throw await deserializeAws_json1_0HandlerInternalFailureExceptionResponse(parsedOutput, context);
548
- case "InvalidCredentialsException":
549
- case "com.amazonaws.cloudcontrol#InvalidCredentialsException":
550
- throw await deserializeAws_json1_0InvalidCredentialsExceptionResponse(parsedOutput, context);
551
- case "InvalidRequestException":
552
- case "com.amazonaws.cloudcontrol#InvalidRequestException":
553
- throw await deserializeAws_json1_0InvalidRequestExceptionResponse(parsedOutput, context);
554
- case "NetworkFailureException":
555
- case "com.amazonaws.cloudcontrol#NetworkFailureException":
556
- throw await deserializeAws_json1_0NetworkFailureExceptionResponse(parsedOutput, context);
557
- case "NotStabilizedException":
558
- case "com.amazonaws.cloudcontrol#NotStabilizedException":
559
- throw await deserializeAws_json1_0NotStabilizedExceptionResponse(parsedOutput, context);
560
- case "NotUpdatableException":
561
- case "com.amazonaws.cloudcontrol#NotUpdatableException":
562
- throw await deserializeAws_json1_0NotUpdatableExceptionResponse(parsedOutput, context);
563
- case "PrivateTypeException":
564
- case "com.amazonaws.cloudcontrol#PrivateTypeException":
565
- throw await deserializeAws_json1_0PrivateTypeExceptionResponse(parsedOutput, context);
566
- case "ResourceConflictException":
567
- case "com.amazonaws.cloudcontrol#ResourceConflictException":
568
- throw await deserializeAws_json1_0ResourceConflictExceptionResponse(parsedOutput, context);
569
- case "ResourceNotFoundException":
570
- case "com.amazonaws.cloudcontrol#ResourceNotFoundException":
571
- throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
572
- case "ServiceInternalErrorException":
573
- case "com.amazonaws.cloudcontrol#ServiceInternalErrorException":
574
- throw await deserializeAws_json1_0ServiceInternalErrorExceptionResponse(parsedOutput, context);
575
- case "ServiceLimitExceededException":
576
- case "com.amazonaws.cloudcontrol#ServiceLimitExceededException":
577
- throw await deserializeAws_json1_0ServiceLimitExceededExceptionResponse(parsedOutput, context);
578
- case "ThrottlingException":
579
- case "com.amazonaws.cloudcontrol#ThrottlingException":
580
- throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
581
- case "TypeNotFoundException":
582
- case "com.amazonaws.cloudcontrol#TypeNotFoundException":
583
- throw await deserializeAws_json1_0TypeNotFoundExceptionResponse(parsedOutput, context);
584
- case "UnsupportedActionException":
585
- case "com.amazonaws.cloudcontrol#UnsupportedActionException":
586
- throw await deserializeAws_json1_0UnsupportedActionExceptionResponse(parsedOutput, context);
587
- default:
588
- const parsedBody = parsedOutput.body;
589
- throwDefaultError({
590
- output,
591
- parsedBody,
592
- exceptionCtor: __BaseException,
593
- errorCode,
594
- });
595
- }
596
- };
597
- const deserializeAws_json1_0AlreadyExistsExceptionResponse = async (parsedOutput, context) => {
598
- const body = parsedOutput.body;
599
- const deserialized = deserializeAws_json1_0AlreadyExistsException(body, context);
600
- const exception = new AlreadyExistsException({
601
- $metadata: deserializeMetadata(parsedOutput),
602
- ...deserialized,
17
+ }); };
18
+ export var serializeAws_json1_0CreateResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
19
+ var headers, body;
20
+ return __generator(this, function (_a) {
21
+ headers = {
22
+ "content-type": "application/x-amz-json-1.0",
23
+ "x-amz-target": "CloudApiService.CreateResource",
24
+ };
25
+ body = JSON.stringify(serializeAws_json1_0CreateResourceInput(input, context));
26
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
603
27
  });
604
- return __decorateServiceException(exception, body);
605
- };
606
- const deserializeAws_json1_0ClientTokenConflictExceptionResponse = async (parsedOutput, context) => {
607
- const body = parsedOutput.body;
608
- const deserialized = deserializeAws_json1_0ClientTokenConflictException(body, context);
609
- const exception = new ClientTokenConflictException({
610
- $metadata: deserializeMetadata(parsedOutput),
611
- ...deserialized,
28
+ }); };
29
+ export var serializeAws_json1_0DeleteResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
30
+ var headers, body;
31
+ return __generator(this, function (_a) {
32
+ headers = {
33
+ "content-type": "application/x-amz-json-1.0",
34
+ "x-amz-target": "CloudApiService.DeleteResource",
35
+ };
36
+ body = JSON.stringify(serializeAws_json1_0DeleteResourceInput(input, context));
37
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
612
38
  });
613
- return __decorateServiceException(exception, body);
614
- };
615
- const deserializeAws_json1_0ConcurrentModificationExceptionResponse = async (parsedOutput, context) => {
616
- const body = parsedOutput.body;
617
- const deserialized = deserializeAws_json1_0ConcurrentModificationException(body, context);
618
- const exception = new ConcurrentModificationException({
619
- $metadata: deserializeMetadata(parsedOutput),
620
- ...deserialized,
39
+ }); };
40
+ export var serializeAws_json1_0GetResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
41
+ var headers, body;
42
+ return __generator(this, function (_a) {
43
+ headers = {
44
+ "content-type": "application/x-amz-json-1.0",
45
+ "x-amz-target": "CloudApiService.GetResource",
46
+ };
47
+ body = JSON.stringify(serializeAws_json1_0GetResourceInput(input, context));
48
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
621
49
  });
622
- return __decorateServiceException(exception, body);
623
- };
624
- const deserializeAws_json1_0ConcurrentOperationExceptionResponse = async (parsedOutput, context) => {
625
- const body = parsedOutput.body;
626
- const deserialized = deserializeAws_json1_0ConcurrentOperationException(body, context);
627
- const exception = new ConcurrentOperationException({
628
- $metadata: deserializeMetadata(parsedOutput),
629
- ...deserialized,
50
+ }); };
51
+ export var serializeAws_json1_0GetResourceRequestStatusCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
52
+ var headers, body;
53
+ return __generator(this, function (_a) {
54
+ headers = {
55
+ "content-type": "application/x-amz-json-1.0",
56
+ "x-amz-target": "CloudApiService.GetResourceRequestStatus",
57
+ };
58
+ body = JSON.stringify(serializeAws_json1_0GetResourceRequestStatusInput(input, context));
59
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
630
60
  });
631
- return __decorateServiceException(exception, body);
632
- };
633
- const deserializeAws_json1_0GeneralServiceExceptionResponse = async (parsedOutput, context) => {
634
- const body = parsedOutput.body;
635
- const deserialized = deserializeAws_json1_0GeneralServiceException(body, context);
636
- const exception = new GeneralServiceException({
637
- $metadata: deserializeMetadata(parsedOutput),
638
- ...deserialized,
61
+ }); };
62
+ export var serializeAws_json1_0ListResourceRequestsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
63
+ var headers, body;
64
+ return __generator(this, function (_a) {
65
+ headers = {
66
+ "content-type": "application/x-amz-json-1.0",
67
+ "x-amz-target": "CloudApiService.ListResourceRequests",
68
+ };
69
+ body = JSON.stringify(serializeAws_json1_0ListResourceRequestsInput(input, context));
70
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
639
71
  });
640
- return __decorateServiceException(exception, body);
641
- };
642
- const deserializeAws_json1_0HandlerFailureExceptionResponse = async (parsedOutput, context) => {
643
- const body = parsedOutput.body;
644
- const deserialized = deserializeAws_json1_0HandlerFailureException(body, context);
645
- const exception = new HandlerFailureException({
646
- $metadata: deserializeMetadata(parsedOutput),
647
- ...deserialized,
72
+ }); };
73
+ export var serializeAws_json1_0ListResourcesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
74
+ var headers, body;
75
+ return __generator(this, function (_a) {
76
+ headers = {
77
+ "content-type": "application/x-amz-json-1.0",
78
+ "x-amz-target": "CloudApiService.ListResources",
79
+ };
80
+ body = JSON.stringify(serializeAws_json1_0ListResourcesInput(input, context));
81
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
648
82
  });
649
- return __decorateServiceException(exception, body);
650
- };
651
- const deserializeAws_json1_0HandlerInternalFailureExceptionResponse = async (parsedOutput, context) => {
652
- const body = parsedOutput.body;
653
- const deserialized = deserializeAws_json1_0HandlerInternalFailureException(body, context);
654
- const exception = new HandlerInternalFailureException({
655
- $metadata: deserializeMetadata(parsedOutput),
656
- ...deserialized,
83
+ }); };
84
+ export var serializeAws_json1_0UpdateResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
85
+ var headers, body;
86
+ return __generator(this, function (_a) {
87
+ headers = {
88
+ "content-type": "application/x-amz-json-1.0",
89
+ "x-amz-target": "CloudApiService.UpdateResource",
90
+ };
91
+ body = JSON.stringify(serializeAws_json1_0UpdateResourceInput(input, context));
92
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
657
93
  });
658
- return __decorateServiceException(exception, body);
659
- };
660
- const deserializeAws_json1_0InvalidCredentialsExceptionResponse = async (parsedOutput, context) => {
661
- const body = parsedOutput.body;
662
- const deserialized = deserializeAws_json1_0InvalidCredentialsException(body, context);
663
- const exception = new InvalidCredentialsException({
664
- $metadata: deserializeMetadata(parsedOutput),
665
- ...deserialized,
94
+ }); };
95
+ export var deserializeAws_json1_0CancelResourceRequestCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
96
+ var data, contents, response;
97
+ return __generator(this, function (_a) {
98
+ switch (_a.label) {
99
+ case 0:
100
+ if (output.statusCode >= 300) {
101
+ return [2, deserializeAws_json1_0CancelResourceRequestCommandError(output, context)];
102
+ }
103
+ return [4, parseBody(output.body, context)];
104
+ case 1:
105
+ data = _a.sent();
106
+ contents = {};
107
+ contents = deserializeAws_json1_0CancelResourceRequestOutput(data, context);
108
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
109
+ return [2, Promise.resolve(response)];
110
+ }
666
111
  });
667
- return __decorateServiceException(exception, body);
668
- };
669
- const deserializeAws_json1_0InvalidRequestExceptionResponse = async (parsedOutput, context) => {
670
- const body = parsedOutput.body;
671
- const deserialized = deserializeAws_json1_0InvalidRequestException(body, context);
672
- const exception = new InvalidRequestException({
673
- $metadata: deserializeMetadata(parsedOutput),
674
- ...deserialized,
112
+ }); };
113
+ var deserializeAws_json1_0CancelResourceRequestCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
114
+ var parsedOutput, _a, errorCode, _b, parsedBody;
115
+ var _c;
116
+ return __generator(this, function (_d) {
117
+ switch (_d.label) {
118
+ case 0:
119
+ _a = [__assign({}, output)];
120
+ _c = {};
121
+ return [4, parseErrorBody(output.body, context)];
122
+ case 1:
123
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
124
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
125
+ _b = errorCode;
126
+ switch (_b) {
127
+ case "ConcurrentModificationException": return [3, 2];
128
+ case "com.amazonaws.cloudcontrol#ConcurrentModificationException": return [3, 2];
129
+ case "RequestTokenNotFoundException": return [3, 4];
130
+ case "com.amazonaws.cloudcontrol#RequestTokenNotFoundException": return [3, 4];
131
+ }
132
+ return [3, 6];
133
+ case 2: return [4, deserializeAws_json1_0ConcurrentModificationExceptionResponse(parsedOutput, context)];
134
+ case 3: throw _d.sent();
135
+ case 4: return [4, deserializeAws_json1_0RequestTokenNotFoundExceptionResponse(parsedOutput, context)];
136
+ case 5: throw _d.sent();
137
+ case 6:
138
+ parsedBody = parsedOutput.body;
139
+ throwDefaultError({
140
+ output: output,
141
+ parsedBody: parsedBody,
142
+ exceptionCtor: __BaseException,
143
+ errorCode: errorCode,
144
+ });
145
+ _d.label = 7;
146
+ case 7: return [2];
147
+ }
675
148
  });
676
- return __decorateServiceException(exception, body);
677
- };
678
- const deserializeAws_json1_0NetworkFailureExceptionResponse = async (parsedOutput, context) => {
679
- const body = parsedOutput.body;
680
- const deserialized = deserializeAws_json1_0NetworkFailureException(body, context);
681
- const exception = new NetworkFailureException({
682
- $metadata: deserializeMetadata(parsedOutput),
683
- ...deserialized,
149
+ }); };
150
+ export var deserializeAws_json1_0CreateResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
151
+ var data, contents, response;
152
+ return __generator(this, function (_a) {
153
+ switch (_a.label) {
154
+ case 0:
155
+ if (output.statusCode >= 300) {
156
+ return [2, deserializeAws_json1_0CreateResourceCommandError(output, context)];
157
+ }
158
+ return [4, parseBody(output.body, context)];
159
+ case 1:
160
+ data = _a.sent();
161
+ contents = {};
162
+ contents = deserializeAws_json1_0CreateResourceOutput(data, context);
163
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
164
+ return [2, Promise.resolve(response)];
165
+ }
684
166
  });
685
- return __decorateServiceException(exception, body);
686
- };
687
- const deserializeAws_json1_0NotStabilizedExceptionResponse = async (parsedOutput, context) => {
688
- const body = parsedOutput.body;
689
- const deserialized = deserializeAws_json1_0NotStabilizedException(body, context);
690
- const exception = new NotStabilizedException({
691
- $metadata: deserializeMetadata(parsedOutput),
692
- ...deserialized,
167
+ }); };
168
+ var deserializeAws_json1_0CreateResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
169
+ var parsedOutput, _a, errorCode, _b, parsedBody;
170
+ var _c;
171
+ return __generator(this, function (_d) {
172
+ switch (_d.label) {
173
+ case 0:
174
+ _a = [__assign({}, output)];
175
+ _c = {};
176
+ return [4, parseErrorBody(output.body, context)];
177
+ case 1:
178
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
179
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
180
+ _b = errorCode;
181
+ switch (_b) {
182
+ case "AlreadyExistsException": return [3, 2];
183
+ case "com.amazonaws.cloudcontrol#AlreadyExistsException": return [3, 2];
184
+ case "ClientTokenConflictException": return [3, 4];
185
+ case "com.amazonaws.cloudcontrol#ClientTokenConflictException": return [3, 4];
186
+ case "ConcurrentOperationException": return [3, 6];
187
+ case "com.amazonaws.cloudcontrol#ConcurrentOperationException": return [3, 6];
188
+ case "GeneralServiceException": return [3, 8];
189
+ case "com.amazonaws.cloudcontrol#GeneralServiceException": return [3, 8];
190
+ case "HandlerFailureException": return [3, 10];
191
+ case "com.amazonaws.cloudcontrol#HandlerFailureException": return [3, 10];
192
+ case "HandlerInternalFailureException": return [3, 12];
193
+ case "com.amazonaws.cloudcontrol#HandlerInternalFailureException": return [3, 12];
194
+ case "InvalidCredentialsException": return [3, 14];
195
+ case "com.amazonaws.cloudcontrol#InvalidCredentialsException": return [3, 14];
196
+ case "InvalidRequestException": return [3, 16];
197
+ case "com.amazonaws.cloudcontrol#InvalidRequestException": return [3, 16];
198
+ case "NetworkFailureException": return [3, 18];
199
+ case "com.amazonaws.cloudcontrol#NetworkFailureException": return [3, 18];
200
+ case "NotStabilizedException": return [3, 20];
201
+ case "com.amazonaws.cloudcontrol#NotStabilizedException": return [3, 20];
202
+ case "NotUpdatableException": return [3, 22];
203
+ case "com.amazonaws.cloudcontrol#NotUpdatableException": return [3, 22];
204
+ case "PrivateTypeException": return [3, 24];
205
+ case "com.amazonaws.cloudcontrol#PrivateTypeException": return [3, 24];
206
+ case "ResourceConflictException": return [3, 26];
207
+ case "com.amazonaws.cloudcontrol#ResourceConflictException": return [3, 26];
208
+ case "ResourceNotFoundException": return [3, 28];
209
+ case "com.amazonaws.cloudcontrol#ResourceNotFoundException": return [3, 28];
210
+ case "ServiceInternalErrorException": return [3, 30];
211
+ case "com.amazonaws.cloudcontrol#ServiceInternalErrorException": return [3, 30];
212
+ case "ServiceLimitExceededException": return [3, 32];
213
+ case "com.amazonaws.cloudcontrol#ServiceLimitExceededException": return [3, 32];
214
+ case "ThrottlingException": return [3, 34];
215
+ case "com.amazonaws.cloudcontrol#ThrottlingException": return [3, 34];
216
+ case "TypeNotFoundException": return [3, 36];
217
+ case "com.amazonaws.cloudcontrol#TypeNotFoundException": return [3, 36];
218
+ case "UnsupportedActionException": return [3, 38];
219
+ case "com.amazonaws.cloudcontrol#UnsupportedActionException": return [3, 38];
220
+ }
221
+ return [3, 40];
222
+ case 2: return [4, deserializeAws_json1_0AlreadyExistsExceptionResponse(parsedOutput, context)];
223
+ case 3: throw _d.sent();
224
+ case 4: return [4, deserializeAws_json1_0ClientTokenConflictExceptionResponse(parsedOutput, context)];
225
+ case 5: throw _d.sent();
226
+ case 6: return [4, deserializeAws_json1_0ConcurrentOperationExceptionResponse(parsedOutput, context)];
227
+ case 7: throw _d.sent();
228
+ case 8: return [4, deserializeAws_json1_0GeneralServiceExceptionResponse(parsedOutput, context)];
229
+ case 9: throw _d.sent();
230
+ case 10: return [4, deserializeAws_json1_0HandlerFailureExceptionResponse(parsedOutput, context)];
231
+ case 11: throw _d.sent();
232
+ case 12: return [4, deserializeAws_json1_0HandlerInternalFailureExceptionResponse(parsedOutput, context)];
233
+ case 13: throw _d.sent();
234
+ case 14: return [4, deserializeAws_json1_0InvalidCredentialsExceptionResponse(parsedOutput, context)];
235
+ case 15: throw _d.sent();
236
+ case 16: return [4, deserializeAws_json1_0InvalidRequestExceptionResponse(parsedOutput, context)];
237
+ case 17: throw _d.sent();
238
+ case 18: return [4, deserializeAws_json1_0NetworkFailureExceptionResponse(parsedOutput, context)];
239
+ case 19: throw _d.sent();
240
+ case 20: return [4, deserializeAws_json1_0NotStabilizedExceptionResponse(parsedOutput, context)];
241
+ case 21: throw _d.sent();
242
+ case 22: return [4, deserializeAws_json1_0NotUpdatableExceptionResponse(parsedOutput, context)];
243
+ case 23: throw _d.sent();
244
+ case 24: return [4, deserializeAws_json1_0PrivateTypeExceptionResponse(parsedOutput, context)];
245
+ case 25: throw _d.sent();
246
+ case 26: return [4, deserializeAws_json1_0ResourceConflictExceptionResponse(parsedOutput, context)];
247
+ case 27: throw _d.sent();
248
+ case 28: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
249
+ case 29: throw _d.sent();
250
+ case 30: return [4, deserializeAws_json1_0ServiceInternalErrorExceptionResponse(parsedOutput, context)];
251
+ case 31: throw _d.sent();
252
+ case 32: return [4, deserializeAws_json1_0ServiceLimitExceededExceptionResponse(parsedOutput, context)];
253
+ case 33: throw _d.sent();
254
+ case 34: return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
255
+ case 35: throw _d.sent();
256
+ case 36: return [4, deserializeAws_json1_0TypeNotFoundExceptionResponse(parsedOutput, context)];
257
+ case 37: throw _d.sent();
258
+ case 38: return [4, deserializeAws_json1_0UnsupportedActionExceptionResponse(parsedOutput, context)];
259
+ case 39: throw _d.sent();
260
+ case 40:
261
+ parsedBody = parsedOutput.body;
262
+ throwDefaultError({
263
+ output: output,
264
+ parsedBody: parsedBody,
265
+ exceptionCtor: __BaseException,
266
+ errorCode: errorCode,
267
+ });
268
+ _d.label = 41;
269
+ case 41: return [2];
270
+ }
693
271
  });
694
- return __decorateServiceException(exception, body);
695
- };
696
- const deserializeAws_json1_0NotUpdatableExceptionResponse = async (parsedOutput, context) => {
697
- const body = parsedOutput.body;
698
- const deserialized = deserializeAws_json1_0NotUpdatableException(body, context);
699
- const exception = new NotUpdatableException({
700
- $metadata: deserializeMetadata(parsedOutput),
701
- ...deserialized,
272
+ }); };
273
+ export var deserializeAws_json1_0DeleteResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
274
+ var data, contents, response;
275
+ return __generator(this, function (_a) {
276
+ switch (_a.label) {
277
+ case 0:
278
+ if (output.statusCode >= 300) {
279
+ return [2, deserializeAws_json1_0DeleteResourceCommandError(output, context)];
280
+ }
281
+ return [4, parseBody(output.body, context)];
282
+ case 1:
283
+ data = _a.sent();
284
+ contents = {};
285
+ contents = deserializeAws_json1_0DeleteResourceOutput(data, context);
286
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
287
+ return [2, Promise.resolve(response)];
288
+ }
702
289
  });
703
- return __decorateServiceException(exception, body);
704
- };
705
- const deserializeAws_json1_0PrivateTypeExceptionResponse = async (parsedOutput, context) => {
706
- const body = parsedOutput.body;
707
- const deserialized = deserializeAws_json1_0PrivateTypeException(body, context);
708
- const exception = new PrivateTypeException({
709
- $metadata: deserializeMetadata(parsedOutput),
710
- ...deserialized,
290
+ }); };
291
+ var deserializeAws_json1_0DeleteResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
292
+ var parsedOutput, _a, errorCode, _b, parsedBody;
293
+ var _c;
294
+ return __generator(this, function (_d) {
295
+ switch (_d.label) {
296
+ case 0:
297
+ _a = [__assign({}, output)];
298
+ _c = {};
299
+ return [4, parseErrorBody(output.body, context)];
300
+ case 1:
301
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
302
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
303
+ _b = errorCode;
304
+ switch (_b) {
305
+ case "AlreadyExistsException": return [3, 2];
306
+ case "com.amazonaws.cloudcontrol#AlreadyExistsException": return [3, 2];
307
+ case "ClientTokenConflictException": return [3, 4];
308
+ case "com.amazonaws.cloudcontrol#ClientTokenConflictException": return [3, 4];
309
+ case "ConcurrentOperationException": return [3, 6];
310
+ case "com.amazonaws.cloudcontrol#ConcurrentOperationException": return [3, 6];
311
+ case "GeneralServiceException": return [3, 8];
312
+ case "com.amazonaws.cloudcontrol#GeneralServiceException": return [3, 8];
313
+ case "HandlerFailureException": return [3, 10];
314
+ case "com.amazonaws.cloudcontrol#HandlerFailureException": return [3, 10];
315
+ case "HandlerInternalFailureException": return [3, 12];
316
+ case "com.amazonaws.cloudcontrol#HandlerInternalFailureException": return [3, 12];
317
+ case "InvalidCredentialsException": return [3, 14];
318
+ case "com.amazonaws.cloudcontrol#InvalidCredentialsException": return [3, 14];
319
+ case "InvalidRequestException": return [3, 16];
320
+ case "com.amazonaws.cloudcontrol#InvalidRequestException": return [3, 16];
321
+ case "NetworkFailureException": return [3, 18];
322
+ case "com.amazonaws.cloudcontrol#NetworkFailureException": return [3, 18];
323
+ case "NotStabilizedException": return [3, 20];
324
+ case "com.amazonaws.cloudcontrol#NotStabilizedException": return [3, 20];
325
+ case "NotUpdatableException": return [3, 22];
326
+ case "com.amazonaws.cloudcontrol#NotUpdatableException": return [3, 22];
327
+ case "PrivateTypeException": return [3, 24];
328
+ case "com.amazonaws.cloudcontrol#PrivateTypeException": return [3, 24];
329
+ case "ResourceConflictException": return [3, 26];
330
+ case "com.amazonaws.cloudcontrol#ResourceConflictException": return [3, 26];
331
+ case "ResourceNotFoundException": return [3, 28];
332
+ case "com.amazonaws.cloudcontrol#ResourceNotFoundException": return [3, 28];
333
+ case "ServiceInternalErrorException": return [3, 30];
334
+ case "com.amazonaws.cloudcontrol#ServiceInternalErrorException": return [3, 30];
335
+ case "ServiceLimitExceededException": return [3, 32];
336
+ case "com.amazonaws.cloudcontrol#ServiceLimitExceededException": return [3, 32];
337
+ case "ThrottlingException": return [3, 34];
338
+ case "com.amazonaws.cloudcontrol#ThrottlingException": return [3, 34];
339
+ case "TypeNotFoundException": return [3, 36];
340
+ case "com.amazonaws.cloudcontrol#TypeNotFoundException": return [3, 36];
341
+ case "UnsupportedActionException": return [3, 38];
342
+ case "com.amazonaws.cloudcontrol#UnsupportedActionException": return [3, 38];
343
+ }
344
+ return [3, 40];
345
+ case 2: return [4, deserializeAws_json1_0AlreadyExistsExceptionResponse(parsedOutput, context)];
346
+ case 3: throw _d.sent();
347
+ case 4: return [4, deserializeAws_json1_0ClientTokenConflictExceptionResponse(parsedOutput, context)];
348
+ case 5: throw _d.sent();
349
+ case 6: return [4, deserializeAws_json1_0ConcurrentOperationExceptionResponse(parsedOutput, context)];
350
+ case 7: throw _d.sent();
351
+ case 8: return [4, deserializeAws_json1_0GeneralServiceExceptionResponse(parsedOutput, context)];
352
+ case 9: throw _d.sent();
353
+ case 10: return [4, deserializeAws_json1_0HandlerFailureExceptionResponse(parsedOutput, context)];
354
+ case 11: throw _d.sent();
355
+ case 12: return [4, deserializeAws_json1_0HandlerInternalFailureExceptionResponse(parsedOutput, context)];
356
+ case 13: throw _d.sent();
357
+ case 14: return [4, deserializeAws_json1_0InvalidCredentialsExceptionResponse(parsedOutput, context)];
358
+ case 15: throw _d.sent();
359
+ case 16: return [4, deserializeAws_json1_0InvalidRequestExceptionResponse(parsedOutput, context)];
360
+ case 17: throw _d.sent();
361
+ case 18: return [4, deserializeAws_json1_0NetworkFailureExceptionResponse(parsedOutput, context)];
362
+ case 19: throw _d.sent();
363
+ case 20: return [4, deserializeAws_json1_0NotStabilizedExceptionResponse(parsedOutput, context)];
364
+ case 21: throw _d.sent();
365
+ case 22: return [4, deserializeAws_json1_0NotUpdatableExceptionResponse(parsedOutput, context)];
366
+ case 23: throw _d.sent();
367
+ case 24: return [4, deserializeAws_json1_0PrivateTypeExceptionResponse(parsedOutput, context)];
368
+ case 25: throw _d.sent();
369
+ case 26: return [4, deserializeAws_json1_0ResourceConflictExceptionResponse(parsedOutput, context)];
370
+ case 27: throw _d.sent();
371
+ case 28: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
372
+ case 29: throw _d.sent();
373
+ case 30: return [4, deserializeAws_json1_0ServiceInternalErrorExceptionResponse(parsedOutput, context)];
374
+ case 31: throw _d.sent();
375
+ case 32: return [4, deserializeAws_json1_0ServiceLimitExceededExceptionResponse(parsedOutput, context)];
376
+ case 33: throw _d.sent();
377
+ case 34: return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
378
+ case 35: throw _d.sent();
379
+ case 36: return [4, deserializeAws_json1_0TypeNotFoundExceptionResponse(parsedOutput, context)];
380
+ case 37: throw _d.sent();
381
+ case 38: return [4, deserializeAws_json1_0UnsupportedActionExceptionResponse(parsedOutput, context)];
382
+ case 39: throw _d.sent();
383
+ case 40:
384
+ parsedBody = parsedOutput.body;
385
+ throwDefaultError({
386
+ output: output,
387
+ parsedBody: parsedBody,
388
+ exceptionCtor: __BaseException,
389
+ errorCode: errorCode,
390
+ });
391
+ _d.label = 41;
392
+ case 41: return [2];
393
+ }
711
394
  });
712
- return __decorateServiceException(exception, body);
713
- };
714
- const deserializeAws_json1_0RequestTokenNotFoundExceptionResponse = async (parsedOutput, context) => {
715
- const body = parsedOutput.body;
716
- const deserialized = deserializeAws_json1_0RequestTokenNotFoundException(body, context);
717
- const exception = new RequestTokenNotFoundException({
718
- $metadata: deserializeMetadata(parsedOutput),
719
- ...deserialized,
395
+ }); };
396
+ export var deserializeAws_json1_0GetResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
397
+ var data, contents, response;
398
+ return __generator(this, function (_a) {
399
+ switch (_a.label) {
400
+ case 0:
401
+ if (output.statusCode >= 300) {
402
+ return [2, deserializeAws_json1_0GetResourceCommandError(output, context)];
403
+ }
404
+ return [4, parseBody(output.body, context)];
405
+ case 1:
406
+ data = _a.sent();
407
+ contents = {};
408
+ contents = deserializeAws_json1_0GetResourceOutput(data, context);
409
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
410
+ return [2, Promise.resolve(response)];
411
+ }
720
412
  });
721
- return __decorateServiceException(exception, body);
722
- };
723
- const deserializeAws_json1_0ResourceConflictExceptionResponse = async (parsedOutput, context) => {
724
- const body = parsedOutput.body;
725
- const deserialized = deserializeAws_json1_0ResourceConflictException(body, context);
726
- const exception = new ResourceConflictException({
727
- $metadata: deserializeMetadata(parsedOutput),
728
- ...deserialized,
413
+ }); };
414
+ var deserializeAws_json1_0GetResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
415
+ var parsedOutput, _a, errorCode, _b, parsedBody;
416
+ var _c;
417
+ return __generator(this, function (_d) {
418
+ switch (_d.label) {
419
+ case 0:
420
+ _a = [__assign({}, output)];
421
+ _c = {};
422
+ return [4, parseErrorBody(output.body, context)];
423
+ case 1:
424
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
425
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
426
+ _b = errorCode;
427
+ switch (_b) {
428
+ case "AlreadyExistsException": return [3, 2];
429
+ case "com.amazonaws.cloudcontrol#AlreadyExistsException": return [3, 2];
430
+ case "GeneralServiceException": return [3, 4];
431
+ case "com.amazonaws.cloudcontrol#GeneralServiceException": return [3, 4];
432
+ case "HandlerFailureException": return [3, 6];
433
+ case "com.amazonaws.cloudcontrol#HandlerFailureException": return [3, 6];
434
+ case "HandlerInternalFailureException": return [3, 8];
435
+ case "com.amazonaws.cloudcontrol#HandlerInternalFailureException": return [3, 8];
436
+ case "InvalidCredentialsException": return [3, 10];
437
+ case "com.amazonaws.cloudcontrol#InvalidCredentialsException": return [3, 10];
438
+ case "InvalidRequestException": return [3, 12];
439
+ case "com.amazonaws.cloudcontrol#InvalidRequestException": return [3, 12];
440
+ case "NetworkFailureException": return [3, 14];
441
+ case "com.amazonaws.cloudcontrol#NetworkFailureException": return [3, 14];
442
+ case "NotStabilizedException": return [3, 16];
443
+ case "com.amazonaws.cloudcontrol#NotStabilizedException": return [3, 16];
444
+ case "NotUpdatableException": return [3, 18];
445
+ case "com.amazonaws.cloudcontrol#NotUpdatableException": return [3, 18];
446
+ case "PrivateTypeException": return [3, 20];
447
+ case "com.amazonaws.cloudcontrol#PrivateTypeException": return [3, 20];
448
+ case "ResourceConflictException": return [3, 22];
449
+ case "com.amazonaws.cloudcontrol#ResourceConflictException": return [3, 22];
450
+ case "ResourceNotFoundException": return [3, 24];
451
+ case "com.amazonaws.cloudcontrol#ResourceNotFoundException": return [3, 24];
452
+ case "ServiceInternalErrorException": return [3, 26];
453
+ case "com.amazonaws.cloudcontrol#ServiceInternalErrorException": return [3, 26];
454
+ case "ServiceLimitExceededException": return [3, 28];
455
+ case "com.amazonaws.cloudcontrol#ServiceLimitExceededException": return [3, 28];
456
+ case "ThrottlingException": return [3, 30];
457
+ case "com.amazonaws.cloudcontrol#ThrottlingException": return [3, 30];
458
+ case "TypeNotFoundException": return [3, 32];
459
+ case "com.amazonaws.cloudcontrol#TypeNotFoundException": return [3, 32];
460
+ case "UnsupportedActionException": return [3, 34];
461
+ case "com.amazonaws.cloudcontrol#UnsupportedActionException": return [3, 34];
462
+ }
463
+ return [3, 36];
464
+ case 2: return [4, deserializeAws_json1_0AlreadyExistsExceptionResponse(parsedOutput, context)];
465
+ case 3: throw _d.sent();
466
+ case 4: return [4, deserializeAws_json1_0GeneralServiceExceptionResponse(parsedOutput, context)];
467
+ case 5: throw _d.sent();
468
+ case 6: return [4, deserializeAws_json1_0HandlerFailureExceptionResponse(parsedOutput, context)];
469
+ case 7: throw _d.sent();
470
+ case 8: return [4, deserializeAws_json1_0HandlerInternalFailureExceptionResponse(parsedOutput, context)];
471
+ case 9: throw _d.sent();
472
+ case 10: return [4, deserializeAws_json1_0InvalidCredentialsExceptionResponse(parsedOutput, context)];
473
+ case 11: throw _d.sent();
474
+ case 12: return [4, deserializeAws_json1_0InvalidRequestExceptionResponse(parsedOutput, context)];
475
+ case 13: throw _d.sent();
476
+ case 14: return [4, deserializeAws_json1_0NetworkFailureExceptionResponse(parsedOutput, context)];
477
+ case 15: throw _d.sent();
478
+ case 16: return [4, deserializeAws_json1_0NotStabilizedExceptionResponse(parsedOutput, context)];
479
+ case 17: throw _d.sent();
480
+ case 18: return [4, deserializeAws_json1_0NotUpdatableExceptionResponse(parsedOutput, context)];
481
+ case 19: throw _d.sent();
482
+ case 20: return [4, deserializeAws_json1_0PrivateTypeExceptionResponse(parsedOutput, context)];
483
+ case 21: throw _d.sent();
484
+ case 22: return [4, deserializeAws_json1_0ResourceConflictExceptionResponse(parsedOutput, context)];
485
+ case 23: throw _d.sent();
486
+ case 24: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
487
+ case 25: throw _d.sent();
488
+ case 26: return [4, deserializeAws_json1_0ServiceInternalErrorExceptionResponse(parsedOutput, context)];
489
+ case 27: throw _d.sent();
490
+ case 28: return [4, deserializeAws_json1_0ServiceLimitExceededExceptionResponse(parsedOutput, context)];
491
+ case 29: throw _d.sent();
492
+ case 30: return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
493
+ case 31: throw _d.sent();
494
+ case 32: return [4, deserializeAws_json1_0TypeNotFoundExceptionResponse(parsedOutput, context)];
495
+ case 33: throw _d.sent();
496
+ case 34: return [4, deserializeAws_json1_0UnsupportedActionExceptionResponse(parsedOutput, context)];
497
+ case 35: throw _d.sent();
498
+ case 36:
499
+ parsedBody = parsedOutput.body;
500
+ throwDefaultError({
501
+ output: output,
502
+ parsedBody: parsedBody,
503
+ exceptionCtor: __BaseException,
504
+ errorCode: errorCode,
505
+ });
506
+ _d.label = 37;
507
+ case 37: return [2];
508
+ }
729
509
  });
730
- return __decorateServiceException(exception, body);
731
- };
732
- const deserializeAws_json1_0ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
733
- const body = parsedOutput.body;
734
- const deserialized = deserializeAws_json1_0ResourceNotFoundException(body, context);
735
- const exception = new ResourceNotFoundException({
736
- $metadata: deserializeMetadata(parsedOutput),
737
- ...deserialized,
510
+ }); };
511
+ export var deserializeAws_json1_0GetResourceRequestStatusCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
512
+ var data, contents, response;
513
+ return __generator(this, function (_a) {
514
+ switch (_a.label) {
515
+ case 0:
516
+ if (output.statusCode >= 300) {
517
+ return [2, deserializeAws_json1_0GetResourceRequestStatusCommandError(output, context)];
518
+ }
519
+ return [4, parseBody(output.body, context)];
520
+ case 1:
521
+ data = _a.sent();
522
+ contents = {};
523
+ contents = deserializeAws_json1_0GetResourceRequestStatusOutput(data, context);
524
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
525
+ return [2, Promise.resolve(response)];
526
+ }
738
527
  });
739
- return __decorateServiceException(exception, body);
740
- };
741
- const deserializeAws_json1_0ServiceInternalErrorExceptionResponse = async (parsedOutput, context) => {
742
- const body = parsedOutput.body;
743
- const deserialized = deserializeAws_json1_0ServiceInternalErrorException(body, context);
744
- const exception = new ServiceInternalErrorException({
745
- $metadata: deserializeMetadata(parsedOutput),
746
- ...deserialized,
528
+ }); };
529
+ var deserializeAws_json1_0GetResourceRequestStatusCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
530
+ var parsedOutput, _a, errorCode, _b, parsedBody;
531
+ var _c;
532
+ return __generator(this, function (_d) {
533
+ switch (_d.label) {
534
+ case 0:
535
+ _a = [__assign({}, output)];
536
+ _c = {};
537
+ return [4, parseErrorBody(output.body, context)];
538
+ case 1:
539
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
540
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
541
+ _b = errorCode;
542
+ switch (_b) {
543
+ case "RequestTokenNotFoundException": return [3, 2];
544
+ case "com.amazonaws.cloudcontrol#RequestTokenNotFoundException": return [3, 2];
545
+ }
546
+ return [3, 4];
547
+ case 2: return [4, deserializeAws_json1_0RequestTokenNotFoundExceptionResponse(parsedOutput, context)];
548
+ case 3: throw _d.sent();
549
+ case 4:
550
+ parsedBody = parsedOutput.body;
551
+ throwDefaultError({
552
+ output: output,
553
+ parsedBody: parsedBody,
554
+ exceptionCtor: __BaseException,
555
+ errorCode: errorCode,
556
+ });
557
+ _d.label = 5;
558
+ case 5: return [2];
559
+ }
747
560
  });
748
- return __decorateServiceException(exception, body);
749
- };
750
- const deserializeAws_json1_0ServiceLimitExceededExceptionResponse = async (parsedOutput, context) => {
751
- const body = parsedOutput.body;
752
- const deserialized = deserializeAws_json1_0ServiceLimitExceededException(body, context);
753
- const exception = new ServiceLimitExceededException({
754
- $metadata: deserializeMetadata(parsedOutput),
755
- ...deserialized,
561
+ }); };
562
+ export var deserializeAws_json1_0ListResourceRequestsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
563
+ var data, contents, response;
564
+ return __generator(this, function (_a) {
565
+ switch (_a.label) {
566
+ case 0:
567
+ if (output.statusCode >= 300) {
568
+ return [2, deserializeAws_json1_0ListResourceRequestsCommandError(output, context)];
569
+ }
570
+ return [4, parseBody(output.body, context)];
571
+ case 1:
572
+ data = _a.sent();
573
+ contents = {};
574
+ contents = deserializeAws_json1_0ListResourceRequestsOutput(data, context);
575
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
576
+ return [2, Promise.resolve(response)];
577
+ }
756
578
  });
757
- return __decorateServiceException(exception, body);
758
- };
759
- const deserializeAws_json1_0ThrottlingExceptionResponse = async (parsedOutput, context) => {
760
- const body = parsedOutput.body;
761
- const deserialized = deserializeAws_json1_0ThrottlingException(body, context);
762
- const exception = new ThrottlingException({
763
- $metadata: deserializeMetadata(parsedOutput),
764
- ...deserialized,
579
+ }); };
580
+ var deserializeAws_json1_0ListResourceRequestsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
581
+ var parsedOutput, _a, errorCode, parsedBody;
582
+ var _b;
583
+ return __generator(this, function (_c) {
584
+ switch (_c.label) {
585
+ case 0:
586
+ _a = [__assign({}, output)];
587
+ _b = {};
588
+ return [4, parseErrorBody(output.body, context)];
589
+ case 1:
590
+ parsedOutput = __assign.apply(void 0, _a.concat([(_b.body = _c.sent(), _b)]));
591
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
592
+ parsedBody = parsedOutput.body;
593
+ throwDefaultError({
594
+ output: output,
595
+ parsedBody: parsedBody,
596
+ exceptionCtor: __BaseException,
597
+ errorCode: errorCode,
598
+ });
599
+ return [2];
600
+ }
765
601
  });
766
- return __decorateServiceException(exception, body);
767
- };
768
- const deserializeAws_json1_0TypeNotFoundExceptionResponse = async (parsedOutput, context) => {
769
- const body = parsedOutput.body;
770
- const deserialized = deserializeAws_json1_0TypeNotFoundException(body, context);
771
- const exception = new TypeNotFoundException({
772
- $metadata: deserializeMetadata(parsedOutput),
773
- ...deserialized,
602
+ }); };
603
+ export var deserializeAws_json1_0ListResourcesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
604
+ var data, contents, response;
605
+ return __generator(this, function (_a) {
606
+ switch (_a.label) {
607
+ case 0:
608
+ if (output.statusCode >= 300) {
609
+ return [2, deserializeAws_json1_0ListResourcesCommandError(output, context)];
610
+ }
611
+ return [4, parseBody(output.body, context)];
612
+ case 1:
613
+ data = _a.sent();
614
+ contents = {};
615
+ contents = deserializeAws_json1_0ListResourcesOutput(data, context);
616
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
617
+ return [2, Promise.resolve(response)];
618
+ }
774
619
  });
775
- return __decorateServiceException(exception, body);
776
- };
777
- const deserializeAws_json1_0UnsupportedActionExceptionResponse = async (parsedOutput, context) => {
778
- const body = parsedOutput.body;
779
- const deserialized = deserializeAws_json1_0UnsupportedActionException(body, context);
780
- const exception = new UnsupportedActionException({
781
- $metadata: deserializeMetadata(parsedOutput),
782
- ...deserialized,
620
+ }); };
621
+ var deserializeAws_json1_0ListResourcesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
622
+ var parsedOutput, _a, errorCode, _b, parsedBody;
623
+ var _c;
624
+ return __generator(this, function (_d) {
625
+ switch (_d.label) {
626
+ case 0:
627
+ _a = [__assign({}, output)];
628
+ _c = {};
629
+ return [4, parseErrorBody(output.body, context)];
630
+ case 1:
631
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
632
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
633
+ _b = errorCode;
634
+ switch (_b) {
635
+ case "AlreadyExistsException": return [3, 2];
636
+ case "com.amazonaws.cloudcontrol#AlreadyExistsException": return [3, 2];
637
+ case "GeneralServiceException": return [3, 4];
638
+ case "com.amazonaws.cloudcontrol#GeneralServiceException": return [3, 4];
639
+ case "HandlerFailureException": return [3, 6];
640
+ case "com.amazonaws.cloudcontrol#HandlerFailureException": return [3, 6];
641
+ case "HandlerInternalFailureException": return [3, 8];
642
+ case "com.amazonaws.cloudcontrol#HandlerInternalFailureException": return [3, 8];
643
+ case "InvalidCredentialsException": return [3, 10];
644
+ case "com.amazonaws.cloudcontrol#InvalidCredentialsException": return [3, 10];
645
+ case "InvalidRequestException": return [3, 12];
646
+ case "com.amazonaws.cloudcontrol#InvalidRequestException": return [3, 12];
647
+ case "NetworkFailureException": return [3, 14];
648
+ case "com.amazonaws.cloudcontrol#NetworkFailureException": return [3, 14];
649
+ case "NotStabilizedException": return [3, 16];
650
+ case "com.amazonaws.cloudcontrol#NotStabilizedException": return [3, 16];
651
+ case "NotUpdatableException": return [3, 18];
652
+ case "com.amazonaws.cloudcontrol#NotUpdatableException": return [3, 18];
653
+ case "PrivateTypeException": return [3, 20];
654
+ case "com.amazonaws.cloudcontrol#PrivateTypeException": return [3, 20];
655
+ case "ResourceConflictException": return [3, 22];
656
+ case "com.amazonaws.cloudcontrol#ResourceConflictException": return [3, 22];
657
+ case "ResourceNotFoundException": return [3, 24];
658
+ case "com.amazonaws.cloudcontrol#ResourceNotFoundException": return [3, 24];
659
+ case "ServiceInternalErrorException": return [3, 26];
660
+ case "com.amazonaws.cloudcontrol#ServiceInternalErrorException": return [3, 26];
661
+ case "ServiceLimitExceededException": return [3, 28];
662
+ case "com.amazonaws.cloudcontrol#ServiceLimitExceededException": return [3, 28];
663
+ case "ThrottlingException": return [3, 30];
664
+ case "com.amazonaws.cloudcontrol#ThrottlingException": return [3, 30];
665
+ case "TypeNotFoundException": return [3, 32];
666
+ case "com.amazonaws.cloudcontrol#TypeNotFoundException": return [3, 32];
667
+ case "UnsupportedActionException": return [3, 34];
668
+ case "com.amazonaws.cloudcontrol#UnsupportedActionException": return [3, 34];
669
+ }
670
+ return [3, 36];
671
+ case 2: return [4, deserializeAws_json1_0AlreadyExistsExceptionResponse(parsedOutput, context)];
672
+ case 3: throw _d.sent();
673
+ case 4: return [4, deserializeAws_json1_0GeneralServiceExceptionResponse(parsedOutput, context)];
674
+ case 5: throw _d.sent();
675
+ case 6: return [4, deserializeAws_json1_0HandlerFailureExceptionResponse(parsedOutput, context)];
676
+ case 7: throw _d.sent();
677
+ case 8: return [4, deserializeAws_json1_0HandlerInternalFailureExceptionResponse(parsedOutput, context)];
678
+ case 9: throw _d.sent();
679
+ case 10: return [4, deserializeAws_json1_0InvalidCredentialsExceptionResponse(parsedOutput, context)];
680
+ case 11: throw _d.sent();
681
+ case 12: return [4, deserializeAws_json1_0InvalidRequestExceptionResponse(parsedOutput, context)];
682
+ case 13: throw _d.sent();
683
+ case 14: return [4, deserializeAws_json1_0NetworkFailureExceptionResponse(parsedOutput, context)];
684
+ case 15: throw _d.sent();
685
+ case 16: return [4, deserializeAws_json1_0NotStabilizedExceptionResponse(parsedOutput, context)];
686
+ case 17: throw _d.sent();
687
+ case 18: return [4, deserializeAws_json1_0NotUpdatableExceptionResponse(parsedOutput, context)];
688
+ case 19: throw _d.sent();
689
+ case 20: return [4, deserializeAws_json1_0PrivateTypeExceptionResponse(parsedOutput, context)];
690
+ case 21: throw _d.sent();
691
+ case 22: return [4, deserializeAws_json1_0ResourceConflictExceptionResponse(parsedOutput, context)];
692
+ case 23: throw _d.sent();
693
+ case 24: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
694
+ case 25: throw _d.sent();
695
+ case 26: return [4, deserializeAws_json1_0ServiceInternalErrorExceptionResponse(parsedOutput, context)];
696
+ case 27: throw _d.sent();
697
+ case 28: return [4, deserializeAws_json1_0ServiceLimitExceededExceptionResponse(parsedOutput, context)];
698
+ case 29: throw _d.sent();
699
+ case 30: return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
700
+ case 31: throw _d.sent();
701
+ case 32: return [4, deserializeAws_json1_0TypeNotFoundExceptionResponse(parsedOutput, context)];
702
+ case 33: throw _d.sent();
703
+ case 34: return [4, deserializeAws_json1_0UnsupportedActionExceptionResponse(parsedOutput, context)];
704
+ case 35: throw _d.sent();
705
+ case 36:
706
+ parsedBody = parsedOutput.body;
707
+ throwDefaultError({
708
+ output: output,
709
+ parsedBody: parsedBody,
710
+ exceptionCtor: __BaseException,
711
+ errorCode: errorCode,
712
+ });
713
+ _d.label = 37;
714
+ case 37: return [2];
715
+ }
783
716
  });
784
- return __decorateServiceException(exception, body);
785
- };
786
- const serializeAws_json1_0CancelResourceRequestInput = (input, context) => {
787
- return {
788
- ...(input.RequestToken != null && { RequestToken: input.RequestToken }),
789
- };
717
+ }); };
718
+ export var deserializeAws_json1_0UpdateResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
719
+ var data, contents, response;
720
+ return __generator(this, function (_a) {
721
+ switch (_a.label) {
722
+ case 0:
723
+ if (output.statusCode >= 300) {
724
+ return [2, deserializeAws_json1_0UpdateResourceCommandError(output, context)];
725
+ }
726
+ return [4, parseBody(output.body, context)];
727
+ case 1:
728
+ data = _a.sent();
729
+ contents = {};
730
+ contents = deserializeAws_json1_0UpdateResourceOutput(data, context);
731
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
732
+ return [2, Promise.resolve(response)];
733
+ }
734
+ });
735
+ }); };
736
+ var deserializeAws_json1_0UpdateResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
737
+ var parsedOutput, _a, errorCode, _b, parsedBody;
738
+ var _c;
739
+ return __generator(this, function (_d) {
740
+ switch (_d.label) {
741
+ case 0:
742
+ _a = [__assign({}, output)];
743
+ _c = {};
744
+ return [4, parseErrorBody(output.body, context)];
745
+ case 1:
746
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
747
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
748
+ _b = errorCode;
749
+ switch (_b) {
750
+ case "AlreadyExistsException": return [3, 2];
751
+ case "com.amazonaws.cloudcontrol#AlreadyExistsException": return [3, 2];
752
+ case "ClientTokenConflictException": return [3, 4];
753
+ case "com.amazonaws.cloudcontrol#ClientTokenConflictException": return [3, 4];
754
+ case "ConcurrentOperationException": return [3, 6];
755
+ case "com.amazonaws.cloudcontrol#ConcurrentOperationException": return [3, 6];
756
+ case "GeneralServiceException": return [3, 8];
757
+ case "com.amazonaws.cloudcontrol#GeneralServiceException": return [3, 8];
758
+ case "HandlerFailureException": return [3, 10];
759
+ case "com.amazonaws.cloudcontrol#HandlerFailureException": return [3, 10];
760
+ case "HandlerInternalFailureException": return [3, 12];
761
+ case "com.amazonaws.cloudcontrol#HandlerInternalFailureException": return [3, 12];
762
+ case "InvalidCredentialsException": return [3, 14];
763
+ case "com.amazonaws.cloudcontrol#InvalidCredentialsException": return [3, 14];
764
+ case "InvalidRequestException": return [3, 16];
765
+ case "com.amazonaws.cloudcontrol#InvalidRequestException": return [3, 16];
766
+ case "NetworkFailureException": return [3, 18];
767
+ case "com.amazonaws.cloudcontrol#NetworkFailureException": return [3, 18];
768
+ case "NotStabilizedException": return [3, 20];
769
+ case "com.amazonaws.cloudcontrol#NotStabilizedException": return [3, 20];
770
+ case "NotUpdatableException": return [3, 22];
771
+ case "com.amazonaws.cloudcontrol#NotUpdatableException": return [3, 22];
772
+ case "PrivateTypeException": return [3, 24];
773
+ case "com.amazonaws.cloudcontrol#PrivateTypeException": return [3, 24];
774
+ case "ResourceConflictException": return [3, 26];
775
+ case "com.amazonaws.cloudcontrol#ResourceConflictException": return [3, 26];
776
+ case "ResourceNotFoundException": return [3, 28];
777
+ case "com.amazonaws.cloudcontrol#ResourceNotFoundException": return [3, 28];
778
+ case "ServiceInternalErrorException": return [3, 30];
779
+ case "com.amazonaws.cloudcontrol#ServiceInternalErrorException": return [3, 30];
780
+ case "ServiceLimitExceededException": return [3, 32];
781
+ case "com.amazonaws.cloudcontrol#ServiceLimitExceededException": return [3, 32];
782
+ case "ThrottlingException": return [3, 34];
783
+ case "com.amazonaws.cloudcontrol#ThrottlingException": return [3, 34];
784
+ case "TypeNotFoundException": return [3, 36];
785
+ case "com.amazonaws.cloudcontrol#TypeNotFoundException": return [3, 36];
786
+ case "UnsupportedActionException": return [3, 38];
787
+ case "com.amazonaws.cloudcontrol#UnsupportedActionException": return [3, 38];
788
+ }
789
+ return [3, 40];
790
+ case 2: return [4, deserializeAws_json1_0AlreadyExistsExceptionResponse(parsedOutput, context)];
791
+ case 3: throw _d.sent();
792
+ case 4: return [4, deserializeAws_json1_0ClientTokenConflictExceptionResponse(parsedOutput, context)];
793
+ case 5: throw _d.sent();
794
+ case 6: return [4, deserializeAws_json1_0ConcurrentOperationExceptionResponse(parsedOutput, context)];
795
+ case 7: throw _d.sent();
796
+ case 8: return [4, deserializeAws_json1_0GeneralServiceExceptionResponse(parsedOutput, context)];
797
+ case 9: throw _d.sent();
798
+ case 10: return [4, deserializeAws_json1_0HandlerFailureExceptionResponse(parsedOutput, context)];
799
+ case 11: throw _d.sent();
800
+ case 12: return [4, deserializeAws_json1_0HandlerInternalFailureExceptionResponse(parsedOutput, context)];
801
+ case 13: throw _d.sent();
802
+ case 14: return [4, deserializeAws_json1_0InvalidCredentialsExceptionResponse(parsedOutput, context)];
803
+ case 15: throw _d.sent();
804
+ case 16: return [4, deserializeAws_json1_0InvalidRequestExceptionResponse(parsedOutput, context)];
805
+ case 17: throw _d.sent();
806
+ case 18: return [4, deserializeAws_json1_0NetworkFailureExceptionResponse(parsedOutput, context)];
807
+ case 19: throw _d.sent();
808
+ case 20: return [4, deserializeAws_json1_0NotStabilizedExceptionResponse(parsedOutput, context)];
809
+ case 21: throw _d.sent();
810
+ case 22: return [4, deserializeAws_json1_0NotUpdatableExceptionResponse(parsedOutput, context)];
811
+ case 23: throw _d.sent();
812
+ case 24: return [4, deserializeAws_json1_0PrivateTypeExceptionResponse(parsedOutput, context)];
813
+ case 25: throw _d.sent();
814
+ case 26: return [4, deserializeAws_json1_0ResourceConflictExceptionResponse(parsedOutput, context)];
815
+ case 27: throw _d.sent();
816
+ case 28: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
817
+ case 29: throw _d.sent();
818
+ case 30: return [4, deserializeAws_json1_0ServiceInternalErrorExceptionResponse(parsedOutput, context)];
819
+ case 31: throw _d.sent();
820
+ case 32: return [4, deserializeAws_json1_0ServiceLimitExceededExceptionResponse(parsedOutput, context)];
821
+ case 33: throw _d.sent();
822
+ case 34: return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
823
+ case 35: throw _d.sent();
824
+ case 36: return [4, deserializeAws_json1_0TypeNotFoundExceptionResponse(parsedOutput, context)];
825
+ case 37: throw _d.sent();
826
+ case 38: return [4, deserializeAws_json1_0UnsupportedActionExceptionResponse(parsedOutput, context)];
827
+ case 39: throw _d.sent();
828
+ case 40:
829
+ parsedBody = parsedOutput.body;
830
+ throwDefaultError({
831
+ output: output,
832
+ parsedBody: parsedBody,
833
+ exceptionCtor: __BaseException,
834
+ errorCode: errorCode,
835
+ });
836
+ _d.label = 41;
837
+ case 41: return [2];
838
+ }
839
+ });
840
+ }); };
841
+ var deserializeAws_json1_0AlreadyExistsExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
842
+ var body, deserialized, exception;
843
+ return __generator(this, function (_a) {
844
+ body = parsedOutput.body;
845
+ deserialized = deserializeAws_json1_0AlreadyExistsException(body, context);
846
+ exception = new AlreadyExistsException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
847
+ return [2, __decorateServiceException(exception, body)];
848
+ });
849
+ }); };
850
+ var deserializeAws_json1_0ClientTokenConflictExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
851
+ var body, deserialized, exception;
852
+ return __generator(this, function (_a) {
853
+ body = parsedOutput.body;
854
+ deserialized = deserializeAws_json1_0ClientTokenConflictException(body, context);
855
+ exception = new ClientTokenConflictException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
856
+ return [2, __decorateServiceException(exception, body)];
857
+ });
858
+ }); };
859
+ var deserializeAws_json1_0ConcurrentModificationExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
860
+ var body, deserialized, exception;
861
+ return __generator(this, function (_a) {
862
+ body = parsedOutput.body;
863
+ deserialized = deserializeAws_json1_0ConcurrentModificationException(body, context);
864
+ exception = new ConcurrentModificationException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
865
+ return [2, __decorateServiceException(exception, body)];
866
+ });
867
+ }); };
868
+ var deserializeAws_json1_0ConcurrentOperationExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
869
+ var body, deserialized, exception;
870
+ return __generator(this, function (_a) {
871
+ body = parsedOutput.body;
872
+ deserialized = deserializeAws_json1_0ConcurrentOperationException(body, context);
873
+ exception = new ConcurrentOperationException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
874
+ return [2, __decorateServiceException(exception, body)];
875
+ });
876
+ }); };
877
+ var deserializeAws_json1_0GeneralServiceExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
878
+ var body, deserialized, exception;
879
+ return __generator(this, function (_a) {
880
+ body = parsedOutput.body;
881
+ deserialized = deserializeAws_json1_0GeneralServiceException(body, context);
882
+ exception = new GeneralServiceException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
883
+ return [2, __decorateServiceException(exception, body)];
884
+ });
885
+ }); };
886
+ var deserializeAws_json1_0HandlerFailureExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
887
+ var body, deserialized, exception;
888
+ return __generator(this, function (_a) {
889
+ body = parsedOutput.body;
890
+ deserialized = deserializeAws_json1_0HandlerFailureException(body, context);
891
+ exception = new HandlerFailureException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
892
+ return [2, __decorateServiceException(exception, body)];
893
+ });
894
+ }); };
895
+ var deserializeAws_json1_0HandlerInternalFailureExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
896
+ var body, deserialized, exception;
897
+ return __generator(this, function (_a) {
898
+ body = parsedOutput.body;
899
+ deserialized = deserializeAws_json1_0HandlerInternalFailureException(body, context);
900
+ exception = new HandlerInternalFailureException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
901
+ return [2, __decorateServiceException(exception, body)];
902
+ });
903
+ }); };
904
+ var deserializeAws_json1_0InvalidCredentialsExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
905
+ var body, deserialized, exception;
906
+ return __generator(this, function (_a) {
907
+ body = parsedOutput.body;
908
+ deserialized = deserializeAws_json1_0InvalidCredentialsException(body, context);
909
+ exception = new InvalidCredentialsException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
910
+ return [2, __decorateServiceException(exception, body)];
911
+ });
912
+ }); };
913
+ var deserializeAws_json1_0InvalidRequestExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
914
+ var body, deserialized, exception;
915
+ return __generator(this, function (_a) {
916
+ body = parsedOutput.body;
917
+ deserialized = deserializeAws_json1_0InvalidRequestException(body, context);
918
+ exception = new InvalidRequestException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
919
+ return [2, __decorateServiceException(exception, body)];
920
+ });
921
+ }); };
922
+ var deserializeAws_json1_0NetworkFailureExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
923
+ var body, deserialized, exception;
924
+ return __generator(this, function (_a) {
925
+ body = parsedOutput.body;
926
+ deserialized = deserializeAws_json1_0NetworkFailureException(body, context);
927
+ exception = new NetworkFailureException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
928
+ return [2, __decorateServiceException(exception, body)];
929
+ });
930
+ }); };
931
+ var deserializeAws_json1_0NotStabilizedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
932
+ var body, deserialized, exception;
933
+ return __generator(this, function (_a) {
934
+ body = parsedOutput.body;
935
+ deserialized = deserializeAws_json1_0NotStabilizedException(body, context);
936
+ exception = new NotStabilizedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
937
+ return [2, __decorateServiceException(exception, body)];
938
+ });
939
+ }); };
940
+ var deserializeAws_json1_0NotUpdatableExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
941
+ var body, deserialized, exception;
942
+ return __generator(this, function (_a) {
943
+ body = parsedOutput.body;
944
+ deserialized = deserializeAws_json1_0NotUpdatableException(body, context);
945
+ exception = new NotUpdatableException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
946
+ return [2, __decorateServiceException(exception, body)];
947
+ });
948
+ }); };
949
+ var deserializeAws_json1_0PrivateTypeExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
950
+ var body, deserialized, exception;
951
+ return __generator(this, function (_a) {
952
+ body = parsedOutput.body;
953
+ deserialized = deserializeAws_json1_0PrivateTypeException(body, context);
954
+ exception = new PrivateTypeException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
955
+ return [2, __decorateServiceException(exception, body)];
956
+ });
957
+ }); };
958
+ var deserializeAws_json1_0RequestTokenNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
959
+ var body, deserialized, exception;
960
+ return __generator(this, function (_a) {
961
+ body = parsedOutput.body;
962
+ deserialized = deserializeAws_json1_0RequestTokenNotFoundException(body, context);
963
+ exception = new RequestTokenNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
964
+ return [2, __decorateServiceException(exception, body)];
965
+ });
966
+ }); };
967
+ var deserializeAws_json1_0ResourceConflictExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
968
+ var body, deserialized, exception;
969
+ return __generator(this, function (_a) {
970
+ body = parsedOutput.body;
971
+ deserialized = deserializeAws_json1_0ResourceConflictException(body, context);
972
+ exception = new ResourceConflictException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
973
+ return [2, __decorateServiceException(exception, body)];
974
+ });
975
+ }); };
976
+ var deserializeAws_json1_0ResourceNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
977
+ var body, deserialized, exception;
978
+ return __generator(this, function (_a) {
979
+ body = parsedOutput.body;
980
+ deserialized = deserializeAws_json1_0ResourceNotFoundException(body, context);
981
+ exception = new ResourceNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
982
+ return [2, __decorateServiceException(exception, body)];
983
+ });
984
+ }); };
985
+ var deserializeAws_json1_0ServiceInternalErrorExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
986
+ var body, deserialized, exception;
987
+ return __generator(this, function (_a) {
988
+ body = parsedOutput.body;
989
+ deserialized = deserializeAws_json1_0ServiceInternalErrorException(body, context);
990
+ exception = new ServiceInternalErrorException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
991
+ return [2, __decorateServiceException(exception, body)];
992
+ });
993
+ }); };
994
+ var deserializeAws_json1_0ServiceLimitExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
995
+ var body, deserialized, exception;
996
+ return __generator(this, function (_a) {
997
+ body = parsedOutput.body;
998
+ deserialized = deserializeAws_json1_0ServiceLimitExceededException(body, context);
999
+ exception = new ServiceLimitExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1000
+ return [2, __decorateServiceException(exception, body)];
1001
+ });
1002
+ }); };
1003
+ var deserializeAws_json1_0ThrottlingExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1004
+ var body, deserialized, exception;
1005
+ return __generator(this, function (_a) {
1006
+ body = parsedOutput.body;
1007
+ deserialized = deserializeAws_json1_0ThrottlingException(body, context);
1008
+ exception = new ThrottlingException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1009
+ return [2, __decorateServiceException(exception, body)];
1010
+ });
1011
+ }); };
1012
+ var deserializeAws_json1_0TypeNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1013
+ var body, deserialized, exception;
1014
+ return __generator(this, function (_a) {
1015
+ body = parsedOutput.body;
1016
+ deserialized = deserializeAws_json1_0TypeNotFoundException(body, context);
1017
+ exception = new TypeNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1018
+ return [2, __decorateServiceException(exception, body)];
1019
+ });
1020
+ }); };
1021
+ var deserializeAws_json1_0UnsupportedActionExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1022
+ var body, deserialized, exception;
1023
+ return __generator(this, function (_a) {
1024
+ body = parsedOutput.body;
1025
+ deserialized = deserializeAws_json1_0UnsupportedActionException(body, context);
1026
+ exception = new UnsupportedActionException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1027
+ return [2, __decorateServiceException(exception, body)];
1028
+ });
1029
+ }); };
1030
+ var serializeAws_json1_0CancelResourceRequestInput = function (input, context) {
1031
+ return __assign({}, (input.RequestToken != null && { RequestToken: input.RequestToken }));
790
1032
  };
791
- const serializeAws_json1_0CreateResourceInput = (input, context) => {
792
- return {
793
- ClientToken: input.ClientToken ?? generateIdempotencyToken(),
794
- ...(input.DesiredState != null && { DesiredState: input.DesiredState }),
795
- ...(input.RoleArn != null && { RoleArn: input.RoleArn }),
796
- ...(input.TypeName != null && { TypeName: input.TypeName }),
797
- ...(input.TypeVersionId != null && { TypeVersionId: input.TypeVersionId }),
798
- };
1033
+ var serializeAws_json1_0CreateResourceInput = function (input, context) {
1034
+ var _a;
1035
+ return __assign(__assign(__assign(__assign({ ClientToken: (_a = input.ClientToken) !== null && _a !== void 0 ? _a : generateIdempotencyToken() }, (input.DesiredState != null && { DesiredState: input.DesiredState })), (input.RoleArn != null && { RoleArn: input.RoleArn })), (input.TypeName != null && { TypeName: input.TypeName })), (input.TypeVersionId != null && { TypeVersionId: input.TypeVersionId }));
799
1036
  };
800
- const serializeAws_json1_0DeleteResourceInput = (input, context) => {
801
- return {
802
- ClientToken: input.ClientToken ?? generateIdempotencyToken(),
803
- ...(input.Identifier != null && { Identifier: input.Identifier }),
804
- ...(input.RoleArn != null && { RoleArn: input.RoleArn }),
805
- ...(input.TypeName != null && { TypeName: input.TypeName }),
806
- ...(input.TypeVersionId != null && { TypeVersionId: input.TypeVersionId }),
807
- };
1037
+ var serializeAws_json1_0DeleteResourceInput = function (input, context) {
1038
+ var _a;
1039
+ return __assign(__assign(__assign(__assign({ ClientToken: (_a = input.ClientToken) !== null && _a !== void 0 ? _a : generateIdempotencyToken() }, (input.Identifier != null && { Identifier: input.Identifier })), (input.RoleArn != null && { RoleArn: input.RoleArn })), (input.TypeName != null && { TypeName: input.TypeName })), (input.TypeVersionId != null && { TypeVersionId: input.TypeVersionId }));
808
1040
  };
809
- const serializeAws_json1_0GetResourceInput = (input, context) => {
810
- return {
811
- ...(input.Identifier != null && { Identifier: input.Identifier }),
812
- ...(input.RoleArn != null && { RoleArn: input.RoleArn }),
813
- ...(input.TypeName != null && { TypeName: input.TypeName }),
814
- ...(input.TypeVersionId != null && { TypeVersionId: input.TypeVersionId }),
815
- };
1041
+ var serializeAws_json1_0GetResourceInput = function (input, context) {
1042
+ return __assign(__assign(__assign(__assign({}, (input.Identifier != null && { Identifier: input.Identifier })), (input.RoleArn != null && { RoleArn: input.RoleArn })), (input.TypeName != null && { TypeName: input.TypeName })), (input.TypeVersionId != null && { TypeVersionId: input.TypeVersionId }));
816
1043
  };
817
- const serializeAws_json1_0GetResourceRequestStatusInput = (input, context) => {
818
- return {
819
- ...(input.RequestToken != null && { RequestToken: input.RequestToken }),
820
- };
1044
+ var serializeAws_json1_0GetResourceRequestStatusInput = function (input, context) {
1045
+ return __assign({}, (input.RequestToken != null && { RequestToken: input.RequestToken }));
821
1046
  };
822
- const serializeAws_json1_0ListResourceRequestsInput = (input, context) => {
823
- return {
824
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
825
- ...(input.NextToken != null && { NextToken: input.NextToken }),
826
- ...(input.ResourceRequestStatusFilter != null && {
827
- ResourceRequestStatusFilter: serializeAws_json1_0ResourceRequestStatusFilter(input.ResourceRequestStatusFilter, context),
828
- }),
829
- };
1047
+ var serializeAws_json1_0ListResourceRequestsInput = function (input, context) {
1048
+ return __assign(__assign(__assign({}, (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken })), (input.ResourceRequestStatusFilter != null && {
1049
+ ResourceRequestStatusFilter: serializeAws_json1_0ResourceRequestStatusFilter(input.ResourceRequestStatusFilter, context),
1050
+ }));
830
1051
  };
831
- const serializeAws_json1_0ListResourcesInput = (input, context) => {
832
- return {
833
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
834
- ...(input.NextToken != null && { NextToken: input.NextToken }),
835
- ...(input.ResourceModel != null && { ResourceModel: input.ResourceModel }),
836
- ...(input.RoleArn != null && { RoleArn: input.RoleArn }),
837
- ...(input.TypeName != null && { TypeName: input.TypeName }),
838
- ...(input.TypeVersionId != null && { TypeVersionId: input.TypeVersionId }),
839
- };
1052
+ var serializeAws_json1_0ListResourcesInput = function (input, context) {
1053
+ return __assign(__assign(__assign(__assign(__assign(__assign({}, (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken })), (input.ResourceModel != null && { ResourceModel: input.ResourceModel })), (input.RoleArn != null && { RoleArn: input.RoleArn })), (input.TypeName != null && { TypeName: input.TypeName })), (input.TypeVersionId != null && { TypeVersionId: input.TypeVersionId }));
840
1054
  };
841
- const serializeAws_json1_0Operations = (input, context) => {
1055
+ var serializeAws_json1_0Operations = function (input, context) {
842
1056
  return input
843
- .filter((e) => e != null)
844
- .map((entry) => {
1057
+ .filter(function (e) { return e != null; })
1058
+ .map(function (entry) {
845
1059
  return entry;
846
1060
  });
847
1061
  };
848
- const serializeAws_json1_0OperationStatuses = (input, context) => {
1062
+ var serializeAws_json1_0OperationStatuses = function (input, context) {
849
1063
  return input
850
- .filter((e) => e != null)
851
- .map((entry) => {
1064
+ .filter(function (e) { return e != null; })
1065
+ .map(function (entry) {
852
1066
  return entry;
853
1067
  });
854
1068
  };
855
- const serializeAws_json1_0ResourceRequestStatusFilter = (input, context) => {
856
- return {
857
- ...(input.OperationStatuses != null && {
858
- OperationStatuses: serializeAws_json1_0OperationStatuses(input.OperationStatuses, context),
859
- }),
860
- ...(input.Operations != null && { Operations: serializeAws_json1_0Operations(input.Operations, context) }),
861
- };
1069
+ var serializeAws_json1_0ResourceRequestStatusFilter = function (input, context) {
1070
+ return __assign(__assign({}, (input.OperationStatuses != null && {
1071
+ OperationStatuses: serializeAws_json1_0OperationStatuses(input.OperationStatuses, context),
1072
+ })), (input.Operations != null && { Operations: serializeAws_json1_0Operations(input.Operations, context) }));
862
1073
  };
863
- const serializeAws_json1_0UpdateResourceInput = (input, context) => {
864
- return {
865
- ClientToken: input.ClientToken ?? generateIdempotencyToken(),
866
- ...(input.Identifier != null && { Identifier: input.Identifier }),
867
- ...(input.PatchDocument != null && { PatchDocument: input.PatchDocument }),
868
- ...(input.RoleArn != null && { RoleArn: input.RoleArn }),
869
- ...(input.TypeName != null && { TypeName: input.TypeName }),
870
- ...(input.TypeVersionId != null && { TypeVersionId: input.TypeVersionId }),
871
- };
1074
+ var serializeAws_json1_0UpdateResourceInput = function (input, context) {
1075
+ var _a;
1076
+ return __assign(__assign(__assign(__assign(__assign({ ClientToken: (_a = input.ClientToken) !== null && _a !== void 0 ? _a : generateIdempotencyToken() }, (input.Identifier != null && { Identifier: input.Identifier })), (input.PatchDocument != null && { PatchDocument: input.PatchDocument })), (input.RoleArn != null && { RoleArn: input.RoleArn })), (input.TypeName != null && { TypeName: input.TypeName })), (input.TypeVersionId != null && { TypeVersionId: input.TypeVersionId }));
872
1077
  };
873
- const deserializeAws_json1_0AlreadyExistsException = (output, context) => {
1078
+ var deserializeAws_json1_0AlreadyExistsException = function (output, context) {
874
1079
  return {
875
1080
  Message: __expectString(output.Message),
876
1081
  };
877
1082
  };
878
- const deserializeAws_json1_0CancelResourceRequestOutput = (output, context) => {
1083
+ var deserializeAws_json1_0CancelResourceRequestOutput = function (output, context) {
879
1084
  return {
880
1085
  ProgressEvent: output.ProgressEvent != null ? deserializeAws_json1_0ProgressEvent(output.ProgressEvent, context) : undefined,
881
1086
  };
882
1087
  };
883
- const deserializeAws_json1_0ClientTokenConflictException = (output, context) => {
1088
+ var deserializeAws_json1_0ClientTokenConflictException = function (output, context) {
884
1089
  return {
885
1090
  Message: __expectString(output.Message),
886
1091
  };
887
1092
  };
888
- const deserializeAws_json1_0ConcurrentModificationException = (output, context) => {
1093
+ var deserializeAws_json1_0ConcurrentModificationException = function (output, context) {
889
1094
  return {
890
1095
  Message: __expectString(output.Message),
891
1096
  };
892
1097
  };
893
- const deserializeAws_json1_0ConcurrentOperationException = (output, context) => {
1098
+ var deserializeAws_json1_0ConcurrentOperationException = function (output, context) {
894
1099
  return {
895
1100
  Message: __expectString(output.Message),
896
1101
  };
897
1102
  };
898
- const deserializeAws_json1_0CreateResourceOutput = (output, context) => {
1103
+ var deserializeAws_json1_0CreateResourceOutput = function (output, context) {
899
1104
  return {
900
1105
  ProgressEvent: output.ProgressEvent != null ? deserializeAws_json1_0ProgressEvent(output.ProgressEvent, context) : undefined,
901
1106
  };
902
1107
  };
903
- const deserializeAws_json1_0DeleteResourceOutput = (output, context) => {
1108
+ var deserializeAws_json1_0DeleteResourceOutput = function (output, context) {
904
1109
  return {
905
1110
  ProgressEvent: output.ProgressEvent != null ? deserializeAws_json1_0ProgressEvent(output.ProgressEvent, context) : undefined,
906
1111
  };
907
1112
  };
908
- const deserializeAws_json1_0GeneralServiceException = (output, context) => {
1113
+ var deserializeAws_json1_0GeneralServiceException = function (output, context) {
909
1114
  return {
910
1115
  Message: __expectString(output.Message),
911
1116
  };
912
1117
  };
913
- const deserializeAws_json1_0GetResourceOutput = (output, context) => {
1118
+ var deserializeAws_json1_0GetResourceOutput = function (output, context) {
914
1119
  return {
915
1120
  ResourceDescription: output.ResourceDescription != null
916
1121
  ? deserializeAws_json1_0ResourceDescription(output.ResourceDescription, context)
@@ -918,32 +1123,32 @@ const deserializeAws_json1_0GetResourceOutput = (output, context) => {
918
1123
  TypeName: __expectString(output.TypeName),
919
1124
  };
920
1125
  };
921
- const deserializeAws_json1_0GetResourceRequestStatusOutput = (output, context) => {
1126
+ var deserializeAws_json1_0GetResourceRequestStatusOutput = function (output, context) {
922
1127
  return {
923
1128
  ProgressEvent: output.ProgressEvent != null ? deserializeAws_json1_0ProgressEvent(output.ProgressEvent, context) : undefined,
924
1129
  };
925
1130
  };
926
- const deserializeAws_json1_0HandlerFailureException = (output, context) => {
1131
+ var deserializeAws_json1_0HandlerFailureException = function (output, context) {
927
1132
  return {
928
1133
  Message: __expectString(output.Message),
929
1134
  };
930
1135
  };
931
- const deserializeAws_json1_0HandlerInternalFailureException = (output, context) => {
1136
+ var deserializeAws_json1_0HandlerInternalFailureException = function (output, context) {
932
1137
  return {
933
1138
  Message: __expectString(output.Message),
934
1139
  };
935
1140
  };
936
- const deserializeAws_json1_0InvalidCredentialsException = (output, context) => {
1141
+ var deserializeAws_json1_0InvalidCredentialsException = function (output, context) {
937
1142
  return {
938
1143
  Message: __expectString(output.Message),
939
1144
  };
940
1145
  };
941
- const deserializeAws_json1_0InvalidRequestException = (output, context) => {
1146
+ var deserializeAws_json1_0InvalidRequestException = function (output, context) {
942
1147
  return {
943
1148
  Message: __expectString(output.Message),
944
1149
  };
945
1150
  };
946
- const deserializeAws_json1_0ListResourceRequestsOutput = (output, context) => {
1151
+ var deserializeAws_json1_0ListResourceRequestsOutput = function (output, context) {
947
1152
  return {
948
1153
  NextToken: __expectString(output.NextToken),
949
1154
  ResourceRequestStatusSummaries: output.ResourceRequestStatusSummaries != null
@@ -951,7 +1156,7 @@ const deserializeAws_json1_0ListResourceRequestsOutput = (output, context) => {
951
1156
  : undefined,
952
1157
  };
953
1158
  };
954
- const deserializeAws_json1_0ListResourcesOutput = (output, context) => {
1159
+ var deserializeAws_json1_0ListResourcesOutput = function (output, context) {
955
1160
  return {
956
1161
  NextToken: __expectString(output.NextToken),
957
1162
  ResourceDescriptions: output.ResourceDescriptions != null
@@ -960,27 +1165,27 @@ const deserializeAws_json1_0ListResourcesOutput = (output, context) => {
960
1165
  TypeName: __expectString(output.TypeName),
961
1166
  };
962
1167
  };
963
- const deserializeAws_json1_0NetworkFailureException = (output, context) => {
1168
+ var deserializeAws_json1_0NetworkFailureException = function (output, context) {
964
1169
  return {
965
1170
  Message: __expectString(output.Message),
966
1171
  };
967
1172
  };
968
- const deserializeAws_json1_0NotStabilizedException = (output, context) => {
1173
+ var deserializeAws_json1_0NotStabilizedException = function (output, context) {
969
1174
  return {
970
1175
  Message: __expectString(output.Message),
971
1176
  };
972
1177
  };
973
- const deserializeAws_json1_0NotUpdatableException = (output, context) => {
1178
+ var deserializeAws_json1_0NotUpdatableException = function (output, context) {
974
1179
  return {
975
1180
  Message: __expectString(output.Message),
976
1181
  };
977
1182
  };
978
- const deserializeAws_json1_0PrivateTypeException = (output, context) => {
1183
+ var deserializeAws_json1_0PrivateTypeException = function (output, context) {
979
1184
  return {
980
1185
  Message: __expectString(output.Message),
981
1186
  };
982
1187
  };
983
- const deserializeAws_json1_0ProgressEvent = (output, context) => {
1188
+ var deserializeAws_json1_0ProgressEvent = function (output, context) {
984
1189
  return {
985
1190
  ErrorCode: __expectString(output.ErrorCode),
986
1191
  EventTime: output.EventTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EventTime))) : undefined,
@@ -994,26 +1199,26 @@ const deserializeAws_json1_0ProgressEvent = (output, context) => {
994
1199
  TypeName: __expectString(output.TypeName),
995
1200
  };
996
1201
  };
997
- const deserializeAws_json1_0RequestTokenNotFoundException = (output, context) => {
1202
+ var deserializeAws_json1_0RequestTokenNotFoundException = function (output, context) {
998
1203
  return {
999
1204
  Message: __expectString(output.Message),
1000
1205
  };
1001
1206
  };
1002
- const deserializeAws_json1_0ResourceConflictException = (output, context) => {
1207
+ var deserializeAws_json1_0ResourceConflictException = function (output, context) {
1003
1208
  return {
1004
1209
  Message: __expectString(output.Message),
1005
1210
  };
1006
1211
  };
1007
- const deserializeAws_json1_0ResourceDescription = (output, context) => {
1212
+ var deserializeAws_json1_0ResourceDescription = function (output, context) {
1008
1213
  return {
1009
1214
  Identifier: __expectString(output.Identifier),
1010
1215
  Properties: __expectString(output.Properties),
1011
1216
  };
1012
1217
  };
1013
- const deserializeAws_json1_0ResourceDescriptions = (output, context) => {
1014
- const retVal = (output || [])
1015
- .filter((e) => e != null)
1016
- .map((entry) => {
1218
+ var deserializeAws_json1_0ResourceDescriptions = function (output, context) {
1219
+ var retVal = (output || [])
1220
+ .filter(function (e) { return e != null; })
1221
+ .map(function (entry) {
1017
1222
  if (entry === null) {
1018
1223
  return null;
1019
1224
  }
@@ -1021,15 +1226,15 @@ const deserializeAws_json1_0ResourceDescriptions = (output, context) => {
1021
1226
  });
1022
1227
  return retVal;
1023
1228
  };
1024
- const deserializeAws_json1_0ResourceNotFoundException = (output, context) => {
1229
+ var deserializeAws_json1_0ResourceNotFoundException = function (output, context) {
1025
1230
  return {
1026
1231
  Message: __expectString(output.Message),
1027
1232
  };
1028
1233
  };
1029
- const deserializeAws_json1_0ResourceRequestStatusSummaries = (output, context) => {
1030
- const retVal = (output || [])
1031
- .filter((e) => e != null)
1032
- .map((entry) => {
1234
+ var deserializeAws_json1_0ResourceRequestStatusSummaries = function (output, context) {
1235
+ var retVal = (output || [])
1236
+ .filter(function (e) { return e != null; })
1237
+ .map(function (entry) {
1033
1238
  if (entry === null) {
1034
1239
  return null;
1035
1240
  }
@@ -1037,82 +1242,105 @@ const deserializeAws_json1_0ResourceRequestStatusSummaries = (output, context) =
1037
1242
  });
1038
1243
  return retVal;
1039
1244
  };
1040
- const deserializeAws_json1_0ServiceInternalErrorException = (output, context) => {
1245
+ var deserializeAws_json1_0ServiceInternalErrorException = function (output, context) {
1041
1246
  return {
1042
1247
  Message: __expectString(output.Message),
1043
1248
  };
1044
1249
  };
1045
- const deserializeAws_json1_0ServiceLimitExceededException = (output, context) => {
1250
+ var deserializeAws_json1_0ServiceLimitExceededException = function (output, context) {
1046
1251
  return {
1047
1252
  Message: __expectString(output.Message),
1048
1253
  };
1049
1254
  };
1050
- const deserializeAws_json1_0ThrottlingException = (output, context) => {
1255
+ var deserializeAws_json1_0ThrottlingException = function (output, context) {
1051
1256
  return {
1052
1257
  Message: __expectString(output.Message),
1053
1258
  };
1054
1259
  };
1055
- const deserializeAws_json1_0TypeNotFoundException = (output, context) => {
1260
+ var deserializeAws_json1_0TypeNotFoundException = function (output, context) {
1056
1261
  return {
1057
1262
  Message: __expectString(output.Message),
1058
1263
  };
1059
1264
  };
1060
- const deserializeAws_json1_0UnsupportedActionException = (output, context) => {
1265
+ var deserializeAws_json1_0UnsupportedActionException = function (output, context) {
1061
1266
  return {
1062
1267
  Message: __expectString(output.Message),
1063
1268
  };
1064
1269
  };
1065
- const deserializeAws_json1_0UpdateResourceOutput = (output, context) => {
1270
+ var deserializeAws_json1_0UpdateResourceOutput = function (output, context) {
1066
1271
  return {
1067
1272
  ProgressEvent: output.ProgressEvent != null ? deserializeAws_json1_0ProgressEvent(output.ProgressEvent, context) : undefined,
1068
1273
  };
1069
1274
  };
1070
- const deserializeMetadata = (output) => ({
1071
- httpStatusCode: output.statusCode,
1072
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
1073
- extendedRequestId: output.headers["x-amz-id-2"],
1074
- cfId: output.headers["x-amz-cf-id"],
1075
- });
1076
- const collectBody = (streamBody = new Uint8Array(), context) => {
1275
+ var deserializeMetadata = function (output) {
1276
+ var _a, _b;
1277
+ return ({
1278
+ httpStatusCode: output.statusCode,
1279
+ requestId: (_b = (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"]) !== null && _b !== void 0 ? _b : output.headers["x-amz-request-id"],
1280
+ extendedRequestId: output.headers["x-amz-id-2"],
1281
+ cfId: output.headers["x-amz-cf-id"],
1282
+ });
1283
+ };
1284
+ var collectBody = function (streamBody, context) {
1285
+ if (streamBody === void 0) { streamBody = new Uint8Array(); }
1077
1286
  if (streamBody instanceof Uint8Array) {
1078
1287
  return Promise.resolve(streamBody);
1079
1288
  }
1080
1289
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
1081
1290
  };
1082
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
1083
- const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
1084
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1085
- const contents = {
1086
- protocol,
1087
- hostname,
1088
- port,
1089
- method: "POST",
1090
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
1091
- headers,
1092
- };
1093
- if (resolvedHostname !== undefined) {
1094
- contents.hostname = resolvedHostname;
1095
- }
1096
- if (body !== undefined) {
1097
- contents.body = body;
1098
- }
1099
- return new __HttpRequest(contents);
1100
- };
1101
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1102
- if (encoded.length) {
1103
- return JSON.parse(encoded);
1104
- }
1105
- return {};
1106
- });
1107
- const parseErrorBody = async (errorBody, context) => {
1108
- const value = await parseBody(errorBody, context);
1109
- value.message = value.message ?? value.Message;
1110
- return value;
1291
+ var collectBodyString = function (streamBody, context) {
1292
+ return collectBody(streamBody, context).then(function (body) { return context.utf8Encoder(body); });
1293
+ };
1294
+ var buildHttpRpcRequest = function (context, headers, path, resolvedHostname, body) { return __awaiter(void 0, void 0, void 0, function () {
1295
+ var _a, hostname, _b, protocol, port, basePath, contents;
1296
+ return __generator(this, function (_c) {
1297
+ switch (_c.label) {
1298
+ case 0: return [4, context.endpoint()];
1299
+ case 1:
1300
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
1301
+ contents = {
1302
+ protocol: protocol,
1303
+ hostname: hostname,
1304
+ port: port,
1305
+ method: "POST",
1306
+ path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
1307
+ headers: headers,
1308
+ };
1309
+ if (resolvedHostname !== undefined) {
1310
+ contents.hostname = resolvedHostname;
1311
+ }
1312
+ if (body !== undefined) {
1313
+ contents.body = body;
1314
+ }
1315
+ return [2, new __HttpRequest(contents)];
1316
+ }
1317
+ });
1318
+ }); };
1319
+ var parseBody = function (streamBody, context) {
1320
+ return collectBodyString(streamBody, context).then(function (encoded) {
1321
+ if (encoded.length) {
1322
+ return JSON.parse(encoded);
1323
+ }
1324
+ return {};
1325
+ });
1111
1326
  };
1112
- const loadRestJsonErrorCode = (output, data) => {
1113
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
1114
- const sanitizeErrorCode = (rawValue) => {
1115
- let cleanValue = rawValue;
1327
+ var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
1328
+ var value;
1329
+ var _a;
1330
+ return __generator(this, function (_b) {
1331
+ switch (_b.label) {
1332
+ case 0: return [4, parseBody(errorBody, context)];
1333
+ case 1:
1334
+ value = _b.sent();
1335
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
1336
+ return [2, value];
1337
+ }
1338
+ });
1339
+ }); };
1340
+ var loadRestJsonErrorCode = function (output, data) {
1341
+ var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
1342
+ var sanitizeErrorCode = function (rawValue) {
1343
+ var cleanValue = rawValue;
1116
1344
  if (typeof cleanValue === "number") {
1117
1345
  cleanValue = cleanValue.toString();
1118
1346
  }
@@ -1127,7 +1355,7 @@ const loadRestJsonErrorCode = (output, data) => {
1127
1355
  }
1128
1356
  return cleanValue;
1129
1357
  };
1130
- const headerKey = findKey(output.headers, "x-amzn-errortype");
1358
+ var headerKey = findKey(output.headers, "x-amzn-errortype");
1131
1359
  if (headerKey !== undefined) {
1132
1360
  return sanitizeErrorCode(output.headers[headerKey]);
1133
1361
  }