@aws-sdk/client-ssm-contacts 3.183.0 → 3.185.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.
Files changed (46) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist-cjs/protocols/Aws_json1_1.js +2 -2
  3. package/dist-es/SSMContacts.js +117 -110
  4. package/dist-es/SSMContactsClient.js +28 -22
  5. package/dist-es/commands/AcceptPageCommand.js +28 -21
  6. package/dist-es/commands/ActivateContactChannelCommand.js +28 -21
  7. package/dist-es/commands/CreateContactChannelCommand.js +28 -21
  8. package/dist-es/commands/CreateContactCommand.js +28 -21
  9. package/dist-es/commands/DeactivateContactChannelCommand.js +28 -21
  10. package/dist-es/commands/DeleteContactChannelCommand.js +28 -21
  11. package/dist-es/commands/DeleteContactCommand.js +28 -21
  12. package/dist-es/commands/DescribeEngagementCommand.js +28 -21
  13. package/dist-es/commands/DescribePageCommand.js +28 -21
  14. package/dist-es/commands/GetContactChannelCommand.js +28 -21
  15. package/dist-es/commands/GetContactCommand.js +28 -21
  16. package/dist-es/commands/GetContactPolicyCommand.js +28 -21
  17. package/dist-es/commands/ListContactChannelsCommand.js +28 -21
  18. package/dist-es/commands/ListContactsCommand.js +28 -21
  19. package/dist-es/commands/ListEngagementsCommand.js +28 -21
  20. package/dist-es/commands/ListPageReceiptsCommand.js +28 -21
  21. package/dist-es/commands/ListPagesByContactCommand.js +28 -21
  22. package/dist-es/commands/ListPagesByEngagementCommand.js +28 -21
  23. package/dist-es/commands/ListTagsForResourceCommand.js +28 -21
  24. package/dist-es/commands/PutContactPolicyCommand.js +28 -21
  25. package/dist-es/commands/SendActivationCodeCommand.js +28 -21
  26. package/dist-es/commands/StartEngagementCommand.js +28 -21
  27. package/dist-es/commands/StopEngagementCommand.js +28 -21
  28. package/dist-es/commands/TagResourceCommand.js +28 -21
  29. package/dist-es/commands/UntagResourceCommand.js +28 -21
  30. package/dist-es/commands/UpdateContactChannelCommand.js +28 -21
  31. package/dist-es/commands/UpdateContactCommand.js +28 -21
  32. package/dist-es/endpoints.js +8 -8
  33. package/dist-es/models/SSMContactsServiceException.js +10 -5
  34. package/dist-es/models/models_0.js +179 -314
  35. package/dist-es/pagination/ListContactChannelsPaginator.js +68 -25
  36. package/dist-es/pagination/ListContactsPaginator.js +68 -25
  37. package/dist-es/pagination/ListEngagementsPaginator.js +68 -25
  38. package/dist-es/pagination/ListPageReceiptsPaginator.js +68 -25
  39. package/dist-es/pagination/ListPagesByContactPaginator.js +68 -25
  40. package/dist-es/pagination/ListPagesByEngagementPaginator.js +68 -25
  41. package/dist-es/protocols/Aws_json1_1.js +2482 -1913
  42. package/dist-es/runtimeConfig.browser.js +12 -26
  43. package/dist-es/runtimeConfig.js +12 -30
  44. package/dist-es/runtimeConfig.native.js +5 -8
  45. package/dist-es/runtimeConfig.shared.js +11 -8
  46. package/package.json +5 -5
