@aws-sdk/client-codestar-connections 3.186.0 → 3.190.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/dist-es/CodeStarConnections.js +50 -57
- package/dist-es/CodeStarConnectionsClient.js +22 -28
- package/dist-es/commands/CreateConnectionCommand.js +21 -28
- package/dist-es/commands/CreateHostCommand.js +21 -28
- package/dist-es/commands/DeleteConnectionCommand.js +21 -28
- package/dist-es/commands/DeleteHostCommand.js +21 -28
- package/dist-es/commands/GetConnectionCommand.js +21 -28
- package/dist-es/commands/GetHostCommand.js +21 -28
- package/dist-es/commands/ListConnectionsCommand.js +21 -28
- package/dist-es/commands/ListHostsCommand.js +21 -28
- package/dist-es/commands/ListTagsForResourceCommand.js +21 -28
- package/dist-es/commands/TagResourceCommand.js +21 -28
- package/dist-es/commands/UntagResourceCommand.js +21 -28
- package/dist-es/commands/UpdateHostCommand.js +21 -28
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/CodeStarConnectionsServiceException.js +5 -10
- package/dist-es/models/models_0.js +144 -89
- package/dist-es/pagination/ListConnectionsPaginator.js +25 -68
- package/dist-es/pagination/ListHostsPaginator.js +25 -68
- package/dist-es/protocols/Aws_json1_0.js +734 -952
- package/dist-es/runtimeConfig.browser.js +26 -12
- package/dist-es/runtimeConfig.js +30 -12
- package/dist-es/runtimeConfig.native.js +8 -5
- package/dist-es/runtimeConfig.shared.js +8 -11
- package/package.json +33 -33
|
@@ -1,895 +1,700 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
1
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
3
2
|
import { decorateServiceException as __decorateServiceException, expectString as __expectString, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
4
3
|
import { CodeStarConnectionsServiceException as __BaseException } from "../models/CodeStarConnectionsServiceException";
|
|
5
4
|
import { ConflictException, LimitExceededException, ResourceNotFoundException, ResourceUnavailableException, UnsupportedOperationException, } from "../models/models_0";
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
return
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
}
|
|
105
|
-
export
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
});
|
|
353
|
-
}
|
|
354
|
-
export
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
}
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
}
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
});
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
return [4, parseErrorBody(output.body, context)];
|
|
532
|
-
case 1:
|
|
533
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_b.body = _c.sent(), _b)]));
|
|
534
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
535
|
-
parsedBody = parsedOutput.body;
|
|
536
|
-
throwDefaultError({
|
|
537
|
-
output: output,
|
|
538
|
-
parsedBody: parsedBody,
|
|
539
|
-
exceptionCtor: __BaseException,
|
|
540
|
-
errorCode: errorCode,
|
|
541
|
-
});
|
|
542
|
-
return [2];
|
|
543
|
-
}
|
|
544
|
-
});
|
|
545
|
-
}); };
|
|
546
|
-
export var deserializeAws_json1_0ListTagsForResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
547
|
-
var data, contents, response;
|
|
548
|
-
return __generator(this, function (_a) {
|
|
549
|
-
switch (_a.label) {
|
|
550
|
-
case 0:
|
|
551
|
-
if (output.statusCode >= 300) {
|
|
552
|
-
return [2, deserializeAws_json1_0ListTagsForResourceCommandError(output, context)];
|
|
553
|
-
}
|
|
554
|
-
return [4, parseBody(output.body, context)];
|
|
555
|
-
case 1:
|
|
556
|
-
data = _a.sent();
|
|
557
|
-
contents = {};
|
|
558
|
-
contents = deserializeAws_json1_0ListTagsForResourceOutput(data, context);
|
|
559
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
560
|
-
return [2, Promise.resolve(response)];
|
|
561
|
-
}
|
|
562
|
-
});
|
|
563
|
-
}); };
|
|
564
|
-
var deserializeAws_json1_0ListTagsForResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
565
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
566
|
-
var _c;
|
|
567
|
-
return __generator(this, function (_d) {
|
|
568
|
-
switch (_d.label) {
|
|
569
|
-
case 0:
|
|
570
|
-
_a = [__assign({}, output)];
|
|
571
|
-
_c = {};
|
|
572
|
-
return [4, parseErrorBody(output.body, context)];
|
|
573
|
-
case 1:
|
|
574
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
575
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
576
|
-
_b = errorCode;
|
|
577
|
-
switch (_b) {
|
|
578
|
-
case "ResourceNotFoundException": return [3, 2];
|
|
579
|
-
case "com.amazonaws.codestarconnections#ResourceNotFoundException": return [3, 2];
|
|
580
|
-
}
|
|
581
|
-
return [3, 4];
|
|
582
|
-
case 2: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
583
|
-
case 3: throw _d.sent();
|
|
584
|
-
case 4:
|
|
585
|
-
parsedBody = parsedOutput.body;
|
|
586
|
-
throwDefaultError({
|
|
587
|
-
output: output,
|
|
588
|
-
parsedBody: parsedBody,
|
|
589
|
-
exceptionCtor: __BaseException,
|
|
590
|
-
errorCode: errorCode,
|
|
591
|
-
});
|
|
592
|
-
_d.label = 5;
|
|
593
|
-
case 5: return [2];
|
|
594
|
-
}
|
|
595
|
-
});
|
|
596
|
-
}); };
|
|
597
|
-
export var deserializeAws_json1_0TagResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
598
|
-
var data, contents, response;
|
|
599
|
-
return __generator(this, function (_a) {
|
|
600
|
-
switch (_a.label) {
|
|
601
|
-
case 0:
|
|
602
|
-
if (output.statusCode >= 300) {
|
|
603
|
-
return [2, deserializeAws_json1_0TagResourceCommandError(output, context)];
|
|
604
|
-
}
|
|
605
|
-
return [4, parseBody(output.body, context)];
|
|
606
|
-
case 1:
|
|
607
|
-
data = _a.sent();
|
|
608
|
-
contents = {};
|
|
609
|
-
contents = deserializeAws_json1_0TagResourceOutput(data, context);
|
|
610
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
611
|
-
return [2, Promise.resolve(response)];
|
|
612
|
-
}
|
|
613
|
-
});
|
|
614
|
-
}); };
|
|
615
|
-
var deserializeAws_json1_0TagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
616
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
617
|
-
var _c;
|
|
618
|
-
return __generator(this, function (_d) {
|
|
619
|
-
switch (_d.label) {
|
|
620
|
-
case 0:
|
|
621
|
-
_a = [__assign({}, output)];
|
|
622
|
-
_c = {};
|
|
623
|
-
return [4, parseErrorBody(output.body, context)];
|
|
624
|
-
case 1:
|
|
625
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
626
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
627
|
-
_b = errorCode;
|
|
628
|
-
switch (_b) {
|
|
629
|
-
case "LimitExceededException": return [3, 2];
|
|
630
|
-
case "com.amazonaws.codestarconnections#LimitExceededException": return [3, 2];
|
|
631
|
-
case "ResourceNotFoundException": return [3, 4];
|
|
632
|
-
case "com.amazonaws.codestarconnections#ResourceNotFoundException": return [3, 4];
|
|
633
|
-
}
|
|
634
|
-
return [3, 6];
|
|
635
|
-
case 2: return [4, deserializeAws_json1_0LimitExceededExceptionResponse(parsedOutput, context)];
|
|
636
|
-
case 3: throw _d.sent();
|
|
637
|
-
case 4: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
638
|
-
case 5: throw _d.sent();
|
|
639
|
-
case 6:
|
|
640
|
-
parsedBody = parsedOutput.body;
|
|
641
|
-
throwDefaultError({
|
|
642
|
-
output: output,
|
|
643
|
-
parsedBody: parsedBody,
|
|
644
|
-
exceptionCtor: __BaseException,
|
|
645
|
-
errorCode: errorCode,
|
|
646
|
-
});
|
|
647
|
-
_d.label = 7;
|
|
648
|
-
case 7: return [2];
|
|
649
|
-
}
|
|
650
|
-
});
|
|
651
|
-
}); };
|
|
652
|
-
export var deserializeAws_json1_0UntagResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
653
|
-
var data, contents, response;
|
|
654
|
-
return __generator(this, function (_a) {
|
|
655
|
-
switch (_a.label) {
|
|
656
|
-
case 0:
|
|
657
|
-
if (output.statusCode >= 300) {
|
|
658
|
-
return [2, deserializeAws_json1_0UntagResourceCommandError(output, context)];
|
|
659
|
-
}
|
|
660
|
-
return [4, parseBody(output.body, context)];
|
|
661
|
-
case 1:
|
|
662
|
-
data = _a.sent();
|
|
663
|
-
contents = {};
|
|
664
|
-
contents = deserializeAws_json1_0UntagResourceOutput(data, context);
|
|
665
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
666
|
-
return [2, Promise.resolve(response)];
|
|
667
|
-
}
|
|
668
|
-
});
|
|
669
|
-
}); };
|
|
670
|
-
var deserializeAws_json1_0UntagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
671
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
672
|
-
var _c;
|
|
673
|
-
return __generator(this, function (_d) {
|
|
674
|
-
switch (_d.label) {
|
|
675
|
-
case 0:
|
|
676
|
-
_a = [__assign({}, output)];
|
|
677
|
-
_c = {};
|
|
678
|
-
return [4, parseErrorBody(output.body, context)];
|
|
679
|
-
case 1:
|
|
680
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
681
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
682
|
-
_b = errorCode;
|
|
683
|
-
switch (_b) {
|
|
684
|
-
case "ResourceNotFoundException": return [3, 2];
|
|
685
|
-
case "com.amazonaws.codestarconnections#ResourceNotFoundException": return [3, 2];
|
|
686
|
-
}
|
|
687
|
-
return [3, 4];
|
|
688
|
-
case 2: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
689
|
-
case 3: throw _d.sent();
|
|
690
|
-
case 4:
|
|
691
|
-
parsedBody = parsedOutput.body;
|
|
692
|
-
throwDefaultError({
|
|
693
|
-
output: output,
|
|
694
|
-
parsedBody: parsedBody,
|
|
695
|
-
exceptionCtor: __BaseException,
|
|
696
|
-
errorCode: errorCode,
|
|
697
|
-
});
|
|
698
|
-
_d.label = 5;
|
|
699
|
-
case 5: return [2];
|
|
700
|
-
}
|
|
701
|
-
});
|
|
702
|
-
}); };
|
|
703
|
-
export var deserializeAws_json1_0UpdateHostCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
704
|
-
var data, contents, response;
|
|
705
|
-
return __generator(this, function (_a) {
|
|
706
|
-
switch (_a.label) {
|
|
707
|
-
case 0:
|
|
708
|
-
if (output.statusCode >= 300) {
|
|
709
|
-
return [2, deserializeAws_json1_0UpdateHostCommandError(output, context)];
|
|
710
|
-
}
|
|
711
|
-
return [4, parseBody(output.body, context)];
|
|
712
|
-
case 1:
|
|
713
|
-
data = _a.sent();
|
|
714
|
-
contents = {};
|
|
715
|
-
contents = deserializeAws_json1_0UpdateHostOutput(data, context);
|
|
716
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
717
|
-
return [2, Promise.resolve(response)];
|
|
718
|
-
}
|
|
719
|
-
});
|
|
720
|
-
}); };
|
|
721
|
-
var deserializeAws_json1_0UpdateHostCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
722
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
723
|
-
var _c;
|
|
724
|
-
return __generator(this, function (_d) {
|
|
725
|
-
switch (_d.label) {
|
|
726
|
-
case 0:
|
|
727
|
-
_a = [__assign({}, output)];
|
|
728
|
-
_c = {};
|
|
729
|
-
return [4, parseErrorBody(output.body, context)];
|
|
730
|
-
case 1:
|
|
731
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
732
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
733
|
-
_b = errorCode;
|
|
734
|
-
switch (_b) {
|
|
735
|
-
case "ConflictException": return [3, 2];
|
|
736
|
-
case "com.amazonaws.codestarconnections#ConflictException": return [3, 2];
|
|
737
|
-
case "ResourceNotFoundException": return [3, 4];
|
|
738
|
-
case "com.amazonaws.codestarconnections#ResourceNotFoundException": return [3, 4];
|
|
739
|
-
case "ResourceUnavailableException": return [3, 6];
|
|
740
|
-
case "com.amazonaws.codestarconnections#ResourceUnavailableException": return [3, 6];
|
|
741
|
-
case "UnsupportedOperationException": return [3, 8];
|
|
742
|
-
case "com.amazonaws.codestarconnections#UnsupportedOperationException": return [3, 8];
|
|
743
|
-
}
|
|
744
|
-
return [3, 10];
|
|
745
|
-
case 2: return [4, deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context)];
|
|
746
|
-
case 3: throw _d.sent();
|
|
747
|
-
case 4: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
748
|
-
case 5: throw _d.sent();
|
|
749
|
-
case 6: return [4, deserializeAws_json1_0ResourceUnavailableExceptionResponse(parsedOutput, context)];
|
|
750
|
-
case 7: throw _d.sent();
|
|
751
|
-
case 8: return [4, deserializeAws_json1_0UnsupportedOperationExceptionResponse(parsedOutput, context)];
|
|
752
|
-
case 9: throw _d.sent();
|
|
753
|
-
case 10:
|
|
754
|
-
parsedBody = parsedOutput.body;
|
|
755
|
-
throwDefaultError({
|
|
756
|
-
output: output,
|
|
757
|
-
parsedBody: parsedBody,
|
|
758
|
-
exceptionCtor: __BaseException,
|
|
759
|
-
errorCode: errorCode,
|
|
760
|
-
});
|
|
761
|
-
_d.label = 11;
|
|
762
|
-
case 11: return [2];
|
|
763
|
-
}
|
|
764
|
-
});
|
|
765
|
-
}); };
|
|
766
|
-
var deserializeAws_json1_0ConflictExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
767
|
-
var body, deserialized, exception;
|
|
768
|
-
return __generator(this, function (_a) {
|
|
769
|
-
body = parsedOutput.body;
|
|
770
|
-
deserialized = deserializeAws_json1_0ConflictException(body, context);
|
|
771
|
-
exception = new ConflictException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
772
|
-
return [2, __decorateServiceException(exception, body)];
|
|
5
|
+
export const serializeAws_json1_0CreateConnectionCommand = async (input, context) => {
|
|
6
|
+
const headers = {
|
|
7
|
+
"content-type": "application/x-amz-json-1.0",
|
|
8
|
+
"x-amz-target": "CodeStar_connections_20191201.CreateConnection",
|
|
9
|
+
};
|
|
10
|
+
let body;
|
|
11
|
+
body = JSON.stringify(serializeAws_json1_0CreateConnectionInput(input, context));
|
|
12
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
13
|
+
};
|
|
14
|
+
export const serializeAws_json1_0CreateHostCommand = async (input, context) => {
|
|
15
|
+
const headers = {
|
|
16
|
+
"content-type": "application/x-amz-json-1.0",
|
|
17
|
+
"x-amz-target": "CodeStar_connections_20191201.CreateHost",
|
|
18
|
+
};
|
|
19
|
+
let body;
|
|
20
|
+
body = JSON.stringify(serializeAws_json1_0CreateHostInput(input, context));
|
|
21
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
22
|
+
};
|
|
23
|
+
export const serializeAws_json1_0DeleteConnectionCommand = async (input, context) => {
|
|
24
|
+
const headers = {
|
|
25
|
+
"content-type": "application/x-amz-json-1.0",
|
|
26
|
+
"x-amz-target": "CodeStar_connections_20191201.DeleteConnection",
|
|
27
|
+
};
|
|
28
|
+
let body;
|
|
29
|
+
body = JSON.stringify(serializeAws_json1_0DeleteConnectionInput(input, context));
|
|
30
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
31
|
+
};
|
|
32
|
+
export const serializeAws_json1_0DeleteHostCommand = async (input, context) => {
|
|
33
|
+
const headers = {
|
|
34
|
+
"content-type": "application/x-amz-json-1.0",
|
|
35
|
+
"x-amz-target": "CodeStar_connections_20191201.DeleteHost",
|
|
36
|
+
};
|
|
37
|
+
let body;
|
|
38
|
+
body = JSON.stringify(serializeAws_json1_0DeleteHostInput(input, context));
|
|
39
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
40
|
+
};
|
|
41
|
+
export const serializeAws_json1_0GetConnectionCommand = async (input, context) => {
|
|
42
|
+
const headers = {
|
|
43
|
+
"content-type": "application/x-amz-json-1.0",
|
|
44
|
+
"x-amz-target": "CodeStar_connections_20191201.GetConnection",
|
|
45
|
+
};
|
|
46
|
+
let body;
|
|
47
|
+
body = JSON.stringify(serializeAws_json1_0GetConnectionInput(input, context));
|
|
48
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
49
|
+
};
|
|
50
|
+
export const serializeAws_json1_0GetHostCommand = async (input, context) => {
|
|
51
|
+
const headers = {
|
|
52
|
+
"content-type": "application/x-amz-json-1.0",
|
|
53
|
+
"x-amz-target": "CodeStar_connections_20191201.GetHost",
|
|
54
|
+
};
|
|
55
|
+
let body;
|
|
56
|
+
body = JSON.stringify(serializeAws_json1_0GetHostInput(input, context));
|
|
57
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
58
|
+
};
|
|
59
|
+
export const serializeAws_json1_0ListConnectionsCommand = async (input, context) => {
|
|
60
|
+
const headers = {
|
|
61
|
+
"content-type": "application/x-amz-json-1.0",
|
|
62
|
+
"x-amz-target": "CodeStar_connections_20191201.ListConnections",
|
|
63
|
+
};
|
|
64
|
+
let body;
|
|
65
|
+
body = JSON.stringify(serializeAws_json1_0ListConnectionsInput(input, context));
|
|
66
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
67
|
+
};
|
|
68
|
+
export const serializeAws_json1_0ListHostsCommand = async (input, context) => {
|
|
69
|
+
const headers = {
|
|
70
|
+
"content-type": "application/x-amz-json-1.0",
|
|
71
|
+
"x-amz-target": "CodeStar_connections_20191201.ListHosts",
|
|
72
|
+
};
|
|
73
|
+
let body;
|
|
74
|
+
body = JSON.stringify(serializeAws_json1_0ListHostsInput(input, context));
|
|
75
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
76
|
+
};
|
|
77
|
+
export const serializeAws_json1_0ListTagsForResourceCommand = async (input, context) => {
|
|
78
|
+
const headers = {
|
|
79
|
+
"content-type": "application/x-amz-json-1.0",
|
|
80
|
+
"x-amz-target": "CodeStar_connections_20191201.ListTagsForResource",
|
|
81
|
+
};
|
|
82
|
+
let body;
|
|
83
|
+
body = JSON.stringify(serializeAws_json1_0ListTagsForResourceInput(input, context));
|
|
84
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
85
|
+
};
|
|
86
|
+
export const serializeAws_json1_0TagResourceCommand = async (input, context) => {
|
|
87
|
+
const headers = {
|
|
88
|
+
"content-type": "application/x-amz-json-1.0",
|
|
89
|
+
"x-amz-target": "CodeStar_connections_20191201.TagResource",
|
|
90
|
+
};
|
|
91
|
+
let body;
|
|
92
|
+
body = JSON.stringify(serializeAws_json1_0TagResourceInput(input, context));
|
|
93
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
94
|
+
};
|
|
95
|
+
export const serializeAws_json1_0UntagResourceCommand = async (input, context) => {
|
|
96
|
+
const headers = {
|
|
97
|
+
"content-type": "application/x-amz-json-1.0",
|
|
98
|
+
"x-amz-target": "CodeStar_connections_20191201.UntagResource",
|
|
99
|
+
};
|
|
100
|
+
let body;
|
|
101
|
+
body = JSON.stringify(serializeAws_json1_0UntagResourceInput(input, context));
|
|
102
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
103
|
+
};
|
|
104
|
+
export const serializeAws_json1_0UpdateHostCommand = async (input, context) => {
|
|
105
|
+
const headers = {
|
|
106
|
+
"content-type": "application/x-amz-json-1.0",
|
|
107
|
+
"x-amz-target": "CodeStar_connections_20191201.UpdateHost",
|
|
108
|
+
};
|
|
109
|
+
let body;
|
|
110
|
+
body = JSON.stringify(serializeAws_json1_0UpdateHostInput(input, context));
|
|
111
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
112
|
+
};
|
|
113
|
+
export const deserializeAws_json1_0CreateConnectionCommand = async (output, context) => {
|
|
114
|
+
if (output.statusCode >= 300) {
|
|
115
|
+
return deserializeAws_json1_0CreateConnectionCommandError(output, context);
|
|
116
|
+
}
|
|
117
|
+
const data = await parseBody(output.body, context);
|
|
118
|
+
let contents = {};
|
|
119
|
+
contents = deserializeAws_json1_0CreateConnectionOutput(data, context);
|
|
120
|
+
const response = {
|
|
121
|
+
$metadata: deserializeMetadata(output),
|
|
122
|
+
...contents,
|
|
123
|
+
};
|
|
124
|
+
return Promise.resolve(response);
|
|
125
|
+
};
|
|
126
|
+
const deserializeAws_json1_0CreateConnectionCommandError = async (output, context) => {
|
|
127
|
+
const parsedOutput = {
|
|
128
|
+
...output,
|
|
129
|
+
body: await parseErrorBody(output.body, context),
|
|
130
|
+
};
|
|
131
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
132
|
+
switch (errorCode) {
|
|
133
|
+
case "LimitExceededException":
|
|
134
|
+
case "com.amazonaws.codestarconnections#LimitExceededException":
|
|
135
|
+
throw await deserializeAws_json1_0LimitExceededExceptionResponse(parsedOutput, context);
|
|
136
|
+
case "ResourceNotFoundException":
|
|
137
|
+
case "com.amazonaws.codestarconnections#ResourceNotFoundException":
|
|
138
|
+
throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
139
|
+
case "ResourceUnavailableException":
|
|
140
|
+
case "com.amazonaws.codestarconnections#ResourceUnavailableException":
|
|
141
|
+
throw await deserializeAws_json1_0ResourceUnavailableExceptionResponse(parsedOutput, context);
|
|
142
|
+
default:
|
|
143
|
+
const parsedBody = parsedOutput.body;
|
|
144
|
+
throwDefaultError({
|
|
145
|
+
output,
|
|
146
|
+
parsedBody,
|
|
147
|
+
exceptionCtor: __BaseException,
|
|
148
|
+
errorCode,
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
export const deserializeAws_json1_0CreateHostCommand = async (output, context) => {
|
|
153
|
+
if (output.statusCode >= 300) {
|
|
154
|
+
return deserializeAws_json1_0CreateHostCommandError(output, context);
|
|
155
|
+
}
|
|
156
|
+
const data = await parseBody(output.body, context);
|
|
157
|
+
let contents = {};
|
|
158
|
+
contents = deserializeAws_json1_0CreateHostOutput(data, context);
|
|
159
|
+
const response = {
|
|
160
|
+
$metadata: deserializeMetadata(output),
|
|
161
|
+
...contents,
|
|
162
|
+
};
|
|
163
|
+
return Promise.resolve(response);
|
|
164
|
+
};
|
|
165
|
+
const deserializeAws_json1_0CreateHostCommandError = async (output, context) => {
|
|
166
|
+
const parsedOutput = {
|
|
167
|
+
...output,
|
|
168
|
+
body: await parseErrorBody(output.body, context),
|
|
169
|
+
};
|
|
170
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
171
|
+
switch (errorCode) {
|
|
172
|
+
case "LimitExceededException":
|
|
173
|
+
case "com.amazonaws.codestarconnections#LimitExceededException":
|
|
174
|
+
throw await deserializeAws_json1_0LimitExceededExceptionResponse(parsedOutput, context);
|
|
175
|
+
default:
|
|
176
|
+
const parsedBody = parsedOutput.body;
|
|
177
|
+
throwDefaultError({
|
|
178
|
+
output,
|
|
179
|
+
parsedBody,
|
|
180
|
+
exceptionCtor: __BaseException,
|
|
181
|
+
errorCode,
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
export const deserializeAws_json1_0DeleteConnectionCommand = async (output, context) => {
|
|
186
|
+
if (output.statusCode >= 300) {
|
|
187
|
+
return deserializeAws_json1_0DeleteConnectionCommandError(output, context);
|
|
188
|
+
}
|
|
189
|
+
const data = await parseBody(output.body, context);
|
|
190
|
+
let contents = {};
|
|
191
|
+
contents = deserializeAws_json1_0DeleteConnectionOutput(data, context);
|
|
192
|
+
const response = {
|
|
193
|
+
$metadata: deserializeMetadata(output),
|
|
194
|
+
...contents,
|
|
195
|
+
};
|
|
196
|
+
return Promise.resolve(response);
|
|
197
|
+
};
|
|
198
|
+
const deserializeAws_json1_0DeleteConnectionCommandError = async (output, context) => {
|
|
199
|
+
const parsedOutput = {
|
|
200
|
+
...output,
|
|
201
|
+
body: await parseErrorBody(output.body, context),
|
|
202
|
+
};
|
|
203
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
204
|
+
switch (errorCode) {
|
|
205
|
+
case "ResourceNotFoundException":
|
|
206
|
+
case "com.amazonaws.codestarconnections#ResourceNotFoundException":
|
|
207
|
+
throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
208
|
+
default:
|
|
209
|
+
const parsedBody = parsedOutput.body;
|
|
210
|
+
throwDefaultError({
|
|
211
|
+
output,
|
|
212
|
+
parsedBody,
|
|
213
|
+
exceptionCtor: __BaseException,
|
|
214
|
+
errorCode,
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
};
|
|
218
|
+
export const deserializeAws_json1_0DeleteHostCommand = async (output, context) => {
|
|
219
|
+
if (output.statusCode >= 300) {
|
|
220
|
+
return deserializeAws_json1_0DeleteHostCommandError(output, context);
|
|
221
|
+
}
|
|
222
|
+
const data = await parseBody(output.body, context);
|
|
223
|
+
let contents = {};
|
|
224
|
+
contents = deserializeAws_json1_0DeleteHostOutput(data, context);
|
|
225
|
+
const response = {
|
|
226
|
+
$metadata: deserializeMetadata(output),
|
|
227
|
+
...contents,
|
|
228
|
+
};
|
|
229
|
+
return Promise.resolve(response);
|
|
230
|
+
};
|
|
231
|
+
const deserializeAws_json1_0DeleteHostCommandError = async (output, context) => {
|
|
232
|
+
const parsedOutput = {
|
|
233
|
+
...output,
|
|
234
|
+
body: await parseErrorBody(output.body, context),
|
|
235
|
+
};
|
|
236
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
237
|
+
switch (errorCode) {
|
|
238
|
+
case "ResourceNotFoundException":
|
|
239
|
+
case "com.amazonaws.codestarconnections#ResourceNotFoundException":
|
|
240
|
+
throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
241
|
+
case "ResourceUnavailableException":
|
|
242
|
+
case "com.amazonaws.codestarconnections#ResourceUnavailableException":
|
|
243
|
+
throw await deserializeAws_json1_0ResourceUnavailableExceptionResponse(parsedOutput, context);
|
|
244
|
+
default:
|
|
245
|
+
const parsedBody = parsedOutput.body;
|
|
246
|
+
throwDefaultError({
|
|
247
|
+
output,
|
|
248
|
+
parsedBody,
|
|
249
|
+
exceptionCtor: __BaseException,
|
|
250
|
+
errorCode,
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
};
|
|
254
|
+
export const deserializeAws_json1_0GetConnectionCommand = async (output, context) => {
|
|
255
|
+
if (output.statusCode >= 300) {
|
|
256
|
+
return deserializeAws_json1_0GetConnectionCommandError(output, context);
|
|
257
|
+
}
|
|
258
|
+
const data = await parseBody(output.body, context);
|
|
259
|
+
let contents = {};
|
|
260
|
+
contents = deserializeAws_json1_0GetConnectionOutput(data, context);
|
|
261
|
+
const response = {
|
|
262
|
+
$metadata: deserializeMetadata(output),
|
|
263
|
+
...contents,
|
|
264
|
+
};
|
|
265
|
+
return Promise.resolve(response);
|
|
266
|
+
};
|
|
267
|
+
const deserializeAws_json1_0GetConnectionCommandError = async (output, context) => {
|
|
268
|
+
const parsedOutput = {
|
|
269
|
+
...output,
|
|
270
|
+
body: await parseErrorBody(output.body, context),
|
|
271
|
+
};
|
|
272
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
273
|
+
switch (errorCode) {
|
|
274
|
+
case "ResourceNotFoundException":
|
|
275
|
+
case "com.amazonaws.codestarconnections#ResourceNotFoundException":
|
|
276
|
+
throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
277
|
+
case "ResourceUnavailableException":
|
|
278
|
+
case "com.amazonaws.codestarconnections#ResourceUnavailableException":
|
|
279
|
+
throw await deserializeAws_json1_0ResourceUnavailableExceptionResponse(parsedOutput, context);
|
|
280
|
+
default:
|
|
281
|
+
const parsedBody = parsedOutput.body;
|
|
282
|
+
throwDefaultError({
|
|
283
|
+
output,
|
|
284
|
+
parsedBody,
|
|
285
|
+
exceptionCtor: __BaseException,
|
|
286
|
+
errorCode,
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
};
|
|
290
|
+
export const deserializeAws_json1_0GetHostCommand = async (output, context) => {
|
|
291
|
+
if (output.statusCode >= 300) {
|
|
292
|
+
return deserializeAws_json1_0GetHostCommandError(output, context);
|
|
293
|
+
}
|
|
294
|
+
const data = await parseBody(output.body, context);
|
|
295
|
+
let contents = {};
|
|
296
|
+
contents = deserializeAws_json1_0GetHostOutput(data, context);
|
|
297
|
+
const response = {
|
|
298
|
+
$metadata: deserializeMetadata(output),
|
|
299
|
+
...contents,
|
|
300
|
+
};
|
|
301
|
+
return Promise.resolve(response);
|
|
302
|
+
};
|
|
303
|
+
const deserializeAws_json1_0GetHostCommandError = async (output, context) => {
|
|
304
|
+
const parsedOutput = {
|
|
305
|
+
...output,
|
|
306
|
+
body: await parseErrorBody(output.body, context),
|
|
307
|
+
};
|
|
308
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
309
|
+
switch (errorCode) {
|
|
310
|
+
case "ResourceNotFoundException":
|
|
311
|
+
case "com.amazonaws.codestarconnections#ResourceNotFoundException":
|
|
312
|
+
throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
313
|
+
case "ResourceUnavailableException":
|
|
314
|
+
case "com.amazonaws.codestarconnections#ResourceUnavailableException":
|
|
315
|
+
throw await deserializeAws_json1_0ResourceUnavailableExceptionResponse(parsedOutput, context);
|
|
316
|
+
default:
|
|
317
|
+
const parsedBody = parsedOutput.body;
|
|
318
|
+
throwDefaultError({
|
|
319
|
+
output,
|
|
320
|
+
parsedBody,
|
|
321
|
+
exceptionCtor: __BaseException,
|
|
322
|
+
errorCode,
|
|
323
|
+
});
|
|
324
|
+
}
|
|
325
|
+
};
|
|
326
|
+
export const deserializeAws_json1_0ListConnectionsCommand = async (output, context) => {
|
|
327
|
+
if (output.statusCode >= 300) {
|
|
328
|
+
return deserializeAws_json1_0ListConnectionsCommandError(output, context);
|
|
329
|
+
}
|
|
330
|
+
const data = await parseBody(output.body, context);
|
|
331
|
+
let contents = {};
|
|
332
|
+
contents = deserializeAws_json1_0ListConnectionsOutput(data, context);
|
|
333
|
+
const response = {
|
|
334
|
+
$metadata: deserializeMetadata(output),
|
|
335
|
+
...contents,
|
|
336
|
+
};
|
|
337
|
+
return Promise.resolve(response);
|
|
338
|
+
};
|
|
339
|
+
const deserializeAws_json1_0ListConnectionsCommandError = async (output, context) => {
|
|
340
|
+
const parsedOutput = {
|
|
341
|
+
...output,
|
|
342
|
+
body: await parseErrorBody(output.body, context),
|
|
343
|
+
};
|
|
344
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
345
|
+
const parsedBody = parsedOutput.body;
|
|
346
|
+
throwDefaultError({
|
|
347
|
+
output,
|
|
348
|
+
parsedBody,
|
|
349
|
+
exceptionCtor: __BaseException,
|
|
350
|
+
errorCode,
|
|
351
|
+
});
|
|
352
|
+
};
|
|
353
|
+
export const deserializeAws_json1_0ListHostsCommand = async (output, context) => {
|
|
354
|
+
if (output.statusCode >= 300) {
|
|
355
|
+
return deserializeAws_json1_0ListHostsCommandError(output, context);
|
|
356
|
+
}
|
|
357
|
+
const data = await parseBody(output.body, context);
|
|
358
|
+
let contents = {};
|
|
359
|
+
contents = deserializeAws_json1_0ListHostsOutput(data, context);
|
|
360
|
+
const response = {
|
|
361
|
+
$metadata: deserializeMetadata(output),
|
|
362
|
+
...contents,
|
|
363
|
+
};
|
|
364
|
+
return Promise.resolve(response);
|
|
365
|
+
};
|
|
366
|
+
const deserializeAws_json1_0ListHostsCommandError = async (output, context) => {
|
|
367
|
+
const parsedOutput = {
|
|
368
|
+
...output,
|
|
369
|
+
body: await parseErrorBody(output.body, context),
|
|
370
|
+
};
|
|
371
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
372
|
+
const parsedBody = parsedOutput.body;
|
|
373
|
+
throwDefaultError({
|
|
374
|
+
output,
|
|
375
|
+
parsedBody,
|
|
376
|
+
exceptionCtor: __BaseException,
|
|
377
|
+
errorCode,
|
|
378
|
+
});
|
|
379
|
+
};
|
|
380
|
+
export const deserializeAws_json1_0ListTagsForResourceCommand = async (output, context) => {
|
|
381
|
+
if (output.statusCode >= 300) {
|
|
382
|
+
return deserializeAws_json1_0ListTagsForResourceCommandError(output, context);
|
|
383
|
+
}
|
|
384
|
+
const data = await parseBody(output.body, context);
|
|
385
|
+
let contents = {};
|
|
386
|
+
contents = deserializeAws_json1_0ListTagsForResourceOutput(data, context);
|
|
387
|
+
const response = {
|
|
388
|
+
$metadata: deserializeMetadata(output),
|
|
389
|
+
...contents,
|
|
390
|
+
};
|
|
391
|
+
return Promise.resolve(response);
|
|
392
|
+
};
|
|
393
|
+
const deserializeAws_json1_0ListTagsForResourceCommandError = async (output, context) => {
|
|
394
|
+
const parsedOutput = {
|
|
395
|
+
...output,
|
|
396
|
+
body: await parseErrorBody(output.body, context),
|
|
397
|
+
};
|
|
398
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
399
|
+
switch (errorCode) {
|
|
400
|
+
case "ResourceNotFoundException":
|
|
401
|
+
case "com.amazonaws.codestarconnections#ResourceNotFoundException":
|
|
402
|
+
throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
403
|
+
default:
|
|
404
|
+
const parsedBody = parsedOutput.body;
|
|
405
|
+
throwDefaultError({
|
|
406
|
+
output,
|
|
407
|
+
parsedBody,
|
|
408
|
+
exceptionCtor: __BaseException,
|
|
409
|
+
errorCode,
|
|
410
|
+
});
|
|
411
|
+
}
|
|
412
|
+
};
|
|
413
|
+
export const deserializeAws_json1_0TagResourceCommand = async (output, context) => {
|
|
414
|
+
if (output.statusCode >= 300) {
|
|
415
|
+
return deserializeAws_json1_0TagResourceCommandError(output, context);
|
|
416
|
+
}
|
|
417
|
+
const data = await parseBody(output.body, context);
|
|
418
|
+
let contents = {};
|
|
419
|
+
contents = deserializeAws_json1_0TagResourceOutput(data, context);
|
|
420
|
+
const response = {
|
|
421
|
+
$metadata: deserializeMetadata(output),
|
|
422
|
+
...contents,
|
|
423
|
+
};
|
|
424
|
+
return Promise.resolve(response);
|
|
425
|
+
};
|
|
426
|
+
const deserializeAws_json1_0TagResourceCommandError = async (output, context) => {
|
|
427
|
+
const parsedOutput = {
|
|
428
|
+
...output,
|
|
429
|
+
body: await parseErrorBody(output.body, context),
|
|
430
|
+
};
|
|
431
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
432
|
+
switch (errorCode) {
|
|
433
|
+
case "LimitExceededException":
|
|
434
|
+
case "com.amazonaws.codestarconnections#LimitExceededException":
|
|
435
|
+
throw await deserializeAws_json1_0LimitExceededExceptionResponse(parsedOutput, context);
|
|
436
|
+
case "ResourceNotFoundException":
|
|
437
|
+
case "com.amazonaws.codestarconnections#ResourceNotFoundException":
|
|
438
|
+
throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
439
|
+
default:
|
|
440
|
+
const parsedBody = parsedOutput.body;
|
|
441
|
+
throwDefaultError({
|
|
442
|
+
output,
|
|
443
|
+
parsedBody,
|
|
444
|
+
exceptionCtor: __BaseException,
|
|
445
|
+
errorCode,
|
|
446
|
+
});
|
|
447
|
+
}
|
|
448
|
+
};
|
|
449
|
+
export const deserializeAws_json1_0UntagResourceCommand = async (output, context) => {
|
|
450
|
+
if (output.statusCode >= 300) {
|
|
451
|
+
return deserializeAws_json1_0UntagResourceCommandError(output, context);
|
|
452
|
+
}
|
|
453
|
+
const data = await parseBody(output.body, context);
|
|
454
|
+
let contents = {};
|
|
455
|
+
contents = deserializeAws_json1_0UntagResourceOutput(data, context);
|
|
456
|
+
const response = {
|
|
457
|
+
$metadata: deserializeMetadata(output),
|
|
458
|
+
...contents,
|
|
459
|
+
};
|
|
460
|
+
return Promise.resolve(response);
|
|
461
|
+
};
|
|
462
|
+
const deserializeAws_json1_0UntagResourceCommandError = async (output, context) => {
|
|
463
|
+
const parsedOutput = {
|
|
464
|
+
...output,
|
|
465
|
+
body: await parseErrorBody(output.body, context),
|
|
466
|
+
};
|
|
467
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
468
|
+
switch (errorCode) {
|
|
469
|
+
case "ResourceNotFoundException":
|
|
470
|
+
case "com.amazonaws.codestarconnections#ResourceNotFoundException":
|
|
471
|
+
throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
472
|
+
default:
|
|
473
|
+
const parsedBody = parsedOutput.body;
|
|
474
|
+
throwDefaultError({
|
|
475
|
+
output,
|
|
476
|
+
parsedBody,
|
|
477
|
+
exceptionCtor: __BaseException,
|
|
478
|
+
errorCode,
|
|
479
|
+
});
|
|
480
|
+
}
|
|
481
|
+
};
|
|
482
|
+
export const deserializeAws_json1_0UpdateHostCommand = async (output, context) => {
|
|
483
|
+
if (output.statusCode >= 300) {
|
|
484
|
+
return deserializeAws_json1_0UpdateHostCommandError(output, context);
|
|
485
|
+
}
|
|
486
|
+
const data = await parseBody(output.body, context);
|
|
487
|
+
let contents = {};
|
|
488
|
+
contents = deserializeAws_json1_0UpdateHostOutput(data, context);
|
|
489
|
+
const response = {
|
|
490
|
+
$metadata: deserializeMetadata(output),
|
|
491
|
+
...contents,
|
|
492
|
+
};
|
|
493
|
+
return Promise.resolve(response);
|
|
494
|
+
};
|
|
495
|
+
const deserializeAws_json1_0UpdateHostCommandError = async (output, context) => {
|
|
496
|
+
const parsedOutput = {
|
|
497
|
+
...output,
|
|
498
|
+
body: await parseErrorBody(output.body, context),
|
|
499
|
+
};
|
|
500
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
501
|
+
switch (errorCode) {
|
|
502
|
+
case "ConflictException":
|
|
503
|
+
case "com.amazonaws.codestarconnections#ConflictException":
|
|
504
|
+
throw await deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context);
|
|
505
|
+
case "ResourceNotFoundException":
|
|
506
|
+
case "com.amazonaws.codestarconnections#ResourceNotFoundException":
|
|
507
|
+
throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
508
|
+
case "ResourceUnavailableException":
|
|
509
|
+
case "com.amazonaws.codestarconnections#ResourceUnavailableException":
|
|
510
|
+
throw await deserializeAws_json1_0ResourceUnavailableExceptionResponse(parsedOutput, context);
|
|
511
|
+
case "UnsupportedOperationException":
|
|
512
|
+
case "com.amazonaws.codestarconnections#UnsupportedOperationException":
|
|
513
|
+
throw await deserializeAws_json1_0UnsupportedOperationExceptionResponse(parsedOutput, context);
|
|
514
|
+
default:
|
|
515
|
+
const parsedBody = parsedOutput.body;
|
|
516
|
+
throwDefaultError({
|
|
517
|
+
output,
|
|
518
|
+
parsedBody,
|
|
519
|
+
exceptionCtor: __BaseException,
|
|
520
|
+
errorCode,
|
|
521
|
+
});
|
|
522
|
+
}
|
|
523
|
+
};
|
|
524
|
+
const deserializeAws_json1_0ConflictExceptionResponse = async (parsedOutput, context) => {
|
|
525
|
+
const body = parsedOutput.body;
|
|
526
|
+
const deserialized = deserializeAws_json1_0ConflictException(body, context);
|
|
527
|
+
const exception = new ConflictException({
|
|
528
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
529
|
+
...deserialized,
|
|
773
530
|
});
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
531
|
+
return __decorateServiceException(exception, body);
|
|
532
|
+
};
|
|
533
|
+
const deserializeAws_json1_0LimitExceededExceptionResponse = async (parsedOutput, context) => {
|
|
534
|
+
const body = parsedOutput.body;
|
|
535
|
+
const deserialized = deserializeAws_json1_0LimitExceededException(body, context);
|
|
536
|
+
const exception = new LimitExceededException({
|
|
537
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
538
|
+
...deserialized,
|
|
782
539
|
});
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
540
|
+
return __decorateServiceException(exception, body);
|
|
541
|
+
};
|
|
542
|
+
const deserializeAws_json1_0ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
543
|
+
const body = parsedOutput.body;
|
|
544
|
+
const deserialized = deserializeAws_json1_0ResourceNotFoundException(body, context);
|
|
545
|
+
const exception = new ResourceNotFoundException({
|
|
546
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
547
|
+
...deserialized,
|
|
791
548
|
});
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
549
|
+
return __decorateServiceException(exception, body);
|
|
550
|
+
};
|
|
551
|
+
const deserializeAws_json1_0ResourceUnavailableExceptionResponse = async (parsedOutput, context) => {
|
|
552
|
+
const body = parsedOutput.body;
|
|
553
|
+
const deserialized = deserializeAws_json1_0ResourceUnavailableException(body, context);
|
|
554
|
+
const exception = new ResourceUnavailableException({
|
|
555
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
556
|
+
...deserialized,
|
|
800
557
|
});
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
558
|
+
return __decorateServiceException(exception, body);
|
|
559
|
+
};
|
|
560
|
+
const deserializeAws_json1_0UnsupportedOperationExceptionResponse = async (parsedOutput, context) => {
|
|
561
|
+
const body = parsedOutput.body;
|
|
562
|
+
const deserialized = deserializeAws_json1_0UnsupportedOperationException(body, context);
|
|
563
|
+
const exception = new UnsupportedOperationException({
|
|
564
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
565
|
+
...deserialized,
|
|
809
566
|
});
|
|
810
|
-
|
|
811
|
-
var serializeAws_json1_0CreateConnectionInput = function (input, context) {
|
|
812
|
-
return __assign(__assign(__assign(__assign({}, (input.ConnectionName != null && { ConnectionName: input.ConnectionName })), (input.HostArn != null && { HostArn: input.HostArn })), (input.ProviderType != null && { ProviderType: input.ProviderType })), (input.Tags != null && { Tags: serializeAws_json1_0TagList(input.Tags, context) }));
|
|
567
|
+
return __decorateServiceException(exception, body);
|
|
813
568
|
};
|
|
814
|
-
|
|
815
|
-
return
|
|
816
|
-
|
|
817
|
-
|
|
569
|
+
const serializeAws_json1_0CreateConnectionInput = (input, context) => {
|
|
570
|
+
return {
|
|
571
|
+
...(input.ConnectionName != null && { ConnectionName: input.ConnectionName }),
|
|
572
|
+
...(input.HostArn != null && { HostArn: input.HostArn }),
|
|
573
|
+
...(input.ProviderType != null && { ProviderType: input.ProviderType }),
|
|
574
|
+
...(input.Tags != null && { Tags: serializeAws_json1_0TagList(input.Tags, context) }),
|
|
575
|
+
};
|
|
818
576
|
};
|
|
819
|
-
|
|
820
|
-
return
|
|
577
|
+
const serializeAws_json1_0CreateHostInput = (input, context) => {
|
|
578
|
+
return {
|
|
579
|
+
...(input.Name != null && { Name: input.Name }),
|
|
580
|
+
...(input.ProviderEndpoint != null && { ProviderEndpoint: input.ProviderEndpoint }),
|
|
581
|
+
...(input.ProviderType != null && { ProviderType: input.ProviderType }),
|
|
582
|
+
...(input.Tags != null && { Tags: serializeAws_json1_0TagList(input.Tags, context) }),
|
|
583
|
+
...(input.VpcConfiguration != null && {
|
|
584
|
+
VpcConfiguration: serializeAws_json1_0VpcConfiguration(input.VpcConfiguration, context),
|
|
585
|
+
}),
|
|
586
|
+
};
|
|
821
587
|
};
|
|
822
|
-
|
|
823
|
-
return
|
|
588
|
+
const serializeAws_json1_0DeleteConnectionInput = (input, context) => {
|
|
589
|
+
return {
|
|
590
|
+
...(input.ConnectionArn != null && { ConnectionArn: input.ConnectionArn }),
|
|
591
|
+
};
|
|
824
592
|
};
|
|
825
|
-
|
|
826
|
-
return
|
|
593
|
+
const serializeAws_json1_0DeleteHostInput = (input, context) => {
|
|
594
|
+
return {
|
|
595
|
+
...(input.HostArn != null && { HostArn: input.HostArn }),
|
|
596
|
+
};
|
|
827
597
|
};
|
|
828
|
-
|
|
829
|
-
return
|
|
598
|
+
const serializeAws_json1_0GetConnectionInput = (input, context) => {
|
|
599
|
+
return {
|
|
600
|
+
...(input.ConnectionArn != null && { ConnectionArn: input.ConnectionArn }),
|
|
601
|
+
};
|
|
830
602
|
};
|
|
831
|
-
|
|
832
|
-
return
|
|
603
|
+
const serializeAws_json1_0GetHostInput = (input, context) => {
|
|
604
|
+
return {
|
|
605
|
+
...(input.HostArn != null && { HostArn: input.HostArn }),
|
|
606
|
+
};
|
|
833
607
|
};
|
|
834
|
-
|
|
835
|
-
return
|
|
608
|
+
const serializeAws_json1_0ListConnectionsInput = (input, context) => {
|
|
609
|
+
return {
|
|
610
|
+
...(input.HostArnFilter != null && { HostArnFilter: input.HostArnFilter }),
|
|
611
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
612
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
613
|
+
...(input.ProviderTypeFilter != null && { ProviderTypeFilter: input.ProviderTypeFilter }),
|
|
614
|
+
};
|
|
836
615
|
};
|
|
837
|
-
|
|
838
|
-
return
|
|
616
|
+
const serializeAws_json1_0ListHostsInput = (input, context) => {
|
|
617
|
+
return {
|
|
618
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
619
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
620
|
+
};
|
|
621
|
+
};
|
|
622
|
+
const serializeAws_json1_0ListTagsForResourceInput = (input, context) => {
|
|
623
|
+
return {
|
|
624
|
+
...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
|
|
625
|
+
};
|
|
839
626
|
};
|
|
840
|
-
|
|
627
|
+
const serializeAws_json1_0SecurityGroupIds = (input, context) => {
|
|
841
628
|
return input
|
|
842
|
-
.filter(
|
|
843
|
-
.map(
|
|
629
|
+
.filter((e) => e != null)
|
|
630
|
+
.map((entry) => {
|
|
844
631
|
return entry;
|
|
845
632
|
});
|
|
846
633
|
};
|
|
847
|
-
|
|
634
|
+
const serializeAws_json1_0SubnetIds = (input, context) => {
|
|
848
635
|
return input
|
|
849
|
-
.filter(
|
|
850
|
-
.map(
|
|
636
|
+
.filter((e) => e != null)
|
|
637
|
+
.map((entry) => {
|
|
851
638
|
return entry;
|
|
852
639
|
});
|
|
853
640
|
};
|
|
854
|
-
|
|
855
|
-
return
|
|
641
|
+
const serializeAws_json1_0Tag = (input, context) => {
|
|
642
|
+
return {
|
|
643
|
+
...(input.Key != null && { Key: input.Key }),
|
|
644
|
+
...(input.Value != null && { Value: input.Value }),
|
|
645
|
+
};
|
|
856
646
|
};
|
|
857
|
-
|
|
647
|
+
const serializeAws_json1_0TagKeyList = (input, context) => {
|
|
858
648
|
return input
|
|
859
|
-
.filter(
|
|
860
|
-
.map(
|
|
649
|
+
.filter((e) => e != null)
|
|
650
|
+
.map((entry) => {
|
|
861
651
|
return entry;
|
|
862
652
|
});
|
|
863
653
|
};
|
|
864
|
-
|
|
654
|
+
const serializeAws_json1_0TagList = (input, context) => {
|
|
865
655
|
return input
|
|
866
|
-
.filter(
|
|
867
|
-
.map(
|
|
656
|
+
.filter((e) => e != null)
|
|
657
|
+
.map((entry) => {
|
|
868
658
|
return serializeAws_json1_0Tag(entry, context);
|
|
869
659
|
});
|
|
870
660
|
};
|
|
871
|
-
|
|
872
|
-
return
|
|
661
|
+
const serializeAws_json1_0TagResourceInput = (input, context) => {
|
|
662
|
+
return {
|
|
663
|
+
...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
|
|
664
|
+
...(input.Tags != null && { Tags: serializeAws_json1_0TagList(input.Tags, context) }),
|
|
665
|
+
};
|
|
873
666
|
};
|
|
874
|
-
|
|
875
|
-
return
|
|
667
|
+
const serializeAws_json1_0UntagResourceInput = (input, context) => {
|
|
668
|
+
return {
|
|
669
|
+
...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
|
|
670
|
+
...(input.TagKeys != null && { TagKeys: serializeAws_json1_0TagKeyList(input.TagKeys, context) }),
|
|
671
|
+
};
|
|
876
672
|
};
|
|
877
|
-
|
|
878
|
-
return
|
|
879
|
-
|
|
880
|
-
|
|
673
|
+
const serializeAws_json1_0UpdateHostInput = (input, context) => {
|
|
674
|
+
return {
|
|
675
|
+
...(input.HostArn != null && { HostArn: input.HostArn }),
|
|
676
|
+
...(input.ProviderEndpoint != null && { ProviderEndpoint: input.ProviderEndpoint }),
|
|
677
|
+
...(input.VpcConfiguration != null && {
|
|
678
|
+
VpcConfiguration: serializeAws_json1_0VpcConfiguration(input.VpcConfiguration, context),
|
|
679
|
+
}),
|
|
680
|
+
};
|
|
881
681
|
};
|
|
882
|
-
|
|
883
|
-
return
|
|
884
|
-
|
|
885
|
-
|
|
682
|
+
const serializeAws_json1_0VpcConfiguration = (input, context) => {
|
|
683
|
+
return {
|
|
684
|
+
...(input.SecurityGroupIds != null && {
|
|
685
|
+
SecurityGroupIds: serializeAws_json1_0SecurityGroupIds(input.SecurityGroupIds, context),
|
|
686
|
+
}),
|
|
687
|
+
...(input.SubnetIds != null && { SubnetIds: serializeAws_json1_0SubnetIds(input.SubnetIds, context) }),
|
|
688
|
+
...(input.TlsCertificate != null && { TlsCertificate: input.TlsCertificate }),
|
|
689
|
+
...(input.VpcId != null && { VpcId: input.VpcId }),
|
|
690
|
+
};
|
|
886
691
|
};
|
|
887
|
-
|
|
692
|
+
const deserializeAws_json1_0ConflictException = (output, context) => {
|
|
888
693
|
return {
|
|
889
694
|
Message: __expectString(output.Message),
|
|
890
695
|
};
|
|
891
696
|
};
|
|
892
|
-
|
|
697
|
+
const deserializeAws_json1_0Connection = (output, context) => {
|
|
893
698
|
return {
|
|
894
699
|
ConnectionArn: __expectString(output.ConnectionArn),
|
|
895
700
|
ConnectionName: __expectString(output.ConnectionName),
|
|
@@ -899,10 +704,10 @@ var deserializeAws_json1_0Connection = function (output, context) {
|
|
|
899
704
|
ProviderType: __expectString(output.ProviderType),
|
|
900
705
|
};
|
|
901
706
|
};
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
.filter(
|
|
905
|
-
.map(
|
|
707
|
+
const deserializeAws_json1_0ConnectionList = (output, context) => {
|
|
708
|
+
const retVal = (output || [])
|
|
709
|
+
.filter((e) => e != null)
|
|
710
|
+
.map((entry) => {
|
|
906
711
|
if (entry === null) {
|
|
907
712
|
return null;
|
|
908
713
|
}
|
|
@@ -910,30 +715,30 @@ var deserializeAws_json1_0ConnectionList = function (output, context) {
|
|
|
910
715
|
});
|
|
911
716
|
return retVal;
|
|
912
717
|
};
|
|
913
|
-
|
|
718
|
+
const deserializeAws_json1_0CreateConnectionOutput = (output, context) => {
|
|
914
719
|
return {
|
|
915
720
|
ConnectionArn: __expectString(output.ConnectionArn),
|
|
916
721
|
Tags: output.Tags != null ? deserializeAws_json1_0TagList(output.Tags, context) : undefined,
|
|
917
722
|
};
|
|
918
723
|
};
|
|
919
|
-
|
|
724
|
+
const deserializeAws_json1_0CreateHostOutput = (output, context) => {
|
|
920
725
|
return {
|
|
921
726
|
HostArn: __expectString(output.HostArn),
|
|
922
727
|
Tags: output.Tags != null ? deserializeAws_json1_0TagList(output.Tags, context) : undefined,
|
|
923
728
|
};
|
|
924
729
|
};
|
|
925
|
-
|
|
730
|
+
const deserializeAws_json1_0DeleteConnectionOutput = (output, context) => {
|
|
926
731
|
return {};
|
|
927
732
|
};
|
|
928
|
-
|
|
733
|
+
const deserializeAws_json1_0DeleteHostOutput = (output, context) => {
|
|
929
734
|
return {};
|
|
930
735
|
};
|
|
931
|
-
|
|
736
|
+
const deserializeAws_json1_0GetConnectionOutput = (output, context) => {
|
|
932
737
|
return {
|
|
933
738
|
Connection: output.Connection != null ? deserializeAws_json1_0Connection(output.Connection, context) : undefined,
|
|
934
739
|
};
|
|
935
740
|
};
|
|
936
|
-
|
|
741
|
+
const deserializeAws_json1_0GetHostOutput = (output, context) => {
|
|
937
742
|
return {
|
|
938
743
|
Name: __expectString(output.Name),
|
|
939
744
|
ProviderEndpoint: __expectString(output.ProviderEndpoint),
|
|
@@ -944,7 +749,7 @@ var deserializeAws_json1_0GetHostOutput = function (output, context) {
|
|
|
944
749
|
: undefined,
|
|
945
750
|
};
|
|
946
751
|
};
|
|
947
|
-
|
|
752
|
+
const deserializeAws_json1_0Host = (output, context) => {
|
|
948
753
|
return {
|
|
949
754
|
HostArn: __expectString(output.HostArn),
|
|
950
755
|
Name: __expectString(output.Name),
|
|
@@ -957,10 +762,10 @@ var deserializeAws_json1_0Host = function (output, context) {
|
|
|
957
762
|
: undefined,
|
|
958
763
|
};
|
|
959
764
|
};
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
.filter(
|
|
963
|
-
.map(
|
|
765
|
+
const deserializeAws_json1_0HostList = (output, context) => {
|
|
766
|
+
const retVal = (output || [])
|
|
767
|
+
.filter((e) => e != null)
|
|
768
|
+
.map((entry) => {
|
|
964
769
|
if (entry === null) {
|
|
965
770
|
return null;
|
|
966
771
|
}
|
|
@@ -968,42 +773,42 @@ var deserializeAws_json1_0HostList = function (output, context) {
|
|
|
968
773
|
});
|
|
969
774
|
return retVal;
|
|
970
775
|
};
|
|
971
|
-
|
|
776
|
+
const deserializeAws_json1_0LimitExceededException = (output, context) => {
|
|
972
777
|
return {
|
|
973
778
|
Message: __expectString(output.Message),
|
|
974
779
|
};
|
|
975
780
|
};
|
|
976
|
-
|
|
781
|
+
const deserializeAws_json1_0ListConnectionsOutput = (output, context) => {
|
|
977
782
|
return {
|
|
978
783
|
Connections: output.Connections != null ? deserializeAws_json1_0ConnectionList(output.Connections, context) : undefined,
|
|
979
784
|
NextToken: __expectString(output.NextToken),
|
|
980
785
|
};
|
|
981
786
|
};
|
|
982
|
-
|
|
787
|
+
const deserializeAws_json1_0ListHostsOutput = (output, context) => {
|
|
983
788
|
return {
|
|
984
789
|
Hosts: output.Hosts != null ? deserializeAws_json1_0HostList(output.Hosts, context) : undefined,
|
|
985
790
|
NextToken: __expectString(output.NextToken),
|
|
986
791
|
};
|
|
987
792
|
};
|
|
988
|
-
|
|
793
|
+
const deserializeAws_json1_0ListTagsForResourceOutput = (output, context) => {
|
|
989
794
|
return {
|
|
990
795
|
Tags: output.Tags != null ? deserializeAws_json1_0TagList(output.Tags, context) : undefined,
|
|
991
796
|
};
|
|
992
797
|
};
|
|
993
|
-
|
|
798
|
+
const deserializeAws_json1_0ResourceNotFoundException = (output, context) => {
|
|
994
799
|
return {
|
|
995
800
|
Message: __expectString(output.Message),
|
|
996
801
|
};
|
|
997
802
|
};
|
|
998
|
-
|
|
803
|
+
const deserializeAws_json1_0ResourceUnavailableException = (output, context) => {
|
|
999
804
|
return {
|
|
1000
805
|
Message: __expectString(output.Message),
|
|
1001
806
|
};
|
|
1002
807
|
};
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
.filter(
|
|
1006
|
-
.map(
|
|
808
|
+
const deserializeAws_json1_0SecurityGroupIds = (output, context) => {
|
|
809
|
+
const retVal = (output || [])
|
|
810
|
+
.filter((e) => e != null)
|
|
811
|
+
.map((entry) => {
|
|
1007
812
|
if (entry === null) {
|
|
1008
813
|
return null;
|
|
1009
814
|
}
|
|
@@ -1011,10 +816,10 @@ var deserializeAws_json1_0SecurityGroupIds = function (output, context) {
|
|
|
1011
816
|
});
|
|
1012
817
|
return retVal;
|
|
1013
818
|
};
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
.filter(
|
|
1017
|
-
.map(
|
|
819
|
+
const deserializeAws_json1_0SubnetIds = (output, context) => {
|
|
820
|
+
const retVal = (output || [])
|
|
821
|
+
.filter((e) => e != null)
|
|
822
|
+
.map((entry) => {
|
|
1018
823
|
if (entry === null) {
|
|
1019
824
|
return null;
|
|
1020
825
|
}
|
|
@@ -1022,16 +827,16 @@ var deserializeAws_json1_0SubnetIds = function (output, context) {
|
|
|
1022
827
|
});
|
|
1023
828
|
return retVal;
|
|
1024
829
|
};
|
|
1025
|
-
|
|
830
|
+
const deserializeAws_json1_0Tag = (output, context) => {
|
|
1026
831
|
return {
|
|
1027
832
|
Key: __expectString(output.Key),
|
|
1028
833
|
Value: __expectString(output.Value),
|
|
1029
834
|
};
|
|
1030
835
|
};
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
.filter(
|
|
1034
|
-
.map(
|
|
836
|
+
const deserializeAws_json1_0TagList = (output, context) => {
|
|
837
|
+
const retVal = (output || [])
|
|
838
|
+
.filter((e) => e != null)
|
|
839
|
+
.map((entry) => {
|
|
1035
840
|
if (entry === null) {
|
|
1036
841
|
return null;
|
|
1037
842
|
}
|
|
@@ -1039,21 +844,21 @@ var deserializeAws_json1_0TagList = function (output, context) {
|
|
|
1039
844
|
});
|
|
1040
845
|
return retVal;
|
|
1041
846
|
};
|
|
1042
|
-
|
|
847
|
+
const deserializeAws_json1_0TagResourceOutput = (output, context) => {
|
|
1043
848
|
return {};
|
|
1044
849
|
};
|
|
1045
|
-
|
|
850
|
+
const deserializeAws_json1_0UnsupportedOperationException = (output, context) => {
|
|
1046
851
|
return {
|
|
1047
852
|
Message: __expectString(output.Message),
|
|
1048
853
|
};
|
|
1049
854
|
};
|
|
1050
|
-
|
|
855
|
+
const deserializeAws_json1_0UntagResourceOutput = (output, context) => {
|
|
1051
856
|
return {};
|
|
1052
857
|
};
|
|
1053
|
-
|
|
858
|
+
const deserializeAws_json1_0UpdateHostOutput = (output, context) => {
|
|
1054
859
|
return {};
|
|
1055
860
|
};
|
|
1056
|
-
|
|
861
|
+
const deserializeAws_json1_0VpcConfiguration = (output, context) => {
|
|
1057
862
|
return {
|
|
1058
863
|
SecurityGroupIds: output.SecurityGroupIds != null
|
|
1059
864
|
? deserializeAws_json1_0SecurityGroupIds(output.SecurityGroupIds, context)
|
|
@@ -1063,75 +868,52 @@ var deserializeAws_json1_0VpcConfiguration = function (output, context) {
|
|
|
1063
868
|
VpcId: __expectString(output.VpcId),
|
|
1064
869
|
};
|
|
1065
870
|
};
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
});
|
|
1074
|
-
};
|
|
1075
|
-
var collectBody = function (streamBody, context) {
|
|
1076
|
-
if (streamBody === void 0) { streamBody = new Uint8Array(); }
|
|
871
|
+
const deserializeMetadata = (output) => ({
|
|
872
|
+
httpStatusCode: output.statusCode,
|
|
873
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
874
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
875
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
876
|
+
});
|
|
877
|
+
const collectBody = (streamBody = new Uint8Array(), context) => {
|
|
1077
878
|
if (streamBody instanceof Uint8Array) {
|
|
1078
879
|
return Promise.resolve(streamBody);
|
|
1079
880
|
}
|
|
1080
881
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
1081
882
|
};
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
};
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
if (resolvedHostname !== undefined) {
|
|
1101
|
-
contents.hostname = resolvedHostname;
|
|
1102
|
-
}
|
|
1103
|
-
if (body !== undefined) {
|
|
1104
|
-
contents.body = body;
|
|
1105
|
-
}
|
|
1106
|
-
return [2, new __HttpRequest(contents)];
|
|
1107
|
-
}
|
|
1108
|
-
});
|
|
1109
|
-
}); };
|
|
1110
|
-
var parseBody = function (streamBody, context) {
|
|
1111
|
-
return collectBodyString(streamBody, context).then(function (encoded) {
|
|
1112
|
-
if (encoded.length) {
|
|
1113
|
-
return JSON.parse(encoded);
|
|
1114
|
-
}
|
|
1115
|
-
return {};
|
|
1116
|
-
});
|
|
883
|
+
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
884
|
+
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
|
|
885
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
886
|
+
const contents = {
|
|
887
|
+
protocol,
|
|
888
|
+
hostname,
|
|
889
|
+
port,
|
|
890
|
+
method: "POST",
|
|
891
|
+
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
892
|
+
headers,
|
|
893
|
+
};
|
|
894
|
+
if (resolvedHostname !== undefined) {
|
|
895
|
+
contents.hostname = resolvedHostname;
|
|
896
|
+
}
|
|
897
|
+
if (body !== undefined) {
|
|
898
|
+
contents.body = body;
|
|
899
|
+
}
|
|
900
|
+
return new __HttpRequest(contents);
|
|
1117
901
|
};
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
var sanitizeErrorCode = function (rawValue) {
|
|
1134
|
-
var cleanValue = rawValue;
|
|
902
|
+
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
903
|
+
if (encoded.length) {
|
|
904
|
+
return JSON.parse(encoded);
|
|
905
|
+
}
|
|
906
|
+
return {};
|
|
907
|
+
});
|
|
908
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
909
|
+
const value = await parseBody(errorBody, context);
|
|
910
|
+
value.message = value.message ?? value.Message;
|
|
911
|
+
return value;
|
|
912
|
+
};
|
|
913
|
+
const loadRestJsonErrorCode = (output, data) => {
|
|
914
|
+
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
915
|
+
const sanitizeErrorCode = (rawValue) => {
|
|
916
|
+
let cleanValue = rawValue;
|
|
1135
917
|
if (typeof cleanValue === "number") {
|
|
1136
918
|
cleanValue = cleanValue.toString();
|
|
1137
919
|
}
|
|
@@ -1146,7 +928,7 @@ var loadRestJsonErrorCode = function (output, data) {
|
|
|
1146
928
|
}
|
|
1147
929
|
return cleanValue;
|
|
1148
930
|
};
|
|
1149
|
-
|
|
931
|
+
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1150
932
|
if (headerKey !== undefined) {
|
|
1151
933
|
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1152
934
|
}
|