@@ -1,1872 +1,2418 @@
1
+ import { __assign, __awaiter, __generator } from "tslib";
1
2
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
3
  import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, 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 { AccessDeniedException, ConflictException, DataEncryptionException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
5
6
  import { SSMContactsServiceException as __BaseException } from "../models/SSMContactsServiceException";
6
- export const serializeAws_json1_1AcceptPageCommand = async (input, context) => {
7
- const headers = {
8
- "content-type": "application/x-amz-json-1.1",
9
- "x-amz-target": "SSMContacts.AcceptPage",
10
- };
11
- let body;
12
- body = JSON.stringify(serializeAws_json1_1AcceptPageRequest(input, context));
13
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
14
- };
15
- export const serializeAws_json1_1ActivateContactChannelCommand = async (input, context) => {
16
- const headers = {
17
- "content-type": "application/x-amz-json-1.1",
18
- "x-amz-target": "SSMContacts.ActivateContactChannel",
19
- };
20
- let body;
21
- body = JSON.stringify(serializeAws_json1_1ActivateContactChannelRequest(input, context));
22
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
23
- };
24
- export const serializeAws_json1_1CreateContactCommand = async (input, context) => {
25
- const headers = {
26
- "content-type": "application/x-amz-json-1.1",
27
- "x-amz-target": "SSMContacts.CreateContact",
28
- };
29
- let body;
30
- body = JSON.stringify(serializeAws_json1_1CreateContactRequest(input, context));
31
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
32
- };
33
- export const serializeAws_json1_1CreateContactChannelCommand = async (input, context) => {
34
- const headers = {
35
- "content-type": "application/x-amz-json-1.1",
36
- "x-amz-target": "SSMContacts.CreateContactChannel",
37
- };
38
- let body;
39
- body = JSON.stringify(serializeAws_json1_1CreateContactChannelRequest(input, context));
40
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
41
- };
42
- export const serializeAws_json1_1DeactivateContactChannelCommand = async (input, context) => {
43
- const headers = {
44
- "content-type": "application/x-amz-json-1.1",
45
- "x-amz-target": "SSMContacts.DeactivateContactChannel",
46
- };
47
- let body;
48
- body = JSON.stringify(serializeAws_json1_1DeactivateContactChannelRequest(input, context));
49
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
50
- };
51
- export const serializeAws_json1_1DeleteContactCommand = async (input, context) => {
52
- const headers = {
53
- "content-type": "application/x-amz-json-1.1",
54
- "x-amz-target": "SSMContacts.DeleteContact",
55
- };
56
- let body;
57
- body = JSON.stringify(serializeAws_json1_1DeleteContactRequest(input, context));
58
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
59
- };
60
- export const serializeAws_json1_1DeleteContactChannelCommand = async (input, context) => {
61
- const headers = {
62
- "content-type": "application/x-amz-json-1.1",
63
- "x-amz-target": "SSMContacts.DeleteContactChannel",
64
- };
65
- let body;
66
- body = JSON.stringify(serializeAws_json1_1DeleteContactChannelRequest(input, context));
67
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
68
- };
69
- export const serializeAws_json1_1DescribeEngagementCommand = async (input, context) => {
70
- const headers = {
71
- "content-type": "application/x-amz-json-1.1",
72
- "x-amz-target": "SSMContacts.DescribeEngagement",
73
- };
74
- let body;
75
- body = JSON.stringify(serializeAws_json1_1DescribeEngagementRequest(input, context));
76
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
77
- };
78
- export const serializeAws_json1_1DescribePageCommand = async (input, context) => {
79
- const headers = {
80
- "content-type": "application/x-amz-json-1.1",
81
- "x-amz-target": "SSMContacts.DescribePage",
82
- };
83
- let body;
84
- body = JSON.stringify(serializeAws_json1_1DescribePageRequest(input, context));
85
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
86
- };
87
- export const serializeAws_json1_1GetContactCommand = async (input, context) => {
88
- const headers = {
89
- "content-type": "application/x-amz-json-1.1",
90
- "x-amz-target": "SSMContacts.GetContact",
91
- };
92
- let body;
93
- body = JSON.stringify(serializeAws_json1_1GetContactRequest(input, context));
94
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
95
- };
96
- export const serializeAws_json1_1GetContactChannelCommand = async (input, context) => {
97
- const headers = {
98
- "content-type": "application/x-amz-json-1.1",
99
- "x-amz-target": "SSMContacts.GetContactChannel",
100
- };
101
- let body;
102
- body = JSON.stringify(serializeAws_json1_1GetContactChannelRequest(input, context));
103
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
104
- };
105
- export const serializeAws_json1_1GetContactPolicyCommand = async (input, context) => {
106
- const headers = {
107
- "content-type": "application/x-amz-json-1.1",
108
- "x-amz-target": "SSMContacts.GetContactPolicy",
109
- };
110
- let body;
111
- body = JSON.stringify(serializeAws_json1_1GetContactPolicyRequest(input, context));
112
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
113
- };
114
- export const serializeAws_json1_1ListContactChannelsCommand = async (input, context) => {
115
- const headers = {
116
- "content-type": "application/x-amz-json-1.1",
117
- "x-amz-target": "SSMContacts.ListContactChannels",
118
- };
119
- let body;
120
- body = JSON.stringify(serializeAws_json1_1ListContactChannelsRequest(input, context));
121
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
122
- };
123
- export const serializeAws_json1_1ListContactsCommand = async (input, context) => {
124
- const headers = {
125
- "content-type": "application/x-amz-json-1.1",
126
- "x-amz-target": "SSMContacts.ListContacts",
127
- };
128
- let body;
129
- body = JSON.stringify(serializeAws_json1_1ListContactsRequest(input, context));
130
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
131
- };
132
- export const serializeAws_json1_1ListEngagementsCommand = async (input, context) => {
133
- const headers = {
134
- "content-type": "application/x-amz-json-1.1",
135
- "x-amz-target": "SSMContacts.ListEngagements",
136
- };
137
- let body;
138
- body = JSON.stringify(serializeAws_json1_1ListEngagementsRequest(input, context));
139
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
140
- };
141
- export const serializeAws_json1_1ListPageReceiptsCommand = async (input, context) => {
142
- const headers = {
143
- "content-type": "application/x-amz-json-1.1",
144
- "x-amz-target": "SSMContacts.ListPageReceipts",
145
- };
146
- let body;
147
- body = JSON.stringify(serializeAws_json1_1ListPageReceiptsRequest(input, context));
148
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
149
- };
150
- export const serializeAws_json1_1ListPagesByContactCommand = async (input, context) => {
151
- const headers = {
152
- "content-type": "application/x-amz-json-1.1",
153
- "x-amz-target": "SSMContacts.ListPagesByContact",
154
- };
155
- let body;
156
- body = JSON.stringify(serializeAws_json1_1ListPagesByContactRequest(input, context));
157
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
158
- };
159
- export const serializeAws_json1_1ListPagesByEngagementCommand = async (input, context) => {
160
- const headers = {
161
- "content-type": "application/x-amz-json-1.1",
162
- "x-amz-target": "SSMContacts.ListPagesByEngagement",
163
- };
164
- let body;
165
- body = JSON.stringify(serializeAws_json1_1ListPagesByEngagementRequest(input, context));
166
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
167
- };
168
- export const serializeAws_json1_1ListTagsForResourceCommand = async (input, context) => {
169
- const headers = {
170
- "content-type": "application/x-amz-json-1.1",
171
- "x-amz-target": "SSMContacts.ListTagsForResource",
172
- };
173
- let body;
174
- body = JSON.stringify(serializeAws_json1_1ListTagsForResourceRequest(input, context));
175
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
176
- };
177
- export const serializeAws_json1_1PutContactPolicyCommand = async (input, context) => {
178
- const headers = {
179
- "content-type": "application/x-amz-json-1.1",
180
- "x-amz-target": "SSMContacts.PutContactPolicy",
181
- };
182
- let body;
183
- body = JSON.stringify(serializeAws_json1_1PutContactPolicyRequest(input, context));
184
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
185
- };
186
- export const serializeAws_json1_1SendActivationCodeCommand = async (input, context) => {
187
- const headers = {
188
- "content-type": "application/x-amz-json-1.1",
189
- "x-amz-target": "SSMContacts.SendActivationCode",
190
- };
191
- let body;
192
- body = JSON.stringify(serializeAws_json1_1SendActivationCodeRequest(input, context));
193
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
194
- };
195
- export const serializeAws_json1_1StartEngagementCommand = async (input, context) => {
196
- const headers = {
197
- "content-type": "application/x-amz-json-1.1",
198
- "x-amz-target": "SSMContacts.StartEngagement",
199
- };
200
- let body;
201
- body = JSON.stringify(serializeAws_json1_1StartEngagementRequest(input, context));
202
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
203
- };
204
- export const serializeAws_json1_1StopEngagementCommand = async (input, context) => {
205
- const headers = {
206
- "content-type": "application/x-amz-json-1.1",
207
- "x-amz-target": "SSMContacts.StopEngagement",
208
- };
209
- let body;
210
- body = JSON.stringify(serializeAws_json1_1StopEngagementRequest(input, context));
211
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
212
- };
213
- export const serializeAws_json1_1TagResourceCommand = async (input, context) => {
214
- const headers = {
215
- "content-type": "application/x-amz-json-1.1",
216
- "x-amz-target": "SSMContacts.TagResource",
217
- };
218
- let body;
219
- body = JSON.stringify(serializeAws_json1_1TagResourceRequest(input, context));
220
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
221
- };
222
- export const serializeAws_json1_1UntagResourceCommand = async (input, context) => {
223
- const headers = {
224
- "content-type": "application/x-amz-json-1.1",
225
- "x-amz-target": "SSMContacts.UntagResource",
226
- };
227
- let body;
228
- body = JSON.stringify(serializeAws_json1_1UntagResourceRequest(input, context));
229
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
230
- };
231
- export const serializeAws_json1_1UpdateContactCommand = async (input, context) => {
232
- const headers = {
233
- "content-type": "application/x-amz-json-1.1",
234
- "x-amz-target": "SSMContacts.UpdateContact",
235
- };
236
- let body;
237
- body = JSON.stringify(serializeAws_json1_1UpdateContactRequest(input, context));
238
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
239
- };
240
- export const serializeAws_json1_1UpdateContactChannelCommand = async (input, context) => {
241
- const headers = {
242
- "content-type": "application/x-amz-json-1.1",
243
- "x-amz-target": "SSMContacts.UpdateContactChannel",
244
- };
245
- let body;
246
- body = JSON.stringify(serializeAws_json1_1UpdateContactChannelRequest(input, context));
247
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
248
- };
249
- export const deserializeAws_json1_1AcceptPageCommand = async (output, context) => {
250
- if (output.statusCode >= 300) {
251
- return deserializeAws_json1_1AcceptPageCommandError(output, context);
252
- }
253
- const data = await parseBody(output.body, context);
254
- let contents = {};
255
- contents = deserializeAws_json1_1AcceptPageResult(data, context);
256
- const response = {
257
- $metadata: deserializeMetadata(output),
258
- ...contents,
259
- };
260
- return Promise.resolve(response);
261
- };
262
- const deserializeAws_json1_1AcceptPageCommandError = async (output, context) => {
263
- const parsedOutput = {
264
- ...output,
265
- body: await parseErrorBody(output.body, context),
266
- };
267
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
268
- switch (errorCode) {
269
- case "AccessDeniedException":
270
- case "com.amazonaws.ssmcontacts#AccessDeniedException":
271
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
272
- case "InternalServerException":
273
- case "com.amazonaws.ssmcontacts#InternalServerException":
274
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
275
- case "ResourceNotFoundException":
276
- case "com.amazonaws.ssmcontacts#ResourceNotFoundException":
277
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
278
- case "ThrottlingException":
279
- case "com.amazonaws.ssmcontacts#ThrottlingException":
280
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
281
- case "ValidationException":
282
- case "com.amazonaws.ssmcontacts#ValidationException":
283
- throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
284
- default:
285
- const parsedBody = parsedOutput.body;
286
- throwDefaultError({
287
- output,
288
- parsedBody,
289
- exceptionCtor: __BaseException,
290
- errorCode,
291
- });
292
- }
293
- };
294
- export const deserializeAws_json1_1ActivateContactChannelCommand = async (output, context) => {
295
- if (output.statusCode >= 300) {
296
- return deserializeAws_json1_1ActivateContactChannelCommandError(output, context);
297
- }
298
- const data = await parseBody(output.body, context);
299
- let contents = {};
300
- contents = deserializeAws_json1_1ActivateContactChannelResult(data, context);
301
- const response = {
302
- $metadata: deserializeMetadata(output),
303
- ...contents,
304
- };
305
- return Promise.resolve(response);
306
- };
307
- const deserializeAws_json1_1ActivateContactChannelCommandError = async (output, context) => {
308
- const parsedOutput = {
309
- ...output,
310
- body: await parseErrorBody(output.body, context),
311
- };
312
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
313
- switch (errorCode) {
314
- case "AccessDeniedException":
315
- case "com.amazonaws.ssmcontacts#AccessDeniedException":
316
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
317
- case "InternalServerException":
318
- case "com.amazonaws.ssmcontacts#InternalServerException":
319
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
320
- case "ResourceNotFoundException":
321
- case "com.amazonaws.ssmcontacts#ResourceNotFoundException":
322
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
323
- case "ThrottlingException":
324
- case "com.amazonaws.ssmcontacts#ThrottlingException":
325
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
326
- case "ValidationException":
327
- case "com.amazonaws.ssmcontacts#ValidationException":
328
- throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
329
- default:
330
- const parsedBody = parsedOutput.body;
331
- throwDefaultError({
332
- output,
333
- parsedBody,
334
- exceptionCtor: __BaseException,
335
- errorCode,
336
- });
337
- }
338
- };
339
- export const deserializeAws_json1_1CreateContactCommand = async (output, context) => {
340
- if (output.statusCode >= 300) {
341
- return deserializeAws_json1_1CreateContactCommandError(output, context);
342
- }
343
- const data = await parseBody(output.body, context);
344
- let contents = {};
345
- contents = deserializeAws_json1_1CreateContactResult(data, context);
346
- const response = {
347
- $metadata: deserializeMetadata(output),
348
- ...contents,
349
- };
350
- return Promise.resolve(response);
351
- };
352
- const deserializeAws_json1_1CreateContactCommandError = async (output, context) => {
353
- const parsedOutput = {
354
- ...output,
355
- body: await parseErrorBody(output.body, context),
356
- };
357
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
358
- switch (errorCode) {
359
- case "AccessDeniedException":
360
- case "com.amazonaws.ssmcontacts#AccessDeniedException":
361
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
362
- case "ConflictException":
363
- case "com.amazonaws.ssmcontacts#ConflictException":
364
- throw await deserializeAws_json1_1ConflictExceptionResponse(parsedOutput, context);
365
- case "DataEncryptionException":
366
- case "com.amazonaws.ssmcontacts#DataEncryptionException":
367
- throw await deserializeAws_json1_1DataEncryptionExceptionResponse(parsedOutput, context);
368
- case "InternalServerException":
369
- case "com.amazonaws.ssmcontacts#InternalServerException":
370
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
371
- case "ServiceQuotaExceededException":
372
- case "com.amazonaws.ssmcontacts#ServiceQuotaExceededException":
373
- throw await deserializeAws_json1_1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
374
- case "ThrottlingException":
375
- case "com.amazonaws.ssmcontacts#ThrottlingException":
376
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
377
- case "ValidationException":
378
- case "com.amazonaws.ssmcontacts#ValidationException":
379
- throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
380
- default:
381
- const parsedBody = parsedOutput.body;
382
- throwDefaultError({
383
- output,
384
- parsedBody,
385
- exceptionCtor: __BaseException,
386
- errorCode,
387
- });
388
- }
389
- };
390
- export const deserializeAws_json1_1CreateContactChannelCommand = async (output, context) => {
391
- if (output.statusCode >= 300) {
392
- return deserializeAws_json1_1CreateContactChannelCommandError(output, context);
393
- }
394
- const data = await parseBody(output.body, context);
395
- let contents = {};
396
- contents = deserializeAws_json1_1CreateContactChannelResult(data, context);
397
- const response = {
398
- $metadata: deserializeMetadata(output),
399
- ...contents,
400
- };
401
- return Promise.resolve(response);
402
- };
403
- const deserializeAws_json1_1CreateContactChannelCommandError = async (output, context) => {
404
- const parsedOutput = {
405
- ...output,
406
- body: await parseErrorBody(output.body, context),
407
- };
408
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
409
- switch (errorCode) {
410
- case "AccessDeniedException":
411
- case "com.amazonaws.ssmcontacts#AccessDeniedException":
412
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
413
- case "ConflictException":
414
- case "com.amazonaws.ssmcontacts#ConflictException":
415
- throw await deserializeAws_json1_1ConflictExceptionResponse(parsedOutput, context);
416
- case "DataEncryptionException":
417
- case "com.amazonaws.ssmcontacts#DataEncryptionException":
418
- throw await deserializeAws_json1_1DataEncryptionExceptionResponse(parsedOutput, context);
419
- case "InternalServerException":
420
- case "com.amazonaws.ssmcontacts#InternalServerException":
421
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
422
- case "ThrottlingException":
423
- case "com.amazonaws.ssmcontacts#ThrottlingException":
424
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
425
- case "ValidationException":
426
- case "com.amazonaws.ssmcontacts#ValidationException":
427
- throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
428
- default:
429
- const parsedBody = parsedOutput.body;
430
- throwDefaultError({
431
- output,
432
- parsedBody,
433
- exceptionCtor: __BaseException,
434
- errorCode,
435
- });
436
- }
437
- };
438
- export const deserializeAws_json1_1DeactivateContactChannelCommand = async (output, context) => {
439
- if (output.statusCode >= 300) {
440
- return deserializeAws_json1_1DeactivateContactChannelCommandError(output, context);
441
- }
442
- const data = await parseBody(output.body, context);
443
- let contents = {};
444
- contents = deserializeAws_json1_1DeactivateContactChannelResult(data, context);
445
- const response = {
446
- $metadata: deserializeMetadata(output),
447
- ...contents,
448
- };
449
- return Promise.resolve(response);
450
- };
451
- const deserializeAws_json1_1DeactivateContactChannelCommandError = async (output, context) => {
452
- const parsedOutput = {
453
- ...output,
454
- body: await parseErrorBody(output.body, context),
455
- };
456
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
457
- switch (errorCode) {
458
- case "AccessDeniedException":
459
- case "com.amazonaws.ssmcontacts#AccessDeniedException":
460
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
461
- case "InternalServerException":
462
- case "com.amazonaws.ssmcontacts#InternalServerException":
463
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
464
- case "ResourceNotFoundException":
465
- case "com.amazonaws.ssmcontacts#ResourceNotFoundException":
466
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
467
- case "ThrottlingException":
468
- case "com.amazonaws.ssmcontacts#ThrottlingException":
469
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
470
- case "ValidationException":
471
- case "com.amazonaws.ssmcontacts#ValidationException":
472
- throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
473
- default:
474
- const parsedBody = parsedOutput.body;
475
- throwDefaultError({
476
- output,
477
- parsedBody,
478
- exceptionCtor: __BaseException,
479
- errorCode,
480
- });
481
- }
482
- };
483
- export const deserializeAws_json1_1DeleteContactCommand = async (output, context) => {
484
- if (output.statusCode >= 300) {
485
- return deserializeAws_json1_1DeleteContactCommandError(output, context);
486
- }
487
- const data = await parseBody(output.body, context);
488
- let contents = {};
489
- contents = deserializeAws_json1_1DeleteContactResult(data, context);
490
- const response = {
491
- $metadata: deserializeMetadata(output),
492
- ...contents,
493
- };
494
- return Promise.resolve(response);
495
- };
496
- const deserializeAws_json1_1DeleteContactCommandError = async (output, context) => {
497
- const parsedOutput = {
498
- ...output,
499
- body: await parseErrorBody(output.body, context),
500
- };
501
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
502
- switch (errorCode) {
503
- case "AccessDeniedException":
504
- case "com.amazonaws.ssmcontacts#AccessDeniedException":
505
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
506
- case "InternalServerException":
507
- case "com.amazonaws.ssmcontacts#InternalServerException":
508
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
509
- case "ResourceNotFoundException":
510
- case "com.amazonaws.ssmcontacts#ResourceNotFoundException":
511
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
512
- case "ThrottlingException":
513
- case "com.amazonaws.ssmcontacts#ThrottlingException":
514
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
515
- case "ValidationException":
516
- case "com.amazonaws.ssmcontacts#ValidationException":
517
- throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
518
- default:
519
- const parsedBody = parsedOutput.body;
520
- throwDefaultError({
521
- output,
522
- parsedBody,
523
- exceptionCtor: __BaseException,
524
- errorCode,
525
- });
526
- }
527
- };
528
- export const deserializeAws_json1_1DeleteContactChannelCommand = async (output, context) => {
529
- if (output.statusCode >= 300) {
530
- return deserializeAws_json1_1DeleteContactChannelCommandError(output, context);
531
- }
532
- const data = await parseBody(output.body, context);
533
- let contents = {};
534
- contents = deserializeAws_json1_1DeleteContactChannelResult(data, context);
535
- const response = {
536
- $metadata: deserializeMetadata(output),
537
- ...contents,
538
- };
539
- return Promise.resolve(response);
540
- };
541
- const deserializeAws_json1_1DeleteContactChannelCommandError = async (output, context) => {
542
- const parsedOutput = {
543
- ...output,
544
- body: await parseErrorBody(output.body, context),
545
- };
546
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
547
- switch (errorCode) {
548
- case "AccessDeniedException":
549
- case "com.amazonaws.ssmcontacts#AccessDeniedException":
550
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
551
- case "InternalServerException":
552
- case "com.amazonaws.ssmcontacts#InternalServerException":
553
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
554
- case "ResourceNotFoundException":
555
- case "com.amazonaws.ssmcontacts#ResourceNotFoundException":
556
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
557
- case "ThrottlingException":
558
- case "com.amazonaws.ssmcontacts#ThrottlingException":
559
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
560
- case "ValidationException":
561
- case "com.amazonaws.ssmcontacts#ValidationException":
562
- throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
563
- default:
564
- const parsedBody = parsedOutput.body;
565
- throwDefaultError({
566
- output,
567
- parsedBody,
568
- exceptionCtor: __BaseException,
569
- errorCode,
570
- });
571
- }
572
- };
573
- export const deserializeAws_json1_1DescribeEngagementCommand = async (output, context) => {
574
- if (output.statusCode >= 300) {
575
- return deserializeAws_json1_1DescribeEngagementCommandError(output, context);
576
- }
577
- const data = await parseBody(output.body, context);
578
- let contents = {};
579
- contents = deserializeAws_json1_1DescribeEngagementResult(data, context);
580
- const response = {
581
- $metadata: deserializeMetadata(output),
582
- ...contents,
583
- };
584
- return Promise.resolve(response);
585
- };
586
- const deserializeAws_json1_1DescribeEngagementCommandError = async (output, context) => {
587
- const parsedOutput = {
588
- ...output,
589
- body: await parseErrorBody(output.body, context),
590
- };
591
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
592
- switch (errorCode) {
593
- case "AccessDeniedException":
594
- case "com.amazonaws.ssmcontacts#AccessDeniedException":
595
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
596
- case "DataEncryptionException":
597
- case "com.amazonaws.ssmcontacts#DataEncryptionException":
598
- throw await deserializeAws_json1_1DataEncryptionExceptionResponse(parsedOutput, context);
599
- case "InternalServerException":
600
- case "com.amazonaws.ssmcontacts#InternalServerException":
601
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
602
- case "ResourceNotFoundException":
603
- case "com.amazonaws.ssmcontacts#ResourceNotFoundException":
604
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
605
- case "ThrottlingException":
606
- case "com.amazonaws.ssmcontacts#ThrottlingException":
607
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
608
- case "ValidationException":
609
- case "com.amazonaws.ssmcontacts#ValidationException":
610
- throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
611
- default:
612
- const parsedBody = parsedOutput.body;
613
- throwDefaultError({
614
- output,
615
- parsedBody,
616
- exceptionCtor: __BaseException,
617
- errorCode,
618
- });
619
- }
620
- };
621
- export const deserializeAws_json1_1DescribePageCommand = async (output, context) => {
622
- if (output.statusCode >= 300) {
623
- return deserializeAws_json1_1DescribePageCommandError(output, context);
624
- }
625
- const data = await parseBody(output.body, context);
626
- let contents = {};
627
- contents = deserializeAws_json1_1DescribePageResult(data, context);
628
- const response = {
629
- $metadata: deserializeMetadata(output),
630
- ...contents,
631
- };
632
- return Promise.resolve(response);
633
- };
634
- const deserializeAws_json1_1DescribePageCommandError = async (output, context) => {
635
- const parsedOutput = {
636
- ...output,
637
- body: await parseErrorBody(output.body, context),
638
- };
639
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
640
- switch (errorCode) {
641
- case "AccessDeniedException":
642
- case "com.amazonaws.ssmcontacts#AccessDeniedException":
643
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
644
- case "DataEncryptionException":
645
- case "com.amazonaws.ssmcontacts#DataEncryptionException":
646
- throw await deserializeAws_json1_1DataEncryptionExceptionResponse(parsedOutput, context);
647
- case "InternalServerException":
648
- case "com.amazonaws.ssmcontacts#InternalServerException":
649
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
650
- case "ResourceNotFoundException":
651
- case "com.amazonaws.ssmcontacts#ResourceNotFoundException":
652
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
653
- case "ThrottlingException":
654
- case "com.amazonaws.ssmcontacts#ThrottlingException":
655
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
656
- case "ValidationException":
657
- case "com.amazonaws.ssmcontacts#ValidationException":
658
- throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
659
- default:
660
- const parsedBody = parsedOutput.body;
661
- throwDefaultError({
662
- output,
663
- parsedBody,
664
- exceptionCtor: __BaseException,
665
- errorCode,
666
- });
667
- }
668
- };
669
- export const deserializeAws_json1_1GetContactCommand = async (output, context) => {
670
- if (output.statusCode >= 300) {
671
- return deserializeAws_json1_1GetContactCommandError(output, context);
672
- }
673
- const data = await parseBody(output.body, context);
674
- let contents = {};
675
- contents = deserializeAws_json1_1GetContactResult(data, context);
676
- const response = {
677
- $metadata: deserializeMetadata(output),
678
- ...contents,
679
- };
680
- return Promise.resolve(response);
681
- };
682
- const deserializeAws_json1_1GetContactCommandError = async (output, context) => {
683
- const parsedOutput = {
684
- ...output,
685
- body: await parseErrorBody(output.body, context),
686
- };
687
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
688
- switch (errorCode) {
689
- case "AccessDeniedException":
690
- case "com.amazonaws.ssmcontacts#AccessDeniedException":
691
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
692
- case "DataEncryptionException":
693
- case "com.amazonaws.ssmcontacts#DataEncryptionException":
694
- throw await deserializeAws_json1_1DataEncryptionExceptionResponse(parsedOutput, context);
695
- case "InternalServerException":
696
- case "com.amazonaws.ssmcontacts#InternalServerException":
697
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
698
- case "ResourceNotFoundException":
699
- case "com.amazonaws.ssmcontacts#ResourceNotFoundException":
700
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
701
- case "ThrottlingException":
702
- case "com.amazonaws.ssmcontacts#ThrottlingException":
703
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
704
- case "ValidationException":
705
- case "com.amazonaws.ssmcontacts#ValidationException":
706
- throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
707
- default:
708
- const parsedBody = parsedOutput.body;
709
- throwDefaultError({
710
- output,
711
- parsedBody,
712
- exceptionCtor: __BaseException,
713
- errorCode,
714
- });
715
- }
716
- };
717
- export const deserializeAws_json1_1GetContactChannelCommand = async (output, context) => {
718
- if (output.statusCode >= 300) {
719
- return deserializeAws_json1_1GetContactChannelCommandError(output, context);
720
- }
721
- const data = await parseBody(output.body, context);
722
- let contents = {};
723
- contents = deserializeAws_json1_1GetContactChannelResult(data, context);
724
- const response = {
725
- $metadata: deserializeMetadata(output),
726
- ...contents,
727
- };
728
- return Promise.resolve(response);
729
- };
730
- const deserializeAws_json1_1GetContactChannelCommandError = async (output, context) => {
731
- const parsedOutput = {
732
- ...output,
733
- body: await parseErrorBody(output.body, context),
734
- };
735
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
736
- switch (errorCode) {
737
- case "AccessDeniedException":
738
- case "com.amazonaws.ssmcontacts#AccessDeniedException":
739
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
740
- case "DataEncryptionException":
741
- case "com.amazonaws.ssmcontacts#DataEncryptionException":
742
- throw await deserializeAws_json1_1DataEncryptionExceptionResponse(parsedOutput, context);
743
- case "InternalServerException":
744
- case "com.amazonaws.ssmcontacts#InternalServerException":
745
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
746
- case "ResourceNotFoundException":
747
- case "com.amazonaws.ssmcontacts#ResourceNotFoundException":
748
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
749
- case "ThrottlingException":
750
- case "com.amazonaws.ssmcontacts#ThrottlingException":
751
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
752
- case "ValidationException":
753
- case "com.amazonaws.ssmcontacts#ValidationException":
754
- throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
755
- default:
756
- const parsedBody = parsedOutput.body;
757
- throwDefaultError({
758
- output,
759
- parsedBody,
760
- exceptionCtor: __BaseException,
761
- errorCode,
762
- });
763
- }
764
- };
765
- export const deserializeAws_json1_1GetContactPolicyCommand = async (output, context) => {
766
- if (output.statusCode >= 300) {
767
- return deserializeAws_json1_1GetContactPolicyCommandError(output, context);
768
- }
769
- const data = await parseBody(output.body, context);
770
- let contents = {};
771
- contents = deserializeAws_json1_1GetContactPolicyResult(data, context);
772
- const response = {
773
- $metadata: deserializeMetadata(output),
774
- ...contents,
775
- };
776
- return Promise.resolve(response);
777
- };
778
- const deserializeAws_json1_1GetContactPolicyCommandError = async (output, context) => {
779
- const parsedOutput = {
780
- ...output,
781
- body: await parseErrorBody(output.body, context),
782
- };
783
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
784
- switch (errorCode) {
785
- case "AccessDeniedException":
786
- case "com.amazonaws.ssmcontacts#AccessDeniedException":
787
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
788
- case "InternalServerException":
789
- case "com.amazonaws.ssmcontacts#InternalServerException":
790
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
791
- case "ResourceNotFoundException":
792
- case "com.amazonaws.ssmcontacts#ResourceNotFoundException":
793
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
794
- case "ThrottlingException":
795
- case "com.amazonaws.ssmcontacts#ThrottlingException":
796
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
797
- case "ValidationException":
798
- case "com.amazonaws.ssmcontacts#ValidationException":
799
- throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
800
- default:
801
- const parsedBody = parsedOutput.body;
802
- throwDefaultError({
803
- output,
804
- parsedBody,
805
- exceptionCtor: __BaseException,
806
- errorCode,
807
- });
808
- }
809
- };
810
- export const deserializeAws_json1_1ListContactChannelsCommand = async (output, context) => {
811
- if (output.statusCode >= 300) {
812
- return deserializeAws_json1_1ListContactChannelsCommandError(output, context);
813
- }
814
- const data = await parseBody(output.body, context);
815
- let contents = {};
816
- contents = deserializeAws_json1_1ListContactChannelsResult(data, context);
817
- const response = {
818
- $metadata: deserializeMetadata(output),
819
- ...contents,
820
- };
821
- return Promise.resolve(response);
822
- };
823
- const deserializeAws_json1_1ListContactChannelsCommandError = async (output, context) => {
824
- const parsedOutput = {
825
- ...output,
826
- body: await parseErrorBody(output.body, context),
827
- };
828
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
829
- switch (errorCode) {
830
- case "AccessDeniedException":
831
- case "com.amazonaws.ssmcontacts#AccessDeniedException":
832
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
833
- case "DataEncryptionException":
834
- case "com.amazonaws.ssmcontacts#DataEncryptionException":
835
- throw await deserializeAws_json1_1DataEncryptionExceptionResponse(parsedOutput, context);
836
- case "InternalServerException":
837
- case "com.amazonaws.ssmcontacts#InternalServerException":
838
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
839
- case "ResourceNotFoundException":
840
- case "com.amazonaws.ssmcontacts#ResourceNotFoundException":
841
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
842
- case "ThrottlingException":
843
- case "com.amazonaws.ssmcontacts#ThrottlingException":
844
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
845
- case "ValidationException":
846
- case "com.amazonaws.ssmcontacts#ValidationException":
847
- throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
848
- default:
849
- const parsedBody = parsedOutput.body;
850
- throwDefaultError({
851
- output,
852
- parsedBody,
853
- exceptionCtor: __BaseException,
854
- errorCode,
855
- });
856
- }
857
- };
858
- export const deserializeAws_json1_1ListContactsCommand = async (output, context) => {
859
- if (output.statusCode >= 300) {
860
- return deserializeAws_json1_1ListContactsCommandError(output, context);
861
- }
862
- const data = await parseBody(output.body, context);
863
- let contents = {};
864
- contents = deserializeAws_json1_1ListContactsResult(data, context);
865
- const response = {
866
- $metadata: deserializeMetadata(output),
867
- ...contents,
868
- };
869
- return Promise.resolve(response);
870
- };
871
- const deserializeAws_json1_1ListContactsCommandError = async (output, context) => {
872
- const parsedOutput = {
873
- ...output,
874
- body: await parseErrorBody(output.body, context),
875
- };
876
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
877
- switch (errorCode) {
878
- case "AccessDeniedException":
879
- case "com.amazonaws.ssmcontacts#AccessDeniedException":
880
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
881
- case "InternalServerException":
882
- case "com.amazonaws.ssmcontacts#InternalServerException":
883
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
884
- case "ThrottlingException":
885
- case "com.amazonaws.ssmcontacts#ThrottlingException":
886
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
887
- case "ValidationException":
888
- case "com.amazonaws.ssmcontacts#ValidationException":
889
- throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
890
- default:
891
- const parsedBody = parsedOutput.body;
892
- throwDefaultError({
893
- output,
894
- parsedBody,
895
- exceptionCtor: __BaseException,
896
- errorCode,
897
- });
898
- }
899
- };
900
- export const deserializeAws_json1_1ListEngagementsCommand = async (output, context) => {
901
- if (output.statusCode >= 300) {
902
- return deserializeAws_json1_1ListEngagementsCommandError(output, context);
903
- }
904
- const data = await parseBody(output.body, context);
905
- let contents = {};
906
- contents = deserializeAws_json1_1ListEngagementsResult(data, context);
907
- const response = {
908
- $metadata: deserializeMetadata(output),
909
- ...contents,
910
- };
911
- return Promise.resolve(response);
912
- };
913
- const deserializeAws_json1_1ListEngagementsCommandError = async (output, context) => {
914
- const parsedOutput = {
915
- ...output,
916
- body: await parseErrorBody(output.body, context),
917
- };
918
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
919
- switch (errorCode) {
920
- case "AccessDeniedException":
921
- case "com.amazonaws.ssmcontacts#AccessDeniedException":
922
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
923
- case "InternalServerException":
924
- case "com.amazonaws.ssmcontacts#InternalServerException":
925
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
926
- case "ThrottlingException":
927
- case "com.amazonaws.ssmcontacts#ThrottlingException":
928
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
929
- case "ValidationException":
930
- case "com.amazonaws.ssmcontacts#ValidationException":
931
- throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
932
- default:
933
- const parsedBody = parsedOutput.body;
934
- throwDefaultError({
935
- output,
936
- parsedBody,
937
- exceptionCtor: __BaseException,
938
- errorCode,
939
- });
940
- }
941
- };
942
- export const deserializeAws_json1_1ListPageReceiptsCommand = async (output, context) => {
943
- if (output.statusCode >= 300) {
944
- return deserializeAws_json1_1ListPageReceiptsCommandError(output, context);
945
- }
946
- const data = await parseBody(output.body, context);
947
- let contents = {};
948
- contents = deserializeAws_json1_1ListPageReceiptsResult(data, context);
949
- const response = {
950
- $metadata: deserializeMetadata(output),
951
- ...contents,
952
- };
953
- return Promise.resolve(response);
954
- };
955
- const deserializeAws_json1_1ListPageReceiptsCommandError = async (output, context) => {
956
- const parsedOutput = {
957
- ...output,
958
- body: await parseErrorBody(output.body, context),
959
- };
960
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
961
- switch (errorCode) {
962
- case "AccessDeniedException":
963
- case "com.amazonaws.ssmcontacts#AccessDeniedException":
964
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
965
- case "InternalServerException":
966
- case "com.amazonaws.ssmcontacts#InternalServerException":
967
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
968
- case "ResourceNotFoundException":
969
- case "com.amazonaws.ssmcontacts#ResourceNotFoundException":
970
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
971
- case "ThrottlingException":
972
- case "com.amazonaws.ssmcontacts#ThrottlingException":
973
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
974
- case "ValidationException":
975
- case "com.amazonaws.ssmcontacts#ValidationException":
976
- throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
977
- default:
978
- const parsedBody = parsedOutput.body;
979
- throwDefaultError({
980
- output,
981
- parsedBody,
982
- exceptionCtor: __BaseException,
983
- errorCode,
984
- });
985
- }
986
- };
987
- export const deserializeAws_json1_1ListPagesByContactCommand = async (output, context) => {
988
- if (output.statusCode >= 300) {
989
- return deserializeAws_json1_1ListPagesByContactCommandError(output, context);
990
- }
991
- const data = await parseBody(output.body, context);
992
- let contents = {};
993
- contents = deserializeAws_json1_1ListPagesByContactResult(data, context);
994
- const response = {
995
- $metadata: deserializeMetadata(output),
996
- ...contents,
997
- };
998
- return Promise.resolve(response);
999
- };
1000
- const deserializeAws_json1_1ListPagesByContactCommandError = async (output, context) => {
1001
- const parsedOutput = {
1002
- ...output,
1003
- body: await parseErrorBody(output.body, context),
1004
- };
1005
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1006
- switch (errorCode) {
1007
- case "AccessDeniedException":
1008
- case "com.amazonaws.ssmcontacts#AccessDeniedException":
1009
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
1010
- case "InternalServerException":
1011
- case "com.amazonaws.ssmcontacts#InternalServerException":
1012
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
1013
- case "ResourceNotFoundException":
1014
- case "com.amazonaws.ssmcontacts#ResourceNotFoundException":
1015
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
1016
- case "ThrottlingException":
1017
- case "com.amazonaws.ssmcontacts#ThrottlingException":
1018
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
1019
- case "ValidationException":
1020
- case "com.amazonaws.ssmcontacts#ValidationException":
1021
- throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
1022
- default:
1023
- const parsedBody = parsedOutput.body;
1024
- throwDefaultError({
1025
- output,
1026
- parsedBody,
1027
- exceptionCtor: __BaseException,
1028
- errorCode,
1029
- });
1030
- }
1031
- };
1032
- export const deserializeAws_json1_1ListPagesByEngagementCommand = async (output, context) => {
1033
- if (output.statusCode >= 300) {
1034
- return deserializeAws_json1_1ListPagesByEngagementCommandError(output, context);
1035
- }
1036
- const data = await parseBody(output.body, context);
1037
- let contents = {};
1038
- contents = deserializeAws_json1_1ListPagesByEngagementResult(data, context);
1039
- const response = {
1040
- $metadata: deserializeMetadata(output),
1041
- ...contents,
1042
- };
1043
- return Promise.resolve(response);
1044
- };
1045
- const deserializeAws_json1_1ListPagesByEngagementCommandError = async (output, context) => {
1046
- const parsedOutput = {
1047
- ...output,
1048
- body: await parseErrorBody(output.body, context),
1049
- };
1050
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1051
- switch (errorCode) {
1052
- case "AccessDeniedException":
1053
- case "com.amazonaws.ssmcontacts#AccessDeniedException":
1054
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
1055
- case "InternalServerException":
1056
- case "com.amazonaws.ssmcontacts#InternalServerException":
1057
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
1058
- case "ResourceNotFoundException":
1059
- case "com.amazonaws.ssmcontacts#ResourceNotFoundException":
1060
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
1061
- case "ThrottlingException":
1062
- case "com.amazonaws.ssmcontacts#ThrottlingException":
1063
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
1064
- case "ValidationException":
1065
- case "com.amazonaws.ssmcontacts#ValidationException":
1066
- throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
1067
- default:
1068
- const parsedBody = parsedOutput.body;
1069
- throwDefaultError({
1070
- output,
1071
- parsedBody,
1072
- exceptionCtor: __BaseException,
1073
- errorCode,
1074
- });
1075
- }
1076
- };
1077
- export const deserializeAws_json1_1ListTagsForResourceCommand = async (output, context) => {
1078
- if (output.statusCode >= 300) {
1079
- return deserializeAws_json1_1ListTagsForResourceCommandError(output, context);
1080
- }
1081
- const data = await parseBody(output.body, context);
1082
- let contents = {};
1083
- contents = deserializeAws_json1_1ListTagsForResourceResult(data, context);
1084
- const response = {
1085
- $metadata: deserializeMetadata(output),
1086
- ...contents,
1087
- };
1088
- return Promise.resolve(response);
1089
- };
1090
- const deserializeAws_json1_1ListTagsForResourceCommandError = async (output, context) => {
1091
- const parsedOutput = {
1092
- ...output,
1093
- body: await parseErrorBody(output.body, context),
1094
- };
1095
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1096
- switch (errorCode) {
1097
- case "AccessDeniedException":
1098
- case "com.amazonaws.ssmcontacts#AccessDeniedException":
1099
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
1100
- case "InternalServerException":
1101
- case "com.amazonaws.ssmcontacts#InternalServerException":
1102
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
1103
- case "ResourceNotFoundException":
1104
- case "com.amazonaws.ssmcontacts#ResourceNotFoundException":
1105
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
1106
- case "ThrottlingException":
1107
- case "com.amazonaws.ssmcontacts#ThrottlingException":
1108
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
1109
- case "ValidationException":
1110
- case "com.amazonaws.ssmcontacts#ValidationException":
1111
- throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
1112
- default:
1113
- const parsedBody = parsedOutput.body;
1114
- throwDefaultError({
1115
- output,
1116
- parsedBody,
1117
- exceptionCtor: __BaseException,
1118
- errorCode,
1119
- });
1120
- }
1121
- };
1122
- export const deserializeAws_json1_1PutContactPolicyCommand = async (output, context) => {
1123
- if (output.statusCode >= 300) {
1124
- return deserializeAws_json1_1PutContactPolicyCommandError(output, context);
1125
- }
1126
- const data = await parseBody(output.body, context);
1127
- let contents = {};
1128
- contents = deserializeAws_json1_1PutContactPolicyResult(data, context);
1129
- const response = {
1130
- $metadata: deserializeMetadata(output),
1131
- ...contents,
1132
- };
1133
- return Promise.resolve(response);
1134
- };
1135
- const deserializeAws_json1_1PutContactPolicyCommandError = async (output, context) => {
1136
- const parsedOutput = {
1137
- ...output,
1138
- body: await parseErrorBody(output.body, context),
1139
- };
1140
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1141
- switch (errorCode) {
1142
- case "AccessDeniedException":
1143
- case "com.amazonaws.ssmcontacts#AccessDeniedException":
1144
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
1145
- case "ConflictException":
1146
- case "com.amazonaws.ssmcontacts#ConflictException":
1147
- throw await deserializeAws_json1_1ConflictExceptionResponse(parsedOutput, context);
1148
- case "InternalServerException":
1149
- case "com.amazonaws.ssmcontacts#InternalServerException":
1150
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
1151
- case "ResourceNotFoundException":
1152
- case "com.amazonaws.ssmcontacts#ResourceNotFoundException":
1153
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
1154
- case "ThrottlingException":
1155
- case "com.amazonaws.ssmcontacts#ThrottlingException":
1156
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
1157
- case "ValidationException":
1158
- case "com.amazonaws.ssmcontacts#ValidationException":
1159
- throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
1160
- default:
1161
- const parsedBody = parsedOutput.body;
1162
- throwDefaultError({
1163
- output,
1164
- parsedBody,
1165
- exceptionCtor: __BaseException,
1166
- errorCode,
1167
- });
1168
- }
1169
- };
1170
- export const deserializeAws_json1_1SendActivationCodeCommand = async (output, context) => {
1171
- if (output.statusCode >= 300) {
1172
- return deserializeAws_json1_1SendActivationCodeCommandError(output, context);
1173
- }
1174
- const data = await parseBody(output.body, context);
1175
- let contents = {};
1176
- contents = deserializeAws_json1_1SendActivationCodeResult(data, context);
1177
- const response = {
1178
- $metadata: deserializeMetadata(output),
1179
- ...contents,
1180
- };
1181
- return Promise.resolve(response);
1182
- };
1183
- const deserializeAws_json1_1SendActivationCodeCommandError = async (output, context) => {
1184
- const parsedOutput = {
1185
- ...output,
1186
- body: await parseErrorBody(output.body, context),
1187
- };
1188
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1189
- switch (errorCode) {
1190
- case "AccessDeniedException":
1191
- case "com.amazonaws.ssmcontacts#AccessDeniedException":
1192
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
1193
- case "DataEncryptionException":
1194
- case "com.amazonaws.ssmcontacts#DataEncryptionException":
1195
- throw await deserializeAws_json1_1DataEncryptionExceptionResponse(parsedOutput, context);
1196
- case "InternalServerException":
1197
- case "com.amazonaws.ssmcontacts#InternalServerException":
1198
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
1199
- case "ResourceNotFoundException":
1200
- case "com.amazonaws.ssmcontacts#ResourceNotFoundException":
1201
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
1202
- case "ServiceQuotaExceededException":
1203
- case "com.amazonaws.ssmcontacts#ServiceQuotaExceededException":
1204
- throw await deserializeAws_json1_1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
1205
- case "ThrottlingException":
1206
- case "com.amazonaws.ssmcontacts#ThrottlingException":
1207
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
1208
- case "ValidationException":
1209
- case "com.amazonaws.ssmcontacts#ValidationException":
1210
- throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
1211
- default:
1212
- const parsedBody = parsedOutput.body;
1213
- throwDefaultError({
1214
- output,
1215
- parsedBody,
1216
- exceptionCtor: __BaseException,
1217
- errorCode,
1218
- });
1219
- }
1220
- };
1221
- export const deserializeAws_json1_1StartEngagementCommand = async (output, context) => {
1222
- if (output.statusCode >= 300) {
1223
- return deserializeAws_json1_1StartEngagementCommandError(output, context);
1224
- }
1225
- const data = await parseBody(output.body, context);
1226
- let contents = {};
1227
- contents = deserializeAws_json1_1StartEngagementResult(data, context);
1228
- const response = {
1229
- $metadata: deserializeMetadata(output),
1230
- ...contents,
1231
- };
1232
- return Promise.resolve(response);
1233
- };
1234
- const deserializeAws_json1_1StartEngagementCommandError = async (output, context) => {
1235
- const parsedOutput = {
1236
- ...output,
1237
- body: await parseErrorBody(output.body, context),
1238
- };
1239
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1240
- switch (errorCode) {
1241
- case "AccessDeniedException":
1242
- case "com.amazonaws.ssmcontacts#AccessDeniedException":
1243
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
1244
- case "DataEncryptionException":
1245
- case "com.amazonaws.ssmcontacts#DataEncryptionException":
1246
- throw await deserializeAws_json1_1DataEncryptionExceptionResponse(parsedOutput, context);
1247
- case "InternalServerException":
1248
- case "com.amazonaws.ssmcontacts#InternalServerException":
1249
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
1250
- case "ResourceNotFoundException":
1251
- case "com.amazonaws.ssmcontacts#ResourceNotFoundException":
1252
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
1253
- case "ThrottlingException":
1254
- case "com.amazonaws.ssmcontacts#ThrottlingException":
1255
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
1256
- case "ValidationException":
1257
- case "com.amazonaws.ssmcontacts#ValidationException":
1258
- throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
1259
- default:
1260
- const parsedBody = parsedOutput.body;
1261
- throwDefaultError({
1262
- output,
1263
- parsedBody,
1264
- exceptionCtor: __BaseException,
1265
- errorCode,
1266
- });
1267
- }
1268
- };
1269
- export const deserializeAws_json1_1StopEngagementCommand = async (output, context) => {
1270
- if (output.statusCode >= 300) {
1271
- return deserializeAws_json1_1StopEngagementCommandError(output, context);
1272
- }
1273
- const data = await parseBody(output.body, context);
1274
- let contents = {};
1275
- contents = deserializeAws_json1_1StopEngagementResult(data, context);
1276
- const response = {
1277
- $metadata: deserializeMetadata(output),
1278
- ...contents,
1279
- };
1280
- return Promise.resolve(response);
1281
- };
1282
- const deserializeAws_json1_1StopEngagementCommandError = async (output, context) => {
1283
- const parsedOutput = {
1284
- ...output,
1285
- body: await parseErrorBody(output.body, context),
1286
- };
1287
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1288
- switch (errorCode) {
1289
- case "AccessDeniedException":
1290
- case "com.amazonaws.ssmcontacts#AccessDeniedException":
1291
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
1292
- case "InternalServerException":
1293
- case "com.amazonaws.ssmcontacts#InternalServerException":
1294
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
1295
- case "ResourceNotFoundException":
1296
- case "com.amazonaws.ssmcontacts#ResourceNotFoundException":
1297
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
1298
- case "ThrottlingException":
1299
- case "com.amazonaws.ssmcontacts#ThrottlingException":
1300
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
1301
- case "ValidationException":
1302
- case "com.amazonaws.ssmcontacts#ValidationException":
1303
- throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
1304
- default:
1305
- const parsedBody = parsedOutput.body;
1306
- throwDefaultError({
1307
- output,
1308
- parsedBody,
1309
- exceptionCtor: __BaseException,
1310
- errorCode,
1311
- });
1312
- }
1313
- };
1314
- export const deserializeAws_json1_1TagResourceCommand = async (output, context) => {
1315
- if (output.statusCode >= 300) {
1316
- return deserializeAws_json1_1TagResourceCommandError(output, context);
1317
- }
1318
- const data = await parseBody(output.body, context);
1319
- let contents = {};
1320
- contents = deserializeAws_json1_1TagResourceResult(data, context);
1321
- const response = {
1322
- $metadata: deserializeMetadata(output),
1323
- ...contents,
1324
- };
1325
- return Promise.resolve(response);
1326
- };
1327
- const deserializeAws_json1_1TagResourceCommandError = async (output, context) => {
1328
- const parsedOutput = {
1329
- ...output,
1330
- body: await parseErrorBody(output.body, context),
1331
- };
1332
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1333
- switch (errorCode) {
1334
- case "AccessDeniedException":
1335
- case "com.amazonaws.ssmcontacts#AccessDeniedException":
1336
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
1337
- case "InternalServerException":
1338
- case "com.amazonaws.ssmcontacts#InternalServerException":
1339
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
1340
- case "ResourceNotFoundException":
1341
- case "com.amazonaws.ssmcontacts#ResourceNotFoundException":
1342
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
1343
- case "ServiceQuotaExceededException":
1344
- case "com.amazonaws.ssmcontacts#ServiceQuotaExceededException":
1345
- throw await deserializeAws_json1_1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
1346
- case "ThrottlingException":
1347
- case "com.amazonaws.ssmcontacts#ThrottlingException":
1348
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
1349
- case "ValidationException":
1350
- case "com.amazonaws.ssmcontacts#ValidationException":
1351
- throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
1352
- default:
1353
- const parsedBody = parsedOutput.body;
1354
- throwDefaultError({
1355
- output,
1356
- parsedBody,
1357
- exceptionCtor: __BaseException,
1358
- errorCode,
1359
- });
1360
- }
1361
- };
1362
- export const deserializeAws_json1_1UntagResourceCommand = async (output, context) => {
1363
- if (output.statusCode >= 300) {
1364
- return deserializeAws_json1_1UntagResourceCommandError(output, context);
1365
- }
1366
- const data = await parseBody(output.body, context);
1367
- let contents = {};
1368
- contents = deserializeAws_json1_1UntagResourceResult(data, context);
1369
- const response = {
1370
- $metadata: deserializeMetadata(output),
1371
- ...contents,
1372
- };
1373
- return Promise.resolve(response);
1374
- };
1375
- const deserializeAws_json1_1UntagResourceCommandError = async (output, context) => {
1376
- const parsedOutput = {
1377
- ...output,
1378
- body: await parseErrorBody(output.body, context),
1379
- };
1380
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1381
- switch (errorCode) {
1382
- case "AccessDeniedException":
1383
- case "com.amazonaws.ssmcontacts#AccessDeniedException":
1384
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
1385
- case "InternalServerException":
1386
- case "com.amazonaws.ssmcontacts#InternalServerException":
1387
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
1388
- case "ResourceNotFoundException":
1389
- case "com.amazonaws.ssmcontacts#ResourceNotFoundException":
1390
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
1391
- case "ThrottlingException":
1392
- case "com.amazonaws.ssmcontacts#ThrottlingException":
1393
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
1394
- case "ValidationException":
1395
- case "com.amazonaws.ssmcontacts#ValidationException":
1396
- throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
1397
- default:
1398
- const parsedBody = parsedOutput.body;
1399
- throwDefaultError({
1400
- output,
1401
- parsedBody,
1402
- exceptionCtor: __BaseException,
1403
- errorCode,
1404
- });
1405
- }
1406
- };
1407
- export const deserializeAws_json1_1UpdateContactCommand = async (output, context) => {
1408
- if (output.statusCode >= 300) {
1409
- return deserializeAws_json1_1UpdateContactCommandError(output, context);
1410
- }
1411
- const data = await parseBody(output.body, context);
1412
- let contents = {};
1413
- contents = deserializeAws_json1_1UpdateContactResult(data, context);
1414
- const response = {
1415
- $metadata: deserializeMetadata(output),
1416
- ...contents,
1417
- };
1418
- return Promise.resolve(response);
1419
- };
1420
- const deserializeAws_json1_1UpdateContactCommandError = async (output, context) => {
1421
- const parsedOutput = {
1422
- ...output,
1423
- body: await parseErrorBody(output.body, context),
1424
- };
1425
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1426
- switch (errorCode) {
1427
- case "AccessDeniedException":
1428
- case "com.amazonaws.ssmcontacts#AccessDeniedException":
1429
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
1430
- case "DataEncryptionException":
1431
- case "com.amazonaws.ssmcontacts#DataEncryptionException":
1432
- throw await deserializeAws_json1_1DataEncryptionExceptionResponse(parsedOutput, context);
1433
- case "InternalServerException":
1434
- case "com.amazonaws.ssmcontacts#InternalServerException":
1435
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
1436
- case "ResourceNotFoundException":
1437
- case "com.amazonaws.ssmcontacts#ResourceNotFoundException":
1438
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
1439
- case "ServiceQuotaExceededException":
1440
- case "com.amazonaws.ssmcontacts#ServiceQuotaExceededException":
1441
- throw await deserializeAws_json1_1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
1442
- case "ThrottlingException":
1443
- case "com.amazonaws.ssmcontacts#ThrottlingException":
1444
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
1445
- case "ValidationException":
1446
- case "com.amazonaws.ssmcontacts#ValidationException":
1447
- throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
1448
- default:
1449
- const parsedBody = parsedOutput.body;
1450
- throwDefaultError({
1451
- output,
1452
- parsedBody,
1453
- exceptionCtor: __BaseException,
1454
- errorCode,
1455
- });
1456
- }
1457
- };
1458
- export const deserializeAws_json1_1UpdateContactChannelCommand = async (output, context) => {
1459
- if (output.statusCode >= 300) {
1460
- return deserializeAws_json1_1UpdateContactChannelCommandError(output, context);
1461
- }
1462
- const data = await parseBody(output.body, context);
1463
- let contents = {};
1464
- contents = deserializeAws_json1_1UpdateContactChannelResult(data, context);
1465
- const response = {
1466
- $metadata: deserializeMetadata(output),
1467
- ...contents,
1468
- };
1469
- return Promise.resolve(response);
1470
- };
1471
- const deserializeAws_json1_1UpdateContactChannelCommandError = async (output, context) => {
1472
- const parsedOutput = {
1473
- ...output,
1474
- body: await parseErrorBody(output.body, context),
1475
- };
1476
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1477
- switch (errorCode) {
1478
- case "AccessDeniedException":
1479
- case "com.amazonaws.ssmcontacts#AccessDeniedException":
1480
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
1481
- case "ConflictException":
1482
- case "com.amazonaws.ssmcontacts#ConflictException":
1483
- throw await deserializeAws_json1_1ConflictExceptionResponse(parsedOutput, context);
1484
- case "DataEncryptionException":
1485
- case "com.amazonaws.ssmcontacts#DataEncryptionException":
1486
- throw await deserializeAws_json1_1DataEncryptionExceptionResponse(parsedOutput, context);
1487
- case "InternalServerException":
1488
- case "com.amazonaws.ssmcontacts#InternalServerException":
1489
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
1490
- case "ResourceNotFoundException":
1491
- case "com.amazonaws.ssmcontacts#ResourceNotFoundException":
1492
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
1493
- case "ThrottlingException":
1494
- case "com.amazonaws.ssmcontacts#ThrottlingException":
1495
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
1496
- case "ValidationException":
1497
- case "com.amazonaws.ssmcontacts#ValidationException":
1498
- throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
1499
- default:
1500
- const parsedBody = parsedOutput.body;
1501
- throwDefaultError({
1502
- output,
1503
- parsedBody,
1504
- exceptionCtor: __BaseException,
1505
- errorCode,
1506
- });
1507
- }
1508
- };
1509
- const deserializeAws_json1_1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
1510
- const body = parsedOutput.body;
1511
- const deserialized = deserializeAws_json1_1AccessDeniedException(body, context);
1512
- const exception = new AccessDeniedException({
1513
- $metadata: deserializeMetadata(parsedOutput),
1514
- ...deserialized,
1515
- });
1516
- return __decorateServiceException(exception, body);
1517
- };
1518
- const deserializeAws_json1_1ConflictExceptionResponse = async (parsedOutput, context) => {
1519
- const body = parsedOutput.body;
1520
- const deserialized = deserializeAws_json1_1ConflictException(body, context);
1521
- const exception = new ConflictException({
1522
- $metadata: deserializeMetadata(parsedOutput),
1523
- ...deserialized,
1524
- });
1525
- return __decorateServiceException(exception, body);
1526
- };
1527
- const deserializeAws_json1_1DataEncryptionExceptionResponse = async (parsedOutput, context) => {
1528
- const body = parsedOutput.body;
1529
- const deserialized = deserializeAws_json1_1DataEncryptionException(body, context);
1530
- const exception = new DataEncryptionException({
1531
- $metadata: deserializeMetadata(parsedOutput),
1532
- ...deserialized,
1533
- });
1534
- return __decorateServiceException(exception, body);
1535
- };
1536
- const deserializeAws_json1_1InternalServerExceptionResponse = async (parsedOutput, context) => {
1537
- const body = parsedOutput.body;
1538
- const deserialized = deserializeAws_json1_1InternalServerException(body, context);
1539
- const exception = new InternalServerException({
1540
- $metadata: deserializeMetadata(parsedOutput),
1541
- ...deserialized,
1542
- });
1543
- return __decorateServiceException(exception, body);
1544
- };
1545
- const deserializeAws_json1_1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
1546
- const body = parsedOutput.body;
1547
- const deserialized = deserializeAws_json1_1ResourceNotFoundException(body, context);
1548
- const exception = new ResourceNotFoundException({
1549
- $metadata: deserializeMetadata(parsedOutput),
1550
- ...deserialized,
1551
- });
1552
- return __decorateServiceException(exception, body);
1553
- };
1554
- const deserializeAws_json1_1ServiceQuotaExceededExceptionResponse = async (parsedOutput, context) => {
1555
- const body = parsedOutput.body;
1556
- const deserialized = deserializeAws_json1_1ServiceQuotaExceededException(body, context);
1557
- const exception = new ServiceQuotaExceededException({
1558
- $metadata: deserializeMetadata(parsedOutput),
1559
- ...deserialized,
1560
- });
1561
- return __decorateServiceException(exception, body);
1562
- };
1563
- const deserializeAws_json1_1ThrottlingExceptionResponse = async (parsedOutput, context) => {
1564
- const body = parsedOutput.body;
1565
- const deserialized = deserializeAws_json1_1ThrottlingException(body, context);
1566
- const exception = new ThrottlingException({
1567
- $metadata: deserializeMetadata(parsedOutput),
1568
- ...deserialized,
1569
- });
1570
- return __decorateServiceException(exception, body);
1571
- };
1572
- const deserializeAws_json1_1ValidationExceptionResponse = async (parsedOutput, context) => {
1573
- const body = parsedOutput.body;
1574
- const deserialized = deserializeAws_json1_1ValidationException(body, context);
1575
- const exception = new ValidationException({
1576
- $metadata: deserializeMetadata(parsedOutput),
1577
- ...deserialized,
1578
- });
1579
- return __decorateServiceException(exception, body);
1580
- };
1581
- const serializeAws_json1_1AcceptPageRequest = (input, context) => {
1582
- return {
1583
- ...(input.AcceptCode != null && { AcceptCode: input.AcceptCode }),
1584
- ...(input.AcceptCodeValidation != null && { AcceptCodeValidation: input.AcceptCodeValidation }),
1585
- ...(input.AcceptType != null && { AcceptType: input.AcceptType }),
1586
- ...(input.ContactChannelId != null && { ContactChannelId: input.ContactChannelId }),
1587
- ...(input.Note != null && { Note: input.Note }),
1588
- ...(input.PageId != null && { PageId: input.PageId }),
1589
- };
7
+ export var serializeAws_json1_1AcceptPageCommand = 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.1",
12
+ "x-amz-target": "SSMContacts.AcceptPage",
13
+ };
14
+ body = JSON.stringify(serializeAws_json1_1AcceptPageRequest(input, context));
15
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
16
+ });
17
+ }); };
18
+ export var serializeAws_json1_1ActivateContactChannelCommand = 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.1",
23
+ "x-amz-target": "SSMContacts.ActivateContactChannel",
24
+ };
25
+ body = JSON.stringify(serializeAws_json1_1ActivateContactChannelRequest(input, context));
26
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
27
+ });
28
+ }); };
29
+ export var serializeAws_json1_1CreateContactCommand = 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.1",
34
+ "x-amz-target": "SSMContacts.CreateContact",
35
+ };
36
+ body = JSON.stringify(serializeAws_json1_1CreateContactRequest(input, context));
37
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
38
+ });
39
+ }); };
40
+ export var serializeAws_json1_1CreateContactChannelCommand = 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.1",
45
+ "x-amz-target": "SSMContacts.CreateContactChannel",
46
+ };
47
+ body = JSON.stringify(serializeAws_json1_1CreateContactChannelRequest(input, context));
48
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
49
+ });
50
+ }); };
51
+ export var serializeAws_json1_1DeactivateContactChannelCommand = 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.1",
56
+ "x-amz-target": "SSMContacts.DeactivateContactChannel",
57
+ };
58
+ body = JSON.stringify(serializeAws_json1_1DeactivateContactChannelRequest(input, context));
59
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
60
+ });
61
+ }); };
62
+ export var serializeAws_json1_1DeleteContactCommand = 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.1",
67
+ "x-amz-target": "SSMContacts.DeleteContact",
68
+ };
69
+ body = JSON.stringify(serializeAws_json1_1DeleteContactRequest(input, context));
70
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
71
+ });
72
+ }); };
73
+ export var serializeAws_json1_1DeleteContactChannelCommand = 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.1",
78
+ "x-amz-target": "SSMContacts.DeleteContactChannel",
79
+ };
80
+ body = JSON.stringify(serializeAws_json1_1DeleteContactChannelRequest(input, context));
81
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
82
+ });
83
+ }); };
84
+ export var serializeAws_json1_1DescribeEngagementCommand = 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.1",
89
+ "x-amz-target": "SSMContacts.DescribeEngagement",
90
+ };
91
+ body = JSON.stringify(serializeAws_json1_1DescribeEngagementRequest(input, context));
92
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
93
+ });
94
+ }); };
95
+ export var serializeAws_json1_1DescribePageCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
96
+ var headers, body;
97
+ return __generator(this, function (_a) {
98
+ headers = {
99
+ "content-type": "application/x-amz-json-1.1",
100
+ "x-amz-target": "SSMContacts.DescribePage",
101
+ };
102
+ body = JSON.stringify(serializeAws_json1_1DescribePageRequest(input, context));
103
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
104
+ });
105
+ }); };
106
+ export var serializeAws_json1_1GetContactCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
107
+ var headers, body;
108
+ return __generator(this, function (_a) {
109
+ headers = {
110
+ "content-type": "application/x-amz-json-1.1",
111
+ "x-amz-target": "SSMContacts.GetContact",
112
+ };
113
+ body = JSON.stringify(serializeAws_json1_1GetContactRequest(input, context));
114
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
115
+ });
116
+ }); };
117
+ export var serializeAws_json1_1GetContactChannelCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
118
+ var headers, body;
119
+ return __generator(this, function (_a) {
120
+ headers = {
121
+ "content-type": "application/x-amz-json-1.1",
122
+ "x-amz-target": "SSMContacts.GetContactChannel",
123
+ };
124
+ body = JSON.stringify(serializeAws_json1_1GetContactChannelRequest(input, context));
125
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
126
+ });
127
+ }); };
128
+ export var serializeAws_json1_1GetContactPolicyCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
129
+ var headers, body;
130
+ return __generator(this, function (_a) {
131
+ headers = {
132
+ "content-type": "application/x-amz-json-1.1",
133
+ "x-amz-target": "SSMContacts.GetContactPolicy",
134
+ };
135
+ body = JSON.stringify(serializeAws_json1_1GetContactPolicyRequest(input, context));
136
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
137
+ });
138
+ }); };
139
+ export var serializeAws_json1_1ListContactChannelsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
140
+ var headers, body;
141
+ return __generator(this, function (_a) {
142
+ headers = {
143
+ "content-type": "application/x-amz-json-1.1",
144
+ "x-amz-target": "SSMContacts.ListContactChannels",
145
+ };
146
+ body = JSON.stringify(serializeAws_json1_1ListContactChannelsRequest(input, context));
147
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
148
+ });
149
+ }); };
150
+ export var serializeAws_json1_1ListContactsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
151
+ var headers, body;
152
+ return __generator(this, function (_a) {
153
+ headers = {
154
+ "content-type": "application/x-amz-json-1.1",
155
+ "x-amz-target": "SSMContacts.ListContacts",
156
+ };
157
+ body = JSON.stringify(serializeAws_json1_1ListContactsRequest(input, context));
158
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
159
+ });
160
+ }); };
161
+ export var serializeAws_json1_1ListEngagementsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
162
+ var headers, body;
163
+ return __generator(this, function (_a) {
164
+ headers = {
165
+ "content-type": "application/x-amz-json-1.1",
166
+ "x-amz-target": "SSMContacts.ListEngagements",
167
+ };
168
+ body = JSON.stringify(serializeAws_json1_1ListEngagementsRequest(input, context));
169
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
170
+ });
171
+ }); };
172
+ export var serializeAws_json1_1ListPageReceiptsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
173
+ var headers, body;
174
+ return __generator(this, function (_a) {
175
+ headers = {
176
+ "content-type": "application/x-amz-json-1.1",
177
+ "x-amz-target": "SSMContacts.ListPageReceipts",
178
+ };
179
+ body = JSON.stringify(serializeAws_json1_1ListPageReceiptsRequest(input, context));
180
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
181
+ });
182
+ }); };
183
+ export var serializeAws_json1_1ListPagesByContactCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
184
+ var headers, body;
185
+ return __generator(this, function (_a) {
186
+ headers = {
187
+ "content-type": "application/x-amz-json-1.1",
188
+ "x-amz-target": "SSMContacts.ListPagesByContact",
189
+ };
190
+ body = JSON.stringify(serializeAws_json1_1ListPagesByContactRequest(input, context));
191
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
192
+ });
193
+ }); };
194
+ export var serializeAws_json1_1ListPagesByEngagementCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
195
+ var headers, body;
196
+ return __generator(this, function (_a) {
197
+ headers = {
198
+ "content-type": "application/x-amz-json-1.1",
199
+ "x-amz-target": "SSMContacts.ListPagesByEngagement",
200
+ };
201
+ body = JSON.stringify(serializeAws_json1_1ListPagesByEngagementRequest(input, context));
202
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
203
+ });
204
+ }); };
205
+ export var serializeAws_json1_1ListTagsForResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
206
+ var headers, body;
207
+ return __generator(this, function (_a) {
208
+ headers = {
209
+ "content-type": "application/x-amz-json-1.1",
210
+ "x-amz-target": "SSMContacts.ListTagsForResource",
211
+ };
212
+ body = JSON.stringify(serializeAws_json1_1ListTagsForResourceRequest(input, context));
213
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
214
+ });
215
+ }); };
216
+ export var serializeAws_json1_1PutContactPolicyCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
217
+ var headers, body;
218
+ return __generator(this, function (_a) {
219
+ headers = {
220
+ "content-type": "application/x-amz-json-1.1",
221
+ "x-amz-target": "SSMContacts.PutContactPolicy",
222
+ };
223
+ body = JSON.stringify(serializeAws_json1_1PutContactPolicyRequest(input, context));
224
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
225
+ });
226
+ }); };
227
+ export var serializeAws_json1_1SendActivationCodeCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
228
+ var headers, body;
229
+ return __generator(this, function (_a) {
230
+ headers = {
231
+ "content-type": "application/x-amz-json-1.1",
232
+ "x-amz-target": "SSMContacts.SendActivationCode",
233
+ };
234
+ body = JSON.stringify(serializeAws_json1_1SendActivationCodeRequest(input, context));
235
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
236
+ });
237
+ }); };
238
+ export var serializeAws_json1_1StartEngagementCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
239
+ var headers, body;
240
+ return __generator(this, function (_a) {
241
+ headers = {
242
+ "content-type": "application/x-amz-json-1.1",
243
+ "x-amz-target": "SSMContacts.StartEngagement",
244
+ };
245
+ body = JSON.stringify(serializeAws_json1_1StartEngagementRequest(input, context));
246
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
247
+ });
248
+ }); };
249
+ export var serializeAws_json1_1StopEngagementCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
250
+ var headers, body;
251
+ return __generator(this, function (_a) {
252
+ headers = {
253
+ "content-type": "application/x-amz-json-1.1",
254
+ "x-amz-target": "SSMContacts.StopEngagement",
255
+ };
256
+ body = JSON.stringify(serializeAws_json1_1StopEngagementRequest(input, context));
257
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
258
+ });
259
+ }); };
260
+ export var serializeAws_json1_1TagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
261
+ var headers, body;
262
+ return __generator(this, function (_a) {
263
+ headers = {
264
+ "content-type": "application/x-amz-json-1.1",
265
+ "x-amz-target": "SSMContacts.TagResource",
266
+ };
267
+ body = JSON.stringify(serializeAws_json1_1TagResourceRequest(input, context));
268
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
269
+ });
270
+ }); };
271
+ export var serializeAws_json1_1UntagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
272
+ var headers, body;
273
+ return __generator(this, function (_a) {
274
+ headers = {
275
+ "content-type": "application/x-amz-json-1.1",
276
+ "x-amz-target": "SSMContacts.UntagResource",
277
+ };
278
+ body = JSON.stringify(serializeAws_json1_1UntagResourceRequest(input, context));
279
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
280
+ });
281
+ }); };
282
+ export var serializeAws_json1_1UpdateContactCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
283
+ var headers, body;
284
+ return __generator(this, function (_a) {
285
+ headers = {
286
+ "content-type": "application/x-amz-json-1.1",
287
+ "x-amz-target": "SSMContacts.UpdateContact",
288
+ };
289
+ body = JSON.stringify(serializeAws_json1_1UpdateContactRequest(input, context));
290
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
291
+ });
292
+ }); };
293
+ export var serializeAws_json1_1UpdateContactChannelCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
294
+ var headers, body;
295
+ return __generator(this, function (_a) {
296
+ headers = {
297
+ "content-type": "application/x-amz-json-1.1",
298
+ "x-amz-target": "SSMContacts.UpdateContactChannel",
299
+ };
300
+ body = JSON.stringify(serializeAws_json1_1UpdateContactChannelRequest(input, context));
301
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
302
+ });
303
+ }); };
304
+ export var deserializeAws_json1_1AcceptPageCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
305
+ var data, contents, response;
306
+ return __generator(this, function (_a) {
307
+ switch (_a.label) {
308
+ case 0:
309
+ if (output.statusCode >= 300) {
310
+ return [2, deserializeAws_json1_1AcceptPageCommandError(output, context)];
311
+ }
312
+ return [4, parseBody(output.body, context)];
313
+ case 1:
314
+ data = _a.sent();
315
+ contents = {};
316
+ contents = deserializeAws_json1_1AcceptPageResult(data, context);
317
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
318
+ return [2, Promise.resolve(response)];
319
+ }
320
+ });
321
+ }); };
322
+ var deserializeAws_json1_1AcceptPageCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
323
+ var parsedOutput, _a, errorCode, _b, parsedBody;
324
+ var _c;
325
+ return __generator(this, function (_d) {
326
+ switch (_d.label) {
327
+ case 0:
328
+ _a = [__assign({}, output)];
329
+ _c = {};
330
+ return [4, parseErrorBody(output.body, context)];
331
+ case 1:
332
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
333
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
334
+ _b = errorCode;
335
+ switch (_b) {
336
+ case "AccessDeniedException": return [3, 2];
337
+ case "com.amazonaws.ssmcontacts#AccessDeniedException": return [3, 2];
338
+ case "InternalServerException": return [3, 4];
339
+ case "com.amazonaws.ssmcontacts#InternalServerException": return [3, 4];
340
+ case "ResourceNotFoundException": return [3, 6];
341
+ case "com.amazonaws.ssmcontacts#ResourceNotFoundException": return [3, 6];
342
+ case "ThrottlingException": return [3, 8];
343
+ case "com.amazonaws.ssmcontacts#ThrottlingException": return [3, 8];
344
+ case "ValidationException": return [3, 10];
345
+ case "com.amazonaws.ssmcontacts#ValidationException": return [3, 10];
346
+ }
347
+ return [3, 12];
348
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
349
+ case 3: throw _d.sent();
350
+ case 4: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
351
+ case 5: throw _d.sent();
352
+ case 6: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
353
+ case 7: throw _d.sent();
354
+ case 8: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
355
+ case 9: throw _d.sent();
356
+ case 10: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
357
+ case 11: throw _d.sent();
358
+ case 12:
359
+ parsedBody = parsedOutput.body;
360
+ throwDefaultError({
361
+ output: output,
362
+ parsedBody: parsedBody,
363
+ exceptionCtor: __BaseException,
364
+ errorCode: errorCode,
365
+ });
366
+ _d.label = 13;
367
+ case 13: return [2];
368
+ }
369
+ });
370
+ }); };
371
+ export var deserializeAws_json1_1ActivateContactChannelCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
372
+ var data, contents, response;
373
+ return __generator(this, function (_a) {
374
+ switch (_a.label) {
375
+ case 0:
376
+ if (output.statusCode >= 300) {
377
+ return [2, deserializeAws_json1_1ActivateContactChannelCommandError(output, context)];
378
+ }
379
+ return [4, parseBody(output.body, context)];
380
+ case 1:
381
+ data = _a.sent();
382
+ contents = {};
383
+ contents = deserializeAws_json1_1ActivateContactChannelResult(data, context);
384
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
385
+ return [2, Promise.resolve(response)];
386
+ }
387
+ });
388
+ }); };
389
+ var deserializeAws_json1_1ActivateContactChannelCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
390
+ var parsedOutput, _a, errorCode, _b, parsedBody;
391
+ var _c;
392
+ return __generator(this, function (_d) {
393
+ switch (_d.label) {
394
+ case 0:
395
+ _a = [__assign({}, output)];
396
+ _c = {};
397
+ return [4, parseErrorBody(output.body, context)];
398
+ case 1:
399
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
400
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
401
+ _b = errorCode;
402
+ switch (_b) {
403
+ case "AccessDeniedException": return [3, 2];
404
+ case "com.amazonaws.ssmcontacts#AccessDeniedException": return [3, 2];
405
+ case "InternalServerException": return [3, 4];
406
+ case "com.amazonaws.ssmcontacts#InternalServerException": return [3, 4];
407
+ case "ResourceNotFoundException": return [3, 6];
408
+ case "com.amazonaws.ssmcontacts#ResourceNotFoundException": return [3, 6];
409
+ case "ThrottlingException": return [3, 8];
410
+ case "com.amazonaws.ssmcontacts#ThrottlingException": return [3, 8];
411
+ case "ValidationException": return [3, 10];
412
+ case "com.amazonaws.ssmcontacts#ValidationException": return [3, 10];
413
+ }
414
+ return [3, 12];
415
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
416
+ case 3: throw _d.sent();
417
+ case 4: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
418
+ case 5: throw _d.sent();
419
+ case 6: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
420
+ case 7: throw _d.sent();
421
+ case 8: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
422
+ case 9: throw _d.sent();
423
+ case 10: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
424
+ case 11: throw _d.sent();
425
+ case 12:
426
+ parsedBody = parsedOutput.body;
427
+ throwDefaultError({
428
+ output: output,
429
+ parsedBody: parsedBody,
430
+ exceptionCtor: __BaseException,
431
+ errorCode: errorCode,
432
+ });
433
+ _d.label = 13;
434
+ case 13: return [2];
435
+ }
436
+ });
437
+ }); };
438
+ export var deserializeAws_json1_1CreateContactCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
439
+ var data, contents, response;
440
+ return __generator(this, function (_a) {
441
+ switch (_a.label) {
442
+ case 0:
443
+ if (output.statusCode >= 300) {
444
+ return [2, deserializeAws_json1_1CreateContactCommandError(output, context)];
445
+ }
446
+ return [4, parseBody(output.body, context)];
447
+ case 1:
448
+ data = _a.sent();
449
+ contents = {};
450
+ contents = deserializeAws_json1_1CreateContactResult(data, context);
451
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
452
+ return [2, Promise.resolve(response)];
453
+ }
454
+ });
455
+ }); };
456
+ var deserializeAws_json1_1CreateContactCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
457
+ var parsedOutput, _a, errorCode, _b, parsedBody;
458
+ var _c;
459
+ return __generator(this, function (_d) {
460
+ switch (_d.label) {
461
+ case 0:
462
+ _a = [__assign({}, output)];
463
+ _c = {};
464
+ return [4, parseErrorBody(output.body, context)];
465
+ case 1:
466
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
467
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
468
+ _b = errorCode;
469
+ switch (_b) {
470
+ case "AccessDeniedException": return [3, 2];
471
+ case "com.amazonaws.ssmcontacts#AccessDeniedException": return [3, 2];
472
+ case "ConflictException": return [3, 4];
473
+ case "com.amazonaws.ssmcontacts#ConflictException": return [3, 4];
474
+ case "DataEncryptionException": return [3, 6];
475
+ case "com.amazonaws.ssmcontacts#DataEncryptionException": return [3, 6];
476
+ case "InternalServerException": return [3, 8];
477
+ case "com.amazonaws.ssmcontacts#InternalServerException": return [3, 8];
478
+ case "ServiceQuotaExceededException": return [3, 10];
479
+ case "com.amazonaws.ssmcontacts#ServiceQuotaExceededException": return [3, 10];
480
+ case "ThrottlingException": return [3, 12];
481
+ case "com.amazonaws.ssmcontacts#ThrottlingException": return [3, 12];
482
+ case "ValidationException": return [3, 14];
483
+ case "com.amazonaws.ssmcontacts#ValidationException": return [3, 14];
484
+ }
485
+ return [3, 16];
486
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
487
+ case 3: throw _d.sent();
488
+ case 4: return [4, deserializeAws_json1_1ConflictExceptionResponse(parsedOutput, context)];
489
+ case 5: throw _d.sent();
490
+ case 6: return [4, deserializeAws_json1_1DataEncryptionExceptionResponse(parsedOutput, context)];
491
+ case 7: throw _d.sent();
492
+ case 8: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
493
+ case 9: throw _d.sent();
494
+ case 10: return [4, deserializeAws_json1_1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
495
+ case 11: throw _d.sent();
496
+ case 12: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
497
+ case 13: throw _d.sent();
498
+ case 14: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
499
+ case 15: throw _d.sent();
500
+ case 16:
501
+ parsedBody = parsedOutput.body;
502
+ throwDefaultError({
503
+ output: output,
504
+ parsedBody: parsedBody,
505
+ exceptionCtor: __BaseException,
506
+ errorCode: errorCode,
507
+ });
508
+ _d.label = 17;
509
+ case 17: return [2];
510
+ }
511
+ });
512
+ }); };
513
+ export var deserializeAws_json1_1CreateContactChannelCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
514
+ var data, contents, response;
515
+ return __generator(this, function (_a) {
516
+ switch (_a.label) {
517
+ case 0:
518
+ if (output.statusCode >= 300) {
519
+ return [2, deserializeAws_json1_1CreateContactChannelCommandError(output, context)];
520
+ }
521
+ return [4, parseBody(output.body, context)];
522
+ case 1:
523
+ data = _a.sent();
524
+ contents = {};
525
+ contents = deserializeAws_json1_1CreateContactChannelResult(data, context);
526
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
527
+ return [2, Promise.resolve(response)];
528
+ }
529
+ });
530
+ }); };
531
+ var deserializeAws_json1_1CreateContactChannelCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
532
+ var parsedOutput, _a, errorCode, _b, parsedBody;
533
+ var _c;
534
+ return __generator(this, function (_d) {
535
+ switch (_d.label) {
536
+ case 0:
537
+ _a = [__assign({}, output)];
538
+ _c = {};
539
+ return [4, parseErrorBody(output.body, context)];
540
+ case 1:
541
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
542
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
543
+ _b = errorCode;
544
+ switch (_b) {
545
+ case "AccessDeniedException": return [3, 2];
546
+ case "com.amazonaws.ssmcontacts#AccessDeniedException": return [3, 2];
547
+ case "ConflictException": return [3, 4];
548
+ case "com.amazonaws.ssmcontacts#ConflictException": return [3, 4];
549
+ case "DataEncryptionException": return [3, 6];
550
+ case "com.amazonaws.ssmcontacts#DataEncryptionException": return [3, 6];
551
+ case "InternalServerException": return [3, 8];
552
+ case "com.amazonaws.ssmcontacts#InternalServerException": return [3, 8];
553
+ case "ThrottlingException": return [3, 10];
554
+ case "com.amazonaws.ssmcontacts#ThrottlingException": return [3, 10];
555
+ case "ValidationException": return [3, 12];
556
+ case "com.amazonaws.ssmcontacts#ValidationException": return [3, 12];
557
+ }
558
+ return [3, 14];
559
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
560
+ case 3: throw _d.sent();
561
+ case 4: return [4, deserializeAws_json1_1ConflictExceptionResponse(parsedOutput, context)];
562
+ case 5: throw _d.sent();
563
+ case 6: return [4, deserializeAws_json1_1DataEncryptionExceptionResponse(parsedOutput, context)];
564
+ case 7: throw _d.sent();
565
+ case 8: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
566
+ case 9: throw _d.sent();
567
+ case 10: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
568
+ case 11: throw _d.sent();
569
+ case 12: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
570
+ case 13: throw _d.sent();
571
+ case 14:
572
+ parsedBody = parsedOutput.body;
573
+ throwDefaultError({
574
+ output: output,
575
+ parsedBody: parsedBody,
576
+ exceptionCtor: __BaseException,
577
+ errorCode: errorCode,
578
+ });
579
+ _d.label = 15;
580
+ case 15: return [2];
581
+ }
582
+ });
583
+ }); };
584
+ export var deserializeAws_json1_1DeactivateContactChannelCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
585
+ var data, contents, response;
586
+ return __generator(this, function (_a) {
587
+ switch (_a.label) {
588
+ case 0:
589
+ if (output.statusCode >= 300) {
590
+ return [2, deserializeAws_json1_1DeactivateContactChannelCommandError(output, context)];
591
+ }
592
+ return [4, parseBody(output.body, context)];
593
+ case 1:
594
+ data = _a.sent();
595
+ contents = {};
596
+ contents = deserializeAws_json1_1DeactivateContactChannelResult(data, context);
597
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
598
+ return [2, Promise.resolve(response)];
599
+ }
600
+ });
601
+ }); };
602
+ var deserializeAws_json1_1DeactivateContactChannelCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
603
+ var parsedOutput, _a, errorCode, _b, parsedBody;
604
+ var _c;
605
+ return __generator(this, function (_d) {
606
+ switch (_d.label) {
607
+ case 0:
608
+ _a = [__assign({}, output)];
609
+ _c = {};
610
+ return [4, parseErrorBody(output.body, context)];
611
+ case 1:
612
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
613
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
614
+ _b = errorCode;
615
+ switch (_b) {
616
+ case "AccessDeniedException": return [3, 2];
617
+ case "com.amazonaws.ssmcontacts#AccessDeniedException": return [3, 2];
618
+ case "InternalServerException": return [3, 4];
619
+ case "com.amazonaws.ssmcontacts#InternalServerException": return [3, 4];
620
+ case "ResourceNotFoundException": return [3, 6];
621
+ case "com.amazonaws.ssmcontacts#ResourceNotFoundException": return [3, 6];
622
+ case "ThrottlingException": return [3, 8];
623
+ case "com.amazonaws.ssmcontacts#ThrottlingException": return [3, 8];
624
+ case "ValidationException": return [3, 10];
625
+ case "com.amazonaws.ssmcontacts#ValidationException": return [3, 10];
626
+ }
627
+ return [3, 12];
628
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
629
+ case 3: throw _d.sent();
630
+ case 4: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
631
+ case 5: throw _d.sent();
632
+ case 6: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
633
+ case 7: throw _d.sent();
634
+ case 8: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
635
+ case 9: throw _d.sent();
636
+ case 10: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
637
+ case 11: throw _d.sent();
638
+ case 12:
639
+ parsedBody = parsedOutput.body;
640
+ throwDefaultError({
641
+ output: output,
642
+ parsedBody: parsedBody,
643
+ exceptionCtor: __BaseException,
644
+ errorCode: errorCode,
645
+ });
646
+ _d.label = 13;
647
+ case 13: return [2];
648
+ }
649
+ });
650
+ }); };
651
+ export var deserializeAws_json1_1DeleteContactCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
652
+ var data, contents, response;
653
+ return __generator(this, function (_a) {
654
+ switch (_a.label) {
655
+ case 0:
656
+ if (output.statusCode >= 300) {
657
+ return [2, deserializeAws_json1_1DeleteContactCommandError(output, context)];
658
+ }
659
+ return [4, parseBody(output.body, context)];
660
+ case 1:
661
+ data = _a.sent();
662
+ contents = {};
663
+ contents = deserializeAws_json1_1DeleteContactResult(data, context);
664
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
665
+ return [2, Promise.resolve(response)];
666
+ }
667
+ });
668
+ }); };
669
+ var deserializeAws_json1_1DeleteContactCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
670
+ var parsedOutput, _a, errorCode, _b, parsedBody;
671
+ var _c;
672
+ return __generator(this, function (_d) {
673
+ switch (_d.label) {
674
+ case 0:
675
+ _a = [__assign({}, output)];
676
+ _c = {};
677
+ return [4, parseErrorBody(output.body, context)];
678
+ case 1:
679
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
680
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
681
+ _b = errorCode;
682
+ switch (_b) {
683
+ case "AccessDeniedException": return [3, 2];
684
+ case "com.amazonaws.ssmcontacts#AccessDeniedException": return [3, 2];
685
+ case "InternalServerException": return [3, 4];
686
+ case "com.amazonaws.ssmcontacts#InternalServerException": return [3, 4];
687
+ case "ResourceNotFoundException": return [3, 6];
688
+ case "com.amazonaws.ssmcontacts#ResourceNotFoundException": return [3, 6];
689
+ case "ThrottlingException": return [3, 8];
690
+ case "com.amazonaws.ssmcontacts#ThrottlingException": return [3, 8];
691
+ case "ValidationException": return [3, 10];
692
+ case "com.amazonaws.ssmcontacts#ValidationException": return [3, 10];
693
+ }
694
+ return [3, 12];
695
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
696
+ case 3: throw _d.sent();
697
+ case 4: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
698
+ case 5: throw _d.sent();
699
+ case 6: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
700
+ case 7: throw _d.sent();
701
+ case 8: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
702
+ case 9: throw _d.sent();
703
+ case 10: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
704
+ case 11: throw _d.sent();
705
+ case 12:
706
+ parsedBody = parsedOutput.body;
707
+ throwDefaultError({
708
+ output: output,
709
+ parsedBody: parsedBody,
710
+ exceptionCtor: __BaseException,
711
+ errorCode: errorCode,
712
+ });
713
+ _d.label = 13;
714
+ case 13: return [2];
715
+ }
716
+ });
717
+ }); };
718
+ export var deserializeAws_json1_1DeleteContactChannelCommand = 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_1DeleteContactChannelCommandError(output, context)];
725
+ }
726
+ return [4, parseBody(output.body, context)];
727
+ case 1:
728
+ data = _a.sent();
729
+ contents = {};
730
+ contents = deserializeAws_json1_1DeleteContactChannelResult(data, context);
731
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
732
+ return [2, Promise.resolve(response)];
733
+ }
734
+ });
735
+ }); };
736
+ var deserializeAws_json1_1DeleteContactChannelCommandError = 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 "AccessDeniedException": return [3, 2];
751
+ case "com.amazonaws.ssmcontacts#AccessDeniedException": return [3, 2];
752
+ case "InternalServerException": return [3, 4];
753
+ case "com.amazonaws.ssmcontacts#InternalServerException": return [3, 4];
754
+ case "ResourceNotFoundException": return [3, 6];
755
+ case "com.amazonaws.ssmcontacts#ResourceNotFoundException": return [3, 6];
756
+ case "ThrottlingException": return [3, 8];
757
+ case "com.amazonaws.ssmcontacts#ThrottlingException": return [3, 8];
758
+ case "ValidationException": return [3, 10];
759
+ case "com.amazonaws.ssmcontacts#ValidationException": return [3, 10];
760
+ }
761
+ return [3, 12];
762
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
763
+ case 3: throw _d.sent();
764
+ case 4: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
765
+ case 5: throw _d.sent();
766
+ case 6: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
767
+ case 7: throw _d.sent();
768
+ case 8: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
769
+ case 9: throw _d.sent();
770
+ case 10: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
771
+ case 11: throw _d.sent();
772
+ case 12:
773
+ parsedBody = parsedOutput.body;
774
+ throwDefaultError({
775
+ output: output,
776
+ parsedBody: parsedBody,
777
+ exceptionCtor: __BaseException,
778
+ errorCode: errorCode,
779
+ });
780
+ _d.label = 13;
781
+ case 13: return [2];
782
+ }
783
+ });
784
+ }); };
785
+ export var deserializeAws_json1_1DescribeEngagementCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
786
+ var data, contents, response;
787
+ return __generator(this, function (_a) {
788
+ switch (_a.label) {
789
+ case 0:
790
+ if (output.statusCode >= 300) {
791
+ return [2, deserializeAws_json1_1DescribeEngagementCommandError(output, context)];
792
+ }
793
+ return [4, parseBody(output.body, context)];
794
+ case 1:
795
+ data = _a.sent();
796
+ contents = {};
797
+ contents = deserializeAws_json1_1DescribeEngagementResult(data, context);
798
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
799
+ return [2, Promise.resolve(response)];
800
+ }
801
+ });
802
+ }); };
803
+ var deserializeAws_json1_1DescribeEngagementCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
804
+ var parsedOutput, _a, errorCode, _b, parsedBody;
805
+ var _c;
806
+ return __generator(this, function (_d) {
807
+ switch (_d.label) {
808
+ case 0:
809
+ _a = [__assign({}, output)];
810
+ _c = {};
811
+ return [4, parseErrorBody(output.body, context)];
812
+ case 1:
813
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
814
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
815
+ _b = errorCode;
816
+ switch (_b) {
817
+ case "AccessDeniedException": return [3, 2];
818
+ case "com.amazonaws.ssmcontacts#AccessDeniedException": return [3, 2];
819
+ case "DataEncryptionException": return [3, 4];
820
+ case "com.amazonaws.ssmcontacts#DataEncryptionException": return [3, 4];
821
+ case "InternalServerException": return [3, 6];
822
+ case "com.amazonaws.ssmcontacts#InternalServerException": return [3, 6];
823
+ case "ResourceNotFoundException": return [3, 8];
824
+ case "com.amazonaws.ssmcontacts#ResourceNotFoundException": return [3, 8];
825
+ case "ThrottlingException": return [3, 10];
826
+ case "com.amazonaws.ssmcontacts#ThrottlingException": return [3, 10];
827
+ case "ValidationException": return [3, 12];
828
+ case "com.amazonaws.ssmcontacts#ValidationException": return [3, 12];
829
+ }
830
+ return [3, 14];
831
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
832
+ case 3: throw _d.sent();
833
+ case 4: return [4, deserializeAws_json1_1DataEncryptionExceptionResponse(parsedOutput, context)];
834
+ case 5: throw _d.sent();
835
+ case 6: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
836
+ case 7: throw _d.sent();
837
+ case 8: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
838
+ case 9: throw _d.sent();
839
+ case 10: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
840
+ case 11: throw _d.sent();
841
+ case 12: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
842
+ case 13: throw _d.sent();
843
+ case 14:
844
+ parsedBody = parsedOutput.body;
845
+ throwDefaultError({
846
+ output: output,
847
+ parsedBody: parsedBody,
848
+ exceptionCtor: __BaseException,
849
+ errorCode: errorCode,
850
+ });
851
+ _d.label = 15;
852
+ case 15: return [2];
853
+ }
854
+ });
855
+ }); };
856
+ export var deserializeAws_json1_1DescribePageCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
857
+ var data, contents, response;
858
+ return __generator(this, function (_a) {
859
+ switch (_a.label) {
860
+ case 0:
861
+ if (output.statusCode >= 300) {
862
+ return [2, deserializeAws_json1_1DescribePageCommandError(output, context)];
863
+ }
864
+ return [4, parseBody(output.body, context)];
865
+ case 1:
866
+ data = _a.sent();
867
+ contents = {};
868
+ contents = deserializeAws_json1_1DescribePageResult(data, context);
869
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
870
+ return [2, Promise.resolve(response)];
871
+ }
872
+ });
873
+ }); };
874
+ var deserializeAws_json1_1DescribePageCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
875
+ var parsedOutput, _a, errorCode, _b, parsedBody;
876
+ var _c;
877
+ return __generator(this, function (_d) {
878
+ switch (_d.label) {
879
+ case 0:
880
+ _a = [__assign({}, output)];
881
+ _c = {};
882
+ return [4, parseErrorBody(output.body, context)];
883
+ case 1:
884
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
885
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
886
+ _b = errorCode;
887
+ switch (_b) {
888
+ case "AccessDeniedException": return [3, 2];
889
+ case "com.amazonaws.ssmcontacts#AccessDeniedException": return [3, 2];
890
+ case "DataEncryptionException": return [3, 4];
891
+ case "com.amazonaws.ssmcontacts#DataEncryptionException": return [3, 4];
892
+ case "InternalServerException": return [3, 6];
893
+ case "com.amazonaws.ssmcontacts#InternalServerException": return [3, 6];
894
+ case "ResourceNotFoundException": return [3, 8];
895
+ case "com.amazonaws.ssmcontacts#ResourceNotFoundException": return [3, 8];
896
+ case "ThrottlingException": return [3, 10];
897
+ case "com.amazonaws.ssmcontacts#ThrottlingException": return [3, 10];
898
+ case "ValidationException": return [3, 12];
899
+ case "com.amazonaws.ssmcontacts#ValidationException": return [3, 12];
900
+ }
901
+ return [3, 14];
902
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
903
+ case 3: throw _d.sent();
904
+ case 4: return [4, deserializeAws_json1_1DataEncryptionExceptionResponse(parsedOutput, context)];
905
+ case 5: throw _d.sent();
906
+ case 6: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
907
+ case 7: throw _d.sent();
908
+ case 8: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
909
+ case 9: throw _d.sent();
910
+ case 10: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
911
+ case 11: throw _d.sent();
912
+ case 12: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
913
+ case 13: throw _d.sent();
914
+ case 14:
915
+ parsedBody = parsedOutput.body;
916
+ throwDefaultError({
917
+ output: output,
918
+ parsedBody: parsedBody,
919
+ exceptionCtor: __BaseException,
920
+ errorCode: errorCode,
921
+ });
922
+ _d.label = 15;
923
+ case 15: return [2];
924
+ }
925
+ });
926
+ }); };
927
+ export var deserializeAws_json1_1GetContactCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
928
+ var data, contents, response;
929
+ return __generator(this, function (_a) {
930
+ switch (_a.label) {
931
+ case 0:
932
+ if (output.statusCode >= 300) {
933
+ return [2, deserializeAws_json1_1GetContactCommandError(output, context)];
934
+ }
935
+ return [4, parseBody(output.body, context)];
936
+ case 1:
937
+ data = _a.sent();
938
+ contents = {};
939
+ contents = deserializeAws_json1_1GetContactResult(data, context);
940
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
941
+ return [2, Promise.resolve(response)];
942
+ }
943
+ });
944
+ }); };
945
+ var deserializeAws_json1_1GetContactCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
946
+ var parsedOutput, _a, errorCode, _b, parsedBody;
947
+ var _c;
948
+ return __generator(this, function (_d) {
949
+ switch (_d.label) {
950
+ case 0:
951
+ _a = [__assign({}, output)];
952
+ _c = {};
953
+ return [4, parseErrorBody(output.body, context)];
954
+ case 1:
955
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
956
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
957
+ _b = errorCode;
958
+ switch (_b) {
959
+ case "AccessDeniedException": return [3, 2];
960
+ case "com.amazonaws.ssmcontacts#AccessDeniedException": return [3, 2];
961
+ case "DataEncryptionException": return [3, 4];
962
+ case "com.amazonaws.ssmcontacts#DataEncryptionException": return [3, 4];
963
+ case "InternalServerException": return [3, 6];
964
+ case "com.amazonaws.ssmcontacts#InternalServerException": return [3, 6];
965
+ case "ResourceNotFoundException": return [3, 8];
966
+ case "com.amazonaws.ssmcontacts#ResourceNotFoundException": return [3, 8];
967
+ case "ThrottlingException": return [3, 10];
968
+ case "com.amazonaws.ssmcontacts#ThrottlingException": return [3, 10];
969
+ case "ValidationException": return [3, 12];
970
+ case "com.amazonaws.ssmcontacts#ValidationException": return [3, 12];
971
+ }
972
+ return [3, 14];
973
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
974
+ case 3: throw _d.sent();
975
+ case 4: return [4, deserializeAws_json1_1DataEncryptionExceptionResponse(parsedOutput, context)];
976
+ case 5: throw _d.sent();
977
+ case 6: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
978
+ case 7: throw _d.sent();
979
+ case 8: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
980
+ case 9: throw _d.sent();
981
+ case 10: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
982
+ case 11: throw _d.sent();
983
+ case 12: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
984
+ case 13: throw _d.sent();
985
+ case 14:
986
+ parsedBody = parsedOutput.body;
987
+ throwDefaultError({
988
+ output: output,
989
+ parsedBody: parsedBody,
990
+ exceptionCtor: __BaseException,
991
+ errorCode: errorCode,
992
+ });
993
+ _d.label = 15;
994
+ case 15: return [2];
995
+ }
996
+ });
997
+ }); };
998
+ export var deserializeAws_json1_1GetContactChannelCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
999
+ var data, contents, response;
1000
+ return __generator(this, function (_a) {
1001
+ switch (_a.label) {
1002
+ case 0:
1003
+ if (output.statusCode >= 300) {
1004
+ return [2, deserializeAws_json1_1GetContactChannelCommandError(output, context)];
1005
+ }
1006
+ return [4, parseBody(output.body, context)];
1007
+ case 1:
1008
+ data = _a.sent();
1009
+ contents = {};
1010
+ contents = deserializeAws_json1_1GetContactChannelResult(data, context);
1011
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1012
+ return [2, Promise.resolve(response)];
1013
+ }
1014
+ });
1015
+ }); };
1016
+ var deserializeAws_json1_1GetContactChannelCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1017
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1018
+ var _c;
1019
+ return __generator(this, function (_d) {
1020
+ switch (_d.label) {
1021
+ case 0:
1022
+ _a = [__assign({}, output)];
1023
+ _c = {};
1024
+ return [4, parseErrorBody(output.body, context)];
1025
+ case 1:
1026
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1027
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1028
+ _b = errorCode;
1029
+ switch (_b) {
1030
+ case "AccessDeniedException": return [3, 2];
1031
+ case "com.amazonaws.ssmcontacts#AccessDeniedException": return [3, 2];
1032
+ case "DataEncryptionException": return [3, 4];
1033
+ case "com.amazonaws.ssmcontacts#DataEncryptionException": return [3, 4];
1034
+ case "InternalServerException": return [3, 6];
1035
+ case "com.amazonaws.ssmcontacts#InternalServerException": return [3, 6];
1036
+ case "ResourceNotFoundException": return [3, 8];
1037
+ case "com.amazonaws.ssmcontacts#ResourceNotFoundException": return [3, 8];
1038
+ case "ThrottlingException": return [3, 10];
1039
+ case "com.amazonaws.ssmcontacts#ThrottlingException": return [3, 10];
1040
+ case "ValidationException": return [3, 12];
1041
+ case "com.amazonaws.ssmcontacts#ValidationException": return [3, 12];
1042
+ }
1043
+ return [3, 14];
1044
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
1045
+ case 3: throw _d.sent();
1046
+ case 4: return [4, deserializeAws_json1_1DataEncryptionExceptionResponse(parsedOutput, context)];
1047
+ case 5: throw _d.sent();
1048
+ case 6: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
1049
+ case 7: throw _d.sent();
1050
+ case 8: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1051
+ case 9: throw _d.sent();
1052
+ case 10: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
1053
+ case 11: throw _d.sent();
1054
+ case 12: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
1055
+ case 13: throw _d.sent();
1056
+ case 14:
1057
+ parsedBody = parsedOutput.body;
1058
+ throwDefaultError({
1059
+ output: output,
1060
+ parsedBody: parsedBody,
1061
+ exceptionCtor: __BaseException,
1062
+ errorCode: errorCode,
1063
+ });
1064
+ _d.label = 15;
1065
+ case 15: return [2];
1066
+ }
1067
+ });
1068
+ }); };
1069
+ export var deserializeAws_json1_1GetContactPolicyCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1070
+ var data, contents, response;
1071
+ return __generator(this, function (_a) {
1072
+ switch (_a.label) {
1073
+ case 0:
1074
+ if (output.statusCode >= 300) {
1075
+ return [2, deserializeAws_json1_1GetContactPolicyCommandError(output, context)];
1076
+ }
1077
+ return [4, parseBody(output.body, context)];
1078
+ case 1:
1079
+ data = _a.sent();
1080
+ contents = {};
1081
+ contents = deserializeAws_json1_1GetContactPolicyResult(data, context);
1082
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1083
+ return [2, Promise.resolve(response)];
1084
+ }
1085
+ });
1086
+ }); };
1087
+ var deserializeAws_json1_1GetContactPolicyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1088
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1089
+ var _c;
1090
+ return __generator(this, function (_d) {
1091
+ switch (_d.label) {
1092
+ case 0:
1093
+ _a = [__assign({}, output)];
1094
+ _c = {};
1095
+ return [4, parseErrorBody(output.body, context)];
1096
+ case 1:
1097
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1098
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1099
+ _b = errorCode;
1100
+ switch (_b) {
1101
+ case "AccessDeniedException": return [3, 2];
1102
+ case "com.amazonaws.ssmcontacts#AccessDeniedException": return [3, 2];
1103
+ case "InternalServerException": return [3, 4];
1104
+ case "com.amazonaws.ssmcontacts#InternalServerException": return [3, 4];
1105
+ case "ResourceNotFoundException": return [3, 6];
1106
+ case "com.amazonaws.ssmcontacts#ResourceNotFoundException": return [3, 6];
1107
+ case "ThrottlingException": return [3, 8];
1108
+ case "com.amazonaws.ssmcontacts#ThrottlingException": return [3, 8];
1109
+ case "ValidationException": return [3, 10];
1110
+ case "com.amazonaws.ssmcontacts#ValidationException": return [3, 10];
1111
+ }
1112
+ return [3, 12];
1113
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
1114
+ case 3: throw _d.sent();
1115
+ case 4: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
1116
+ case 5: throw _d.sent();
1117
+ case 6: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1118
+ case 7: throw _d.sent();
1119
+ case 8: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
1120
+ case 9: throw _d.sent();
1121
+ case 10: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
1122
+ case 11: throw _d.sent();
1123
+ case 12:
1124
+ parsedBody = parsedOutput.body;
1125
+ throwDefaultError({
1126
+ output: output,
1127
+ parsedBody: parsedBody,
1128
+ exceptionCtor: __BaseException,
1129
+ errorCode: errorCode,
1130
+ });
1131
+ _d.label = 13;
1132
+ case 13: return [2];
1133
+ }
1134
+ });
1135
+ }); };
1136
+ export var deserializeAws_json1_1ListContactChannelsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1137
+ var data, contents, response;
1138
+ return __generator(this, function (_a) {
1139
+ switch (_a.label) {
1140
+ case 0:
1141
+ if (output.statusCode >= 300) {
1142
+ return [2, deserializeAws_json1_1ListContactChannelsCommandError(output, context)];
1143
+ }
1144
+ return [4, parseBody(output.body, context)];
1145
+ case 1:
1146
+ data = _a.sent();
1147
+ contents = {};
1148
+ contents = deserializeAws_json1_1ListContactChannelsResult(data, context);
1149
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1150
+ return [2, Promise.resolve(response)];
1151
+ }
1152
+ });
1153
+ }); };
1154
+ var deserializeAws_json1_1ListContactChannelsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1155
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1156
+ var _c;
1157
+ return __generator(this, function (_d) {
1158
+ switch (_d.label) {
1159
+ case 0:
1160
+ _a = [__assign({}, output)];
1161
+ _c = {};
1162
+ return [4, parseErrorBody(output.body, context)];
1163
+ case 1:
1164
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1165
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1166
+ _b = errorCode;
1167
+ switch (_b) {
1168
+ case "AccessDeniedException": return [3, 2];
1169
+ case "com.amazonaws.ssmcontacts#AccessDeniedException": return [3, 2];
1170
+ case "DataEncryptionException": return [3, 4];
1171
+ case "com.amazonaws.ssmcontacts#DataEncryptionException": return [3, 4];
1172
+ case "InternalServerException": return [3, 6];
1173
+ case "com.amazonaws.ssmcontacts#InternalServerException": return [3, 6];
1174
+ case "ResourceNotFoundException": return [3, 8];
1175
+ case "com.amazonaws.ssmcontacts#ResourceNotFoundException": return [3, 8];
1176
+ case "ThrottlingException": return [3, 10];
1177
+ case "com.amazonaws.ssmcontacts#ThrottlingException": return [3, 10];
1178
+ case "ValidationException": return [3, 12];
1179
+ case "com.amazonaws.ssmcontacts#ValidationException": return [3, 12];
1180
+ }
1181
+ return [3, 14];
1182
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
1183
+ case 3: throw _d.sent();
1184
+ case 4: return [4, deserializeAws_json1_1DataEncryptionExceptionResponse(parsedOutput, context)];
1185
+ case 5: throw _d.sent();
1186
+ case 6: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
1187
+ case 7: throw _d.sent();
1188
+ case 8: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1189
+ case 9: throw _d.sent();
1190
+ case 10: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
1191
+ case 11: throw _d.sent();
1192
+ case 12: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
1193
+ case 13: throw _d.sent();
1194
+ case 14:
1195
+ parsedBody = parsedOutput.body;
1196
+ throwDefaultError({
1197
+ output: output,
1198
+ parsedBody: parsedBody,
1199
+ exceptionCtor: __BaseException,
1200
+ errorCode: errorCode,
1201
+ });
1202
+ _d.label = 15;
1203
+ case 15: return [2];
1204
+ }
1205
+ });
1206
+ }); };
1207
+ export var deserializeAws_json1_1ListContactsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1208
+ var data, contents, response;
1209
+ return __generator(this, function (_a) {
1210
+ switch (_a.label) {
1211
+ case 0:
1212
+ if (output.statusCode >= 300) {
1213
+ return [2, deserializeAws_json1_1ListContactsCommandError(output, context)];
1214
+ }
1215
+ return [4, parseBody(output.body, context)];
1216
+ case 1:
1217
+ data = _a.sent();
1218
+ contents = {};
1219
+ contents = deserializeAws_json1_1ListContactsResult(data, context);
1220
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1221
+ return [2, Promise.resolve(response)];
1222
+ }
1223
+ });
1224
+ }); };
1225
+ var deserializeAws_json1_1ListContactsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1226
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1227
+ var _c;
1228
+ return __generator(this, function (_d) {
1229
+ switch (_d.label) {
1230
+ case 0:
1231
+ _a = [__assign({}, output)];
1232
+ _c = {};
1233
+ return [4, parseErrorBody(output.body, context)];
1234
+ case 1:
1235
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1236
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1237
+ _b = errorCode;
1238
+ switch (_b) {
1239
+ case "AccessDeniedException": return [3, 2];
1240
+ case "com.amazonaws.ssmcontacts#AccessDeniedException": return [3, 2];
1241
+ case "InternalServerException": return [3, 4];
1242
+ case "com.amazonaws.ssmcontacts#InternalServerException": return [3, 4];
1243
+ case "ThrottlingException": return [3, 6];
1244
+ case "com.amazonaws.ssmcontacts#ThrottlingException": return [3, 6];
1245
+ case "ValidationException": return [3, 8];
1246
+ case "com.amazonaws.ssmcontacts#ValidationException": return [3, 8];
1247
+ }
1248
+ return [3, 10];
1249
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
1250
+ case 3: throw _d.sent();
1251
+ case 4: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
1252
+ case 5: throw _d.sent();
1253
+ case 6: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
1254
+ case 7: throw _d.sent();
1255
+ case 8: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
1256
+ case 9: throw _d.sent();
1257
+ case 10:
1258
+ parsedBody = parsedOutput.body;
1259
+ throwDefaultError({
1260
+ output: output,
1261
+ parsedBody: parsedBody,
1262
+ exceptionCtor: __BaseException,
1263
+ errorCode: errorCode,
1264
+ });
1265
+ _d.label = 11;
1266
+ case 11: return [2];
1267
+ }
1268
+ });
1269
+ }); };
1270
+ export var deserializeAws_json1_1ListEngagementsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1271
+ var data, contents, response;
1272
+ return __generator(this, function (_a) {
1273
+ switch (_a.label) {
1274
+ case 0:
1275
+ if (output.statusCode >= 300) {
1276
+ return [2, deserializeAws_json1_1ListEngagementsCommandError(output, context)];
1277
+ }
1278
+ return [4, parseBody(output.body, context)];
1279
+ case 1:
1280
+ data = _a.sent();
1281
+ contents = {};
1282
+ contents = deserializeAws_json1_1ListEngagementsResult(data, context);
1283
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1284
+ return [2, Promise.resolve(response)];
1285
+ }
1286
+ });
1287
+ }); };
1288
+ var deserializeAws_json1_1ListEngagementsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1289
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1290
+ var _c;
1291
+ return __generator(this, function (_d) {
1292
+ switch (_d.label) {
1293
+ case 0:
1294
+ _a = [__assign({}, output)];
1295
+ _c = {};
1296
+ return [4, parseErrorBody(output.body, context)];
1297
+ case 1:
1298
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1299
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1300
+ _b = errorCode;
1301
+ switch (_b) {
1302
+ case "AccessDeniedException": return [3, 2];
1303
+ case "com.amazonaws.ssmcontacts#AccessDeniedException": return [3, 2];
1304
+ case "InternalServerException": return [3, 4];
1305
+ case "com.amazonaws.ssmcontacts#InternalServerException": return [3, 4];
1306
+ case "ThrottlingException": return [3, 6];
1307
+ case "com.amazonaws.ssmcontacts#ThrottlingException": return [3, 6];
1308
+ case "ValidationException": return [3, 8];
1309
+ case "com.amazonaws.ssmcontacts#ValidationException": return [3, 8];
1310
+ }
1311
+ return [3, 10];
1312
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
1313
+ case 3: throw _d.sent();
1314
+ case 4: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
1315
+ case 5: throw _d.sent();
1316
+ case 6: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
1317
+ case 7: throw _d.sent();
1318
+ case 8: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
1319
+ case 9: throw _d.sent();
1320
+ case 10:
1321
+ parsedBody = parsedOutput.body;
1322
+ throwDefaultError({
1323
+ output: output,
1324
+ parsedBody: parsedBody,
1325
+ exceptionCtor: __BaseException,
1326
+ errorCode: errorCode,
1327
+ });
1328
+ _d.label = 11;
1329
+ case 11: return [2];
1330
+ }
1331
+ });
1332
+ }); };
1333
+ export var deserializeAws_json1_1ListPageReceiptsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1334
+ var data, contents, response;
1335
+ return __generator(this, function (_a) {
1336
+ switch (_a.label) {
1337
+ case 0:
1338
+ if (output.statusCode >= 300) {
1339
+ return [2, deserializeAws_json1_1ListPageReceiptsCommandError(output, context)];
1340
+ }
1341
+ return [4, parseBody(output.body, context)];
1342
+ case 1:
1343
+ data = _a.sent();
1344
+ contents = {};
1345
+ contents = deserializeAws_json1_1ListPageReceiptsResult(data, context);
1346
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1347
+ return [2, Promise.resolve(response)];
1348
+ }
1349
+ });
1350
+ }); };
1351
+ var deserializeAws_json1_1ListPageReceiptsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1352
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1353
+ var _c;
1354
+ return __generator(this, function (_d) {
1355
+ switch (_d.label) {
1356
+ case 0:
1357
+ _a = [__assign({}, output)];
1358
+ _c = {};
1359
+ return [4, parseErrorBody(output.body, context)];
1360
+ case 1:
1361
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1362
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1363
+ _b = errorCode;
1364
+ switch (_b) {
1365
+ case "AccessDeniedException": return [3, 2];
1366
+ case "com.amazonaws.ssmcontacts#AccessDeniedException": return [3, 2];
1367
+ case "InternalServerException": return [3, 4];
1368
+ case "com.amazonaws.ssmcontacts#InternalServerException": return [3, 4];
1369
+ case "ResourceNotFoundException": return [3, 6];
1370
+ case "com.amazonaws.ssmcontacts#ResourceNotFoundException": return [3, 6];
1371
+ case "ThrottlingException": return [3, 8];
1372
+ case "com.amazonaws.ssmcontacts#ThrottlingException": return [3, 8];
1373
+ case "ValidationException": return [3, 10];
1374
+ case "com.amazonaws.ssmcontacts#ValidationException": return [3, 10];
1375
+ }
1376
+ return [3, 12];
1377
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
1378
+ case 3: throw _d.sent();
1379
+ case 4: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
1380
+ case 5: throw _d.sent();
1381
+ case 6: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1382
+ case 7: throw _d.sent();
1383
+ case 8: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
1384
+ case 9: throw _d.sent();
1385
+ case 10: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
1386
+ case 11: throw _d.sent();
1387
+ case 12:
1388
+ parsedBody = parsedOutput.body;
1389
+ throwDefaultError({
1390
+ output: output,
1391
+ parsedBody: parsedBody,
1392
+ exceptionCtor: __BaseException,
1393
+ errorCode: errorCode,
1394
+ });
1395
+ _d.label = 13;
1396
+ case 13: return [2];
1397
+ }
1398
+ });
1399
+ }); };
1400
+ export var deserializeAws_json1_1ListPagesByContactCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1401
+ var data, contents, response;
1402
+ return __generator(this, function (_a) {
1403
+ switch (_a.label) {
1404
+ case 0:
1405
+ if (output.statusCode >= 300) {
1406
+ return [2, deserializeAws_json1_1ListPagesByContactCommandError(output, context)];
1407
+ }
1408
+ return [4, parseBody(output.body, context)];
1409
+ case 1:
1410
+ data = _a.sent();
1411
+ contents = {};
1412
+ contents = deserializeAws_json1_1ListPagesByContactResult(data, context);
1413
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1414
+ return [2, Promise.resolve(response)];
1415
+ }
1416
+ });
1417
+ }); };
1418
+ var deserializeAws_json1_1ListPagesByContactCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1419
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1420
+ var _c;
1421
+ return __generator(this, function (_d) {
1422
+ switch (_d.label) {
1423
+ case 0:
1424
+ _a = [__assign({}, output)];
1425
+ _c = {};
1426
+ return [4, parseErrorBody(output.body, context)];
1427
+ case 1:
1428
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1429
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1430
+ _b = errorCode;
1431
+ switch (_b) {
1432
+ case "AccessDeniedException": return [3, 2];
1433
+ case "com.amazonaws.ssmcontacts#AccessDeniedException": return [3, 2];
1434
+ case "InternalServerException": return [3, 4];
1435
+ case "com.amazonaws.ssmcontacts#InternalServerException": return [3, 4];
1436
+ case "ResourceNotFoundException": return [3, 6];
1437
+ case "com.amazonaws.ssmcontacts#ResourceNotFoundException": return [3, 6];
1438
+ case "ThrottlingException": return [3, 8];
1439
+ case "com.amazonaws.ssmcontacts#ThrottlingException": return [3, 8];
1440
+ case "ValidationException": return [3, 10];
1441
+ case "com.amazonaws.ssmcontacts#ValidationException": return [3, 10];
1442
+ }
1443
+ return [3, 12];
1444
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
1445
+ case 3: throw _d.sent();
1446
+ case 4: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
1447
+ case 5: throw _d.sent();
1448
+ case 6: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1449
+ case 7: throw _d.sent();
1450
+ case 8: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
1451
+ case 9: throw _d.sent();
1452
+ case 10: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
1453
+ case 11: throw _d.sent();
1454
+ case 12:
1455
+ parsedBody = parsedOutput.body;
1456
+ throwDefaultError({
1457
+ output: output,
1458
+ parsedBody: parsedBody,
1459
+ exceptionCtor: __BaseException,
1460
+ errorCode: errorCode,
1461
+ });
1462
+ _d.label = 13;
1463
+ case 13: return [2];
1464
+ }
1465
+ });
1466
+ }); };
1467
+ export var deserializeAws_json1_1ListPagesByEngagementCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1468
+ var data, contents, response;
1469
+ return __generator(this, function (_a) {
1470
+ switch (_a.label) {
1471
+ case 0:
1472
+ if (output.statusCode >= 300) {
1473
+ return [2, deserializeAws_json1_1ListPagesByEngagementCommandError(output, context)];
1474
+ }
1475
+ return [4, parseBody(output.body, context)];
1476
+ case 1:
1477
+ data = _a.sent();
1478
+ contents = {};
1479
+ contents = deserializeAws_json1_1ListPagesByEngagementResult(data, context);
1480
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1481
+ return [2, Promise.resolve(response)];
1482
+ }
1483
+ });
1484
+ }); };
1485
+ var deserializeAws_json1_1ListPagesByEngagementCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1486
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1487
+ var _c;
1488
+ return __generator(this, function (_d) {
1489
+ switch (_d.label) {
1490
+ case 0:
1491
+ _a = [__assign({}, output)];
1492
+ _c = {};
1493
+ return [4, parseErrorBody(output.body, context)];
1494
+ case 1:
1495
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1496
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1497
+ _b = errorCode;
1498
+ switch (_b) {
1499
+ case "AccessDeniedException": return [3, 2];
1500
+ case "com.amazonaws.ssmcontacts#AccessDeniedException": return [3, 2];
1501
+ case "InternalServerException": return [3, 4];
1502
+ case "com.amazonaws.ssmcontacts#InternalServerException": return [3, 4];
1503
+ case "ResourceNotFoundException": return [3, 6];
1504
+ case "com.amazonaws.ssmcontacts#ResourceNotFoundException": return [3, 6];
1505
+ case "ThrottlingException": return [3, 8];
1506
+ case "com.amazonaws.ssmcontacts#ThrottlingException": return [3, 8];
1507
+ case "ValidationException": return [3, 10];
1508
+ case "com.amazonaws.ssmcontacts#ValidationException": return [3, 10];
1509
+ }
1510
+ return [3, 12];
1511
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
1512
+ case 3: throw _d.sent();
1513
+ case 4: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
1514
+ case 5: throw _d.sent();
1515
+ case 6: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1516
+ case 7: throw _d.sent();
1517
+ case 8: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
1518
+ case 9: throw _d.sent();
1519
+ case 10: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
1520
+ case 11: throw _d.sent();
1521
+ case 12:
1522
+ parsedBody = parsedOutput.body;
1523
+ throwDefaultError({
1524
+ output: output,
1525
+ parsedBody: parsedBody,
1526
+ exceptionCtor: __BaseException,
1527
+ errorCode: errorCode,
1528
+ });
1529
+ _d.label = 13;
1530
+ case 13: return [2];
1531
+ }
1532
+ });
1533
+ }); };
1534
+ export var deserializeAws_json1_1ListTagsForResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1535
+ var data, contents, response;
1536
+ return __generator(this, function (_a) {
1537
+ switch (_a.label) {
1538
+ case 0:
1539
+ if (output.statusCode >= 300) {
1540
+ return [2, deserializeAws_json1_1ListTagsForResourceCommandError(output, context)];
1541
+ }
1542
+ return [4, parseBody(output.body, context)];
1543
+ case 1:
1544
+ data = _a.sent();
1545
+ contents = {};
1546
+ contents = deserializeAws_json1_1ListTagsForResourceResult(data, context);
1547
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1548
+ return [2, Promise.resolve(response)];
1549
+ }
1550
+ });
1551
+ }); };
1552
+ var deserializeAws_json1_1ListTagsForResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1553
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1554
+ var _c;
1555
+ return __generator(this, function (_d) {
1556
+ switch (_d.label) {
1557
+ case 0:
1558
+ _a = [__assign({}, output)];
1559
+ _c = {};
1560
+ return [4, parseErrorBody(output.body, context)];
1561
+ case 1:
1562
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1563
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1564
+ _b = errorCode;
1565
+ switch (_b) {
1566
+ case "AccessDeniedException": return [3, 2];
1567
+ case "com.amazonaws.ssmcontacts#AccessDeniedException": return [3, 2];
1568
+ case "InternalServerException": return [3, 4];
1569
+ case "com.amazonaws.ssmcontacts#InternalServerException": return [3, 4];
1570
+ case "ResourceNotFoundException": return [3, 6];
1571
+ case "com.amazonaws.ssmcontacts#ResourceNotFoundException": return [3, 6];
1572
+ case "ThrottlingException": return [3, 8];
1573
+ case "com.amazonaws.ssmcontacts#ThrottlingException": return [3, 8];
1574
+ case "ValidationException": return [3, 10];
1575
+ case "com.amazonaws.ssmcontacts#ValidationException": return [3, 10];
1576
+ }
1577
+ return [3, 12];
1578
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
1579
+ case 3: throw _d.sent();
1580
+ case 4: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
1581
+ case 5: throw _d.sent();
1582
+ case 6: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1583
+ case 7: throw _d.sent();
1584
+ case 8: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
1585
+ case 9: throw _d.sent();
1586
+ case 10: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
1587
+ case 11: throw _d.sent();
1588
+ case 12:
1589
+ parsedBody = parsedOutput.body;
1590
+ throwDefaultError({
1591
+ output: output,
1592
+ parsedBody: parsedBody,
1593
+ exceptionCtor: __BaseException,
1594
+ errorCode: errorCode,
1595
+ });
1596
+ _d.label = 13;
1597
+ case 13: return [2];
1598
+ }
1599
+ });
1600
+ }); };
1601
+ export var deserializeAws_json1_1PutContactPolicyCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1602
+ var data, contents, response;
1603
+ return __generator(this, function (_a) {
1604
+ switch (_a.label) {
1605
+ case 0:
1606
+ if (output.statusCode >= 300) {
1607
+ return [2, deserializeAws_json1_1PutContactPolicyCommandError(output, context)];
1608
+ }
1609
+ return [4, parseBody(output.body, context)];
1610
+ case 1:
1611
+ data = _a.sent();
1612
+ contents = {};
1613
+ contents = deserializeAws_json1_1PutContactPolicyResult(data, context);
1614
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1615
+ return [2, Promise.resolve(response)];
1616
+ }
1617
+ });
1618
+ }); };
1619
+ var deserializeAws_json1_1PutContactPolicyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1620
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1621
+ var _c;
1622
+ return __generator(this, function (_d) {
1623
+ switch (_d.label) {
1624
+ case 0:
1625
+ _a = [__assign({}, output)];
1626
+ _c = {};
1627
+ return [4, parseErrorBody(output.body, context)];
1628
+ case 1:
1629
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1630
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1631
+ _b = errorCode;
1632
+ switch (_b) {
1633
+ case "AccessDeniedException": return [3, 2];
1634
+ case "com.amazonaws.ssmcontacts#AccessDeniedException": return [3, 2];
1635
+ case "ConflictException": return [3, 4];
1636
+ case "com.amazonaws.ssmcontacts#ConflictException": return [3, 4];
1637
+ case "InternalServerException": return [3, 6];
1638
+ case "com.amazonaws.ssmcontacts#InternalServerException": return [3, 6];
1639
+ case "ResourceNotFoundException": return [3, 8];
1640
+ case "com.amazonaws.ssmcontacts#ResourceNotFoundException": return [3, 8];
1641
+ case "ThrottlingException": return [3, 10];
1642
+ case "com.amazonaws.ssmcontacts#ThrottlingException": return [3, 10];
1643
+ case "ValidationException": return [3, 12];
1644
+ case "com.amazonaws.ssmcontacts#ValidationException": return [3, 12];
1645
+ }
1646
+ return [3, 14];
1647
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
1648
+ case 3: throw _d.sent();
1649
+ case 4: return [4, deserializeAws_json1_1ConflictExceptionResponse(parsedOutput, context)];
1650
+ case 5: throw _d.sent();
1651
+ case 6: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
1652
+ case 7: throw _d.sent();
1653
+ case 8: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1654
+ case 9: throw _d.sent();
1655
+ case 10: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
1656
+ case 11: throw _d.sent();
1657
+ case 12: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
1658
+ case 13: throw _d.sent();
1659
+ case 14:
1660
+ parsedBody = parsedOutput.body;
1661
+ throwDefaultError({
1662
+ output: output,
1663
+ parsedBody: parsedBody,
1664
+ exceptionCtor: __BaseException,
1665
+ errorCode: errorCode,
1666
+ });
1667
+ _d.label = 15;
1668
+ case 15: return [2];
1669
+ }
1670
+ });
1671
+ }); };
1672
+ export var deserializeAws_json1_1SendActivationCodeCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1673
+ var data, contents, response;
1674
+ return __generator(this, function (_a) {
1675
+ switch (_a.label) {
1676
+ case 0:
1677
+ if (output.statusCode >= 300) {
1678
+ return [2, deserializeAws_json1_1SendActivationCodeCommandError(output, context)];
1679
+ }
1680
+ return [4, parseBody(output.body, context)];
1681
+ case 1:
1682
+ data = _a.sent();
1683
+ contents = {};
1684
+ contents = deserializeAws_json1_1SendActivationCodeResult(data, context);
1685
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1686
+ return [2, Promise.resolve(response)];
1687
+ }
1688
+ });
1689
+ }); };
1690
+ var deserializeAws_json1_1SendActivationCodeCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1691
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1692
+ var _c;
1693
+ return __generator(this, function (_d) {
1694
+ switch (_d.label) {
1695
+ case 0:
1696
+ _a = [__assign({}, output)];
1697
+ _c = {};
1698
+ return [4, parseErrorBody(output.body, context)];
1699
+ case 1:
1700
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1701
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1702
+ _b = errorCode;
1703
+ switch (_b) {
1704
+ case "AccessDeniedException": return [3, 2];
1705
+ case "com.amazonaws.ssmcontacts#AccessDeniedException": return [3, 2];
1706
+ case "DataEncryptionException": return [3, 4];
1707
+ case "com.amazonaws.ssmcontacts#DataEncryptionException": return [3, 4];
1708
+ case "InternalServerException": return [3, 6];
1709
+ case "com.amazonaws.ssmcontacts#InternalServerException": return [3, 6];
1710
+ case "ResourceNotFoundException": return [3, 8];
1711
+ case "com.amazonaws.ssmcontacts#ResourceNotFoundException": return [3, 8];
1712
+ case "ServiceQuotaExceededException": return [3, 10];
1713
+ case "com.amazonaws.ssmcontacts#ServiceQuotaExceededException": return [3, 10];
1714
+ case "ThrottlingException": return [3, 12];
1715
+ case "com.amazonaws.ssmcontacts#ThrottlingException": return [3, 12];
1716
+ case "ValidationException": return [3, 14];
1717
+ case "com.amazonaws.ssmcontacts#ValidationException": return [3, 14];
1718
+ }
1719
+ return [3, 16];
1720
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
1721
+ case 3: throw _d.sent();
1722
+ case 4: return [4, deserializeAws_json1_1DataEncryptionExceptionResponse(parsedOutput, context)];
1723
+ case 5: throw _d.sent();
1724
+ case 6: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
1725
+ case 7: throw _d.sent();
1726
+ case 8: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1727
+ case 9: throw _d.sent();
1728
+ case 10: return [4, deserializeAws_json1_1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
1729
+ case 11: throw _d.sent();
1730
+ case 12: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
1731
+ case 13: throw _d.sent();
1732
+ case 14: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
1733
+ case 15: throw _d.sent();
1734
+ case 16:
1735
+ parsedBody = parsedOutput.body;
1736
+ throwDefaultError({
1737
+ output: output,
1738
+ parsedBody: parsedBody,
1739
+ exceptionCtor: __BaseException,
1740
+ errorCode: errorCode,
1741
+ });
1742
+ _d.label = 17;
1743
+ case 17: return [2];
1744
+ }
1745
+ });
1746
+ }); };
1747
+ export var deserializeAws_json1_1StartEngagementCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1748
+ var data, contents, response;
1749
+ return __generator(this, function (_a) {
1750
+ switch (_a.label) {
1751
+ case 0:
1752
+ if (output.statusCode >= 300) {
1753
+ return [2, deserializeAws_json1_1StartEngagementCommandError(output, context)];
1754
+ }
1755
+ return [4, parseBody(output.body, context)];
1756
+ case 1:
1757
+ data = _a.sent();
1758
+ contents = {};
1759
+ contents = deserializeAws_json1_1StartEngagementResult(data, context);
1760
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1761
+ return [2, Promise.resolve(response)];
1762
+ }
1763
+ });
1764
+ }); };
1765
+ var deserializeAws_json1_1StartEngagementCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1766
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1767
+ var _c;
1768
+ return __generator(this, function (_d) {
1769
+ switch (_d.label) {
1770
+ case 0:
1771
+ _a = [__assign({}, output)];
1772
+ _c = {};
1773
+ return [4, parseErrorBody(output.body, context)];
1774
+ case 1:
1775
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1776
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1777
+ _b = errorCode;
1778
+ switch (_b) {
1779
+ case "AccessDeniedException": return [3, 2];
1780
+ case "com.amazonaws.ssmcontacts#AccessDeniedException": return [3, 2];
1781
+ case "DataEncryptionException": return [3, 4];
1782
+ case "com.amazonaws.ssmcontacts#DataEncryptionException": return [3, 4];
1783
+ case "InternalServerException": return [3, 6];
1784
+ case "com.amazonaws.ssmcontacts#InternalServerException": return [3, 6];
1785
+ case "ResourceNotFoundException": return [3, 8];
1786
+ case "com.amazonaws.ssmcontacts#ResourceNotFoundException": return [3, 8];
1787
+ case "ThrottlingException": return [3, 10];
1788
+ case "com.amazonaws.ssmcontacts#ThrottlingException": return [3, 10];
1789
+ case "ValidationException": return [3, 12];
1790
+ case "com.amazonaws.ssmcontacts#ValidationException": return [3, 12];
1791
+ }
1792
+ return [3, 14];
1793
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
1794
+ case 3: throw _d.sent();
1795
+ case 4: return [4, deserializeAws_json1_1DataEncryptionExceptionResponse(parsedOutput, context)];
1796
+ case 5: throw _d.sent();
1797
+ case 6: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
1798
+ case 7: throw _d.sent();
1799
+ case 8: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1800
+ case 9: throw _d.sent();
1801
+ case 10: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
1802
+ case 11: throw _d.sent();
1803
+ case 12: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
1804
+ case 13: throw _d.sent();
1805
+ case 14:
1806
+ parsedBody = parsedOutput.body;
1807
+ throwDefaultError({
1808
+ output: output,
1809
+ parsedBody: parsedBody,
1810
+ exceptionCtor: __BaseException,
1811
+ errorCode: errorCode,
1812
+ });
1813
+ _d.label = 15;
1814
+ case 15: return [2];
1815
+ }
1816
+ });
1817
+ }); };
1818
+ export var deserializeAws_json1_1StopEngagementCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1819
+ var data, contents, response;
1820
+ return __generator(this, function (_a) {
1821
+ switch (_a.label) {
1822
+ case 0:
1823
+ if (output.statusCode >= 300) {
1824
+ return [2, deserializeAws_json1_1StopEngagementCommandError(output, context)];
1825
+ }
1826
+ return [4, parseBody(output.body, context)];
1827
+ case 1:
1828
+ data = _a.sent();
1829
+ contents = {};
1830
+ contents = deserializeAws_json1_1StopEngagementResult(data, context);
1831
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1832
+ return [2, Promise.resolve(response)];
1833
+ }
1834
+ });
1835
+ }); };
1836
+ var deserializeAws_json1_1StopEngagementCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1837
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1838
+ var _c;
1839
+ return __generator(this, function (_d) {
1840
+ switch (_d.label) {
1841
+ case 0:
1842
+ _a = [__assign({}, output)];
1843
+ _c = {};
1844
+ return [4, parseErrorBody(output.body, context)];
1845
+ case 1:
1846
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1847
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1848
+ _b = errorCode;
1849
+ switch (_b) {
1850
+ case "AccessDeniedException": return [3, 2];
1851
+ case "com.amazonaws.ssmcontacts#AccessDeniedException": return [3, 2];
1852
+ case "InternalServerException": return [3, 4];
1853
+ case "com.amazonaws.ssmcontacts#InternalServerException": return [3, 4];
1854
+ case "ResourceNotFoundException": return [3, 6];
1855
+ case "com.amazonaws.ssmcontacts#ResourceNotFoundException": return [3, 6];
1856
+ case "ThrottlingException": return [3, 8];
1857
+ case "com.amazonaws.ssmcontacts#ThrottlingException": return [3, 8];
1858
+ case "ValidationException": return [3, 10];
1859
+ case "com.amazonaws.ssmcontacts#ValidationException": return [3, 10];
1860
+ }
1861
+ return [3, 12];
1862
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
1863
+ case 3: throw _d.sent();
1864
+ case 4: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
1865
+ case 5: throw _d.sent();
1866
+ case 6: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1867
+ case 7: throw _d.sent();
1868
+ case 8: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
1869
+ case 9: throw _d.sent();
1870
+ case 10: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
1871
+ case 11: throw _d.sent();
1872
+ case 12:
1873
+ parsedBody = parsedOutput.body;
1874
+ throwDefaultError({
1875
+ output: output,
1876
+ parsedBody: parsedBody,
1877
+ exceptionCtor: __BaseException,
1878
+ errorCode: errorCode,
1879
+ });
1880
+ _d.label = 13;
1881
+ case 13: return [2];
1882
+ }
1883
+ });
1884
+ }); };
1885
+ export var deserializeAws_json1_1TagResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1886
+ var data, contents, response;
1887
+ return __generator(this, function (_a) {
1888
+ switch (_a.label) {
1889
+ case 0:
1890
+ if (output.statusCode >= 300) {
1891
+ return [2, deserializeAws_json1_1TagResourceCommandError(output, context)];
1892
+ }
1893
+ return [4, parseBody(output.body, context)];
1894
+ case 1:
1895
+ data = _a.sent();
1896
+ contents = {};
1897
+ contents = deserializeAws_json1_1TagResourceResult(data, context);
1898
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1899
+ return [2, Promise.resolve(response)];
1900
+ }
1901
+ });
1902
+ }); };
1903
+ var deserializeAws_json1_1TagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1904
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1905
+ var _c;
1906
+ return __generator(this, function (_d) {
1907
+ switch (_d.label) {
1908
+ case 0:
1909
+ _a = [__assign({}, output)];
1910
+ _c = {};
1911
+ return [4, parseErrorBody(output.body, context)];
1912
+ case 1:
1913
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1914
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1915
+ _b = errorCode;
1916
+ switch (_b) {
1917
+ case "AccessDeniedException": return [3, 2];
1918
+ case "com.amazonaws.ssmcontacts#AccessDeniedException": return [3, 2];
1919
+ case "InternalServerException": return [3, 4];
1920
+ case "com.amazonaws.ssmcontacts#InternalServerException": return [3, 4];
1921
+ case "ResourceNotFoundException": return [3, 6];
1922
+ case "com.amazonaws.ssmcontacts#ResourceNotFoundException": return [3, 6];
1923
+ case "ServiceQuotaExceededException": return [3, 8];
1924
+ case "com.amazonaws.ssmcontacts#ServiceQuotaExceededException": return [3, 8];
1925
+ case "ThrottlingException": return [3, 10];
1926
+ case "com.amazonaws.ssmcontacts#ThrottlingException": return [3, 10];
1927
+ case "ValidationException": return [3, 12];
1928
+ case "com.amazonaws.ssmcontacts#ValidationException": return [3, 12];
1929
+ }
1930
+ return [3, 14];
1931
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
1932
+ case 3: throw _d.sent();
1933
+ case 4: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
1934
+ case 5: throw _d.sent();
1935
+ case 6: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1936
+ case 7: throw _d.sent();
1937
+ case 8: return [4, deserializeAws_json1_1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
1938
+ case 9: throw _d.sent();
1939
+ case 10: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
1940
+ case 11: throw _d.sent();
1941
+ case 12: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
1942
+ case 13: throw _d.sent();
1943
+ case 14:
1944
+ parsedBody = parsedOutput.body;
1945
+ throwDefaultError({
1946
+ output: output,
1947
+ parsedBody: parsedBody,
1948
+ exceptionCtor: __BaseException,
1949
+ errorCode: errorCode,
1950
+ });
1951
+ _d.label = 15;
1952
+ case 15: return [2];
1953
+ }
1954
+ });
1955
+ }); };
1956
+ export var deserializeAws_json1_1UntagResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1957
+ var data, contents, response;
1958
+ return __generator(this, function (_a) {
1959
+ switch (_a.label) {
1960
+ case 0:
1961
+ if (output.statusCode >= 300) {
1962
+ return [2, deserializeAws_json1_1UntagResourceCommandError(output, context)];
1963
+ }
1964
+ return [4, parseBody(output.body, context)];
1965
+ case 1:
1966
+ data = _a.sent();
1967
+ contents = {};
1968
+ contents = deserializeAws_json1_1UntagResourceResult(data, context);
1969
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1970
+ return [2, Promise.resolve(response)];
1971
+ }
1972
+ });
1973
+ }); };
1974
+ var deserializeAws_json1_1UntagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1975
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1976
+ var _c;
1977
+ return __generator(this, function (_d) {
1978
+ switch (_d.label) {
1979
+ case 0:
1980
+ _a = [__assign({}, output)];
1981
+ _c = {};
1982
+ return [4, parseErrorBody(output.body, context)];
1983
+ case 1:
1984
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1985
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1986
+ _b = errorCode;
1987
+ switch (_b) {
1988
+ case "AccessDeniedException": return [3, 2];
1989
+ case "com.amazonaws.ssmcontacts#AccessDeniedException": return [3, 2];
1990
+ case "InternalServerException": return [3, 4];
1991
+ case "com.amazonaws.ssmcontacts#InternalServerException": return [3, 4];
1992
+ case "ResourceNotFoundException": return [3, 6];
1993
+ case "com.amazonaws.ssmcontacts#ResourceNotFoundException": return [3, 6];
1994
+ case "ThrottlingException": return [3, 8];
1995
+ case "com.amazonaws.ssmcontacts#ThrottlingException": return [3, 8];
1996
+ case "ValidationException": return [3, 10];
1997
+ case "com.amazonaws.ssmcontacts#ValidationException": return [3, 10];
1998
+ }
1999
+ return [3, 12];
2000
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
2001
+ case 3: throw _d.sent();
2002
+ case 4: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
2003
+ case 5: throw _d.sent();
2004
+ case 6: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
2005
+ case 7: throw _d.sent();
2006
+ case 8: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
2007
+ case 9: throw _d.sent();
2008
+ case 10: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
2009
+ case 11: throw _d.sent();
2010
+ case 12:
2011
+ parsedBody = parsedOutput.body;
2012
+ throwDefaultError({
2013
+ output: output,
2014
+ parsedBody: parsedBody,
2015
+ exceptionCtor: __BaseException,
2016
+ errorCode: errorCode,
2017
+ });
2018
+ _d.label = 13;
2019
+ case 13: return [2];
2020
+ }
2021
+ });
2022
+ }); };
2023
+ export var deserializeAws_json1_1UpdateContactCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2024
+ var data, contents, response;
2025
+ return __generator(this, function (_a) {
2026
+ switch (_a.label) {
2027
+ case 0:
2028
+ if (output.statusCode >= 300) {
2029
+ return [2, deserializeAws_json1_1UpdateContactCommandError(output, context)];
2030
+ }
2031
+ return [4, parseBody(output.body, context)];
2032
+ case 1:
2033
+ data = _a.sent();
2034
+ contents = {};
2035
+ contents = deserializeAws_json1_1UpdateContactResult(data, context);
2036
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
2037
+ return [2, Promise.resolve(response)];
2038
+ }
2039
+ });
2040
+ }); };
2041
+ var deserializeAws_json1_1UpdateContactCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2042
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2043
+ var _c;
2044
+ return __generator(this, function (_d) {
2045
+ switch (_d.label) {
2046
+ case 0:
2047
+ _a = [__assign({}, output)];
2048
+ _c = {};
2049
+ return [4, parseErrorBody(output.body, context)];
2050
+ case 1:
2051
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2052
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2053
+ _b = errorCode;
2054
+ switch (_b) {
2055
+ case "AccessDeniedException": return [3, 2];
2056
+ case "com.amazonaws.ssmcontacts#AccessDeniedException": return [3, 2];
2057
+ case "DataEncryptionException": return [3, 4];
2058
+ case "com.amazonaws.ssmcontacts#DataEncryptionException": return [3, 4];
2059
+ case "InternalServerException": return [3, 6];
2060
+ case "com.amazonaws.ssmcontacts#InternalServerException": return [3, 6];
2061
+ case "ResourceNotFoundException": return [3, 8];
2062
+ case "com.amazonaws.ssmcontacts#ResourceNotFoundException": return [3, 8];
2063
+ case "ServiceQuotaExceededException": return [3, 10];
2064
+ case "com.amazonaws.ssmcontacts#ServiceQuotaExceededException": return [3, 10];
2065
+ case "ThrottlingException": return [3, 12];
2066
+ case "com.amazonaws.ssmcontacts#ThrottlingException": return [3, 12];
2067
+ case "ValidationException": return [3, 14];
2068
+ case "com.amazonaws.ssmcontacts#ValidationException": return [3, 14];
2069
+ }
2070
+ return [3, 16];
2071
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
2072
+ case 3: throw _d.sent();
2073
+ case 4: return [4, deserializeAws_json1_1DataEncryptionExceptionResponse(parsedOutput, context)];
2074
+ case 5: throw _d.sent();
2075
+ case 6: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
2076
+ case 7: throw _d.sent();
2077
+ case 8: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
2078
+ case 9: throw _d.sent();
2079
+ case 10: return [4, deserializeAws_json1_1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
2080
+ case 11: throw _d.sent();
2081
+ case 12: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
2082
+ case 13: throw _d.sent();
2083
+ case 14: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
2084
+ case 15: throw _d.sent();
2085
+ case 16:
2086
+ parsedBody = parsedOutput.body;
2087
+ throwDefaultError({
2088
+ output: output,
2089
+ parsedBody: parsedBody,
2090
+ exceptionCtor: __BaseException,
2091
+ errorCode: errorCode,
2092
+ });
2093
+ _d.label = 17;
2094
+ case 17: return [2];
2095
+ }
2096
+ });
2097
+ }); };
2098
+ export var deserializeAws_json1_1UpdateContactChannelCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2099
+ var data, contents, response;
2100
+ return __generator(this, function (_a) {
2101
+ switch (_a.label) {
2102
+ case 0:
2103
+ if (output.statusCode >= 300) {
2104
+ return [2, deserializeAws_json1_1UpdateContactChannelCommandError(output, context)];
2105
+ }
2106
+ return [4, parseBody(output.body, context)];
2107
+ case 1:
2108
+ data = _a.sent();
2109
+ contents = {};
2110
+ contents = deserializeAws_json1_1UpdateContactChannelResult(data, context);
2111
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
2112
+ return [2, Promise.resolve(response)];
2113
+ }
2114
+ });
2115
+ }); };
2116
+ var deserializeAws_json1_1UpdateContactChannelCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2117
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2118
+ var _c;
2119
+ return __generator(this, function (_d) {
2120
+ switch (_d.label) {
2121
+ case 0:
2122
+ _a = [__assign({}, output)];
2123
+ _c = {};
2124
+ return [4, parseErrorBody(output.body, context)];
2125
+ case 1:
2126
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2127
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2128
+ _b = errorCode;
2129
+ switch (_b) {
2130
+ case "AccessDeniedException": return [3, 2];
2131
+ case "com.amazonaws.ssmcontacts#AccessDeniedException": return [3, 2];
2132
+ case "ConflictException": return [3, 4];
2133
+ case "com.amazonaws.ssmcontacts#ConflictException": return [3, 4];
2134
+ case "DataEncryptionException": return [3, 6];
2135
+ case "com.amazonaws.ssmcontacts#DataEncryptionException": return [3, 6];
2136
+ case "InternalServerException": return [3, 8];
2137
+ case "com.amazonaws.ssmcontacts#InternalServerException": return [3, 8];
2138
+ case "ResourceNotFoundException": return [3, 10];
2139
+ case "com.amazonaws.ssmcontacts#ResourceNotFoundException": return [3, 10];
2140
+ case "ThrottlingException": return [3, 12];
2141
+ case "com.amazonaws.ssmcontacts#ThrottlingException": return [3, 12];
2142
+ case "ValidationException": return [3, 14];
2143
+ case "com.amazonaws.ssmcontacts#ValidationException": return [3, 14];
2144
+ }
2145
+ return [3, 16];
2146
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
2147
+ case 3: throw _d.sent();
2148
+ case 4: return [4, deserializeAws_json1_1ConflictExceptionResponse(parsedOutput, context)];
2149
+ case 5: throw _d.sent();
2150
+ case 6: return [4, deserializeAws_json1_1DataEncryptionExceptionResponse(parsedOutput, context)];
2151
+ case 7: throw _d.sent();
2152
+ case 8: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
2153
+ case 9: throw _d.sent();
2154
+ case 10: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
2155
+ case 11: throw _d.sent();
2156
+ case 12: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
2157
+ case 13: throw _d.sent();
2158
+ case 14: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
2159
+ case 15: throw _d.sent();
2160
+ case 16:
2161
+ parsedBody = parsedOutput.body;
2162
+ throwDefaultError({
2163
+ output: output,
2164
+ parsedBody: parsedBody,
2165
+ exceptionCtor: __BaseException,
2166
+ errorCode: errorCode,
2167
+ });
2168
+ _d.label = 17;
2169
+ case 17: return [2];
2170
+ }
2171
+ });
2172
+ }); };
2173
+ var deserializeAws_json1_1AccessDeniedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
2174
+ var body, deserialized, exception;
2175
+ return __generator(this, function (_a) {
2176
+ body = parsedOutput.body;
2177
+ deserialized = deserializeAws_json1_1AccessDeniedException(body, context);
2178
+ exception = new AccessDeniedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
2179
+ return [2, __decorateServiceException(exception, body)];
2180
+ });
2181
+ }); };
2182
+ var deserializeAws_json1_1ConflictExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
2183
+ var body, deserialized, exception;
2184
+ return __generator(this, function (_a) {
2185
+ body = parsedOutput.body;
2186
+ deserialized = deserializeAws_json1_1ConflictException(body, context);
2187
+ exception = new ConflictException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
2188
+ return [2, __decorateServiceException(exception, body)];
2189
+ });
2190
+ }); };
2191
+ var deserializeAws_json1_1DataEncryptionExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
2192
+ var body, deserialized, exception;
2193
+ return __generator(this, function (_a) {
2194
+ body = parsedOutput.body;
2195
+ deserialized = deserializeAws_json1_1DataEncryptionException(body, context);
2196
+ exception = new DataEncryptionException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
2197
+ return [2, __decorateServiceException(exception, body)];
2198
+ });
2199
+ }); };
2200
+ var deserializeAws_json1_1InternalServerExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
2201
+ var body, deserialized, exception;
2202
+ return __generator(this, function (_a) {
2203
+ body = parsedOutput.body;
2204
+ deserialized = deserializeAws_json1_1InternalServerException(body, context);
2205
+ exception = new InternalServerException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
2206
+ return [2, __decorateServiceException(exception, body)];
2207
+ });
2208
+ }); };
2209
+ var deserializeAws_json1_1ResourceNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
2210
+ var body, deserialized, exception;
2211
+ return __generator(this, function (_a) {
2212
+ body = parsedOutput.body;
2213
+ deserialized = deserializeAws_json1_1ResourceNotFoundException(body, context);
2214
+ exception = new ResourceNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
2215
+ return [2, __decorateServiceException(exception, body)];
2216
+ });
2217
+ }); };
2218
+ var deserializeAws_json1_1ServiceQuotaExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
2219
+ var body, deserialized, exception;
2220
+ return __generator(this, function (_a) {
2221
+ body = parsedOutput.body;
2222
+ deserialized = deserializeAws_json1_1ServiceQuotaExceededException(body, context);
2223
+ exception = new ServiceQuotaExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
2224
+ return [2, __decorateServiceException(exception, body)];
2225
+ });
2226
+ }); };
2227
+ var deserializeAws_json1_1ThrottlingExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
2228
+ var body, deserialized, exception;
2229
+ return __generator(this, function (_a) {
2230
+ body = parsedOutput.body;
2231
+ deserialized = deserializeAws_json1_1ThrottlingException(body, context);
2232
+ exception = new ThrottlingException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
2233
+ return [2, __decorateServiceException(exception, body)];
2234
+ });
2235
+ }); };
2236
+ var deserializeAws_json1_1ValidationExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
2237
+ var body, deserialized, exception;
2238
+ return __generator(this, function (_a) {
2239
+ body = parsedOutput.body;
2240
+ deserialized = deserializeAws_json1_1ValidationException(body, context);
2241
+ exception = new ValidationException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
2242
+ return [2, __decorateServiceException(exception, body)];
2243
+ });
2244
+ }); };
2245
+ var serializeAws_json1_1AcceptPageRequest = function (input, context) {
2246
+ return __assign(__assign(__assign(__assign(__assign(__assign({}, (input.AcceptCode != null && { AcceptCode: input.AcceptCode })), (input.AcceptCodeValidation != null && { AcceptCodeValidation: input.AcceptCodeValidation })), (input.AcceptType != null && { AcceptType: input.AcceptType })), (input.ContactChannelId != null && { ContactChannelId: input.ContactChannelId })), (input.Note != null && { Note: input.Note })), (input.PageId != null && { PageId: input.PageId }));
1590
2247
  };
1591
- const serializeAws_json1_1ActivateContactChannelRequest = (input, context) => {
1592
- return {
1593
- ...(input.ActivationCode != null && { ActivationCode: input.ActivationCode }),
1594
- ...(input.ContactChannelId != null && { ContactChannelId: input.ContactChannelId }),
1595
- };
2248
+ var serializeAws_json1_1ActivateContactChannelRequest = function (input, context) {
2249
+ return __assign(__assign({}, (input.ActivationCode != null && { ActivationCode: input.ActivationCode })), (input.ContactChannelId != null && { ContactChannelId: input.ContactChannelId }));
1596
2250
  };
1597
- const serializeAws_json1_1ChannelTargetInfo = (input, context) => {
1598
- return {
1599
- ...(input.ContactChannelId != null && { ContactChannelId: input.ContactChannelId }),
1600
- ...(input.RetryIntervalInMinutes != null && { RetryIntervalInMinutes: input.RetryIntervalInMinutes }),
1601
- };
2251
+ var serializeAws_json1_1ChannelTargetInfo = function (input, context) {
2252
+ return __assign(__assign({}, (input.ContactChannelId != null && { ContactChannelId: input.ContactChannelId })), (input.RetryIntervalInMinutes != null && { RetryIntervalInMinutes: input.RetryIntervalInMinutes }));
1602
2253
  };
1603
- const serializeAws_json1_1ContactChannelAddress = (input, context) => {
1604
- return {
1605
- ...(input.SimpleAddress != null && { SimpleAddress: input.SimpleAddress }),
1606
- };
2254
+ var serializeAws_json1_1ContactChannelAddress = function (input, context) {
2255
+ return __assign({}, (input.SimpleAddress != null && { SimpleAddress: input.SimpleAddress }));
1607
2256
  };
1608
- const serializeAws_json1_1ContactTargetInfo = (input, context) => {
1609
- return {
1610
- ...(input.ContactId != null && { ContactId: input.ContactId }),
1611
- ...(input.IsEssential != null && { IsEssential: input.IsEssential }),
1612
- };
2257
+ var serializeAws_json1_1ContactTargetInfo = function (input, context) {
2258
+ return __assign(__assign({}, (input.ContactId != null && { ContactId: input.ContactId })), (input.IsEssential != null && { IsEssential: input.IsEssential }));
1613
2259
  };
1614
- const serializeAws_json1_1CreateContactChannelRequest = (input, context) => {
1615
- return {
1616
- ...(input.ContactId != null && { ContactId: input.ContactId }),
1617
- ...(input.DeferActivation != null && { DeferActivation: input.DeferActivation }),
1618
- ...(input.DeliveryAddress != null && {
1619
- DeliveryAddress: serializeAws_json1_1ContactChannelAddress(input.DeliveryAddress, context),
1620
- }),
1621
- IdempotencyToken: input.IdempotencyToken ?? generateIdempotencyToken(),
1622
- ...(input.Name != null && { Name: input.Name }),
1623
- ...(input.Type != null && { Type: input.Type }),
1624
- };
2260
+ var serializeAws_json1_1CreateContactChannelRequest = function (input, context) {
2261
+ var _a;
2262
+ return __assign(__assign(__assign(__assign(__assign(__assign({}, (input.ContactId != null && { ContactId: input.ContactId })), (input.DeferActivation != null && { DeferActivation: input.DeferActivation })), (input.DeliveryAddress != null && {
2263
+ DeliveryAddress: serializeAws_json1_1ContactChannelAddress(input.DeliveryAddress, context),
2264
+ })), { IdempotencyToken: (_a = input.IdempotencyToken) !== null && _a !== void 0 ? _a : generateIdempotencyToken() }), (input.Name != null && { Name: input.Name })), (input.Type != null && { Type: input.Type }));
1625
2265
  };
1626
- const serializeAws_json1_1CreateContactRequest = (input, context) => {
1627
- return {
1628
- ...(input.Alias != null && { Alias: input.Alias }),
1629
- ...(input.DisplayName != null && { DisplayName: input.DisplayName }),
1630
- IdempotencyToken: input.IdempotencyToken ?? generateIdempotencyToken(),
1631
- ...(input.Plan != null && { Plan: serializeAws_json1_1Plan(input.Plan, context) }),
1632
- ...(input.Tags != null && { Tags: serializeAws_json1_1TagsList(input.Tags, context) }),
1633
- ...(input.Type != null && { Type: input.Type }),
1634
- };
2266
+ var serializeAws_json1_1CreateContactRequest = function (input, context) {
2267
+ var _a;
2268
+ return __assign(__assign(__assign(__assign(__assign(__assign({}, (input.Alias != null && { Alias: input.Alias })), (input.DisplayName != null && { DisplayName: input.DisplayName })), { IdempotencyToken: (_a = input.IdempotencyToken) !== null && _a !== void 0 ? _a : generateIdempotencyToken() }), (input.Plan != null && { Plan: serializeAws_json1_1Plan(input.Plan, context) })), (input.Tags != null && { Tags: serializeAws_json1_1TagsList(input.Tags, context) })), (input.Type != null && { Type: input.Type }));
1635
2269
  };
1636
- const serializeAws_json1_1DeactivateContactChannelRequest = (input, context) => {
1637
- return {
1638
- ...(input.ContactChannelId != null && { ContactChannelId: input.ContactChannelId }),
1639
- };
2270
+ var serializeAws_json1_1DeactivateContactChannelRequest = function (input, context) {
2271
+ return __assign({}, (input.ContactChannelId != null && { ContactChannelId: input.ContactChannelId }));
1640
2272
  };
1641
- const serializeAws_json1_1DeleteContactChannelRequest = (input, context) => {
1642
- return {
1643
- ...(input.ContactChannelId != null && { ContactChannelId: input.ContactChannelId }),
1644
- };
2273
+ var serializeAws_json1_1DeleteContactChannelRequest = function (input, context) {
2274
+ return __assign({}, (input.ContactChannelId != null && { ContactChannelId: input.ContactChannelId }));
1645
2275
  };
1646
- const serializeAws_json1_1DeleteContactRequest = (input, context) => {
1647
- return {
1648
- ...(input.ContactId != null && { ContactId: input.ContactId }),
1649
- };
2276
+ var serializeAws_json1_1DeleteContactRequest = function (input, context) {
2277
+ return __assign({}, (input.ContactId != null && { ContactId: input.ContactId }));
1650
2278
  };
1651
- const serializeAws_json1_1DescribeEngagementRequest = (input, context) => {
1652
- return {
1653
- ...(input.EngagementId != null && { EngagementId: input.EngagementId }),
1654
- };
2279
+ var serializeAws_json1_1DescribeEngagementRequest = function (input, context) {
2280
+ return __assign({}, (input.EngagementId != null && { EngagementId: input.EngagementId }));
1655
2281
  };
1656
- const serializeAws_json1_1DescribePageRequest = (input, context) => {
1657
- return {
1658
- ...(input.PageId != null && { PageId: input.PageId }),
1659
- };
2282
+ var serializeAws_json1_1DescribePageRequest = function (input, context) {
2283
+ return __assign({}, (input.PageId != null && { PageId: input.PageId }));
1660
2284
  };
1661
- const serializeAws_json1_1GetContactChannelRequest = (input, context) => {
1662
- return {
1663
- ...(input.ContactChannelId != null && { ContactChannelId: input.ContactChannelId }),
1664
- };
2285
+ var serializeAws_json1_1GetContactChannelRequest = function (input, context) {
2286
+ return __assign({}, (input.ContactChannelId != null && { ContactChannelId: input.ContactChannelId }));
1665
2287
  };
1666
- const serializeAws_json1_1GetContactPolicyRequest = (input, context) => {
1667
- return {
1668
- ...(input.ContactArn != null && { ContactArn: input.ContactArn }),
1669
- };
2288
+ var serializeAws_json1_1GetContactPolicyRequest = function (input, context) {
2289
+ return __assign({}, (input.ContactArn != null && { ContactArn: input.ContactArn }));
1670
2290
  };
1671
- const serializeAws_json1_1GetContactRequest = (input, context) => {
1672
- return {
1673
- ...(input.ContactId != null && { ContactId: input.ContactId }),
1674
- };
2291
+ var serializeAws_json1_1GetContactRequest = function (input, context) {
2292
+ return __assign({}, (input.ContactId != null && { ContactId: input.ContactId }));
1675
2293
  };
1676
- const serializeAws_json1_1ListContactChannelsRequest = (input, context) => {
1677
- return {
1678
- ...(input.ContactId != null && { ContactId: input.ContactId }),
1679
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1680
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1681
- };
2294
+ var serializeAws_json1_1ListContactChannelsRequest = function (input, context) {
2295
+ return __assign(__assign(__assign({}, (input.ContactId != null && { ContactId: input.ContactId })), (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken }));
1682
2296
  };
1683
- const serializeAws_json1_1ListContactsRequest = (input, context) => {
1684
- return {
1685
- ...(input.AliasPrefix != null && { AliasPrefix: input.AliasPrefix }),
1686
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1687
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1688
- ...(input.Type != null && { Type: input.Type }),
1689
- };
2297
+ var serializeAws_json1_1ListContactsRequest = function (input, context) {
2298
+ return __assign(__assign(__assign(__assign({}, (input.AliasPrefix != null && { AliasPrefix: input.AliasPrefix })), (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken })), (input.Type != null && { Type: input.Type }));
1690
2299
  };
1691
- const serializeAws_json1_1ListEngagementsRequest = (input, context) => {
1692
- return {
1693
- ...(input.IncidentId != null && { IncidentId: input.IncidentId }),
1694
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1695
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1696
- ...(input.TimeRangeValue != null && {
1697
- TimeRangeValue: serializeAws_json1_1TimeRange(input.TimeRangeValue, context),
1698
- }),
1699
- };
2300
+ var serializeAws_json1_1ListEngagementsRequest = function (input, context) {
2301
+ return __assign(__assign(__assign(__assign({}, (input.IncidentId != null && { IncidentId: input.IncidentId })), (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken })), (input.TimeRangeValue != null && {
2302
+ TimeRangeValue: serializeAws_json1_1TimeRange(input.TimeRangeValue, context),
2303
+ }));
1700
2304
  };
1701
- const serializeAws_json1_1ListPageReceiptsRequest = (input, context) => {
1702
- return {
1703
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1704
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1705
- ...(input.PageId != null && { PageId: input.PageId }),
1706
- };
2305
+ var serializeAws_json1_1ListPageReceiptsRequest = function (input, context) {
2306
+ return __assign(__assign(__assign({}, (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken })), (input.PageId != null && { PageId: input.PageId }));
1707
2307
  };
1708
- const serializeAws_json1_1ListPagesByContactRequest = (input, context) => {
1709
- return {
1710
- ...(input.ContactId != null && { ContactId: input.ContactId }),
1711
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1712
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1713
- };
2308
+ var serializeAws_json1_1ListPagesByContactRequest = function (input, context) {
2309
+ return __assign(__assign(__assign({}, (input.ContactId != null && { ContactId: input.ContactId })), (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken }));
1714
2310
  };
1715
- const serializeAws_json1_1ListPagesByEngagementRequest = (input, context) => {
1716
- return {
1717
- ...(input.EngagementId != null && { EngagementId: input.EngagementId }),
1718
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1719
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1720
- };
2311
+ var serializeAws_json1_1ListPagesByEngagementRequest = function (input, context) {
2312
+ return __assign(__assign(__assign({}, (input.EngagementId != null && { EngagementId: input.EngagementId })), (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken }));
1721
2313
  };
1722
- const serializeAws_json1_1ListTagsForResourceRequest = (input, context) => {
1723
- return {
1724
- ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
1725
- };
2314
+ var serializeAws_json1_1ListTagsForResourceRequest = function (input, context) {
2315
+ return __assign({}, (input.ResourceARN != null && { ResourceARN: input.ResourceARN }));
1726
2316
  };
1727
- const serializeAws_json1_1Plan = (input, context) => {
1728
- return {
1729
- ...(input.Stages != null && { Stages: serializeAws_json1_1StagesList(input.Stages, context) }),
1730
- };
2317
+ var serializeAws_json1_1Plan = function (input, context) {
2318
+ return __assign({}, (input.Stages != null && { Stages: serializeAws_json1_1StagesList(input.Stages, context) }));
1731
2319
  };
1732
- const serializeAws_json1_1PutContactPolicyRequest = (input, context) => {
1733
- return {
1734
- ...(input.ContactArn != null && { ContactArn: input.ContactArn }),
1735
- ...(input.Policy != null && { Policy: input.Policy }),
1736
- };
2320
+ var serializeAws_json1_1PutContactPolicyRequest = function (input, context) {
2321
+ return __assign(__assign({}, (input.ContactArn != null && { ContactArn: input.ContactArn })), (input.Policy != null && { Policy: input.Policy }));
1737
2322
  };
1738
- const serializeAws_json1_1SendActivationCodeRequest = (input, context) => {
1739
- return {
1740
- ...(input.ContactChannelId != null && { ContactChannelId: input.ContactChannelId }),
1741
- };
2323
+ var serializeAws_json1_1SendActivationCodeRequest = function (input, context) {
2324
+ return __assign({}, (input.ContactChannelId != null && { ContactChannelId: input.ContactChannelId }));
1742
2325
  };
1743
- const serializeAws_json1_1Stage = (input, context) => {
1744
- return {
1745
- ...(input.DurationInMinutes != null && { DurationInMinutes: input.DurationInMinutes }),
1746
- ...(input.Targets != null && { Targets: serializeAws_json1_1TargetsList(input.Targets, context) }),
1747
- };
2326
+ var serializeAws_json1_1Stage = function (input, context) {
2327
+ return __assign(__assign({}, (input.DurationInMinutes != null && { DurationInMinutes: input.DurationInMinutes })), (input.Targets != null && { Targets: serializeAws_json1_1TargetsList(input.Targets, context) }));
1748
2328
  };
1749
- const serializeAws_json1_1StagesList = (input, context) => {
2329
+ var serializeAws_json1_1StagesList = function (input, context) {
1750
2330
  return input
1751
- .filter((e) => e != null)
1752
- .map((entry) => {
2331
+ .filter(function (e) { return e != null; })
2332
+ .map(function (entry) {
1753
2333
  return serializeAws_json1_1Stage(entry, context);
1754
2334
  });
1755
2335
  };
1756
- const serializeAws_json1_1StartEngagementRequest = (input, context) => {
1757
- return {
1758
- ...(input.ContactId != null && { ContactId: input.ContactId }),
1759
- ...(input.Content != null && { Content: input.Content }),
1760
- IdempotencyToken: input.IdempotencyToken ?? generateIdempotencyToken(),
1761
- ...(input.IncidentId != null && { IncidentId: input.IncidentId }),
1762
- ...(input.PublicContent != null && { PublicContent: input.PublicContent }),
1763
- ...(input.PublicSubject != null && { PublicSubject: input.PublicSubject }),
1764
- ...(input.Sender != null && { Sender: input.Sender }),
1765
- ...(input.Subject != null && { Subject: input.Subject }),
1766
- };
2336
+ var serializeAws_json1_1StartEngagementRequest = function (input, context) {
2337
+ var _a;
2338
+ return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.ContactId != null && { ContactId: input.ContactId })), (input.Content != null && { Content: input.Content })), { IdempotencyToken: (_a = input.IdempotencyToken) !== null && _a !== void 0 ? _a : generateIdempotencyToken() }), (input.IncidentId != null && { IncidentId: input.IncidentId })), (input.PublicContent != null && { PublicContent: input.PublicContent })), (input.PublicSubject != null && { PublicSubject: input.PublicSubject })), (input.Sender != null && { Sender: input.Sender })), (input.Subject != null && { Subject: input.Subject }));
1767
2339
  };
1768
- const serializeAws_json1_1StopEngagementRequest = (input, context) => {
1769
- return {
1770
- ...(input.EngagementId != null && { EngagementId: input.EngagementId }),
1771
- ...(input.Reason != null && { Reason: input.Reason }),
1772
- };
2340
+ var serializeAws_json1_1StopEngagementRequest = function (input, context) {
2341
+ return __assign(__assign({}, (input.EngagementId != null && { EngagementId: input.EngagementId })), (input.Reason != null && { Reason: input.Reason }));
1773
2342
  };
1774
- const serializeAws_json1_1Tag = (input, context) => {
1775
- return {
1776
- ...(input.Key != null && { Key: input.Key }),
1777
- ...(input.Value != null && { Value: input.Value }),
1778
- };
2343
+ var serializeAws_json1_1Tag = function (input, context) {
2344
+ return __assign(__assign({}, (input.Key != null && { Key: input.Key })), (input.Value != null && { Value: input.Value }));
1779
2345
  };
1780
- const serializeAws_json1_1TagKeyList = (input, context) => {
2346
+ var serializeAws_json1_1TagKeyList = function (input, context) {
1781
2347
  return input
1782
- .filter((e) => e != null)
1783
- .map((entry) => {
2348
+ .filter(function (e) { return e != null; })
2349
+ .map(function (entry) {
1784
2350
  return entry;
1785
2351
  });
1786
2352
  };
1787
- const serializeAws_json1_1TagResourceRequest = (input, context) => {
1788
- return {
1789
- ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
1790
- ...(input.Tags != null && { Tags: serializeAws_json1_1TagsList(input.Tags, context) }),
1791
- };
2353
+ var serializeAws_json1_1TagResourceRequest = function (input, context) {
2354
+ return __assign(__assign({}, (input.ResourceARN != null && { ResourceARN: input.ResourceARN })), (input.Tags != null && { Tags: serializeAws_json1_1TagsList(input.Tags, context) }));
1792
2355
  };
1793
- const serializeAws_json1_1TagsList = (input, context) => {
2356
+ var serializeAws_json1_1TagsList = function (input, context) {
1794
2357
  return input
1795
- .filter((e) => e != null)
1796
- .map((entry) => {
2358
+ .filter(function (e) { return e != null; })
2359
+ .map(function (entry) {
1797
2360
  return serializeAws_json1_1Tag(entry, context);
1798
2361
  });
1799
2362
  };
1800
- const serializeAws_json1_1Target = (input, context) => {
1801
- return {
1802
- ...(input.ChannelTargetInfo != null && {
1803
- ChannelTargetInfo: serializeAws_json1_1ChannelTargetInfo(input.ChannelTargetInfo, context),
1804
- }),
1805
- ...(input.ContactTargetInfo != null && {
1806
- ContactTargetInfo: serializeAws_json1_1ContactTargetInfo(input.ContactTargetInfo, context),
1807
- }),
1808
- };
2363
+ var serializeAws_json1_1Target = function (input, context) {
2364
+ return __assign(__assign({}, (input.ChannelTargetInfo != null && {
2365
+ ChannelTargetInfo: serializeAws_json1_1ChannelTargetInfo(input.ChannelTargetInfo, context),
2366
+ })), (input.ContactTargetInfo != null && {
2367
+ ContactTargetInfo: serializeAws_json1_1ContactTargetInfo(input.ContactTargetInfo, context),
2368
+ }));
1809
2369
  };
1810
- const serializeAws_json1_1TargetsList = (input, context) => {
2370
+ var serializeAws_json1_1TargetsList = function (input, context) {
1811
2371
  return input
1812
- .filter((e) => e != null)
1813
- .map((entry) => {
2372
+ .filter(function (e) { return e != null; })
2373
+ .map(function (entry) {
1814
2374
  return serializeAws_json1_1Target(entry, context);
1815
2375
  });
1816
2376
  };
1817
- const serializeAws_json1_1TimeRange = (input, context) => {
1818
- return {
1819
- ...(input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) }),
1820
- ...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }),
1821
- };
2377
+ var serializeAws_json1_1TimeRange = function (input, context) {
2378
+ return __assign(__assign({}, (input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) })), (input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }));
1822
2379
  };
1823
- const serializeAws_json1_1UntagResourceRequest = (input, context) => {
1824
- return {
1825
- ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
1826
- ...(input.TagKeys != null && { TagKeys: serializeAws_json1_1TagKeyList(input.TagKeys, context) }),
1827
- };
2380
+ var serializeAws_json1_1UntagResourceRequest = function (input, context) {
2381
+ return __assign(__assign({}, (input.ResourceARN != null && { ResourceARN: input.ResourceARN })), (input.TagKeys != null && { TagKeys: serializeAws_json1_1TagKeyList(input.TagKeys, context) }));
1828
2382
  };
1829
- const serializeAws_json1_1UpdateContactChannelRequest = (input, context) => {
1830
- return {
1831
- ...(input.ContactChannelId != null && { ContactChannelId: input.ContactChannelId }),
1832
- ...(input.DeliveryAddress != null && {
1833
- DeliveryAddress: serializeAws_json1_1ContactChannelAddress(input.DeliveryAddress, context),
1834
- }),
1835
- ...(input.Name != null && { Name: input.Name }),
1836
- };
2383
+ var serializeAws_json1_1UpdateContactChannelRequest = function (input, context) {
2384
+ return __assign(__assign(__assign({}, (input.ContactChannelId != null && { ContactChannelId: input.ContactChannelId })), (input.DeliveryAddress != null && {
2385
+ DeliveryAddress: serializeAws_json1_1ContactChannelAddress(input.DeliveryAddress, context),
2386
+ })), (input.Name != null && { Name: input.Name }));
1837
2387
  };
1838
- const serializeAws_json1_1UpdateContactRequest = (input, context) => {
1839
- return {
1840
- ...(input.ContactId != null && { ContactId: input.ContactId }),
1841
- ...(input.DisplayName != null && { DisplayName: input.DisplayName }),
1842
- ...(input.Plan != null && { Plan: serializeAws_json1_1Plan(input.Plan, context) }),
1843
- };
2388
+ var serializeAws_json1_1UpdateContactRequest = function (input, context) {
2389
+ return __assign(__assign(__assign({}, (input.ContactId != null && { ContactId: input.ContactId })), (input.DisplayName != null && { DisplayName: input.DisplayName })), (input.Plan != null && { Plan: serializeAws_json1_1Plan(input.Plan, context) }));
1844
2390
  };
1845
- const deserializeAws_json1_1AcceptPageResult = (output, context) => {
2391
+ var deserializeAws_json1_1AcceptPageResult = function (output, context) {
1846
2392
  return {};
1847
2393
  };
1848
- const deserializeAws_json1_1AccessDeniedException = (output, context) => {
2394
+ var deserializeAws_json1_1AccessDeniedException = function (output, context) {
1849
2395
  return {
1850
2396
  Message: __expectString(output.Message),
1851
2397
  };
1852
2398
  };
1853
- const deserializeAws_json1_1ActivateContactChannelResult = (output, context) => {
2399
+ var deserializeAws_json1_1ActivateContactChannelResult = function (output, context) {
1854
2400
  return {};
1855
2401
  };
1856
- const deserializeAws_json1_1ChannelTargetInfo = (output, context) => {
2402
+ var deserializeAws_json1_1ChannelTargetInfo = function (output, context) {
1857
2403
  return {
1858
2404
  ContactChannelId: __expectString(output.ContactChannelId),
1859
2405
  RetryIntervalInMinutes: __expectInt32(output.RetryIntervalInMinutes),
1860
2406
  };
1861
2407
  };
1862
- const deserializeAws_json1_1ConflictException = (output, context) => {
2408
+ var deserializeAws_json1_1ConflictException = function (output, context) {
1863
2409
  return {
1864
2410
  Message: __expectString(output.Message),
1865
2411
  ResourceId: __expectString(output.ResourceId),
1866
2412
  ResourceType: __expectString(output.ResourceType),
1867
2413
  };
1868
2414
  };
1869
- const deserializeAws_json1_1Contact = (output, context) => {
2415
+ var deserializeAws_json1_1Contact = function (output, context) {
1870
2416
  return {
1871
2417
  Alias: __expectString(output.Alias),
1872
2418
  ContactArn: __expectString(output.ContactArn),
@@ -1874,7 +2420,7 @@ const deserializeAws_json1_1Contact = (output, context) => {
1874
2420
  Type: __expectString(output.Type),
1875
2421
  };
1876
2422
  };
1877
- const deserializeAws_json1_1ContactChannel = (output, context) => {
2423
+ var deserializeAws_json1_1ContactChannel = function (output, context) {
1878
2424
  return {
1879
2425
  ActivationStatus: __expectString(output.ActivationStatus),
1880
2426
  ContactArn: __expectString(output.ContactArn),
@@ -1886,15 +2432,15 @@ const deserializeAws_json1_1ContactChannel = (output, context) => {
1886
2432
  Type: __expectString(output.Type),
1887
2433
  };
1888
2434
  };
1889
- const deserializeAws_json1_1ContactChannelAddress = (output, context) => {
2435
+ var deserializeAws_json1_1ContactChannelAddress = function (output, context) {
1890
2436
  return {
1891
2437
  SimpleAddress: __expectString(output.SimpleAddress),
1892
2438
  };
1893
2439
  };
1894
- const deserializeAws_json1_1ContactChannelList = (output, context) => {
1895
- const retVal = (output || [])
1896
- .filter((e) => e != null)
1897
- .map((entry) => {
2440
+ var deserializeAws_json1_1ContactChannelList = function (output, context) {
2441
+ var retVal = (output || [])
2442
+ .filter(function (e) { return e != null; })
2443
+ .map(function (entry) {
1898
2444
  if (entry === null) {
1899
2445
  return null;
1900
2446
  }
@@ -1902,10 +2448,10 @@ const deserializeAws_json1_1ContactChannelList = (output, context) => {
1902
2448
  });
1903
2449
  return retVal;
1904
2450
  };
1905
- const deserializeAws_json1_1ContactsList = (output, context) => {
1906
- const retVal = (output || [])
1907
- .filter((e) => e != null)
1908
- .map((entry) => {
2451
+ var deserializeAws_json1_1ContactsList = function (output, context) {
2452
+ var retVal = (output || [])
2453
+ .filter(function (e) { return e != null; })
2454
+ .map(function (entry) {
1909
2455
  if (entry === null) {
1910
2456
  return null;
1911
2457
  }
@@ -1913,37 +2459,37 @@ const deserializeAws_json1_1ContactsList = (output, context) => {
1913
2459
  });
1914
2460
  return retVal;
1915
2461
  };
1916
- const deserializeAws_json1_1ContactTargetInfo = (output, context) => {
2462
+ var deserializeAws_json1_1ContactTargetInfo = function (output, context) {
1917
2463
  return {
1918
2464
  ContactId: __expectString(output.ContactId),
1919
2465
  IsEssential: __expectBoolean(output.IsEssential),
1920
2466
  };
1921
2467
  };
1922
- const deserializeAws_json1_1CreateContactChannelResult = (output, context) => {
2468
+ var deserializeAws_json1_1CreateContactChannelResult = function (output, context) {
1923
2469
  return {
1924
2470
  ContactChannelArn: __expectString(output.ContactChannelArn),
1925
2471
  };
1926
2472
  };
1927
- const deserializeAws_json1_1CreateContactResult = (output, context) => {
2473
+ var deserializeAws_json1_1CreateContactResult = function (output, context) {
1928
2474
  return {
1929
2475
  ContactArn: __expectString(output.ContactArn),
1930
2476
  };
1931
2477
  };
1932
- const deserializeAws_json1_1DataEncryptionException = (output, context) => {
2478
+ var deserializeAws_json1_1DataEncryptionException = function (output, context) {
1933
2479
  return {
1934
2480
  Message: __expectString(output.Message),
1935
2481
  };
1936
2482
  };
1937
- const deserializeAws_json1_1DeactivateContactChannelResult = (output, context) => {
2483
+ var deserializeAws_json1_1DeactivateContactChannelResult = function (output, context) {
1938
2484
  return {};
1939
2485
  };
1940
- const deserializeAws_json1_1DeleteContactChannelResult = (output, context) => {
2486
+ var deserializeAws_json1_1DeleteContactChannelResult = function (output, context) {
1941
2487
  return {};
1942
2488
  };
1943
- const deserializeAws_json1_1DeleteContactResult = (output, context) => {
2489
+ var deserializeAws_json1_1DeleteContactResult = function (output, context) {
1944
2490
  return {};
1945
2491
  };
1946
- const deserializeAws_json1_1DescribeEngagementResult = (output, context) => {
2492
+ var deserializeAws_json1_1DescribeEngagementResult = function (output, context) {
1947
2493
  return {
1948
2494
  ContactArn: __expectString(output.ContactArn),
1949
2495
  Content: __expectString(output.Content),
@@ -1957,7 +2503,7 @@ const deserializeAws_json1_1DescribeEngagementResult = (output, context) => {
1957
2503
  Subject: __expectString(output.Subject),
1958
2504
  };
1959
2505
  };
1960
- const deserializeAws_json1_1DescribePageResult = (output, context) => {
2506
+ var deserializeAws_json1_1DescribePageResult = function (output, context) {
1961
2507
  return {
1962
2508
  ContactArn: __expectString(output.ContactArn),
1963
2509
  Content: __expectString(output.Content),
@@ -1975,7 +2521,7 @@ const deserializeAws_json1_1DescribePageResult = (output, context) => {
1975
2521
  Subject: __expectString(output.Subject),
1976
2522
  };
1977
2523
  };
1978
- const deserializeAws_json1_1Engagement = (output, context) => {
2524
+ var deserializeAws_json1_1Engagement = function (output, context) {
1979
2525
  return {
1980
2526
  ContactArn: __expectString(output.ContactArn),
1981
2527
  EngagementArn: __expectString(output.EngagementArn),
@@ -1985,10 +2531,10 @@ const deserializeAws_json1_1Engagement = (output, context) => {
1985
2531
  StopTime: output.StopTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StopTime))) : undefined,
1986
2532
  };
1987
2533
  };
1988
- const deserializeAws_json1_1EngagementsList = (output, context) => {
1989
- const retVal = (output || [])
1990
- .filter((e) => e != null)
1991
- .map((entry) => {
2534
+ var deserializeAws_json1_1EngagementsList = function (output, context) {
2535
+ var retVal = (output || [])
2536
+ .filter(function (e) { return e != null; })
2537
+ .map(function (entry) {
1992
2538
  if (entry === null) {
1993
2539
  return null;
1994
2540
  }
@@ -1996,7 +2542,7 @@ const deserializeAws_json1_1EngagementsList = (output, context) => {
1996
2542
  });
1997
2543
  return retVal;
1998
2544
  };
1999
- const deserializeAws_json1_1GetContactChannelResult = (output, context) => {
2545
+ var deserializeAws_json1_1GetContactChannelResult = function (output, context) {
2000
2546
  return {
2001
2547
  ActivationStatus: __expectString(output.ActivationStatus),
2002
2548
  ContactArn: __expectString(output.ContactArn),
@@ -2008,13 +2554,13 @@ const deserializeAws_json1_1GetContactChannelResult = (output, context) => {
2008
2554
  Type: __expectString(output.Type),
2009
2555
  };
2010
2556
  };
2011
- const deserializeAws_json1_1GetContactPolicyResult = (output, context) => {
2557
+ var deserializeAws_json1_1GetContactPolicyResult = function (output, context) {
2012
2558
  return {
2013
2559
  ContactArn: __expectString(output.ContactArn),
2014
2560
  Policy: __expectString(output.Policy),
2015
2561
  };
2016
2562
  };
2017
- const deserializeAws_json1_1GetContactResult = (output, context) => {
2563
+ var deserializeAws_json1_1GetContactResult = function (output, context) {
2018
2564
  return {
2019
2565
  Alias: __expectString(output.Alias),
2020
2566
  ContactArn: __expectString(output.ContactArn),
@@ -2023,13 +2569,13 @@ const deserializeAws_json1_1GetContactResult = (output, context) => {
2023
2569
  Type: __expectString(output.Type),
2024
2570
  };
2025
2571
  };
2026
- const deserializeAws_json1_1InternalServerException = (output, context) => {
2572
+ var deserializeAws_json1_1InternalServerException = function (output, context) {
2027
2573
  return {
2028
2574
  Message: __expectString(output.Message),
2029
2575
  RetryAfterSeconds: __expectInt32(output.RetryAfterSeconds),
2030
2576
  };
2031
2577
  };
2032
- const deserializeAws_json1_1ListContactChannelsResult = (output, context) => {
2578
+ var deserializeAws_json1_1ListContactChannelsResult = function (output, context) {
2033
2579
  return {
2034
2580
  ContactChannels: output.ContactChannels != null
2035
2581
  ? deserializeAws_json1_1ContactChannelList(output.ContactChannels, context)
@@ -2037,42 +2583,42 @@ const deserializeAws_json1_1ListContactChannelsResult = (output, context) => {
2037
2583
  NextToken: __expectString(output.NextToken),
2038
2584
  };
2039
2585
  };
2040
- const deserializeAws_json1_1ListContactsResult = (output, context) => {
2586
+ var deserializeAws_json1_1ListContactsResult = function (output, context) {
2041
2587
  return {
2042
2588
  Contacts: output.Contacts != null ? deserializeAws_json1_1ContactsList(output.Contacts, context) : undefined,
2043
2589
  NextToken: __expectString(output.NextToken),
2044
2590
  };
2045
2591
  };
2046
- const deserializeAws_json1_1ListEngagementsResult = (output, context) => {
2592
+ var deserializeAws_json1_1ListEngagementsResult = function (output, context) {
2047
2593
  return {
2048
2594
  Engagements: output.Engagements != null ? deserializeAws_json1_1EngagementsList(output.Engagements, context) : undefined,
2049
2595
  NextToken: __expectString(output.NextToken),
2050
2596
  };
2051
2597
  };
2052
- const deserializeAws_json1_1ListPageReceiptsResult = (output, context) => {
2598
+ var deserializeAws_json1_1ListPageReceiptsResult = function (output, context) {
2053
2599
  return {
2054
2600
  NextToken: __expectString(output.NextToken),
2055
2601
  Receipts: output.Receipts != null ? deserializeAws_json1_1ReceiptsList(output.Receipts, context) : undefined,
2056
2602
  };
2057
2603
  };
2058
- const deserializeAws_json1_1ListPagesByContactResult = (output, context) => {
2604
+ var deserializeAws_json1_1ListPagesByContactResult = function (output, context) {
2059
2605
  return {
2060
2606
  NextToken: __expectString(output.NextToken),
2061
2607
  Pages: output.Pages != null ? deserializeAws_json1_1PagesList(output.Pages, context) : undefined,
2062
2608
  };
2063
2609
  };
2064
- const deserializeAws_json1_1ListPagesByEngagementResult = (output, context) => {
2610
+ var deserializeAws_json1_1ListPagesByEngagementResult = function (output, context) {
2065
2611
  return {
2066
2612
  NextToken: __expectString(output.NextToken),
2067
2613
  Pages: output.Pages != null ? deserializeAws_json1_1PagesList(output.Pages, context) : undefined,
2068
2614
  };
2069
2615
  };
2070
- const deserializeAws_json1_1ListTagsForResourceResult = (output, context) => {
2616
+ var deserializeAws_json1_1ListTagsForResourceResult = function (output, context) {
2071
2617
  return {
2072
2618
  Tags: output.Tags != null ? deserializeAws_json1_1TagsList(output.Tags, context) : undefined,
2073
2619
  };
2074
2620
  };
2075
- const deserializeAws_json1_1Page = (output, context) => {
2621
+ var deserializeAws_json1_1Page = function (output, context) {
2076
2622
  return {
2077
2623
  ContactArn: __expectString(output.ContactArn),
2078
2624
  DeliveryTime: output.DeliveryTime != null
@@ -2086,10 +2632,10 @@ const deserializeAws_json1_1Page = (output, context) => {
2086
2632
  SentTime: output.SentTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SentTime))) : undefined,
2087
2633
  };
2088
2634
  };
2089
- const deserializeAws_json1_1PagesList = (output, context) => {
2090
- const retVal = (output || [])
2091
- .filter((e) => e != null)
2092
- .map((entry) => {
2635
+ var deserializeAws_json1_1PagesList = function (output, context) {
2636
+ var retVal = (output || [])
2637
+ .filter(function (e) { return e != null; })
2638
+ .map(function (entry) {
2093
2639
  if (entry === null) {
2094
2640
  return null;
2095
2641
  }
@@ -2097,15 +2643,15 @@ const deserializeAws_json1_1PagesList = (output, context) => {
2097
2643
  });
2098
2644
  return retVal;
2099
2645
  };
2100
- const deserializeAws_json1_1Plan = (output, context) => {
2646
+ var deserializeAws_json1_1Plan = function (output, context) {
2101
2647
  return {
2102
2648
  Stages: output.Stages != null ? deserializeAws_json1_1StagesList(output.Stages, context) : undefined,
2103
2649
  };
2104
2650
  };
2105
- const deserializeAws_json1_1PutContactPolicyResult = (output, context) => {
2651
+ var deserializeAws_json1_1PutContactPolicyResult = function (output, context) {
2106
2652
  return {};
2107
2653
  };
2108
- const deserializeAws_json1_1Receipt = (output, context) => {
2654
+ var deserializeAws_json1_1Receipt = function (output, context) {
2109
2655
  return {
2110
2656
  ContactChannelArn: __expectString(output.ContactChannelArn),
2111
2657
  ReceiptInfo: __expectString(output.ReceiptInfo),
@@ -2115,10 +2661,10 @@ const deserializeAws_json1_1Receipt = (output, context) => {
2115
2661
  ReceiptType: __expectString(output.ReceiptType),
2116
2662
  };
2117
2663
  };
2118
- const deserializeAws_json1_1ReceiptsList = (output, context) => {
2119
- const retVal = (output || [])
2120
- .filter((e) => e != null)
2121
- .map((entry) => {
2664
+ var deserializeAws_json1_1ReceiptsList = function (output, context) {
2665
+ var retVal = (output || [])
2666
+ .filter(function (e) { return e != null; })
2667
+ .map(function (entry) {
2122
2668
  if (entry === null) {
2123
2669
  return null;
2124
2670
  }
@@ -2126,17 +2672,17 @@ const deserializeAws_json1_1ReceiptsList = (output, context) => {
2126
2672
  });
2127
2673
  return retVal;
2128
2674
  };
2129
- const deserializeAws_json1_1ResourceNotFoundException = (output, context) => {
2675
+ var deserializeAws_json1_1ResourceNotFoundException = function (output, context) {
2130
2676
  return {
2131
2677
  Message: __expectString(output.Message),
2132
2678
  ResourceId: __expectString(output.ResourceId),
2133
2679
  ResourceType: __expectString(output.ResourceType),
2134
2680
  };
2135
2681
  };
2136
- const deserializeAws_json1_1SendActivationCodeResult = (output, context) => {
2682
+ var deserializeAws_json1_1SendActivationCodeResult = function (output, context) {
2137
2683
  return {};
2138
2684
  };
2139
- const deserializeAws_json1_1ServiceQuotaExceededException = (output, context) => {
2685
+ var deserializeAws_json1_1ServiceQuotaExceededException = function (output, context) {
2140
2686
  return {
2141
2687
  Message: __expectString(output.Message),
2142
2688
  QuotaCode: __expectString(output.QuotaCode),
@@ -2145,16 +2691,16 @@ const deserializeAws_json1_1ServiceQuotaExceededException = (output, context) =>
2145
2691
  ServiceCode: __expectString(output.ServiceCode),
2146
2692
  };
2147
2693
  };
2148
- const deserializeAws_json1_1Stage = (output, context) => {
2694
+ var deserializeAws_json1_1Stage = function (output, context) {
2149
2695
  return {
2150
2696
  DurationInMinutes: __expectInt32(output.DurationInMinutes),
2151
2697
  Targets: output.Targets != null ? deserializeAws_json1_1TargetsList(output.Targets, context) : undefined,
2152
2698
  };
2153
2699
  };
2154
- const deserializeAws_json1_1StagesList = (output, context) => {
2155
- const retVal = (output || [])
2156
- .filter((e) => e != null)
2157
- .map((entry) => {
2700
+ var deserializeAws_json1_1StagesList = function (output, context) {
2701
+ var retVal = (output || [])
2702
+ .filter(function (e) { return e != null; })
2703
+ .map(function (entry) {
2158
2704
  if (entry === null) {
2159
2705
  return null;
2160
2706
  }
@@ -2162,27 +2708,27 @@ const deserializeAws_json1_1StagesList = (output, context) => {
2162
2708
  });
2163
2709
  return retVal;
2164
2710
  };
2165
- const deserializeAws_json1_1StartEngagementResult = (output, context) => {
2711
+ var deserializeAws_json1_1StartEngagementResult = function (output, context) {
2166
2712
  return {
2167
2713
  EngagementArn: __expectString(output.EngagementArn),
2168
2714
  };
2169
2715
  };
2170
- const deserializeAws_json1_1StopEngagementResult = (output, context) => {
2716
+ var deserializeAws_json1_1StopEngagementResult = function (output, context) {
2171
2717
  return {};
2172
2718
  };
2173
- const deserializeAws_json1_1Tag = (output, context) => {
2719
+ var deserializeAws_json1_1Tag = function (output, context) {
2174
2720
  return {
2175
2721
  Key: __expectString(output.Key),
2176
2722
  Value: __expectString(output.Value),
2177
2723
  };
2178
2724
  };
2179
- const deserializeAws_json1_1TagResourceResult = (output, context) => {
2725
+ var deserializeAws_json1_1TagResourceResult = function (output, context) {
2180
2726
  return {};
2181
2727
  };
2182
- const deserializeAws_json1_1TagsList = (output, context) => {
2183
- const retVal = (output || [])
2184
- .filter((e) => e != null)
2185
- .map((entry) => {
2728
+ var deserializeAws_json1_1TagsList = function (output, context) {
2729
+ var retVal = (output || [])
2730
+ .filter(function (e) { return e != null; })
2731
+ .map(function (entry) {
2186
2732
  if (entry === null) {
2187
2733
  return null;
2188
2734
  }
@@ -2190,7 +2736,7 @@ const deserializeAws_json1_1TagsList = (output, context) => {
2190
2736
  });
2191
2737
  return retVal;
2192
2738
  };
2193
- const deserializeAws_json1_1Target = (output, context) => {
2739
+ var deserializeAws_json1_1Target = function (output, context) {
2194
2740
  return {
2195
2741
  ChannelTargetInfo: output.ChannelTargetInfo != null
2196
2742
  ? deserializeAws_json1_1ChannelTargetInfo(output.ChannelTargetInfo, context)
@@ -2200,10 +2746,10 @@ const deserializeAws_json1_1Target = (output, context) => {
2200
2746
  : undefined,
2201
2747
  };
2202
2748
  };
2203
- const deserializeAws_json1_1TargetsList = (output, context) => {
2204
- const retVal = (output || [])
2205
- .filter((e) => e != null)
2206
- .map((entry) => {
2749
+ var deserializeAws_json1_1TargetsList = function (output, context) {
2750
+ var retVal = (output || [])
2751
+ .filter(function (e) { return e != null; })
2752
+ .map(function (entry) {
2207
2753
  if (entry === null) {
2208
2754
  return null;
2209
2755
  }
@@ -2211,7 +2757,7 @@ const deserializeAws_json1_1TargetsList = (output, context) => {
2211
2757
  });
2212
2758
  return retVal;
2213
2759
  };
2214
- const deserializeAws_json1_1ThrottlingException = (output, context) => {
2760
+ var deserializeAws_json1_1ThrottlingException = function (output, context) {
2215
2761
  return {
2216
2762
  Message: __expectString(output.Message),
2217
2763
  QuotaCode: __expectString(output.QuotaCode),
@@ -2219,32 +2765,32 @@ const deserializeAws_json1_1ThrottlingException = (output, context) => {
2219
2765
  ServiceCode: __expectString(output.ServiceCode),
2220
2766
  };
2221
2767
  };
2222
- const deserializeAws_json1_1UntagResourceResult = (output, context) => {
2768
+ var deserializeAws_json1_1UntagResourceResult = function (output, context) {
2223
2769
  return {};
2224
2770
  };
2225
- const deserializeAws_json1_1UpdateContactChannelResult = (output, context) => {
2771
+ var deserializeAws_json1_1UpdateContactChannelResult = function (output, context) {
2226
2772
  return {};
2227
2773
  };
2228
- const deserializeAws_json1_1UpdateContactResult = (output, context) => {
2774
+ var deserializeAws_json1_1UpdateContactResult = function (output, context) {
2229
2775
  return {};
2230
2776
  };
2231
- const deserializeAws_json1_1ValidationException = (output, context) => {
2777
+ var deserializeAws_json1_1ValidationException = function (output, context) {
2232
2778
  return {
2233
2779
  Fields: output.Fields != null ? deserializeAws_json1_1ValidationExceptionFieldList(output.Fields, context) : undefined,
2234
2780
  Message: __expectString(output.Message),
2235
2781
  Reason: __expectString(output.Reason),
2236
2782
  };
2237
2783
  };
2238
- const deserializeAws_json1_1ValidationExceptionField = (output, context) => {
2784
+ var deserializeAws_json1_1ValidationExceptionField = function (output, context) {
2239
2785
  return {
2240
2786
  Message: __expectString(output.Message),
2241
2787
  Name: __expectString(output.Name),
2242
2788
  };
2243
2789
  };
2244
- const deserializeAws_json1_1ValidationExceptionFieldList = (output, context) => {
2245
- const retVal = (output || [])
2246
- .filter((e) => e != null)
2247
- .map((entry) => {
2790
+ var deserializeAws_json1_1ValidationExceptionFieldList = function (output, context) {
2791
+ var retVal = (output || [])
2792
+ .filter(function (e) { return e != null; })
2793
+ .map(function (entry) {
2248
2794
  if (entry === null) {
2249
2795
  return null;
2250
2796
  }
@@ -2252,52 +2798,75 @@ const deserializeAws_json1_1ValidationExceptionFieldList = (output, context) =>
2252
2798
  });
2253
2799
  return retVal;
2254
2800
  };
2255
- const deserializeMetadata = (output) => ({
2256
- httpStatusCode: output.statusCode,
2257
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
2258
- extendedRequestId: output.headers["x-amz-id-2"],
2259
- cfId: output.headers["x-amz-cf-id"],
2260
- });
2261
- const collectBody = (streamBody = new Uint8Array(), context) => {
2801
+ var deserializeMetadata = function (output) {
2802
+ var _a, _b;
2803
+ return ({
2804
+ httpStatusCode: output.statusCode,
2805
+ 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"],
2806
+ extendedRequestId: output.headers["x-amz-id-2"],
2807
+ cfId: output.headers["x-amz-cf-id"],
2808
+ });
2809
+ };
2810
+ var collectBody = function (streamBody, context) {
2811
+ if (streamBody === void 0) { streamBody = new Uint8Array(); }
2262
2812
  if (streamBody instanceof Uint8Array) {
2263
2813
  return Promise.resolve(streamBody);
2264
2814
  }
2265
2815
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
2266
2816
  };
2267
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
2268
- const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
2269
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2270
- const contents = {
2271
- protocol,
2272
- hostname,
2273
- port,
2274
- method: "POST",
2275
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
2276
- headers,
2277
- };
2278
- if (resolvedHostname !== undefined) {
2279
- contents.hostname = resolvedHostname;
2280
- }
2281
- if (body !== undefined) {
2282
- contents.body = body;
2283
- }
2284
- return new __HttpRequest(contents);
2817
+ var collectBodyString = function (streamBody, context) {
2818
+ return collectBody(streamBody, context).then(function (body) { return context.utf8Encoder(body); });
2819
+ };
2820
+ var buildHttpRpcRequest = function (context, headers, path, resolvedHostname, body) { return __awaiter(void 0, void 0, void 0, function () {
2821
+ var _a, hostname, _b, protocol, port, basePath, contents;
2822
+ return __generator(this, function (_c) {
2823
+ switch (_c.label) {
2824
+ case 0: return [4, context.endpoint()];
2825
+ case 1:
2826
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
2827
+ contents = {
2828
+ protocol: protocol,
2829
+ hostname: hostname,
2830
+ port: port,
2831
+ method: "POST",
2832
+ path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
2833
+ headers: headers,
2834
+ };
2835
+ if (resolvedHostname !== undefined) {
2836
+ contents.hostname = resolvedHostname;
2837
+ }
2838
+ if (body !== undefined) {
2839
+ contents.body = body;
2840
+ }
2841
+ return [2, new __HttpRequest(contents)];
2842
+ }
2843
+ });
2844
+ }); };
2845
+ var parseBody = function (streamBody, context) {
2846
+ return collectBodyString(streamBody, context).then(function (encoded) {
2847
+ if (encoded.length) {
2848
+ return JSON.parse(encoded);
2849
+ }
2850
+ return {};
2851
+ });
2285
2852
  };
2286
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2287
- if (encoded.length) {
2288
- return JSON.parse(encoded);
2289
- }
2290
- return {};
2291
- });
2292
- const parseErrorBody = async (errorBody, context) => {
2293
- const value = await parseBody(errorBody, context);
2294
- value.message = value.message ?? value.Message;
2295
- return value;
2296
- };
2297
- const loadRestJsonErrorCode = (output, data) => {
2298
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
2299
- const sanitizeErrorCode = (rawValue) => {
2300
- let cleanValue = rawValue;
2853
+ var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
2854
+ var value;
2855
+ var _a;
2856
+ return __generator(this, function (_b) {
2857
+ switch (_b.label) {
2858
+ case 0: return [4, parseBody(errorBody, context)];
2859
+ case 1:
2860
+ value = _b.sent();
2861
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
2862
+ return [2, value];
2863
+ }
2864
+ });
2865
+ }); };
2866
+ var loadRestJsonErrorCode = function (output, data) {
2867
+ var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
2868
+ var sanitizeErrorCode = function (rawValue) {
2869
+ var cleanValue = rawValue;
2301
2870
  if (typeof cleanValue === "number") {
2302
2871
  cleanValue = cleanValue.toString();
2303
2872
  }
@@ -2312,7 +2881,7 @@ const loadRestJsonErrorCode = (output, data) => {
2312
2881
  }
2313
2882
  return cleanValue;
2314
2883
  };
2315
- const headerKey = findKey(output.headers, "x-amzn-errortype");
2884
+ var headerKey = findKey(output.headers, "x-amzn-errortype");
2316
2885
  if (headerKey !== undefined) {
2317
2886
  return sanitizeErrorCode(output.headers[headerKey]);
2318
2887
  }